Stopping an API request

Ops Center Analyzer Detail View REST API Reference Guide

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

You can stop a running asynchronous job on the server. If the requested job does not exist, then an error message is received in a response message.

Request line

GET baseURL/dbapi.do?action=abortRequest&dataset=<Datasetname>&requestId=<requestId of API>

Request body

Not applicable.

Request parameters

Parameter Type Description
action String abortRequest

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=abortRequest&dataset=defaultDs&requestId=316829382_14 HTTP /1.1 Authorization:Basic ZnJlZDpmcmVk

Response body

If the request is stopped successfully:

{
  "aborted": true,
  "id": "316829382_14"
}
The request is processed, but not stopped:
{
  "aborted": false,
  "id": "316829382_14"
}
Cannot find the request ID in the DBresponseCache:
{
  "code": "B5040016",
  "error": "Response is not present in cache for the given requestId '316829382_14'"
}
If the request for the specified requestId is already stopped:
{
  "code": "B5040018",
  "error": "Request for given requestId '316829382_14' is already aborted"
}

Status codes

Status code

Message

Description

200 OK Request was successful, and the response body contains the requested log details.
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.

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
B5020008 Mandatory parameter {requestId} is not specified. Parameter requestId is not specified.
B50000E9 License is not valid. License is not uploaded, or the uploaded license is invalid or expired.
B50000E9 Authorization is required. Request is sent with an invalid authentication token.
B5040016 Response is not present in the cache for the given request ID. Response is not cached on the API server for the given request ID.
B5040017 Request for the given request ID is already completed. Request for the given request ID is already completed.
B5040018 Request for the given request ID is already stopped. Request for the given request ID is already stopped.
B50600E2 Application encountered an internal error API server encountered an unknown error.