EN IT

Assets

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

Base URL: https://api.contit.cloud

GET /assets/{id}

Get single asset

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

Requires ReadAccess policy

Path Parameters

NameTypeRequiredDescription
id string The asset ID (GUID)

Responses

200 Success
id string Asset ID
title string Asset title
description string Asset description
fileInfo object File metadata
assetType string Asset type classification
lastUpdate datetime Last update timestamp
401 Unauthorized
404 Not Found

Code examples

curl -X GET "https://api.contit.cloud/assets/{id}" \
  -H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var response = await http.GetAsync("https://api.contit.cloud/assets/{id}");

response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
  "https://api.contit.cloud/assets/{id}",
  {
    method: "GET",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
    }
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}

response = requests.get(
    "https://api.contit.cloud/assets/{id}",
    headers=headers
)

data = response.json()
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 ReadAccess policy

Request Body application/json

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

Responses

200 Success — returns matching asset or null
id string Asset ID
title string Asset title
fileInfo object File metadata
401 Unauthorized
404 Not 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"
}'
var client = new ContitClient(
    new ClientContitConfiguration(clientId, clientSecret));

var result = await client.Asset.GetAssets(new AssetsRequest
{
    Page = 1, PageSize = 20
});
const response = await fetch(
  "https://api.contit.cloud/assets/getByHash",
  {
    method: "POST",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
  "hash": "hash_value",
  "size": "size_value"
})
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
  "hash": "hash_value",
  "size": "size_value"
}

response = requests.post(
    "https://api.contit.cloud/assets/getByHash",
    json=payload,
    headers=headers
)

data = response.json()
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 WriteAccess policy

Path Parameters

NameTypeRequiredDescription
id string The asset ID (GUID)

Request Body application/json

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

Responses

200 Success — metadata updated
401 Unauthorized
404 Not 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"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var content = new StringContent("{
  \"title\": \"title_value\",
  \"description\": \"description_value\"
}",
    Encoding.UTF8, "application/json");
var response = await http.PutAsync(
    "https://api.contit.cloud/assets/{id}", content);

response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
  "https://api.contit.cloud/assets/{id}",
  {
    method: "PUT",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
  "title": "title_value",
  "description": "description_value"
})
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
  "title": "title_value",
  "description": "description_value"
}

response = requests.put(
    "https://api.contit.cloud/assets/{id}",
    json=payload,
    headers=headers
)

data = response.json()
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.

Requires 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)
chunkSize integer Size of this chunk in bytes
totalChunkCount integer Total number of chunks required to complete the 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

202 First chunk accepted — asset record created, returns the asset object
id string Asset ID
title string Asset title
fileInfo object File metadata
assetType string Detected asset type
200 Subsequent chunk received — returns the asset ID string
401 Unauthorized
403 Forbidden
500 Server 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"
}'
var client = new ContitClient(
    new ClientContitConfiguration(clientId, clientSecret));

await client.Asset.UploadAsset(new UploadAssetRequest
{
    InputFile = stream,
    FileName = "file.pdf",
    CheckMd5BeforeSend = true
});
const response = await fetch(
  "https://api.contit.cloud/assets/uploadAsset",
  {
    method: "POST",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
  "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"
})
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
  "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"
}

response = requests.post(
    "https://api.contit.cloud/assets/uploadAsset",
    json=payload,
    headers=headers
)

data = response.json()
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 WriteAccess policy

Path Parameters

NameTypeRequiredDescription
id string The asset ID (GUID)

Responses

200 Success — asset deleted
401 Unauthorized
404 Not Found

Code examples

curl -X DELETE "https://api.contit.cloud/assets/{id}" \
  -H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var content = new StringContent("{}",
    Encoding.UTF8, "application/json");
var response = await http.DeleteAsync(
    "https://api.contit.cloud/assets/{id}", content);

response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
  "https://api.contit.cloud/assets/{id}",
  {
    method: "DELETE",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
    }
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}

response = requests.delete(
    "https://api.contit.cloud/assets/{id}",
    headers=headers
)

data = response.json()
Example Response 200
{
  "success": true
}
Try it Live