Request and response formats

REST API Reference Guide for Virtual Storage Platform 5000, Virtual Storage Platform E Series, and Virtual Storage Platform G/F Series

Version
93-07-0x
90-09-0x
88-08-10
Audience
anonymous
Part Number
MK-98RD9014-17
Use the JSON format to specify attribute values when creating or changing a resource. Also, use the JSON format for the results of resource information acquisition.

When creating or adding a resource by using the POST method, or when changing or editing a resource by using the PATCH method, specify resource attributes in JSON format. When you use the GET method to collect resource information, responses are returned in JSON format.

The supported character encoding is UTF-8.

Request format

  • If you specified a null character for a string-type attribute, the value of the attribute is assumed to be null.

  • If you specified a null character for an attribute whose type is not string, the attribute is assumed to be unspecified.

  • You can use the following characters in attribute values:

    Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), commas (,), hyphens (-), periods (.), colons (:), at marks (@), and underscores (_)

    Allowable characters vary for each API request. For details, refer to individual API command pages.

    Note:
    • If you specified a character string containing a comma, a colon, or an at mark, you must encode the symbol when generating the object ID. We recommend that you do not use these symbols. If you generate the object ID without encoding these symbols, the URL when an API request is issued might be incorrect and cause an error.
    • You cannot specify a hyphen as the first character of the value.
  • Do not include backslashes (\) or forward slashes (/) in URLs.

  • If you specify an IP address, you cannot use an IPv4-mapped address.

Response format

  • If the API processing succeeds, a response is returned in JSON format.
  • If the processing fails, depending on the contents of the error, a response in HTML format, instead of JSON format, might be returned.

    To resolve the error based on the HTTP status code in the program, check the value of Content-Type in the response header.

Tip:

The following example is used to describe how to read the error message that appears if the string specified in the request body contains a syntax error.

Request body:
{
  "parameters": {
    "status": blk
  }
}
Error message:
{
  "errorSource": "/ConfigurationManager/v1/objects/ldevs/5/actions/change-status/invoke",
  message": "The format of the string or the content specified in the request body is invalid. (details = Unexpected character ('b' (code 98)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.ByteArrayInputStream@10f607b; line: 3, column: 16])",
"  "solution": "Check and, if necessary, revise the specified request body so that the format and content are correct.",
  "messageId": "KART40046-E"
}

The location where the error occurred is output after at in the message details. This example indicates the error is in line: 3, column: 16.

In column 16 of line 3 in the request body, you can see that the status attribute, which should be specified as a string, is specified incorrectly.