Overview

This documentation provides an outline of the key steps for managing categories in Nutanix Prism Central using the Nutanix Prism Categories V4 API. The steps cover tasks such as creating VMs, associating categories, updating, deleting categories, and more. These tasks can be executed using the provided Python SDKs and a Postman collection containing basic GET, POST, and PUT API calls.

Intended Audience

This documentation is intended for Nutanix customers who wish to automate and manage categories within their Nutanix environments using the Prism Categories V4 API. It is designed for system administrators, cloud engineers, or anyone responsible for managing Nutanix infrastructure and virtual machines.

Content Level

  • Intermediate: The audience is expected to have a basic understanding of Nutanix infrastructure, API usage, and Python scripting.

Environment Setup and Requirements

Software Requirements:

  • Python 3.9 (for running the Python script)

  • Postman (for testing and using the API calls in the provided collection)

Nutanix Software Version Requirements:

  • Prism Central 2024.3 or later

  • AOS 6.8 or later

These versions are required for compatibility with the Nutanix Categories V4 API.

Python Script Dependencies

Accompanying files referenced in this guide can be downloaded from the NutanixDev repository.

The following Python SDKs are used in the script. These dependencies can be installed via the requirements.txt file:

requirements.txt

Unset
urllib3==1.26.20
ntnx-clustermgmt-py-client==4.0.1
ntnx-prism-py-client==4.0.1
ntnx-vmm-py-client==4.0.1

Install the dependencies using:

Unset
pip install -r requirements.txt

Nutanix Cluster API Access:

To interact with the Nutanix API, ensure you have:

  1. Authorization requires basic-auth
  2. Prism Central pc_ip, username and password

Steps for Managing Categories Using Nutanix Prism Categories V4 API

  1. Create a VM
  2. Associate Categories to VM
  3. List Categories
  4. Filter Categories by Key/Value Content
  5. Filter Categories by String Prefix
  6. Sort Categories by Key
  7. Expand Results to Show Associated Counts
  8. Filter Categories by Association Type
  9. Filter Categories with Associations
  10. Create a New Category
  11. Filter and List the Created Category
  12. Get Category Details
  13. Update Category Description
  14. Update Category Owner
  15. Expand on Category Associations
  16. Delete a Category
  17. Dissociate Categories from VM
  18. Delete the VM

Postman Collection

The Postman collection contains predefined API calls for:

  • GET, POST, and PUT API calls for categories management.

You can import the collection into Postman, configure the environment (with your Nutanix cluster URL and authentication), and run the workflow steps by sending the corresponding API requests.

Postman Collection

Nutanix Prism Categories V4 API Workflows Documentation is licensed under the MIT License. See the LICENSE file for more details.

Notices

See the NOTICES file for more details.