Add Jobs
const url = 'https://example.com/api/v2/batches/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/jobs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '[{"runs":100,"variables":{"omega":5}}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v2/batches/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/jobs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ { "runs": 100, "variables": { "omega": 5 } } ]'Add additional jobs to an existing batch that has not yet been completed.
Each job specifies variable assignments for the batch's parametrized
sequence, or provides its own sequence via the sequence field.
The batch must still be open (not completed or canceled). The project
will be billed for each added job.
Returns: The updated batch with the newly added jobs.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “ Responses ”Successful Response
object
Response for a batch request which includes its jobs data but without the results.
This schema defines all the fields that can be publicly shared by the API.
object
Unique identifier for the batch.
Current batch status.
Deprecated. Use open instead. Indicates whether the batch is still accepting additional jobs. False means the batch is open; True means it is closed.
Whether the batch is open and accepting additional jobs.
Deprecated. Priority of the batch.
Target device type for the batch.
ID of the user who created the batch.
ID of the project this batch belongs to.
Timestamp when the batch was created.
Timestamp of the last batch update.
Total number of jobs in the batch.
Number of jobs grouped by status.
object
User-defined labels for organizing batches.
Response to a request for a job.
This schema defines all the fields that can be publicly shared by the API and do not require significant computational resources. For example, 'logs_links' or 'results link'.
object
Unique identifier for the job.
Current job status.
ID of the batch this job belongs to.
ID of the project this job belongs to.
Timestamp when the job was created.
Timestamp of the last job update.
Position in the creation order within the batch.
Priority queue on which the batch is scheduled.
Example
{ "data": { "complete": false, "created_at": "2025-01-15T10:30:00Z", "device_type": "FRESNEL", "id": "00000000-0000-0000-0000-000000000002", "jobs": [ { "batch_id": "00000000-0000-0000-0000-000000000002", "created_at": "2025-01-15T10:30:00Z", "creation_order": 0, "id": "00000000-0000-0000-0000-000000000003", "progress": 0, "project_id": "00000000-0000-0000-0000-000000000001", "runs": 100, "status": "PENDING", "updated_at": "2025-01-15T10:30:00Z", "variables": { "omega": 5 } } ], "jobs_count": 1, "jobs_count_per_status": { "PENDING": 1 }, "open": true, "priority": 0, "project_id": "00000000-0000-0000-0000-000000000001", "queue_priority": "MEDIUM", "sequence_builder": "<serialized Pulser sequence>", "status": "PENDING", "tags": [], "updated_at": "2025-01-15T10:30:00Z", "user_id": "user-123" }}Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}