Accounts
Get account configuration
Get the current account information. If no account information is found, returns the default configuration.
HTTP Response Status Codes
Status code | Description |
---|---|
200 | Account configuration successfully retrieved |
400 | Bad Request |
401 | Unauthorized |
404 | Not Found |
500 | Internal error |
Code samples
GET
/v1/accounts/{id}curl -X GET \
/api/v1/accounts/{id} \
-H 'Authorization: Bearer YOUR-TOKEN' \
-H 'Accept: application/json'
import requests
response = requests.request(
"GET",
"/api/v1/accounts/{id}",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
},
)
print(response.json())
Responses
{
"plans": [
{
"plan_id": "plan-id-1",
"usage_allocation_seconds": 200,
"unallocated_usage_seconds": 200,
"backends": [
"ibm_backend"
],
"max_ttl": 28800,
"active_ttl": 28800,
"interactive_ttl": 60
},
{
"plan_id": "plan-id-2",
"usage_allocation_seconds": 1000,
"unallocated_usage_seconds": 150,
"backends": [
"backend1",
"backend2"
]
}
]
}
{
"type": "object",
"description": "Configuration for an account managed by the IBM Qiskit Runtime service.",
"properties": {
"plans": {
"description": "The list of configurations for the account per plan",
"type": "array",
"items": {
"allOf": [
{
"properties": {
"plan_id": {
"type": "string",
"description": "The plan id as defined in Global Catalog",
"pattern": "^.*$",
"minLength": 1,
"maxLength": 128
},
"usage_allocation_seconds": {
"type": "integer",
"description": "The maximum sum of allowable usage allocation across all instances in the account."
},
"backends": {
"type": "array",
"description": "List of backends to allow the account to assign for instances.",
"items": {
"type": "string",
"pattern": "^.*$",
"minLength": 1,
"maxLength": 128
},
"minItems": 0,
"maxItems": 100
},
"max_ttl": {
"type": "integer",
"description": "The maximum time (in seconds) for session to run, subject to plan limits."
},
"active_ttl": {
"type": "integer",
"description": "The remaining time (in seconds) for the session to be in the active state while jobs are running. Must be less than or equal to max ttl."
},
"interactive_ttl": {
"type": "integer",
"description": "The maximum time (in seconds) between jobs to keep the session active. Must be less than or equal to active ttl."
}
},
"required": [
"usage_allocation_seconds",
"backends",
"plan_id"
]
},
{
"type": "object",
"properties": {
"unallocated_usage_seconds": {
"type": "integer",
"description": "The remaining usage allocation that can still be allocated to instances."
}
}
}
]
},
"minItems": 0,
"maxItems": 20
}
},
"required": [
"plans"
]
}
Was this page helpful?
Report a bug or request content on GitHub.