Data Hub
Lab Notebooks

Remove runs from a lab notebook

Requires scope `lab-notebooks:write`. Reports an outcome for each run instead of failing the whole request. The lab notebook stays, even with no runs left. Returns 409 when the lab notebook is deleted. A POST rather than a DELETE with a body, which some proxies and clients drop. 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/remove

Requires scope lab-notebooks:write. Reports an outcome for each run instead of failing the whole request. The lab notebook stays, even with no runs left. Returns 409 when the lab notebook is deleted. A POST rather than a DELETE with a body, which some proxies and clients drop. 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/remove" \  -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": "removed"    }  ],  "counts": {    "removed": 0,    "not_in_lab_notebook": 0,    "run_deleted": 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    }  }}