Get a batch job

GET/lang2fhir/batch/{job_id}

Returns a job's record, its per-status item counts, and one page of per-item statuses.

Items are listed in a stable order that is not upload order and is the same across pages. Match each entry to your own records by its id (your correlation label) or item_id (from the upload response), never by position.

RequiresBearerauthentication

Path parameters

job_idstringrequired

Query parameters

cursorstringoptional

Opaque pagination cursor from a previous page's next_cursor.

limitintegeroptionaldefault 20

Page size for the item-status page. Defaults to 20; values above 100 are clamped to 100.

Returns  

The job record, counts, and a page of item statuses

Response fields

job_idstringoptional
request_idstringoptional
statusstringoptional
finalizedbooleanoptional
total_itemsintegeroptional
errorobjectoptional
kindstringoptional
messagestringoptional
created_atstringoptional
updated_atstringoptional
completed_atstringoptional
expires_atstringoptional
countsobjectoptional
totalintegeroptional
pendingintegeroptional
processingintegeroptional
succeededintegeroptional
failedintegeroptional
itemsarray<object>optional
item_idstringoptional
idstringoptional
statusstringoptional
attemptsintegeroptional
detect_retriesintegeroptional
result_sizeintegeroptional
errorobjectoptional
kindobjectoptional
messageobjectoptional
completed_atstringoptional
next_cursorstringoptional
has_morebooleanoptional
GETRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X GET "https://experiment.app.pheno.ml/lang2fhir/batch/abc-123-def-456?cursor=example&limit=20" \
  -H "Authorization: Bearer $PHENOML_TOKEN"
200 OKExample Response
{
  "job_id": "l2f_batch_6f1d2c3a-8b4e-4f5a-9c7d-0e1f2a3b4c5d",
  "request_id": "submit-2025-09-02-batch-001",
  "status": "pending",
  "finalized": false,
  "total_items": 12,
  "error": {
    "kind": "processing_failed",
    "message": "the item could not be converted"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "completed_at": "2024-01-15T09:30:00Z",
  "expires_at": "2024-01-15T09:30:00Z",
  "counts": {
    "total": 12,
    "pending": 3,
    "processing": 2,
    "succeeded": 6,
    "failed": 1
  },
  "items": [
    {
      "item_id": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
      "id": "chart-note-0042",
      "status": "succeeded",
      "attempts": 1,
      "detect_retries": 1,
      "result_size": 20482,
      "error": {
        "kind": {},
        "message": {}
      },
      "completed_at": "2024-01-15T09:30:00Z"
    }
  ],
  "next_cursor": "<cursor>",
  "has_more": false
}