Create an upload
POST/v1/uploads
Issues a short-lived presigned URL for direct upload to object storage. The returned id is used to reference the upload from resources that accept binary content.
Create an upload
curl https://api.cadenya.com/v1/uploads \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CADENYA_API_KEY" \
-d '{
"metadata": {
"name": "name"
},
"spec": {
"contentType": "contentType",
"filename": "filename",
"sizeBytes": "sizeBytes"
}
}'{
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"status": "UPLOAD_STATUS_UNSPECIFIED",
"uploadUrl": "uploadUrl",
"uploadUrlExpiresAt": "2019-12-27T18:11:19.117Z"
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"contentType": "contentType",
"filename": "filename",
"sizeBytes": "sizeBytes"
}
}Returns Examples
{
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"status": "UPLOAD_STATUS_UNSPECIFIED",
"uploadUrl": "uploadUrl",
"uploadUrlExpiresAt": "2019-12-27T18:11:19.117Z"
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"contentType": "contentType",
"filename": "filename",
"sizeBytes": "sizeBytes"
}
}