Question

How to use v3 API to get categories usage details

  • 29 December 2020
  • 1 reply
  • 95 views

Hi

I’m using Nutanix Prism Central v3 API and I want to run the API call referenced here:

https://www.nutanix.dev/reference/prism_central/v3/api/categories/postcategoryquery/

to get the category information.

I’m calling this API: https://<prism_ip>:9440/api/nutanix/v3/category/query, using Postman. My problem is filling the request body.

 

The example at the bottom of the page shows this request body:

{
  "api_version": "3.1.0",
  "group_member_count": 123,
  "group_member_offset": 123,
  "usage_type": "string",
  "category_filter": {
    "type": "CATEGORIES_MATCH_ANY",
    "kind_list": [
      "string"
    ],
    "params": {}
  }
}

 

But the params property is empty and I can’t figure out how to fill it properly.

It says in the description that it’s supposed to have “a list of category key and list of values”, but no matter what I try I either get an error regarding the json structure or this error: For a search specify the correct usage type.

 

Can someone please provide an example of how to use this API call fully? Specifically how to fill the params property in the request body?

 

 

Thanks


1 reply

Userlevel 5
Badge +4

Hey @Matan Here is the documentation for using this API https://www.nutanix.dev/reference/prism_central/v3/api/categories/postcategoryquery/

 

All the information related to APIs, v2,v3 and code samples can be found here https://www.nutanix.dev/api-reference/

 

I hope this helps you mate. :sweat_smile:

 

Let me know if I can help in any other way.

Reply