Drafts API
The Drafts API provides read-only access to CRF Draft objects in TrialGrid. Use it to list and retrieve drafts and the design objects they contain — folders, forms, fields, edit checks, derivations and so on.
The API is read-only: creating and updating draft objects via the API is not currently supported. For the full request and response schema of every endpoint, see the Swagger documentation (and the Swagger and the Browseable API page).
Drafts
GET /api/v2/drafts/— list drafts the user has access to.GET /api/v2/drafts/<id>/— retrieve a single draft.
Draft objects
Each draft contains a number of design objects. Every endpoint family below follows the same three-view shape:
GET /api/v2/drafts/<draft_id>/<family>/— list view.GET /api/v2/drafts/<draft_id>/<family>/<id>— detail view.GET /api/v2/drafts/<draft_id>/<family>/<id>/metadata— detail plus Labels, Comments and Custom Properties (Metadata).
See Lists, filtering and object detail for the response format and the available query parameters for filtering and expansion.
The available object families are:
Family |
URL path |
Notes |
|---|---|---|
Folders |
|
|
Forms |
|
|
Fields |
|
|
Edit Checks |
|
Use |
Derivations |
|
|
Matrices |
|
|
Custom Functions |
|
|
Data Dictionaries |
|
|
Data Dictionary Entries |
|
|
Unit Dictionaries |
|
|
Test Cases |
|
Standards deviation explanations
For Library Drafts you can additionally retrieve explanations for standards deviations recorded against drafts that link to the library:
GET /api/v2/draft/<draft_id>/standards_explanations/— list explanations.GET /api/v2/draft/<draft_id>/standards_explanations/<id>/— retrieve one.
This endpoint additionally requires the can_access_user_api flag on the user (see
User API).