Datasets
These endpoints allow you to programmatically interact with your datasets. You can create a dataset by going to the Datasets page in Autoblocks:
GEThttps://api.autoblocks.ai/datasets
Get a list of datasets
This endpoint returns a list of all of your datasets.
It is useful for getting the id
of a dataset so that you can use other endpoints that require a dataset's id
.
Code samples for getting a list of datasets
GET
https://api.autoblocks.ai/datasetscurl 'https://api.autoblocks.ai/datasets' \
--header "Authorization: Bearer $AUTOBLOCKS_API_KEY"
[
{
"id": "cljzx8zhd00077w3sqredd0fz",
"name": "My First Dataset"
}
]
GEThttps://api.autoblocks.ai/dataset/<datasetId>
Get a dataset
This endpoint allows you to get a dataset and its items.
Code samples for getting a dataset
GET
https://api.autoblocks.ai/datasets/<datasetId>curl 'https://api.autoblocks.ai/datasets/cljzx8zhd00077w3sqredd0fz' \
--header "Authorization: Bearer $AUTOBLOCKS_API_KEY"
{
"id": "cljzx8zhd00077w3sqredd0fz",
"name": "My First Dataset",
"items": [
{
"id": "cljzx8zhd00077w3sqredd0fz",
"input": "Item Input",
"output": "Item Output"
}
]
}