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
offset
number

Number of workloads to skip when retrieving the list of workloads

Default value: 0
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": "2021-05-05 00:56:04.569709",
      "ended": "2021-05-05 00:56:04.569709",
      "backend": "ibm_seattle",
      "instance": "ibmq/open/main",
      "user_id": "65f0478ed32a1891af0a8d31",
      "accepting_jobs": true,
      "mode": "job",
      "status": "in_progress",
      "status_reason": "Ran too long",
      "tags": [
        "test-job",
        "foo",
        "bar"
      ],
      "usage_seconds": 1.5,
      "estimated_running_time_seconds": 123,
      "estimated_start_time_seconds": 123
    }
  ],
  "count": 5,
  "limit": 5,
  "offset": 1
}

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
offset
number

Number of workloads to skip when retrieving the list of workloads

Default value: 0
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": "2021-05-05 00:56:04.569709",
      "ended": "2021-05-05 00:56:04.569709",
      "backend": "ibm_seattle",
      "instance": "ibmq/open/main",
      "user_id": "65f0478ed32a1891af0a8d31",
      "accepting_jobs": true,
      "mode": "job",
      "status": "in_progress",
      "status_reason": "Ran too long",
      "tags": [
        "test-job",
        "foo",
        "bar"
      ],
      "usage_seconds": 1.5,
      "estimated_running_time_seconds": 123,
      "estimated_start_time_seconds": 123
    }
  ],
  "count": 5,
  "limit": 5,
  "offset": 1
}
Was this page helpful?
Report a bug or request content on GitHub.