Hello All - I have to build a Java thin client to get ResourceID from RequestID.
I am testing this from a REST client for now. I have submitted the action request to provision a VM. I got a feedback URL along with the requestID in the header
From what I have read, I understand that I can query the APIhttps://<vrealize-server>/catalog-service/api/consumer/resources/types/Infrastructure.Machine?$filter=request/id eq 'requestID' to get the details of the VM’s created.
However I just get a blank result as below when I do this.
{
"links": [],
"content": [],
"metadata": {
"size": 20,
"totalElements": 0,
"totalPages": 0,
"number": 1,
"offset": 0
}
}
If I try to search using the VM name that is created using https://<vrealize-server>/catalog-service/api/consumer/resources/types/Infrastructure.Machine?$filter=name eq 'vm-name' I get the results correctly.
From this JSON I can observe that the requestID is different from the requestID that came in from the feedbackURL in request header.
Am i missing something here ? Can anybody guide me how to get the resourceID from requestID using REST API's?
Thanks,
Madhav