Job API Endpoints
1. Create and Invoke Job Endpoint
Purpose: Create and execute a job using a specified function.
Method:
POSTParameters:
function_id: The ID of the function to be used in the job.provider: The provider (e.g., AWS, IBM) responsible for running the job.device: The specific device (e.g., quantum computer, GPU) on which the job will execute.shots: The number of executions (shots) to run the job.
Response:
The server responds with a202 Acceptedstatus and generates a job ID for tracking the job's progress.
2. Track Job Status Endpoint
Purpose: Check the status of an invoked job.
Parameters:
job_id: The ID of the job to track.
Response:
Returns the job status (e.g., "Running", "Completed", "Failed") and additional information about the job's progress.
3. Get Job Results and Logs Endpoint
Purpose: Retrieve the results and logs of a completed job.
Method:
GETParameters:
job_id: The ID of the job to retrieve results and logs for.
Response:
Returns the job results, including output data and logs for debugging or analysis.
4. Cancel or Retry Job Endpoint
Purpose: Cancel or retry a job.
Methods:
- Cancel:
DELETE - Retry:
POST
- Cancel:
Parameters:
job_id: The ID of the job to cancel or retry.
Response:
Returns a200 OKstatus upon successful cancellation or retry, along with the updated job status.