Skip to main content
GET
/
job_status
Check Job Status
curl --request GET \
  --url https://api.example.com/job_status
{
  "status": "<string>",
  "result": {
    "mcqs": [
      {
        "question": "<string>",
        "options": [
          {}
        ],
        "correct_answer": "<string>",
        "bloom_level": "<string>",
        "explanation": "<string>"
      }
    ]
  },
  "error": "<string>"
}
Checks the status of an assessment generation job and retrieves results when complete.

Request

Query Parameters

job_id
string
required
The job identifier returned from the Generate Assessment endpoint.

Response

The response structure varies based on the job status:

Job Not Found

status
null
Returns null if the job ID doesn’t exist or has expired.

Job Finished Successfully

status
string
Returns "finished" when job completed successfully.
result
object
Contains the generated assessment content.

Job Failed

status
string
Returns "failed" when job encountered an error.
error
string
Error message describing what went wrong.

Job In Progress

status
string
Returns current job status: "queued", "started", or other intermediate states.

Example Requests

curl -X GET "http://localhost:8000/job_status?job_id=abc123-def456-ghi789"

Example Responses

Job Still Processing

{
  "status": "started"
}

Job Completed

{
  "status": "finished",
  "result": {
    "mcqs": [
      {
        "question": "What is the primary function of chlorophyll in photosynthesis?",
        "options": [
          "Absorb light energy",
          "Store glucose",
          "Release oxygen",
          "Transport water"
        ],
        "correct_answer": "Absorb light energy",
        "bloom_level": "remember",
        "explanation": "Chlorophyll is the pigment that captures light energy from the sun, which is the first step in photosynthesis."
      },
      {
        "question": "How would limiting carbon dioxide affect the rate of photosynthesis?",
        "options": [
          "No effect",
          "Increase the rate",
          "Decrease the rate",
          "Stop it completely"
        ],
        "correct_answer": "Decrease the rate",
        "bloom_level": "analyze",
        "explanation": "Carbon dioxide is a key reactant in photosynthesis. Limiting it would slow down the process as plants have less raw material to convert into glucose."
      }
    ]
  }
}

Job Failed

{
  "status": "failed",
  "error": "Connection timeout to vector database"
}

Job Not Found

{
  "status": null
}

Polling Recommendations

  • Poll this endpoint every 2-3 seconds while status is in progress
  • Jobs have a 600-second (10-minute) timeout
  • Once status is "finished", save the result immediately as job data may expire
  • Use the Save Assessment endpoint to persist results to your account

Build docs developers (and LLMs) love