VMware {code} Community
naustin2
Contributor
Contributor
Jump to solution

REST API - Unsupported property with name: action.

I'm new to the vSphere API and I'm attempting to look up library items using the following call.  I'm also setting the vmware-api-session-id in the header for this GET request.

curl --location --request GET 'https://{host}/api/content/library/item?action=find
 
Here's the error being returned:
 
"error_type":"INVALID_ARGUMENT", "messages":[{"args":["action""],"default_message":"Unsupported property with name: action.","id":"com.vmware.vapi.rest.unsupportedProperty"}]}
 
Any thoughts on what I might be doing wrong?
 
Thanks
 
Noel
 
Labels (1)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Not sure where you got that curl command, but have a look at the cURL command under Code Samples in Find Item


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

Not sure where you got that curl command, but have a look at the cURL command under Code Samples in Find Item


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

naustin2
Contributor
Contributor
Jump to solution

Thanks, After closer look at the doc I discovered I was using a GET when should have been a POST

0 Kudos