Hello All,
I am having issues querying list objects attached to a tag ids using python requests POST. I am always getting 404 error. I am very new to vmware and not even sure where exactly to see the error on vmware server.
I can see the output from vsphere client development center, But when I try to query it I am getting the error 404.
I can query the API for session-d and can query the tag categories and tag IDs, But to be able to see what objects are tagged to the TAG IDs , I am interested, it is not allowing me to.
~~~
def request_post1(vcip, cmd, s, tags):
payload = {"tag_ids":["urn:vmomi:InventoryServiceTag:b4055c62-a0ed-44d9-babb-3e05a5416bcd:GLOBAL"]}
payload = json.dumps(payload)
session = requests.Session()
session.verify = False
session1 = session.post('https://'+vcip+'/rest/com/vmware/cis/tagging/tag-association?action=list-attached-objects-on-tags',headers={'vmware-api-session-id':s, 'content-type': 'application/json'}, verify=False, data=payload)
return session1.json()
~~~
can anyone kindly help.
Also, Is there a filter we can apply to query a cluster with more than 1000 vms. is there a filter we can apply to the query to limit number of vms queries,
Any help is really appreciated.