Usage
Get usage
Get usage by instance
HTTP Response Status Codes
Status code | Description |
---|---|
200 | Returns usage |
401 | Unauthorized |
500 | Internal server error |
Code samples
GET
/usagecurl -X GET \
https://api.quantum-computing.ibm.com/runtime/usage \
-H 'Authorization: Bearer YOUR-TOKEN' \
-H 'Accept: application/json'
import requests
response = requests.request(
"GET",
"https://api.quantum-computing.ibm.com/runtime/usage",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
},
)
print(response.json())
Responses
{
"period": {
"start": "2023-09-01T00:00:00.000Z",
"end": "2023-09-30T23:59:59.999Z"
},
"byInstance": [
{
"instance": "defaultHub/defaultGroup/defaultProject",
"usage": 10,
"quota": 600,
"pendingJobs": 2,
"maxPendingJobs": 3
}
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"example": {
"start": "2023-09-01T00:00:00.000Z",
"end": "2023-09-30T23:59:59.999Z"
}
},
"byInstance": {
"example": [
{
"instance": "defaultHub/defaultGroup/defaultProject",
"usage": 10,
"quota": 600,
"pendingJobs": 2,
"maxPendingJobs": 3
}
],
"type": "array",
"items": {
"type": "object",
"properties": {
"instance": {
"type": "string",
"example": "defaultHub/defaultGroup/defaultProject"
},
"quota": {
"type": "number",
"example": 10
},
"usage": {
"type": "number",
"example": 7
},
"pendingJobs": {
"type": "number",
"example": 2
},
"maxPendingJobs": {
"type": "number",
"example": 3
}
},
"required": [
"instance",
"quota",
"usage",
"pendingJobs",
"maxPendingJobs"
]
}
}
},
"required": [
"period",
"byInstance"
]
}
Was this page helpful?
Report a bug or request content on GitHub.