The REST API directly¶
You may be working in a language other than Python, or building a service against datalab. If so, you can talk to the REST API yourself.
Prefer the Python client where you can
The REST API does change between versions. The Python client absorbs most of those changes for you.
The API address¶
The API usually has a different address from the web app. For example, the demo web app is at
demo.datalab-org.io and its API is at demo-api.datalab-org.io. Ask your administrator for
yours.
Authenticating a request¶
Send your API key in the DATALAB-API-KEY header:
Useful starting points¶
| Endpoint | Purpose |
|---|---|
GET /info |
Instance details, such as the version and identifier prefix |
GET /info/types |
The item types this instance has |
GET /info/blocks |
The data block types this instance has |
GET /samples/ |
Your samples and cells |
GET /items/<refcode> |
One item, with its details |
GET /collections |
Your collections |
The server's routes are listed in the main documentation. The Python client's source code is also a good guide to how each request is made.