cURL
curl --request POST \ --url https://dash.empirical.run/api/resources \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "project_id": 123, "name": "<string>", "mime_type": "<string>", "size_bytes": 123, "url": "<string>", "description": "<string>" } '
{ "data": { "resource": { "id": 123, "name": "<string>", "url": "<string>", "description": "<string>", "mime_type": "<string>", "size_bytes": 123, "status": "pending", "access_level": "<string>", "created_by": "<string>", "created_at": "<string>", "updated_at": "<string>", "upload_url": "<string>" } } }
Creates a resource record and returns a presigned upload URL. Upload the file via PUT to the upload_url, then confirm with PATCH.
upload_url
API key from the Empirical dashboard.
Resource to create.
Created resource with presigned upload URL.
Show child attributes
Was this page helpful?