Request-specific query parameters

Some requests take query parameters that provide additional information to HCP about the operation you want to perform or that request a particular operation.

When the only action you’re requesting in a POST request for a resource other than a replication resource is specified by a query parameter, you need to provide an empty request body. With cURL, you specify this body as the argument for the -d option in the request:

With a content type of XML, the argument is an empty root element for the resource being modified, enclosed in double quotation marks, like this:

-d "<root-element/>"

For example, here’s a request to change only the password for the user account with the username mwhite:

curl -k -i -d "<userAccount/>" -H "Content-Type: application/xml"
    -H "Authorization: HCP bGdyZWVu:a3b9c163f6c520407ff34cfdb83ca5c6"
    "https://finance.hcp.example.com:9090/mapi/tenants/finance/
         userAccounts/mwhite?password=p4ssw0rd"

With a content type of JSON, the argument is an empty pair of curly braces enclosed in double quotation marks, like this:

-d "{}"

© 2015, 2020 Hitachi Vantara LLC. All rights reserved.