Uploads API
Store media once and reference the upload id from any number of posts. Simple, from-URL, large (signed PUT) and multipart uploads.
| Operation | Method and path |
|---|---|
| Get upload list | GET /api/v1/upload |
| Create upload | POST /api/v1/upload |
| Delete many uploads | DELETE /api/v1/upload |
| Get upload | GET /api/v1/upload/{id} |
| Delete upload | DELETE /api/v1/upload/{id} |
| Create upload from URL | POST /api/v1/upload/from-url |
| Initialize large upload | POST /api/v1/upload/init |
| Finalize large upload | POST /api/v1/upload/finalize |
| Initialize multipart upload | POST /api/v1/upload/multipart/init |
| Re-sign multipart upload parts | POST /api/v1/upload/multipart/sign |
| Complete multipart upload | POST /api/v1/upload/multipart/complete |
| Abort multipart upload | POST /api/v1/upload/multipart/abort |
/api/v1/upload Get upload list
upload.getList · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
teamId | query | string | nullable |
type | query | string | One of image, video, document · nullable |
types | query | string[] | nullable |
status | query | string | One of USED, UNUSED · nullable |
ids | query | string[] | nullable |
urls | query | string[] | nullable |
limit | query | integer | nullable |
includePosts | query | boolean | string | string | default true · nullable |
offset | query | integer | default 0 · nullable |
Example
curl -X GET "https://api.siaran.my/api/v1/upload/" \
-H "x-api-key: $SIAR_API_KEY" Response 200
20 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time -
postsobject[]5 fields
-
postIdstring required -
uploadIdstring required -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time -
deletedAtstring nullable date-time
-
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload Create upload
upload.create · requires x-api-key
Request body multipart/form-data
-
teamIdstring nullable -
filefile nullable
Example
curl -X POST "https://api.siaran.my/api/v1/upload/" \
-H "x-api-key: $SIAR_API_KEY" \
-F "teamId=TEAM_ID" \
-F "file=@./file.jpg" Response 200
19 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload Delete many uploads
upload.deleteMany · requires x-api-key
Request body application/json
-
idsstring[] required min 1 items
Example
curl -X DELETE "https://api.siaran.my/api/v1/upload/" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"ids": [
"ID_ID"
]
}' Response 200
19 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/{id} Get upload
upload.get · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Example
curl -X GET "https://api.siaran.my/api/v1/upload/ID" \
-H "x-api-key: $SIAR_API_KEY" Response 200
20 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time -
postsobject[]5 fields
-
postIdstring required -
uploadIdstring required -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time -
deletedAtstring nullable date-time
-
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/{id} Delete upload
upload.delete · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Example
curl -X DELETE "https://api.siaran.my/api/v1/upload/ID" \
-H "x-api-key: $SIAR_API_KEY" Response 200
19 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/from-url Create upload from URL
upload.createFromUrl · requires x-api-key
Request body application/json
-
teamIdstring nullable -
urlstring required uri
Example
curl -X POST "https://api.siaran.my/api/v1/upload/from-url" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"url": "https://example.com/file.jpg"
}' Response 200
19 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/init Initialize large upload
upload.initLargeUpload · requires x-api-key
Request body application/json
-
teamIdstring nullable -
fileNamestring required -
mimeTypestring requiredOne of:image/jpgimage/jpegimage/pngimage/gifvideo/mp4video/quicktimeapplication/pdf -
fileSizeinteger ≥ 1
Example
curl -X POST "https://api.siaran.my/api/v1/upload/init" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"fileName": "Example",
"mimeType": "image/jpg"
}' Response 200
2 top-level fields
-
urlstring required -
pathstring required
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/finalize Finalize large upload
upload.finalizeLargeUpload · requires x-api-key
Request body application/json
-
teamIdstring nullable -
pathstring required
Example
curl -X POST "https://api.siaran.my/api/v1/upload/finalize" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"path": "string"
}' Response 200
19 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/multipart/init Initialize multipart upload
upload.initMultipartUpload · requires x-api-key
Request body application/json
-
teamIdstring nullable -
fileNamestring required -
mimeTypestring requiredOne of:image/jpgimage/jpegimage/pngimage/gifvideo/mp4video/quicktimeapplication/pdf -
fileSizeinteger required ≥ 1
Example
curl -X POST "https://api.siaran.my/api/v1/upload/multipart/init" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"fileName": "Example",
"mimeType": "image/jpg",
"fileSize": 1
}' Response 200
4 top-level fields
-
uploadIdstring required -
pathstring required -
partSizeinteger required ≥ 1 -
partsobject[] required2 fields
-
partNumberinteger required ≥ 1≤ 10000 -
urlstring required uri
-
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/multipart/sign Re-sign multipart upload parts
upload.signMultipartParts · requires x-api-key
Request body application/json
-
teamIdstring nullable -
partNumbersinteger[] required min 1 itemsmax 10000 itemseach: ≥ 1each: ≤ 10000 -
pathstring required -
uploadIdstring required
Example
curl -X POST "https://api.siaran.my/api/v1/upload/multipart/sign" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"partNumbers": [
1
],
"path": "string",
"uploadId": "UPLOAD_ID"
}' Response 200
1 top-level fields
-
partsobject[] required2 fields
-
partNumberinteger required ≥ 1≤ 10000 -
urlstring required uri
-
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/multipart/complete Complete multipart upload
upload.completeMultipartUpload · requires x-api-key
Request body application/json
-
teamIdstring nullable -
partsobject[] required min 1 itemsmax 10000 items2 fields
-
partNumberinteger required ≥ 1≤ 10000 -
etagstring required min length 1
-
-
pathstring required -
uploadIdstring required
Example
curl -X POST "https://api.siaran.my/api/v1/upload/multipart/complete" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"parts": [
{
"partNumber": 1,
"etag": "string"
}
],
"path": "string",
"uploadId": "UPLOAD_ID"
}' Response 200
19 top-level fields
-
idstring required -
teamIdstring nullable -
organizationIdstring nullable -
iconUrlstring nullable uri -
thumbnailUrlstring nullable uri -
urlstring nullable uri -
externalLinkstring nullable uri -
iconPathstring nullable -
thumbnailPathstring nullable -
pathstring nullable -
typestring requiredOne of:imagevideodocument -
widthnumber nullable -
heightnumber nullable -
fileSizenumber nullable -
videoLengthnumber nullable -
mimestring nullable -
extstring nullable -
createdAtstring required nullable date-time -
updatedAtstring required nullable date-time
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error
/api/v1/upload/multipart/abort Abort multipart upload
upload.abortMultipartUpload · requires x-api-key
Request body application/json
-
teamIdstring nullable -
pathstring required -
uploadIdstring required
Example
curl -X POST "https://api.siaran.my/api/v1/upload/multipart/abort" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"path": "string",
"uploadId": "UPLOAD_ID"
}' Response 200
1 top-level fields
-
successboolean required
Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error