Getting the request status

Ops Center Analyzer Detail View REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA004-11

You can obtain the status of an asynchronous job. The status consists of the available request completion status and results. If the requested status does not exist, then an error message is received in a response message.

Request line

GET baseURL/dbapi.do?action=getStatus&dataset=<Datasetname>&requestId=<reqId>

Request body

Not applicable.

Request parameters

Parameter Type Description
action String getStatus

Specify the API function to be invoked.

dataset String Dataset name. From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed.
requestId String Asynchronous request ID.

Request example

GET /dbapi.do?action=getStatus&dataset=defaultDs&requestId=12344 HTTP /1.1 Authorization:Basic ZnJlZDpmcmVk

Response body

{
  "status":{
    "total":,
    "matched":,
    "processed":,
    "completed":,
    "aborted":,
    "hasErrors":""
  },
  "result":[
    {
      "signature":"",
      "name":"",
      "memory":{
        "type":"",
        "name":"",
        "unit":"",
        "data":""
      },
      "cpu Usage":[
        {
          "type":"",
          "name":"",
          "unit":"",
          "interval":,
          "start":"",
          "data":[
            , , , , 
          ]
        }
      ]
    }
  ] 
}

Response example

{
  "status":{
    "total":10,
    "matched":1,
    "processed":10,
    "completed":true,
    "aborted":false,
    "hasErrors":"false"
  },
  "result":[
    {
      "signature":"vm#cumulus1-lab-vm2",
      "name":"cumulus-lab-vm2",
      "memory":{
        "type":"scalar",
        "name":"Memory",
        "unit":"",
        "data":"204800"
      },
      "cpu Usage":[
        {
          "type":"timeseries",
          "name":"cpu usage",
          "unit":"",
          "interval":60,
          "start":"20140713_230100",
          "data":[
            24.00, 33.00, 68.00, null, 4.00
          ]
        }
      ]
    }
  ] 
}

Status codes

Status code

Message

Description

200 OK Request was successful, and the response body contains the requested log details.
206 PARTIAL CONTENT Request is in progress, and the incremental content is available in the response body.
400 BAD REQUEST Request URL or request body validation failed. Check the response body for details.
401 UNAUTHORIZED Supplied authentication token is invalid or does not have the appropriate credentials to access the resource.
404 NOT FOUND API server could not find a resource matching the request.
500 SERVER ERROR API operation request failed. Check the response body for details.
Note: This API gets the status of other API requests. It can also get all the error conditions of the original API requests.

Response codes

The following table lists the common API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.

Response code Message Condition
72020008 Mandatory parameter {requestId} not specified. Parameter requestId is not specified.
720600E6 Response is not present in the cache for the given requestId. Response is not cached on the API server for the given request ID.
720000E9 License is not valid. License is not uploaded, or the uploaded license is invalid or expired.
720000E9 Authorization needed. Request is sent with an invalid authentication token.
720600E6 Response is not present in the cache for the given requestId. Response is not cached on the API server for the given request ID.
720600E2 Application encountered an internal error. API server encountered an unknown error.