Create or update one asset
curl --request POST \
--url https://api.docusnap365.com/api/v1/asset \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11",
"object": {
"name": "Server01",
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11"
}
}
'import requests
url = "https://api.docusnap365.com/api/v1/asset"
payload = {
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11",
"object": {
"name": "Server01",
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaId: '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11',
object: {name: 'Server01', schemaId: '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11'}
})
};
fetch('https://api.docusnap365.com/api/v1/asset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.docusnap365.com/api/v1/asset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'schemaId' => '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11',
'object' => [
'name' => 'Server01',
'schemaId' => '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.docusnap365.com/api/v1/asset"
payload := strings.NewReader("{\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\",\n \"object\": {\n \"name\": \"Server01\",\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.docusnap365.com/api/v1/asset")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\",\n \"object\": {\n \"name\": \"Server01\",\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.docusnap365.com/api/v1/asset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\",\n \"object\": {\n \"name\": \"Server01\",\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idPair": {
"fakeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousSchemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idMatchResponse": {},
"isCreate": true,
"matchedObjectInRecycleBin": true,
"errorMessage": "<string>",
"error": {
"code": "<string>",
"path": "<string>",
"data": {}
},
"isSuccess": true
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idPair": {
"fakeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousSchemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idMatchResponse": {},
"isCreate": true,
"matchedObjectInRecycleBin": true,
"errorMessage": "<string>",
"error": {
"code": "<string>",
"path": "<string>",
"data": {}
},
"isSuccess": true
}{
"type": "urn:ds365:error:required-field-missing",
"title": "Required field missing",
"status": 400,
"detail": "Bundle.Object.Name is required",
"instance": "/api/v1/asset",
"errorCode": "REQUIRED_FIELD_MISSING",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "REQUIRED_FIELD_MISSING",
"path": "object.name"
}
]
}{
"type": "urn:ds365:error:api-key-missing",
"title": "API key missing",
"status": 401,
"detail": "The request has no X-API-Key header. Create an API key in the web app and send it in that header.",
"instance": "/api/v1/assets",
"errorCode": "API_KEY_MISSING",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "API_KEY_MISSING"
}
]
}{
"type": "urn:ds365:error:forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Missing required scopes: api_write",
"instance": "/api/v1/asset",
"errorCode": "FORBIDDEN",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "FORBIDDEN",
"data": {
"missingScopes": [
"api_write"
]
}
}
]
}{
"type": "urn:ds365:error:rest-request-quota-exceeded",
"title": "Request quota exceeded",
"status": 429,
"detail": "The request quota of 10000 requests per period is exhausted until 2026-12-01T00:00:00.0000000+00:00.",
"instance": "/api/v1/assets",
"errorCode": "REST_REQUEST_QUOTA_EXCEEDED",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "REST_REQUEST_QUOTA_EXCEEDED",
"data": {
"requestsLimit": 10000,
"requestsUsed": 10000,
"quotaResetAt": "2026-12-01T00:00:00+00:00"
}
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errorCode": "<string>",
"traceId": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"data": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errorCode": "<string>",
"traceId": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"data": {}
}
]
}Assets
Create or update one asset
Writes one asset. The service forwards the request body to the ingest service and returns its answer: 201 when the asset was created, 200 when it was updated.
With objectData the ingest service decides by identity matching whether the asset already exists. Without objectData, object.id is required and the asset is updated.
Requires the scope api_write (Read and Write). When the ingest service rejects the asset, the API answers with application/problem+json; the errorCode names the reason, path the field of the request where known, and data further values.
POST
/
asset
Create or update one asset
curl --request POST \
--url https://api.docusnap365.com/api/v1/asset \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11",
"object": {
"name": "Server01",
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11"
}
}
'import requests
url = "https://api.docusnap365.com/api/v1/asset"
payload = {
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11",
"object": {
"name": "Server01",
"schemaId": "9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaId: '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11',
object: {name: 'Server01', schemaId: '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11'}
})
};
fetch('https://api.docusnap365.com/api/v1/asset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.docusnap365.com/api/v1/asset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'schemaId' => '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11',
'object' => [
'name' => 'Server01',
'schemaId' => '9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.docusnap365.com/api/v1/asset"
payload := strings.NewReader("{\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\",\n \"object\": {\n \"name\": \"Server01\",\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.docusnap365.com/api/v1/asset")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\",\n \"object\": {\n \"name\": \"Server01\",\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.docusnap365.com/api/v1/asset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\",\n \"object\": {\n \"name\": \"Server01\",\n \"schemaId\": \"9b2f6a52-1c0e-4c5a-8d55-5f0f6a3f7a11\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idPair": {
"fakeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousSchemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idMatchResponse": {},
"isCreate": true,
"matchedObjectInRecycleBin": true,
"errorMessage": "<string>",
"error": {
"code": "<string>",
"path": "<string>",
"data": {}
},
"isSuccess": true
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idPair": {
"fakeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousSchemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idMatchResponse": {},
"isCreate": true,
"matchedObjectInRecycleBin": true,
"errorMessage": "<string>",
"error": {
"code": "<string>",
"path": "<string>",
"data": {}
},
"isSuccess": true
}{
"type": "urn:ds365:error:required-field-missing",
"title": "Required field missing",
"status": 400,
"detail": "Bundle.Object.Name is required",
"instance": "/api/v1/asset",
"errorCode": "REQUIRED_FIELD_MISSING",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "REQUIRED_FIELD_MISSING",
"path": "object.name"
}
]
}{
"type": "urn:ds365:error:api-key-missing",
"title": "API key missing",
"status": 401,
"detail": "The request has no X-API-Key header. Create an API key in the web app and send it in that header.",
"instance": "/api/v1/assets",
"errorCode": "API_KEY_MISSING",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "API_KEY_MISSING"
}
]
}{
"type": "urn:ds365:error:forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Missing required scopes: api_write",
"instance": "/api/v1/asset",
"errorCode": "FORBIDDEN",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "FORBIDDEN",
"data": {
"missingScopes": [
"api_write"
]
}
}
]
}{
"type": "urn:ds365:error:rest-request-quota-exceeded",
"title": "Request quota exceeded",
"status": 429,
"detail": "The request quota of 10000 requests per period is exhausted until 2026-12-01T00:00:00.0000000+00:00.",
"instance": "/api/v1/assets",
"errorCode": "REST_REQUEST_QUOTA_EXCEEDED",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"errors": [
{
"code": "REST_REQUEST_QUOTA_EXCEEDED",
"data": {
"requestsLimit": 10000,
"requestsUsed": 10000,
"quotaResetAt": "2026-12-01T00:00:00+00:00"
}
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errorCode": "<string>",
"traceId": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"data": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errorCode": "<string>",
"traceId": "<string>",
"errors": [
{
"code": "<string>",
"path": "<string>",
"data": {}
}
]
}Authorizations
Body
application/json
Response
The asset was updated.
The answer of the ingest service for one asset. Properties without a value are omitted.