Skip to main content
POST
/
v1
/
custom-kpi-datasets
/
{dataset_id}
/
responses
/
attachments
/
presigned-url
Create Presigned Url
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({file_name: '<string>', content_length_bytes: 5242880, content_type: '<string>'})
};

fetch('https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id}/responses/attachments/presigned-url', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "upload_url": "<string>",
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "file_name": "<string>"
}

Authorizations

x-api-key
string
header
required

Headers

x-organization-id
string
x-api-key
string
x-user-id
string

Path Parameters

dataset_id
string<uuid>
required

Body

application/json

Request schema for generating a presigned PUT URL for evidence upload.

file_name
string
required
Required string length: 1 - 255
content_length_bytes
integer
required

File size in bytes; used to set FileModel.size_kb. Max 10 MB.

Required range: 0 < x <= 10485760
content_type
string
Maximum string length: 255

Response

Successful Response

Response schema with presigned URL and file metadata.

upload_url
string
required
file_id
string<uuid>
required
file_name
string
required