All Products
Search
Document Center

Batch Compute:Response results

Last Updated:Apr 12, 2018

After the API service is called, data is returned in a unified format. The returned HTTP status code 2xx indicates that the call succeeds, and the status code 4xx or 5xx indicates that the call fails. If a call is successful, the response data is in JSON format.

Successful results

The following is an example of data returned for the cluster creation request.

  1. {
  2. "Id": "qingdao-test-cluster",
  3. }

Error results

If an error is reported in an API call, no result data is returned. The caller can locate the cause of an error based on the error code corresponding to each interface and the error message.

When an error occurs, HTTP Code (> 299) and Body are returned. Body contains the “HostId”, “Code”, and “Message” fields. Here is an example of a request error.

  1. {
  2. "HostId":"",
  3. "Code" : "InvalidParameter",
  4. "Messge" : " Specified parameter format is not valid."
  5. }