v4 API: Create Prism Central Image
Important note: To ensure request idempotency, this request requires use of the Ntnx-Request-Id header. Related Resources
These code samples are standalone examples only.
All code samples are unofficial, are unsupported and will require extensive modification before use in a production environment.
Most code samples are available on the NutanixDev GitHub code samples repo.
The Nutanix.dev code sample collection is also available as an unfiltered single-page view!
See the License section of this page for information on how these code samples may be used.
These samples are for the Nutanix v4 APIs and SDKs (all languages). They cover various common Nutanix Prism and product operations.
Important note: To ensure request idempotency, this request requires use of the Ntnx-Request-Id header. Related Resources
This code is for demonstration purposes only and shows use of the Nutanix v4 JavaScript SDK to list all Prism Element clusters registered to the
This code is for demonstration purposes only and shows use of the Nutanix v4 Go SDK to create a list Prism Central images. Customisation will
These samples require Python 3.7 or later and demonstrate complete, standalone scripts for carrying out common API operations.
For easy sharing of parameters between scripts, most scripts accept their JSON payloads via an on-disk JSON-formatted text file.
Most scripts utilise requests, urllib3, getpass, argparse and json modules.
Repo directory: python
Python script for use with Nutanix Era. Provisions Linux-based database engines, to call X-Play playbook that set VM categories in Prism Central. To use update
This script generates a CSV report based on certain VM statistics in the V1 API accessed through Prism Element.
Use v1 and v3 of the Nutanix REST APIs to get VM stats/metrics.
Python demo to show the creation of Prism Central categories via the v3 Prism Central REST APIs. Utilises “dotenv”, requests and urllib3.
These samples require PHP 7.2 or later and demonstrate complete, standalone scripts for carrying out common API operations.
For easy sharing of parameters between scripts, most scripts accept their JSON payloads via an on-disk JSON-formatted text file.
Repo directory: php
These samples are written specifically for use with Bash Shell; please note that modification will be required before use with the sh shell. All scripts are standalone and can be run without any other script dependencies.
All scripts utilise jq, a free sed-like JSON processor. JQ can be downloaded from here.
Repo directory: shell
These code samples and blueprints are provided for use with NCM Self Service. Please ensure NCM Self Service is enabled and available before using these code samples.
Repo directory: calm and blueprints
These samples are intended for use with Visual Studio. Visual Studio Community can be downloaded from here.
All C# code samples utilise Newtonsoft.Json, a popular high-performance JSON framework for .NET. Please see here for instructions on installing Newtonsoft.Json into your Visual Studio environment.
Repo directory: csharp
A default installation of PowerShell, e.g. on Windows 10 or Windows 2016 (or later) should have all required packages available.
To run these scripts the PowerShell ExecutionPolicy will need to be set to RemoteSigned. To do this, run the following command in an administrative PowerShell session:
SetExecutionPolicy RemoteSigned
Repo directory: powershell
A collection of Go code samples, provided by Nutanix Community and staff members.
To run these scripts please download and install Go from the Go website.
Repo directory: go
A collection of JS code samples, provided by Nutanix Community and staff members.
Repo directory: js
A collection of JSON Payload samples, intended for use with Nutanix API requests.
To use these samples it is suggested than an application such as Postman be used.
Repo directory: json
A collection of Terraform configurations aimed at demonstrating use of the Nutanix Terraform provider.
To use these configurations it is recommended to reference the Nutanix.dev articled titled “Using the Nutanix Terraform Provider”. Please note this article will available after April 19th 2021.
Repo directory: terraform
©2025 Nutanix, Inc. All rights reserved. Nutanix, the Nutanix logo and all Nutanix product and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. All other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s).
Our decision to link to or reference an external site should not be considered an endorsement of any content on such a site. Certain information contained in this post may relate to, or be based on, studies, publications, surveys and other data obtained from third-party sources and our own internal estimates and research. While we believe these third-party studies, publications, surveys and other data are reliable as of the date of this paper, they have not independently verified unless specifically stated, and we make no representation as to the adequacy, fairness, accuracy, or completeness of any information obtained from a third-party.
All code samples are unofficial, are unsupported and will require extensive modification before use in a production environment. This content may reflect an experiment in a test environment. Results, benefits, savings, or other outcomes described depend on a variety of factors including use case, individual requirements, and operating environments, and this publication should not be construed as a promise or obligation to deliver specific outcomes.
This content may reflect an experiment in a test environment. Results, benefits, savings, or other outcomes described depend on a variety of factors including use case, individual requirements, and operating environments, and this publication should not be construed as a promise or obligation to deliver specific outcomes.