Download OpenAPI specification:
OpenSAFELY Reproducible Analytic Pipeline (RAP) API
Get the status (flags) for all backends.
Backend 'test' operating normally
{- "backends": [
- {
- "slug": "test",
- "last_seen": "2025-08-12T11:30:45.123456Z",
- "paused": {
- "status": "off",
- "since": "2025-08-12T11:30:45.123456Z"
}, - "db_maintenance": {
- "status": "off",
- "since": null,
- "type": null
}
}
]
}Create a RAP with one or more actions
| backend required | string The backend this RAP should run on |
| rap_id required | string^[a-z0-9]{16}$ A unique identifier for this RAP |
| workspace required | string[a-zA-Z0-9_-]+ |
| repo_url required | string |
| branch required | string |
| commit required | string^[0-9a-f]{40}$ commit sha |
| database_name required | string Enum: "default" "include_t1oo" |
| requested_actions required | Array of strings non-empty The explicitly requested actions to run as part of this RAP. Note that other actions may be run if they are unmet dependencies of the requested actions. |
| codelists_ok required | boolean |
| force_run_dependencies required | boolean |
| created_by required | string Username |
| project required | string |
| orgs required | Array of strings |
object or null Permissions and configuration to be applied to the execution of actions in this RAP. |
{- "backend": "test",
- "rap_id": "abcdefgh23456789",
- "workspace": "test-study",
- "branch": "main",
- "commit": "07d5f283bb66f52a49933b016cf8dc144cfc7180",
- "database_name": "default",
- "requested_actions": [
- "action1"
], - "codelists_ok": true,
- "force_run_dependencies": false,
- "created_by": "test_user",
- "project": "test-project",
- "orgs": [
- "opensafely"
], - "analysis_scope": null
}Jobs already created
{- "result": "No change",
- "details": "Jobs already created for rap_id 'a1b2c3d4e5f6g7h8'",
- "rap_id": "a1b2c3d4e5f6g7h8",
- "count": 1
}Cancel one or more actions.
| rap_id required | string^[a-z0-9]{16}$ |
| actions required | Array of strings non-empty |
{- "rap_id": "a1b2c3d4e5f6g7h8",
- "actions": [
- "action1"
]
}2 actions successfully cancelled
{- "result": "Success",
- "details": "2 actions cancelled",
- "count": 2
}Get the status of RAPs
| rap_ids required | Array of strings[ items^[a-z0-9]{16}$ ] |
{- "rap_ids": [
- "a1b2c3d4e5f6g7h8"
]
}success
{- "jobs": [
- {
- "action": "action1",
- "backend": "test",
- "completed_at": "None",
- "created_at": "2025-08-28T09:27:26.123456Z",
- "identifier": "zhgksvaob3u5opzv",
- "metrics": {
- "test": 0
}, - "rap_id": "tqyly5nljliltsxj",
- "requires_db": false,
- "run_command": "python myscript.py",
- "started_at": "None",
- "status": "failed",
- "status_code": "created",
- "status_message": "",
- "trace_context": {
- "traceparent": "00-ee668ef06f2f1564c028eea1d9be716d-5b3ca103cdd2a017-01"
}, - "updated_at": "2025-08-28T09:27:26.123456Z"
}
], - "unrecognised_rap_ids": [ ]
}