Getting a list of job information

REST API Reference Guide for Virtual Storage Platform 5000, Virtual Storage Platform E Series, and Virtual Storage Platform G/F Series

Version
93-07-0x
90-09-0x
88-08-10
Audience
anonymous
Part Number
MK-98RD9014-17
The following request gets a list of information about jobs that were submitted by the user from the REST API. Only a user who belongs to a user group with the Storage Administrator (System Resource Management) role can get information about all the registered jobs. Job information can be used to check APIs that were issued and to identify the cause of a problem in the storage system.

Execution permission

No role is required to run this API request. Only the users authenticated by the storage system can issue this API request.

Request line

GET base-URL/v1/objects/jobs

Request message

Object ID

None.

Query parameters

If no query parameters are specified, the request gets information about 100 jobs that can be referenced by the user and were submitted after the other jobs.

Parameter

Type

Filter Condition

startCreatedTime

ISO8601string

(Optional) Specify the submission start time of the jobs for which you want to get information. Specify the time in YYYY-MM-DDThh:mm:ssZ format.

The request gets information about jobs that were submitted on and after the specified time.

endCreatedTime

ISO8601string

(Optional) Specify the submission end time of the jobs for which you want to get information. Specify the time in YYYY-MM-DDThh:mm:ssZ format.

The request gets information about jobs that were submitted before the specified time.

count

int

(Optional) Specify a number from 1 to 100 for the number of jobs for which you want to get information.

The specified number is the maximum number of jobs for which information will be obtained.

If this is omitted, 100 is assumed.

status

string

(Optional) Specify one of the following values for the status of the jobs for which information is to be obtained.

  • Initializing: The jobs are being initialized.

    If you also need to specify a value for "state", you must specify Queued for "state".

  • Running: The jobs are running.

    If you also need to specify a value for "state", you must specify Started for "state".

  • Completed: The jobs have been completed.

    If you also need to specify a value for "state", you must specify Succeeded, Failed, or Unknown for "state".

state

string

(Optional) Specify one of the following values for the status (state) of the jobs for which information is to be obtained.

  • Queued: The jobs have been queued.
  • Started: The jobs have been started.
  • Succeeded: The jobs finished successfully.
  • Failed: The jobs failed.
  • Unknown: The state of the jobs is unknown.

The following example gets information about a maximum of 30 jobs that ended normally and were submitted after other jobs during the period from "2015/05/01 08:00:00" to "2015/05/31 23:59:59".

?startCreatedTime=2015-05-01T08:00:00Z&endCreatedTime=2015-05-31T23:59:59Z&count=30&state=Succeeded
Body

None.

Response message

Body
{
  "data": [
    {
      "jobId": 2,
      "self": "/ConfigurationManager/v1/objects/jobs/2",
      "userId": "rest-test",
      "status": "Completed",
      "state": "Succeeded",
      "createdTime": "2015-09-14T02:08:13Z",
      "updatedTime": "2015-09-14T02:08:13Z",
      "completedTime": "2015-09-14T02:08:13Z",
      "request": {
        "requestUrl": "/ConfigurationManager/v1/services/resource-group-service/actions/lock/invoke",
        "requestMethod": "POST",
        "requestBody": {
          "parameters": {
            "waitTime": null
          }
        }
      },
      "affectedResources": [
        "/ConfigurationManager/v1/objects/resource-groups"
      ]
    },
    {
      "jobId": 1,
      "self": "/ConfigurationManager/v1/objects/jobs/1",
      "userId": "rest-test",
      "status": "Completed",
      "state": "Failed",
      "createdTime": "2015-09-14T02:04:11Z",
      "updatedTime": "2015-09-14T02:04:12Z",
      "completedTime": "2015-09-14T02:04:12Z",
      "request": {
        "requestUrl": "/ConfigurationManager/v1/services/resource-group-service/actions/lock/invoke",
        "requestMethod": "POST",
        "requestBody": {
          "parameters": {
            "waitTime": null
          }
        }
      },
      "error": {
        "errorSource": "/ConfigurationManager/v1/services/resource-group-service/actions/lock/invoke",
        "message": "An error occurred in the storage system. (message =  Access denied with Lock/Unlock)",
        "cause": "An error occurred during execution of a CCI command.",
        "solution": "See the manual of the CCI and remove the cause of the error.",
        "solutionType": "SEE_ERROR_DETAIL",
        "messageId": "KART30000-E",
        "errorCode": {
          "errorCode": "EX_EACCES"
        }
      }
    }
  ]
}

Attribute

Type

Description

data

object[]

Job information (job objects) created by the user from the REST API.

The maximum number of jobs for which you can get information at one time is 100.

For details on the job object schema, see the section explaining job objects.

Status codes

For details on the status codes of the request for this operation, see the description on HTTP status codes.

Coding example

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X GET https://192.0.2.100/ConfigurationManager/v1/objects/jobs