Skip to main contentIBM Quantum Documentation

Workloads


List hub workloads

List hub workloads

Query Parameters

Name, TypeDescription
sort
string

Field to sort the workloads by

Possible values: createdAt
Default value: createdAt
order
string

Order to sort the workloads by

Possible values: ascdesc
Default value: desc
limit
number

Number of workloads to return at a time

Default value: 10
previous
string

Cursor to previous workloads result page

next
string

Cursor to next workloads result page

instance
Required
string

Instance of jobs and sessions. It can be a hub, a hub/group or a hub/group/project. Mandatory.

backend
string

Backend name

search
string

Optional search string, used to filter workloads by id or tags

status
string[]

Status type to filter workloads by. It can be pending, in_progress, failed, completed or canceled.

mode
string

Workload mode: job, session or batch

createdAfter
string

Filter jobs and session created after this date

createdBefore
string

Filter jobs and session created before this date

tags
string[]

Optional array of tags for the workloads

userId
string

User id to filter workloads by user.

HTTP Response Status Codes

Status codeDescription
200
401Unauthorized

Code samples

GET
/workloads/admin
curl -X GET \
  https://api.quantum-computing.ibm.com/runtime/workloads/admin \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "workloads": [
    {
      "id": "ch8b1ok4k9li68vm059r",
      "created": "2024-07-04T16:13:56.562Z",
      "ended": "2024-07-04T16:13:56.562Z",
      "backend": "ibm_seattle",
      "instance": "ibmq/open/main",
      "user_id": "65f0478ed32a1891af0a8d31",
      "accepting_jobs": true,
      "mode": "job",
      "status": "in_progress",
      "status_reason": "Error occurred for job circuit-runner_ckodgbs1fc4b8ufrjsd0_d35e_2. Stale payload, retry maximum reached.",
      "tags": [
        "test-job",
        "foo",
        "bar"
      ],
      "usage_seconds": 1,
      "estimated_running_time_seconds": 123,
      "estimated_start_time_seconds": 123
    }
  ],
  "count": 5,
  "limit": 5,
  "previous": "example",
  "next": "example"
}

List user workloads

List user workloads

Query Parameters

Name, TypeDescription
sort
string

Field to sort the workloads by

Possible values: createdAt
Default value: createdAt
order
string

Order to sort the workloads by

Possible values: ascdesc
Default value: desc
limit
number

Number of workloads to return at a time

Default value: 10
previous
string

Cursor to previous workloads result page

next
string

Cursor to next workloads result page

instance
string

Instance of jobs and sessions. It must be a hub/group/project and the user must be collaborator.

backend
string

Backend name

search
string

Optional search string, used to filter workloads by id or tags

status
string[]

Status type to filter workloads by. It can be pending, in_progress, failed, completed or canceled.

mode
string

Workload mode: job, session or batch

createdAfter
string

Filter jobs and session created after this date

createdBefore
string

Filter jobs and session created before this date

tags
string[]

Optional array of tags for the workloads

HTTP Response Status Codes

Status codeDescription
200
401Unauthorized

Code samples

GET
/workloads/me
curl -X GET \
  https://api.quantum-computing.ibm.com/runtime/workloads/me \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "workloads": [
    {
      "id": "ch8b1ok4k9li68vm059r",
      "created": "2024-07-04T16:13:56.562Z",
      "ended": "2024-07-04T16:13:56.562Z",
      "backend": "ibm_seattle",
      "instance": "ibmq/open/main",
      "user_id": "65f0478ed32a1891af0a8d31",
      "accepting_jobs": true,
      "mode": "job",
      "status": "in_progress",
      "status_reason": "Error occurred for job circuit-runner_ckodgbs1fc4b8ufrjsd0_d35e_2. Stale payload, retry maximum reached.",
      "tags": [
        "test-job",
        "foo",
        "bar"
      ],
      "usage_seconds": 1,
      "estimated_running_time_seconds": 123,
      "estimated_start_time_seconds": 123
    }
  ],
  "count": 5,
  "limit": 5,
  "previous": "example",
  "next": "example"
}
Was this page helpful?
Report a bug or request content on GitHub.