Getting Started
API Reference
Authentication
Alls APIs are authenticated through Basic Authentication. This takes the form of a base64-encoded client ID and client secret, joined by a colon.
client_id:client_secret
Query Task Status
You can check the status of any task by querying the task
API:
https://api.beam.cloud/v1/task/{TASK_ID}/status/
Request
curl -X GET \
--header "Content-Type: application/json" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
"https://api.beam.cloud/v1/task/{TASK_ID}/status/"
Response
If you’ve saved any Outputs in your task, you’ll be able to retrieve pre-signed URLs to access the files.
The full response includes:
- Task ID
- Time the task started, or null if it hasn’t started yet (but is in the queue)
- Time the task ended, or null if it is still running, or hasn’t started yet
- If any outputs are saved: a dictionary of outputs, containing pre-signed URLs to download the files
{
"task_id": "edbcf7ff-e8ce-4199-8661-8e15ed880481",
"started_at": "2022-11-04T19:43:25.668303Z",
"ended_at": "2022-11-04T19:43:26.017401Z",
"outputs": {
"myimage": {
"path": "output.png",
"name": "myimage",
"url": "http://data.beam.cloud/outputs/6446df99cf455a04e0335d9b/z6sks/z6sks-0001/edbcf7ff-e8ce-4199-8661-8e15ed880481/myoutput.zip"
}
}
}
Cancel Tasks
Tasks can be cancelled through the api.beam.cloud/v1/task/cancel/
endpoint.
Request
curl -X DELETE --compressed 'https://api.beam.cloud/v1/task/cancel/' \
-H 'Authorization: Basic [YOUR_AUTH_TOKEN]' \
-H 'Content-Type: application/json' \
-d '{"task_ids": ["TASK_ID"]}'
This API accepts a list of tasks, which can be passed in like this:
{
"task_ids":[
"70101e46-269c-496b-bc8b-1f7ceeee2cce",
"81bdd7a3-3622-4ee0-8024-733227d511cd",
"7679fb12-94bb-4619-9bc5-3bd9c4811dca"
]
}
Response
200
{}
Was this page helpful?