Jobs
Cancel Job
POST
/jobs/{job_qrn}/cancelCancel a quantum job.
Args:
- job_qrn (string): Job QRN (qBraid Resource Name)
Returns:
- Object containing a confirmation message, the job QRN, and the updated status
Raises:
- 400: Job is in an invalid state for cancellation or vendor is not supported
- 404: Job is not found
- 422: Validation error if the job_qrn parameter is invalid
Authorizations
X-API-KEYstringheaderrequiredAuthenticate requests using an API key linked to your qBraid account. Obtain your key by registering or logging in at account.qbraid.com.
Path Parameters
job_qrnstringrequiredJob QRN (qBraid Resource Name)
Response
202Successful Response
successbooleanrequiredWhether the cancellation was initiated successfully
dataobjectrequired404Job Not Found
422Validation Error
curl --request POST \
--url https://api-v2.qbraid.com/api/v1/jobs/%3Cjob_qrn%3E/cancel \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.qbraid.com/api/v1/jobs/%3Cjob_qrn%3E/cancel"
headers = {
"X-API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.json())const url = "https://api-v2.qbraid.com/api/v1/jobs/%3Cjob_qrn%3E/cancel";
const options = {
method: "POST",
headers: {"X-API-KEY":"<api-key>"},
};
const response = await fetch(url, options);
console.log(await response.json());{
"success": true,
"data": {
"message": "Job cancellation initiated successfully",
"jobQrn": "qbraid:job:abc123xyz",
"status": "CANCELLING"
}
}{
"detail": "Job not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}POST
Cancel Job
Cancel Job
Response
Fill in the request and press Send to see the live response.202
{
"success": true,
"data": {
"message": "Job cancellation initiated successfully",
"jobQrn": "qbraid:job:abc123xyz",
"status": "CANCELLING"
}
}Was this page helpful?
Thanks for your feedback.

