Uploads
List uploads
GET
/v1/uploads List uploads for a project, or get a single upload when a file hash is provided.
Request
curl "https://api.rendley.com/v1/uploads?project_id=PROJECT_ID" \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.rendley.com/v1/uploads?project_id=PROJECT_ID", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json(); import requests
res = requests.get(
"https://api.rendley.com/v1/uploads?project_id=PROJECT_ID",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"] Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | Required | Project ID |
hash | string | Optional | File hash to fetch a single upload |
Example response
{
"data": [
{
"file_hash": "string",
"mime_type": "string",
"status": "string",
"storage_url": "string"
}
]
} Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Create an upload
POST
/v1/uploads Create a single upload and get a presigned URL to upload the file bytes to.
Request
curl -X POST "https://api.rendley.com/v1/uploads" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_hash": "<file_hash>",
"media_id": "<media_id>",
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/uploads", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"file_hash": "<file_hash>",
"media_id": "<media_id>",
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"file_hash": "<file_hash>",
"media_id": "<media_id>",
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
duration | number | Optional | |
file_hash | string | Required | |
file_size | integer | Optional | |
media_id | string | Required | |
metadata | string | Optional | |
mime_type | string | Optional | |
original_file_name | string | Optional | |
project_id | string | Required |
Example response
{
"data": {
"presigned_url": "string",
"upload_id": "string"
}
} Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Delete an upload
DELETE
/v1/uploads Delete an upload from a project by its file hash.
Request
curl -X DELETE "https://api.rendley.com/v1/uploads?project_id=PROJECT_ID&hash=HASH" \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.rendley.com/v1/uploads?project_id=PROJECT_ID&hash=HASH", {
method: "DELETE",
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json(); import requests
res = requests.delete(
"https://api.rendley.com/v1/uploads?project_id=PROJECT_ID&hash=HASH",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"] Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | Required | Project ID |
hash | string | Required | File hash of the upload to delete |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Complete an upload
POST
/v1/uploads/{id}/complete Mark a single upload as completed by its ID.
Request
curl -X POST "https://api.rendley.com/v1/uploads/ID/complete" \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.rendley.com/v1/uploads/ID/complete", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads/ID/complete",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"] Path parameters
| Name | Type | Description |
|---|---|---|
id | string | Upload ID |
Response codes
| Status | Description |
|---|---|
200 | OK |
401 | Unauthorized |
404 | Not Found |
Create a batch of uploads
POST
/v1/uploads/batch Create multiple uploads at once, returning presigned URLs for accepted files and reasons for rejected ones.
Request
curl -X POST "https://api.rendley.com/v1/uploads/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"files": [],
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/uploads/batch", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"files": [],
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"files": [],
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
files | array<object> | Required | |
project_id | string | Required |
Example response
{
"data": {
"items": [
{
"media_id": "string",
"presigned_url": "string",
"upload_id": "string"
}
],
"rejected": [
{
"media_id": "string",
"reason": "string"
}
]
}
} Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Complete a batch of uploads
POST
/v1/uploads/batch/complete Mark a batch of uploads as completed by their upload IDs.
Request
curl -X POST "https://api.rendley.com/v1/uploads/batch/complete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"upload_ids": []
}' const res = await fetch("https://api.rendley.com/v1/uploads/batch/complete", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"upload_ids": []
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads/batch/complete",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"upload_ids": []
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
upload_ids | array<string> | Required |
Example response
{
"data": {
"completed": 0,
"failed": [
{
"error": "string",
"upload_id": "string"
}
]
}
} Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
Abort a multipart upload
POST
/v1/uploads/multipart/abort Abort an in-progress multipart upload.
Request
curl -X POST "https://api.rendley.com/v1/uploads/multipart/abort" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"s3_upload_id": "<s3_upload_id>",
"upload_id": "<upload_id>"
}' const res = await fetch("https://api.rendley.com/v1/uploads/multipart/abort", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"s3_upload_id": "<s3_upload_id>",
"upload_id": "<upload_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads/multipart/abort",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"s3_upload_id": "<s3_upload_id>",
"upload_id": "<upload_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
s3_upload_id | string | Required | |
upload_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
Complete a multipart upload
POST
/v1/uploads/multipart/complete Complete a multipart upload by submitting the uploaded parts.
Request
curl -X POST "https://api.rendley.com/v1/uploads/multipart/complete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"parts": [],
"s3_upload_id": "<s3_upload_id>",
"upload_id": "<upload_id>"
}' const res = await fetch("https://api.rendley.com/v1/uploads/multipart/complete", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"parts": [],
"s3_upload_id": "<s3_upload_id>",
"upload_id": "<upload_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads/multipart/complete",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"parts": [],
"s3_upload_id": "<s3_upload_id>",
"upload_id": "<upload_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
parts | array<object> | Required | |
s3_upload_id | string | Required | |
upload_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
Initiate a multipart upload
POST
/v1/uploads/multipart/initiate Initiate a multipart upload and get presigned URLs for each part.
Request
curl -X POST "https://api.rendley.com/v1/uploads/multipart/initiate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_hash": "<file_hash>",
"media_id": "<media_id>",
"part_count": 0,
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/uploads/multipart/initiate", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"file_hash": "<file_hash>",
"media_id": "<media_id>",
"part_count": 0,
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/uploads/multipart/initiate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"file_hash": "<file_hash>",
"media_id": "<media_id>",
"part_count": 0,
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
duration | number | Optional | |
file_hash | string | Required | |
file_size | integer | Optional | |
media_id | string | Required | |
metadata | string | Optional | |
mime_type | string | Optional | |
original_file_name | string | Optional | |
part_count | integer | Required | |
project_id | string | Required |
Example response
{
"data": {
"presigned_urls": [
{
"part_number": 0,
"url": "string"
}
],
"s3_upload_id": "string",
"upload_id": "string"
}
} Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |