Skip to main content
IBM Quantum Platform
This is the API reference for the Qiskit Runtime REST API on the new IBM Quantum Platform, which replaces the REST APIs for IBM Quantum Platform (Classic) Qiskit Runtime and IBM Cloud Qiskit Runtime. For more details, including how to migrate, visit the guide Migrate to the new Qiskit Runtime REST API.

Workloads


List user instance workloads

List user instance workloads

Query Parameters

Name, TypeDescription
sort
string

Field to sort the workloads by. A - prefix indicates descending sort order.

Possible values: createdAt-createdAt
Default value: createdAt
limit
number

Number of workloads to return at a time

Default value: 10
Example: 5
previous
string

Cursor to previous workloads result page

next
string

Cursor to next workloads result page

backend
string

Backend name

Example: "ibm_seattle"
search
string

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

Example: "test"
status
string[]

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

Example: ["pending"]
mode
string

Workload mode: job, session or batch

Possible values: jobsessionbatch
Example: "batch"
created_after
string

Filter jobs and session created after this date

Example: "2021-01-01T00:00:00Z"
created_before
string

Filter jobs and session created before this date

Example: "2021-01-01T00:00:00Z"
tags
string[]

Optional array of tags for the workloads

Example: ["composer-info:composer:true","bar","foo"]

HTTP Response Status Codes

Status codeDescription
200
401Unauthorized

Code samples

GET
/v1/workloads
curl -X GET \
  /api/v1/workloads \
  -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
    }
  ],
  "total_count": 5,
  "limit": 5,
  "previous": {
    "href": "https://api.example.com/v2/accounts?previous=3fe78a36b9aa7f26"
  },
  "next": {
    "href": "https://api.example.com/v2/accounts?next=3fe78a36b9aa7f26"
  }
}
Was this page helpful?
Report a bug or request content on GitHub.