curl --request POST \
--url https://api.tread-horizon.com/v1/direct_uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "<string>",
"byte_size": 123,
"checksum": "<string>",
"content_type": "<string>",
"metadata": {}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"byte_size": 123,
"checksum": "<string>",
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"filename": "<string>",
"key": "<string>",
"service_name": "<string>",
"signed_id": "<string>",
"direct_upload": {
"url": "<string>",
"headers": {}
},
"metadata": {}
}
}Create a DirectUpload.
The checksum must be calculated exactly the way rails expects it (javascript example).
You should upload the file to direct_upload.url using any provided headers from direct_upload.headers.
Once this is done you can use signed_id in place of a file in any endpoint that accepts file uploads.
curl --request POST \
--url https://api.tread-horizon.com/v1/direct_uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "<string>",
"byte_size": 123,
"checksum": "<string>",
"content_type": "<string>",
"metadata": {}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"byte_size": 123,
"checksum": "<string>",
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"filename": "<string>",
"key": "<string>",
"service_name": "<string>",
"signed_id": "<string>",
"direct_upload": {
"url": "<string>",
"headers": {}
},
"metadata": {}
}
}Documentation Index
Fetch the complete documentation index at: https://docs.tread.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Accept-Language request HTTP header indicates the natural language and locale that the client prefers.
"en"
Created
Show child attributes