Getting status information about an API function that performs asynchronous processing

Storage Advisor Embedded Guide

Version
88-06-0x
Audience
anonymous
Part Number
MK-97HM85022-12

The following request obtains the status information about an API function that performs asynchronous processing. For the Authorization header of the request, specify the token of the session that was used when an API function that performs asynchronous processing was run.

Execution permission

Storage Administrator (View Only)

Request line

GET base-URL/simple/v1/objects/command-status/object-ID

Request message

Object ID

Specify the numerical value displayed at the end of the URL for statusResource that was returned when an API function for asynchronous processing was run.

The following is an example of a returned statusResource:

"statusResource": "/ConfigurationManager/simple/v1/objects/command-status/3"

Attribute

Type

Description

id

int

(Required) The ID used to obtain the execution results of the API function that performs asynchronous processing.

Query parameters
None.
Body
None.

Response message

Body

Example of a response message when the API function that creates a volume is run:

{
  "id": 2,
  "progress": "completed",
  "status": "normal",
  "affectedResources": [
    "/ConfigurationManager/simple/v1/objects/volumes/100"
  ],
  "operationDetails": [
    {
      "operationType": "CREATE",
      "resourceType": "Volume",
      "resourceId": "100"
    }
  ]
}

Example of a response message when the API function that deletes a pool fails:

{
  "id": 3,
  "progress": "completed",
  "status": "error",
  "errorResource": "/ConfigurationManager/simple/v1/objects/pools/63",
  "errorCode": {
    "SSB1": "2e11",
    "SSB2": "001f"
  },
  "errorMessage": "Snapshot or volume exists. Operation could not be completed.",
  "operationDetails": [
    {
      "operationType": "DELETE",
      "resourceType": "Pool",
      "resourceId": "63"
    }
  ]
}

Attribute

Type

Description

id

int

ID used for inquiry when the API function for asynchronous processing was run.

status

string

Status of the execution results of the API function:

  • normal: The API function finished successfully.
  • error: The API function failed.

This attribute appears only if the execution of the API function has completed.

affectedResources

string[]

List of URLs used to access the resource targeted by the operation.

If one API function request performs operations on multiple resources, the URLs of all of those resources are returned. If an API function failed, only the URLs of the resources for which processing is confirmed as completed are returned.

If the resource is deleted successfully, the URL of the deleted resource is returned. A 404 error occurs if this URL is accessed. This confirms that the resource was deleted successfully.

This attribute appears if the execution of the API function finished successfully.

errorResource

string

URL where the error occurs.

This attribute appears if the execution of the API function failed.

errorCode

object

Error code from the storage system.

A value is returned only if an error occurs in the storage system.

The error codes are as follows:

  • SSB1 code
  • SSB2 code

Storage system error codes are required for maintenance of the storage system.

This attribute appears if the execution of the API function failed.

errorMessage

string

Content of the error message.

This attribute appears if the execution of the API function failed.

operationDetails

object[]

Details about a resource targeted by the operation

This information appears when an operation is performed for the resource indicated by the resource type:

  • operationType (string)

    The type of the operation performed for the resource

    • CREATE: The resource has been created.
    • UPDATE: The resource has been updated.
    • DELETE: The resource has been deleted.
  • resourceType (string)

    The resource type of a resource that was created, updated, or deleted

    • CommandStatus: A resource related to status information about the API function that performs asynchronous processing
    • Pool: A resource related to pools
    • Port: A resource related to ports
    • Server: A resource related to servers
    • Snapshot: A resource related to snapshots
    • Volume: A resource related to volumes
    • VolumeServerConnection: A resource related to connections between volumes and servers
    • ExternalVolume: A resource related to external volumes
    • QuorumDisk: A resource related to quorum disk
  • resourceId (string)

    The resource ID of a resource that was created, updated, or deleted

Status codes

See HTTP status codes.

Coding example

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session b74777a3f9f04ea8bd8f09847fac48d3" -X GET https://192.0.2.100/ConfigurationManager/simple/v1/objects/command-status/3