HTTP response

This section describes the elements comprising an HTTP response: status code and body. Responses are broadly divided into the 3 categories below.

When a request is completed normally

The status code "200 OK" is returned. This code is mainly returned by the resource information retrieval API (HTTP request using the GET method). For the body, the requested information is returned using the content type specified in the Accept header.

When a request is received normally and processing starts asynchronously

The status code "202 Accepted" is returned. This code is mainly returned by APIs other than the resource information retrieval API, when asynchronously executing tasks that involve time-consuming processing. For the body, the task information is returned using the content type specified in the Accept header. (currently XML only).


       <task>
        <id>taskId</id>
        <status>waiting</status>
        <progress>0</progress>
        <starttime>startTime</starttime>
        <resource id="resourceId"/>
       </task>
     

The XML may include information for internal control purposes. Tags included in the body but not defined as API tags will be ignored.

When an error occurs

A status code from 4xx to 5xx is returned when an error occurs during the processing or accepting stages for HTTP requests.

Refer to "Status codes in use" for details.

For the body, the error information is returned using the content type specified in the Accept header (currently XML only).


       When an error occurs in the delivery platform region manager
       <error>
        <message>msgBody</message>
        <arg>arg1</arg>
        <arg>arg2</arg>
         ...
        <request_id>requestId</request_id>
       </error>
       
       When an error occurs in the delivery platform environment
       <errors>
        <error>
         <code>msgId</code>
         <message>msgBody</message>
         <arg>arg1</arg>
         <arg>arg2</arg>
           ...
         <request_id>requestId</request_id>
         <AvailabilityZone>availZoneWhereErrorOccurred</AvailabilityZone>
         <cause>
           <product>relatedProdName</product>
           <resource_name>linkedProdResourceName</resource_name>
           <request>infoRequestForRelatedProd</request>
           <message>returnInfoOfRelatedProd</message>
         </cause>
        </error>
        <error>
           ... (*1)
        </error>
         ...
       </errors>
 
              *1: Multiple error tags will be displayed when errors occur in multiple availability zones.
     

The message body is in English only, and embedded arguments are expressed as ${number}.

The API user is able to construct the complete message by deploying arguments to the message body.

Example: Message ID=67114, Message body="can not copy file [${0}->${1}]", Argument="a.txt","b.txt"

=>FJSVrcx:ERROR:67114:can not copy file [a.txt->b.txt]

The cause tag is output when some information (related product name, linked product resource name, information requested for related product) returned from a product linked to this product is included.

The XML may be extended, with the addition of detailed error information, for example. Tags included in the body but not defined as API tags will be ignored.