API reference

Assets

API referencehttps://api.contit.cloud

Assets

Endpoints for managing digital assets (files, images, documents) including upload, search, and metadata management.

GET /assets/{id}

Get single asset

Retrieve a single asset by its ID, including metadata and file information.

Requires the ReadAccess policy

Path parameters

NameTypeRequiredDescription
idstringThe asset ID (GUID)

Responses

200Success
idstringAsset ID
titlestringAsset title
descriptionstringAsset description
fileInfoobjectFile metadata
assetTypestringAsset type classification
lastUpdatedatetimeLast update timestamp
401Unauthorized
404Not Found

Code examples

curl -X GET "https://api.contit.cloud/assets/{id}" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response 200
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "title": "Company Logo",
  "description": "Main company logo in PNG format",
  "fileInfo": {
    "contentType": "image/png",
    "hash": "d41d8cd98f00b204e9800998ecf8427e",
    "fileSize": 245760,
    "fileName": "company-logo.png"
  },
  "assetType": "Image",
  "lastUpdate": "2026-03-10T08:30:00Z"
}
Try it Live
POST /assets/getByHash

Find asset by MD5 hash

Look up an existing asset by its MD5 hash and file size. Useful to detect duplicates before uploading.

Requires the ReadAccess policy

Request body application/json

PropertyTypeRequiredDescription
hash string MD5 hash of the file content
size long File size in bytes

Responses

200Success — returns matching asset or null
idstringAsset ID
titlestringAsset title
fileInfoobjectFile metadata
401Unauthorized
404Not Found — no asset with matching hash and size

Code examples

curl -X POST "https://api.contit.cloud/assets/getByHash" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "hash": "hash_value",
  "size": "size_value"
}'
Example request
{
  "hash": "d41d8cd98f00b204e9800998ecf8427e",
  "size": 245760
}
Example response 200
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "title": "Company Logo",
  "description": "Main company logo in PNG format",
  "fileInfo": {
    "contentType": "image/png",
    "hash": "d41d8cd98f00b204e9800998ecf8427e",
    "fileSize": 245760,
    "fileName": "company-logo.png"
  },
  "assetType": "Image",
  "lastUpdate": "2026-03-10T08:30:00Z"
}
Try it Live
PUT /assets/{id}

Update asset metadata

Update the title and description of an existing asset without replacing the file.

Requires the WriteAccess policy

Path parameters

NameTypeRequiredDescription
idstringThe asset ID (GUID)

Request body application/json

PropertyTypeRequiredDescription
title string — New title for the asset
description string — New description for the asset

Responses

200Success — metadata updated
401Unauthorized
404Not Found

Code examples

curl -X PUT "https://api.contit.cloud/assets/{id}" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "title_value",
  "description": "description_value"
}'
Example request
{
  "title": "Updated Company Logo",
  "description": "Refreshed brand logo — April 2026"
}
Example response 200
{
  "success": true
}
Try it Live
POST /assets/uploadAsset

Upload asset

Uploads a file to the platform using a chunked protocol. The same endpoint handles both the first chunk and all subsequent chunks. For the first chunk (ChunkIndex = 0) the asset record is created and the endpoint returns 202 Accepted with the asset object. For subsequent chunks it returns 200 OK with the asset ID. When the last chunk is received the file is fully assembled server-side. Chunks are validated against the session opened by the first chunk: chunkIndex must be within 0 and totalChunkCount - 1, totalChunkCount and fileUploadId must match the values declared on the first chunk, and a single chunk cannot exceed 8 MB. Uploads left unfinished are discarded after 24 hours.

Requires the WriteAccess policy

Request body application/json

PropertyTypeRequiredDescription
assetId string Unique asset ID (GUID) — must be the same for all chunks of the same file
fileUploadId string Unique upload session ID (GUID) — must be the same for all chunks of the same file
originalFileName string Original file name (e.g. photo.jpg)
chunkIndex integer Zero-based index of the current chunk (0 for the first chunk), must be lower than totalChunkCount
chunkSize integer Size of this chunk in bytes, at most 8388608
totalChunkCount integer Total number of chunks required to complete the upload, between 1 and 50000. Must be identical on every chunk of the same upload.
chunkByteOffset long Byte offset of this chunk within the full file
totalFileSize long Total file size in bytes
stream byte[] Binary data of the chunk (base64-encoded in JSON)
title string — Asset title (used only on the first chunk, ChunkIndex = 0)
description string — Asset description (used only on the first chunk, ChunkIndex = 0)
contentMD5 string — MD5 hash of the full file for integrity verification
ignoreCheckDuplicates boolean — If true, skips the duplicate detection check
clientInfo string — Arbitrary client metadata stored with the asset

Responses

202First chunk accepted — asset record created, returns the asset object
idstringAsset ID
titlestringAsset title
fileInfoobjectFile metadata
assetTypestringDetected asset type
200Subsequent chunk received — returns the asset ID string
400Bad Request — chunk index or count out of range, chunk too large, or chunk not belonging to the upload in progress
401Unauthorized
403Forbidden
500Server error — returns ProblemDetails

Code examples

curl -X POST "https://api.contit.cloud/assets/uploadAsset" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "assetId": "assetId_value",
  "fileUploadId": "fileUploadId_value",
  "originalFileName": "originalFileName_value",
  "chunkIndex": 1,
  "chunkSize": 1,
  "totalChunkCount": 1,
  "chunkByteOffset": "chunkByteOffset_value",
  "totalFileSize": "totalFileSize_value",
  "stream": [],
  "title": "title_value",
  "description": "description_value",
  "contentMD5": "contentMD5_value",
  "ignoreCheckDuplicates": true,
  "clientInfo": "clientInfo_value"
}'
Example request
{
  "assetId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
  "fileUploadId": "f6a7b8c9-d0e1-2345-fghi-678901234567",
  "originalFileName": "photo.jpg",
  "chunkIndex": 0,
  "chunkSize": 2097152,
  "totalChunkCount": 1,
  "chunkByteOffset": 0,
  "totalFileSize": 1536000,
  "stream": "(base64-encoded binary data)",
  "title": "Beach Photo",
  "description": "Sunset at the beach",
  "contentMD5": "a3f5b7d9e1c3456789012345abcdef01",
  "ignoreCheckDuplicates": false
}
Example response 200
{
  "id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
  "title": "Beach Photo",
  "description": "Sunset at the beach",
  "fileInfo": {
    "contentType": "image/jpeg",
    "hash": "a3f5b7d9e1c3456789012345abcdef01",
    "fileSize": 1536000,
    "fileName": "photo.jpg"
  },
  "assetType": "Image",
  "lastUpdate": "2026-03-20T16:45:00Z"
}
Try it Live
DELETE /assets/{id}

Delete asset

Permanently delete an asset and its associated file.

Requires the WriteAccess policy

Path parameters

NameTypeRequiredDescription
idstringThe asset ID (GUID)

Responses

200Success — asset deleted
401Unauthorized
404Not Found

Code examples

curl -X DELETE "https://api.contit.cloud/assets/{id}" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response 200
{
  "success": true
}
Try it Live