Create chunked upload session
POST
/v3/uploads
const url = 'https://api.cardio.ai/v3/uploads';const options = { method: 'POST', headers: {'X-Api-Token': '<X-Api-Token>', 'Content-Type': 'application/json'}, body: '{"total_size":1,"hash_sum":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cardio.ai/v3/uploads \ --header 'Content-Type: application/json' \ --header 'X-Api-Token: <X-Api-Token>' \ --data '{ "total_size": 1, "hash_sum": "example" }'Creates a new session for uploading a file in chunks.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Chunked upload request.
Media type application/json
Request payload for initializing a chunked upload.
object
total_size
required
Total size of the file to be uploaded in bytes.
integer format: uint32
hash_sum
required
SHA-256 hash of the full file, encoded with standard padded Base64.
string format: byte
Example generated
{ "total_size": 1, "hash_sum": "example"}Responses
Section titled “ Responses ”Successful response containing the upload session ID.
Media type application/json
Response payload for a chunked upload initialization.
object
upload_id
required
Unique identifier for the upload session.
string
Example generated
{ "upload_id": "example"}Bad Request - missing or invalid parameters.
Media type application/json
string
Example generated
exampleUnauthorized - missing, expired, or invalid token.
Media type application/json
string
Example generated
exampleUnsupported Media Type - Content-Type must be application/json.
Media type application/json
string
Example generated
exampleToo Many Requests - rate limit exceeded.
Media type application/json
string
Example generated
example