Skip to main content
Reference engineering 1 min read Updated

files-rest-apis

Nutanix Files Manual: Files REST APIs

Overview and Endpoints

Nutanix Files provides RESTful APIs for programmatic management, automated share provisioning, and telemetry retrieval.

Key API Endpoints (v4 API Architecture)

# List all file servers
GET /api/files/v4.0/config/file-servers

# Get file server details by ID
GET /api/files/v4.0/config/file-servers/{extId}

# Create a new SMB share / NFS export
POST /api/files/v4.0/config/file-servers/{extId}/shares

# Update share quotas or permissions
PATCH /api/files/v4.0/config/file-servers/{extId}/shares/{shareExtId}

OData Filtering and Query Parameters

Nutanix v4 Files APIs support OData query options:

  • $filter: Filter shares by name or protocol (e.g., name eq 'vdi-profiles').
  • $select: Return only specified fields (e.g., extId,name,capacityBytes).
  • $limit & $page: Control pagination.

Authentication and shared v4 patterns

Nutanix Files v4 endpoints are served by Prism Central on port 9440 and authenticate with a Service Account API key (x-ntnx-api-key) or HTTP Basic Auth. For shared v4 authentication, OData filtering, SDK compatibility, and ETag concurrency patterns, see nutanix-api-v4.

import os
import requests

url = "https://<prism-central-ip>:9440/api/files/v4.0/config/file-servers"
headers = {
    "x-ntnx-api-key": os.environ["NTNX_API_KEY"],
    "Content-Type": "application/json",
}

# Or authenticate with HTTP Basic Auth via auth=(username, password)
response = requests.get(url, headers=headers, verify=True)
response.raise_for_status()
print(response.json())