openapi: 3.1.0 info: title: Nutanix Prism Element API v2 description: >- API for managing individual Nutanix clusters through Prism Element, including storage containers, hosts, virtual machines, and cluster operations. The v2 API is cluster-local and available through Prism Element only. It exposes operations specific to local cluster entities such as storage containers, data-at-rest encryption, storage pools, and hosts. Authentication uses HTTP Basic Auth with cluster credentials. version: '2.0' contact: name: Nutanix Developer Support email: developer@nutanix.com url: https://www.nutanix.dev/ termsOfService: https://www.nutanix.com/legal/terms-of-use externalDocs: description: Nutanix Prism Element v2 API Documentation url: https://www.nutanix.dev/api_references/prism-element/ servers: - url: https://{clusterIp}:9440/PrismGateway/services/rest/v2.0 description: Prism Element Server variables: clusterIp: default: localhost description: IP address or FQDN of the Nutanix cluster or CVM. tags: - name: Alerts description: >- Retrieve and manage cluster alerts for monitoring health and operational events. - name: Clusters description: >- Manage cluster-level configuration, health status, and operational settings for the local Nutanix cluster. - name: Hosts description: >- Retrieve information about physical hosts (nodes) in the cluster including hardware, hypervisor, and CVM details. - name: Protection Domains description: >- Manage protection domains that define groups of VMs and volume groups for data protection and disaster recovery. - name: Snapshots description: >- Manage VM snapshots for point-in-time recovery of virtual machines. - name: Storage Containers description: >- Manage storage containers that provide logical storage partitions within the Nutanix distributed storage fabric. - name: Storage Pools description: >- Manage storage pools which represent groups of physical disks used for storing data across the cluster. - name: Virtual Disks description: >- Manage virtual disks including disk statistics and configuration within the cluster. - name: VMs description: >- Manage virtual machines running on the local cluster including power operations and configuration. security: - basicAuth: [] paths: /cluster: get: operationId: getCluster summary: Nutanix Get cluster information description: >- Retrieves detailed information about the local Nutanix cluster including configuration, health status, and resource utilization. tags: - Clusters responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Cluster' '401': description: Unauthorized /storage_containers: get: operationId: listStorageContainers summary: Nutanix List storage containers description: >- Retrieves a list of all storage containers in the cluster with their configuration and usage statistics. tags: - Storage Containers responses: '200': description: Success content: application/json: schema: type: object properties: entities: type: array items: $ref: '#/components/schemas/StorageContainer' metadata: $ref: '#/components/schemas/PaginationMetadata' '401': description: Unauthorized post: operationId: createStorageContainer summary: Nutanix Create a storage container description: >- Creates a new storage container with the specified configuration including name, storage pool, and data services settings. tags: - Storage Containers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StorageContainerInput' responses: '201': description: Created '400': description: Bad request '401': description: Unauthorized /storage_containers/{id}: get: operationId: getStorageContainer summary: Nutanix Get a storage container description: >- Retrieves details about a specific storage container by its ID. tags: - Storage Containers parameters: - $ref: '#/components/parameters/EntityId' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/StorageContainer' '401': description: Unauthorized '404': description: Storage container not found put: operationId: updateStorageContainer summary: Nutanix Update a storage container description: >- Updates the configuration of an existing storage container. tags: - Storage Containers parameters: - $ref: '#/components/parameters/EntityId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StorageContainerInput' responses: '200': description: Success '401': description: Unauthorized '404': description: Storage container not found delete: operationId: deleteStorageContainer summary: Nutanix Delete a storage container description: >- Deletes a storage container identified by its ID. tags: - Storage Containers parameters: - $ref: '#/components/parameters/EntityId' responses: '204': description: Deleted '401': description: Unauthorized '404': description: Storage container not found /storage_pools: get: operationId: listStoragePools summary: Nutanix List storage pools description: >- Retrieves a list of all storage pools in the cluster. tags: - Storage Pools responses: '200': description: Success '401': description: Unauthorized /storage_pools/{id}: get: operationId: getStoragePool summary: Nutanix Get a storage pool description: >- Retrieves details about a specific storage pool by its ID. tags: - Storage Pools parameters: - $ref: '#/components/parameters/EntityId' responses: '200': description: Success '401': description: Unauthorized '404': description: Storage pool not found /hosts: get: operationId: listHosts summary: Nutanix List hosts description: >- Retrieves a list of all physical hosts in the cluster with hardware details, hypervisor information, and CVM status. tags: - Hosts responses: '200': description: Success content: application/json: schema: type: object properties: entities: type: array items: $ref: '#/components/schemas/Host' metadata: $ref: '#/components/schemas/PaginationMetadata' '401': description: Unauthorized /hosts/{id}: get: operationId: getHost summary: Nutanix Get a host description: >- Retrieves detailed information about a specific host by its ID. tags: - Hosts parameters: - $ref: '#/components/parameters/EntityId' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Host' '401': description: Unauthorized '404': description: Host not found /vms: get: operationId: listVms summary: Nutanix List virtual machines description: >- Retrieves a list of all VMs on the local cluster with their configuration and current state. tags: - VMs parameters: - name: include_vm_disk_config in: query description: Include VM disk configuration details in the response. schema: type: boolean default: false - name: include_vm_nic_config in: query description: Include VM NIC configuration details in the response. schema: type: boolean default: false responses: '200': description: Success '401': description: Unauthorized /vms/{id}: get: operationId: getVm summary: Nutanix Get a virtual machine description: >- Retrieves detailed information about a specific VM by its ID. tags: - VMs parameters: - $ref: '#/components/parameters/EntityId' responses: '200': description: Success '401': description: Unauthorized '404': description: VM not found /vms/{id}/set_power_state: post: operationId: setVmPowerState summary: Nutanix Set VM power state description: >- Changes the power state of a VM to ON, OFF, POWERCYCLE, RESET, PAUSE, SUSPEND, or ACPI_SHUTDOWN. tags: - VMs parameters: - $ref: '#/components/parameters/EntityId' requestBody: required: true content: application/json: schema: type: object required: - transition properties: transition: type: string enum: - 'ON' - 'OFF' - POWERCYCLE - RESET - PAUSE - SUSPEND - ACPI_SHUTDOWN description: The power state transition to perform. responses: '200': description: Success '401': description: Unauthorized '404': description: VM not found /virtual_disks: get: operationId: listVirtualDisks summary: Nutanix List virtual disks description: >- Retrieves a list of all virtual disks in the cluster. tags: - Virtual Disks responses: '200': description: Success '401': description: Unauthorized /protection_domains: get: operationId: listProtectionDomains summary: Nutanix List protection domains description: >- Retrieves a list of all protection domains configured on the cluster for data protection. tags: - Protection Domains responses: '200': description: Success '401': description: Unauthorized post: operationId: createProtectionDomain summary: Nutanix Create a protection domain description: >- Creates a new protection domain for grouping entities for data protection and replication. tags: - Protection Domains requestBody: required: true content: application/json: schema: type: object required: - value properties: value: type: string description: The name of the protection domain. responses: '201': description: Created '400': description: Bad request '401': description: Unauthorized /snapshots: get: operationId: listSnapshots summary: Nutanix List snapshots description: >- Retrieves a list of all VM snapshots available in the cluster. tags: - Snapshots responses: '200': description: Success '401': description: Unauthorized /alerts: get: operationId: listAlerts summary: Nutanix List alerts description: >- Retrieves a list of alerts generated by the cluster for health monitoring and operational events. tags: - Alerts parameters: - name: resolved in: query description: Filter by resolved status. schema: type: boolean - name: severity in: query description: Filter by alert severity. schema: type: string enum: - CRITICAL - WARNING - INFO responses: '200': description: Success '401': description: Unauthorized /alerts/{id}: get: operationId: getAlert summary: Nutanix Get an alert description: >- Retrieves details about a specific alert by its ID. tags: - Alerts parameters: - $ref: '#/components/parameters/EntityId' responses: '200': description: Success '401': description: Unauthorized '404': description: Alert not found components: securitySchemes: basicAuth: type: http scheme: basic description: >- HTTP Basic Authentication using Prism Element username and password credentials. parameters: EntityId: name: id in: path required: true description: The ID of the entity. schema: type: string schemas: Cluster: type: object description: Nutanix cluster information. properties: id: type: string description: The unique identifier of the cluster. uuid: type: string description: The UUID of the cluster. name: type: string description: The name of the cluster. cluster_external_ipaddress: type: string description: External IP address of the cluster. num_nodes: type: integer description: Number of nodes in the cluster. version: type: string description: AOS version running on the cluster. hypervisor_types: type: array items: type: string description: Hypervisor types in the cluster. StorageContainer: type: object description: A storage container in the Nutanix cluster. properties: storage_container_uuid: type: string description: The UUID of the storage container. id: type: string description: The ID of the storage container. name: type: string description: The name of the storage container. max_capacity: type: integer description: Maximum capacity in bytes. usage_bytes: type: integer description: Current usage in bytes. replication_factor: type: integer description: Data replication factor. compression_enabled: type: boolean description: Whether inline compression is enabled. dedupe_enabled: type: boolean description: Whether deduplication is enabled. StorageContainerInput: type: object description: Input for creating or updating a storage container. required: - name properties: name: type: string description: The name of the storage container. storage_pool_uuid: type: string description: UUID of the storage pool to use. replication_factor: type: integer description: Data replication factor. minimum: 2 maximum: 3 compression_enabled: type: boolean description: Whether to enable inline compression. dedupe_enabled: type: boolean description: Whether to enable deduplication. Host: type: object description: A physical host in the Nutanix cluster. properties: uuid: type: string description: The UUID of the host. name: type: string description: The name of the host. serial: type: string description: Serial number of the host. block_serial: type: string description: Block serial number. block_model: type: string description: Hardware block model. hypervisor_address: type: string description: IP address of the hypervisor. controller_vm_backplane_ip: type: string description: CVM backplane IP address. num_cpu_sockets: type: integer description: Number of physical CPU sockets. num_cpu_cores: type: integer description: Number of CPU cores. memory_capacity_in_bytes: type: integer description: Total memory capacity in bytes. hypervisor_type: type: string description: Type of hypervisor running on the host. PaginationMetadata: type: object description: Pagination metadata for list responses. properties: grand_total_entities: type: integer description: Total number of entities. total_entities: type: integer description: Number of entities in the current response. count: type: integer description: Count of entities returned. start_index: type: integer description: Starting index of the returned entities. end_index: type: integer description: Ending index of the returned entities.