Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Input and output format

The REST API server supports JSON input/output format.

As a general rule, if objects have an ObjectID associated with them, and they are to be used as input parameters, either the ID or the ObjectID will be accepted as the parameter. For example, any functions that require a virtualServerId parameter should accept a value of "1" or "313a3a3a3a3a3a303a3a3a4f49445f24232140255f56", as they represent the same object within the NAS system.

NoteObjectID values are not a fixed length, and the length may vary depending on which type of object they identify.

Where API calls require input parameters, in some cases, these can be supplied as query parameters, rather than needing to supply them within the request body. For example, the following two examples are equivalent:

curl -k -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/object-replications/last-report -X GET -d '{"objectReplicationPolicyId":"ca2e73f2-d5d7-11d3-9cff-49e1bb864b23"}'

curl -k -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/object-replications/last-report?objectReplicationPolicyId=ca2e73f2-d5d7-11d3-9cff-49e1bb864b23

This approach is only appropriate for simple input parameters, and should not generally be used for parameters that contain spaces, or other characters that need to be encoded or escaped within a URL, as they may produce unexpected results

JSON requires escaping of the following characters if they are supplied as part of an input, and they will be escaped in the same way if returned as part of an API response - not all characters are necessarily supported when supplying parameters:

  • Backspace to be replaced with \b
  • Form Feed to be replaced with \f
  • Newline to be replaced with \n
  • Carriage Return to be replaced with \r
  • Tab to be replaced with \t
  • Double Quote to be replaced with \"
  • Backslash to be replaced with \\

 

  • Was this article helpful?