HTTP request

This section describes the elements comprising an HTTP request: HTTP header, HTTP method, and URL.

HTTP header

The following HTTP headers can be specified:

  • Content-Type

    Specifies the content type of the HTTP request.

  • Accept

    Specifies the content type of the HTTP response.

  • X-Auth-Token

    Specifies the token of Keystone.

    When the system administrator uses the API, the scope specified for the token is ignored.

  • X-VA-Project-Id

    Specifies the project ID.

    This must be specified when the system administrator uses the API. Users cannot specify the project ID when using the API.

  • X-VA-Domain-Id

    Specifies the domain ID.

    This must be specified when the system administrator uses the API. Users cannot specify the project ID when using the API.

HTTP method

Depending on the purpose of the API, the HTTP methods are distinguished as follows:

  • POST: Create resources
  • GET: Retrieve resource information
  • PUT: Operate resources
  • DELETE: Delete resources

URL

The URL format is as follows:

<protocol>://<host>:<port>/<path> <params>

<protocol>
Transfer protocol (specify "https")
<host>
Host name or IP address of the delivery platform manager
<port>
Port number (default: 23461)
<path>
API path. This must be specified in one of the following formats:

/<resourceType>/

 Format when creating resources or retrieving information (example: /l_servers/)

/<resourceType>>/<resourceId>

Format when retrieving information on, changing the attributes of, or deleting specific resources (example: /l_servers/100)

/<resourceType>/<resourceId>/<operationName>

Format when performing operations specific to a particular resource (example: /l_servers/100/start)

<params>
API parameters

When the HTTP method is GET or DELETE:

Arguments must be specified for queries. A question mark (?) must be appended to <path>, followed by the arguments.

The arguments must be specified in the format <label>=<value> (*1).

When the HTTP method is POST or PUT:

Arguments must be specified in the request body. The arguments must be specified according to the Content-Type value of the HTTP header.

When Content-Type is application/x-www-form-urlencoded:

Arguments must be specified in the format <label<=>value> (*1).

When Content-Type is application/xml:

Arguments must be specified in XML format.

If optional elements are omitted, the XML tags must be omitted. It is not possible to specify a format omitting only values.

*1: The format for specifying <label>=<value> is as follows:

<label>=<value>&<label>=<value>,...

label Parameter name

value Value

When omitting optional arguments, both <label> and <value> must be omitted. It is not possible to specify (<label>=' ' etc.) and omit <value> only