Sorry, no results found for "".
Must be exactly "upload_request"
.
The original file name
"image.png"
Returns a resource object of type upload_request.
POST https://site-api.datocms.com/upload-requests HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "upload_request", "attributes": {} }}
curl -g 'https://site-api.datocms.com/upload-requests' \ -X POST \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"type":"upload_request","attributes":{}}}'
await fetch("https://site-api.datocms.com/upload-requests", { method: "POST", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { type: "upload_request", attributes: {} } }),});
HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "upload_request", "id": "/7/1455102967-image.png", "attributes": { "url": "https://dato-images.s3-eu-west-1.amazonaws.com/7/1455102967-image.png?X-Amz-Credential=AKIAJDTXTZHHDUCKAUMA%2F20160210", "request_headers": {} } }}