Data Hub
Lab Notebooks

Add runs to a lab notebook

Requires scope `lab-notebooks:write`. Reports an outcome for each run instead of failing the whole request. Runs already in the lab notebook stay as they are. Returns 409 when the lab notebook is deleted. A token that registered a watcher gets 403 for the whole request when any listed run is on an instrument whose active watcher it didn't register.

POST
/lab-notebooks/{labNotebookId}/runs

Requires scope lab-notebooks:write. Reports an outcome for each run instead of failing the whole request. Runs already in the lab notebook stay as they are. Returns 409 when the lab notebook is deleted. A token that registered a watcher gets 403 for the whole request when any listed run is on an instrument whose active watcher it didn't register.

Authorization

bearerAuth
AuthorizationBearer <token>

Personal access tokens begin with dhub_… and are restricted by their assigned scopes.

In: header

Path Parameters

labNotebookId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/lab-notebooks/9b2c4e1a-7d3f-4a5b-8c6d-0e1f2a3b4c5d/runs" \  -H "Content-Type: application/json" \  -d '{    "runs": [      {        "instrument_id": "string",        "run_id": "string"      }    ]  }'
{  "lab_notebook_id": "68d3dae3-a03e-426a-9c74-40c2ae60b51f",  "results": [    {      "instrument_id": "string",      "run_id": "string",      "outcome": "added"    }  ],  "counts": {    "added": 0,    "already_in_lab_notebook": 0,    "run_deleted": 0,    "limit_reached": 0,    "not_found": 0  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}