curl -X POST https://api.u1.archetypeai.app/v0.5/batch/jobs/job-2512078e5c9ce4d312a6681e771542/resume \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "job-2512078e5c9ce4d312a6681e771542"
response = requests.post(
f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}/resume",
headers={"Authorization": f"Bearer {api_key}"}
)
result = response.json()
print(f"Job {result['id']} status: {result['status']}")
const jobId = 'job-2512078e5c9ce4d312a6681e771542';
const response = await fetch(
`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/resume`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const result = await response.json();
console.log(`Job ${result.id} status: ${result.status}`);
{
"id": "job-2512078e5c9ce4d312a6681e771542",
"status": "PENDING"
}
{
"code": "job_not_found",
"message": "Job {id} not found",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
{
"code": "invalid_state_transition",
"message": "Cannot resume job in {status} state; only PAUSED or INTERRUPTED jobs can be resumed.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
Jobs
Resume Job
Resume a paused or interrupted job
POST
/
v0.5
/
batch
/
jobs
/
{id}
/
resume
curl -X POST https://api.u1.archetypeai.app/v0.5/batch/jobs/job-2512078e5c9ce4d312a6681e771542/resume \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "job-2512078e5c9ce4d312a6681e771542"
response = requests.post(
f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}/resume",
headers={"Authorization": f"Bearer {api_key}"}
)
result = response.json()
print(f"Job {result['id']} status: {result['status']}")
const jobId = 'job-2512078e5c9ce4d312a6681e771542';
const response = await fetch(
`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/resume`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const result = await response.json();
console.log(`Job ${result.id} status: ${result.status}`);
{
"id": "job-2512078e5c9ce4d312a6681e771542",
"status": "PENDING"
}
{
"code": "job_not_found",
"message": "Job {id} not found",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
{
"code": "invalid_state_transition",
"message": "Cannot resume job in {status} state; only PAUSED or INTERRUPTED jobs can be resumed.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
Requires version 1.1.5 or later of the Archetype platform.
Overview
This endpoint resumes a job identified by its job ID. Per the job status lifecycle, a job in thePAUSED or INTERRUPTED state transitions back to PENDING when resumed.
On success the endpoint returns the job ID and its new status.
Request
string
required
Job identifier. A TypeID-encoded identifier with the
job_ prefix.Response
On success, returns the resumed job record.string
The identifier of the resumed job (a TypeID-encoded
JobId).string
The job’s status after the transition:
PENDING.curl -X POST https://api.u1.archetypeai.app/v0.5/batch/jobs/job-2512078e5c9ce4d312a6681e771542/resume \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "job-2512078e5c9ce4d312a6681e771542"
response = requests.post(
f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}/resume",
headers={"Authorization": f"Bearer {api_key}"}
)
result = response.json()
print(f"Job {result['id']} status: {result['status']}")
const jobId = 'job-2512078e5c9ce4d312a6681e771542';
const response = await fetch(
`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/resume`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const result = await response.json();
console.log(`Job ${result.id} status: ${result.status}`);
{
"id": "job-2512078e5c9ce4d312a6681e771542",
"status": "PENDING"
}
{
"code": "job_not_found",
"message": "Job {id} not found",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
{
"code": "invalid_state_transition",
"message": "Cannot resume job in {status} state; only PAUSED or INTERRUPTED jobs can be resumed.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
Was this page helpful?
⌘I