VMware {code}

 View Only
  • 1.  REST API - Unsupported property with name: action.

    Posted Mar 20, 2023 06:37 PM

    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
     


  • 2.  RE: REST API - Unsupported property with name: action.
    Best Answer

    Posted Mar 20, 2023 06:53 PM

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



  • 3.  RE: REST API - Unsupported property with name: action.

    Posted Mar 20, 2023 07:50 PM

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