Overview
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
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
Content Level
- Intermediate: The audience is expected to have a basic understanding of Nutanix infrastructure, API usage, and Python scripting.
Environment Setup
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:
- Authorization requires basic-auth
- Prism Central pc_ip, username and password
Steps
Steps for Managing Categories Using Nutanix Prism Categories V4 API
- Create a VM
- Associate Categories to VM
- List Categories
- Filter Categories by Key/Value Content
- Filter Categories by String Prefix
- Sort Categories by Key
- Expand Results to Show Associated Counts
- Filter Categories by Association Type
- Filter Categories with Associations
- Create a New Category
- Filter and List the Created Category
- Get Category Details
- Update Category Description
- Update Category Owner
- Expand on Category Associations
- Delete a Category
- Dissociate Categories from VM
- Delete the VM
Postman Collection
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.
License
Postman Collection
Nutanix Prism Categories V4 API Workflows Documentation is licensed under the MIT License. See the LICENSE file for more details.
Notices
Notices
See the NOTICES file for more details.