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/upload

Upload file

Upload a new file as an asset. Uses multipart/form-data encoding. Optionally checks MD5 to prevent duplicates.

Requires WriteAccess policy

Request Body application/json

PropertyTypeRequiredDescription
inputFile binary The file to upload
fileName string Desired file name for the asset
title string Title for the asset
description string Description for the asset
checkMd5BeforeSend boolean If true, check for duplicate by MD5 before storing

Responses

200 Success — returns the created asset
id string New asset ID
title string Asset title
fileInfo object File metadata
assetType string Detected asset type
401 Unauthorized

Code examples

curl -X POST "https://api.contit.cloud/assets/upload" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputFile": "inputFile_value",
  "fileName": "fileName_value",
  "title": "title_value",
  "description": "description_value",
  "checkMd5BeforeSend": true
}'
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/upload",
  {
    method: "POST",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
  "inputFile": "inputFile_value",
  "fileName": "fileName_value",
  "title": "title_value",
  "description": "description_value",
  "checkMd5BeforeSend": true
})
  }
);

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

headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
  "inputFile": "inputFile_value",
  "fileName": "fileName_value",
  "title": "title_value",
  "description": "description_value",
  "checkMd5BeforeSend": true
}

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

data = response.json()
Example Request
Content-Type: multipart/form-data; boundary=----Boundary

------Boundary
Content-Disposition: form-data; name="inputFile"; filename="photo.jpg"
Content-Type: image/jpeg

(binary data)
------Boundary
Content-Disposition: form-data; name="fileName"

photo.jpg
------Boundary
Content-Disposition: form-data; name="title"

Beach Photo
------Boundary
Content-Disposition: form-data; name="description"

Sunset at the beach
------Boundary
Content-Disposition: form-data; name="checkMd5BeforeSend"

true
------Boundary--
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
POST /assets/upload-chunk

Chunked upload

Upload a file in chunks for large files. Each chunk is uploaded individually and assembled server-side.

Requires WriteAccess policy

Request Body application/json

PropertyTypeRequiredDescription
originalFileName string The original file name
fileUploadId string A unique identifier for this upload session (GUID)
chunkIndex integer Zero-based index of this chunk
chunkSize long Size of this chunk in bytes
totalChunkCount integer Total number of chunks for the complete file
stream binary The chunk binary data

Responses

200 Success — chunk received. When the last chunk is uploaded, the asset is assembled and returned.
401 Unauthorized

Code examples

curl -X POST "https://api.contit.cloud/assets/upload-chunk" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "originalFileName": "originalFileName_value",
  "fileUploadId": "fileUploadId_value",
  "chunkIndex": 1,
  "chunkSize": "chunkSize_value",
  "totalChunkCount": 1,
  "stream": "stream_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/upload-chunk",
  {
    method: "POST",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
  "originalFileName": "originalFileName_value",
  "fileUploadId": "fileUploadId_value",
  "chunkIndex": 1,
  "chunkSize": "chunkSize_value",
  "totalChunkCount": 1,
  "stream": "stream_value"
})
  }
);

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

headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
  "originalFileName": "originalFileName_value",
  "fileUploadId": "fileUploadId_value",
  "chunkIndex": 1,
  "chunkSize": "chunkSize_value",
  "totalChunkCount": 1,
  "stream": "stream_value"
}

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

data = response.json()
Example Request
Content-Type: multipart/form-data; boundary=----Boundary

------Boundary
Content-Disposition: form-data; name="originalFileName"

large-video.mp4
------Boundary
Content-Disposition: form-data; name="fileUploadId"

f6a7b8c9-d0e1-2345-fghi-678901234567
------Boundary
Content-Disposition: form-data; name="chunkIndex"

0
------Boundary
Content-Disposition: form-data; name="chunkSize"

5242880
------Boundary
Content-Disposition: form-data; name="totalChunkCount"

10
------Boundary
Content-Disposition: form-data; name="stream"; filename="chunk-0"
Content-Type: application/octet-stream

(binary data)
------Boundary--
Example Response 200
{
  "success": true,
  "chunkIndex": 0,
  "totalChunkCount": 10
}
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