Cancel a batch job

POST/lang2fhir/batch/{job_id}/cancel
RequiresBearerauthentication

Path parameters

job_idstringrequired
Returns  

Response fields

job_idstringrequired
request_idstringoptional
statusstringrequired
pendingprocessingcompletedfailedcanceled
finalizedbooleanrequired
total_itemsintegerrequired
errorobjectoptional
created_atstring (date-time)required
updated_atstring (date-time)required
completed_atstring (date-time)optional
expires_atstring (date-time)required
POSTRequest
# 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 POST "https://experiment.app.pheno.ml/lang2fhir/batch/abc-123-def-456/cancel" \
  -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"
}