ASSETS
Create Asset
Create a monitored asset
POST
/
v1
/
assets
Create asset
curl --request POST \
--url https://api.intrace.ai/v1/assets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"asset_id": "<string>",
"name": "<string>",
"role": "<string>",
"status": "active",
"attributes": {
"lat": 123,
"lng": 123,
"address": "<string>",
"country": "<string>",
"monitoring_radius_km": 123
},
"threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"lookback_days": 45
},
"physical_threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"max_age_hours_by_category": {}
}
}
'import requests
url = "https://api.intrace.ai/v1/assets"
payload = {
"asset_id": "<string>",
"name": "<string>",
"role": "<string>",
"status": "active",
"attributes": {
"lat": 123,
"lng": 123,
"address": "<string>",
"country": "<string>",
"monitoring_radius_km": 123
},
"threat_config": {
"enabled": True,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": ["<string>"],
"lookback_days": 45
},
"physical_threat_config": {
"enabled": True,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": ["<string>"],
"max_age_hours_by_category": {}
}
}
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({
asset_id: '<string>',
name: '<string>',
role: '<string>',
status: 'active',
attributes: {
lat: 123,
lng: 123,
address: '<string>',
country: '<string>',
monitoring_radius_km: 123
},
threat_config: {
enabled: true,
alert_classes: [],
custom_instructions: '<string>',
monitored_event_types: ['<string>'],
lookback_days: 45
},
physical_threat_config: {
enabled: true,
alert_classes: [],
custom_instructions: '<string>',
monitored_event_types: ['<string>'],
max_age_hours_by_category: {}
}
})
};
fetch('https://api.intrace.ai/v1/assets', 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.intrace.ai/v1/assets",
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([
'asset_id' => '<string>',
'name' => '<string>',
'role' => '<string>',
'status' => 'active',
'attributes' => [
'lat' => 123,
'lng' => 123,
'address' => '<string>',
'country' => '<string>',
'monitoring_radius_km' => 123
],
'threat_config' => [
'enabled' => true,
'alert_classes' => [
],
'custom_instructions' => '<string>',
'monitored_event_types' => [
'<string>'
],
'lookback_days' => 45
],
'physical_threat_config' => [
'enabled' => true,
'alert_classes' => [
],
'custom_instructions' => '<string>',
'monitored_event_types' => [
'<string>'
],
'max_age_hours_by_category' => [
]
]
]),
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.intrace.ai/v1/assets"
payload := strings.NewReader("{\n \"asset_id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"status\": \"active\",\n \"attributes\": {\n \"lat\": 123,\n \"lng\": 123,\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"monitoring_radius_km\": 123\n },\n \"threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"lookback_days\": 45\n },\n \"physical_threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"max_age_hours_by_category\": {}\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.intrace.ai/v1/assets")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"asset_id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"status\": \"active\",\n \"attributes\": {\n \"lat\": 123,\n \"lng\": 123,\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"monitoring_radius_km\": 123\n },\n \"threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"lookback_days\": 45\n },\n \"physical_threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"max_age_hours_by_category\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.intrace.ai/v1/assets")
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 \"asset_id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"status\": \"active\",\n \"attributes\": {\n \"lat\": 123,\n \"lng\": 123,\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"monitoring_radius_km\": 123\n },\n \"threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"lookback_days\": 45\n },\n \"physical_threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"max_age_hours_by_category\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_id": "<string>",
"type": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"role": "<string>",
"attributes": {
"lat": 123,
"lng": 123,
"address": "<string>",
"country": "<string>",
"monitoring_radius_km": 123
},
"threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"lookback_days": 45
},
"physical_threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"max_age_hours_by_category": {}
}
}Creates one asset.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
asset_id | string | Yes | Stable client-side identifier |
type | string | Yes | Asset type |
name | string | Yes | Human-readable asset name |
role | string | No | Asset role or business meaning |
status | string | No | Defaults to active |
attributes | object | No | Coordinates, address, country, and custom metadata |
threat_config | object | No | General monitoring config |
physical_threat_config | object | No | Physical threat evaluation config |
Example Request
{
"asset_id": "abuja-residence-1",
"type": "residence",
"name": "Abuja Residence",
"status": "active",
"attributes": {
"lat": 9.0765,
"lng": 7.3986,
"address": "Central District, Abuja",
"country": "NG",
"monitoring_radius_km": 5
},
"physical_threat_config": {
"enabled": true,
"alert_classes": [
"class_2_potential_threat",
"class_3_direct_threat"
]
}
}
Example cURL
curl -X POST -H "X-API-Key: your-api-key" -H "Content-Type: application/json" -d @asset.json "https://api.intrace.ai/v1/assets"
Authorizations
Body
application/json
Response
Asset created.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Create asset
curl --request POST \
--url https://api.intrace.ai/v1/assets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"asset_id": "<string>",
"name": "<string>",
"role": "<string>",
"status": "active",
"attributes": {
"lat": 123,
"lng": 123,
"address": "<string>",
"country": "<string>",
"monitoring_radius_km": 123
},
"threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"lookback_days": 45
},
"physical_threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"max_age_hours_by_category": {}
}
}
'import requests
url = "https://api.intrace.ai/v1/assets"
payload = {
"asset_id": "<string>",
"name": "<string>",
"role": "<string>",
"status": "active",
"attributes": {
"lat": 123,
"lng": 123,
"address": "<string>",
"country": "<string>",
"monitoring_radius_km": 123
},
"threat_config": {
"enabled": True,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": ["<string>"],
"lookback_days": 45
},
"physical_threat_config": {
"enabled": True,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": ["<string>"],
"max_age_hours_by_category": {}
}
}
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({
asset_id: '<string>',
name: '<string>',
role: '<string>',
status: 'active',
attributes: {
lat: 123,
lng: 123,
address: '<string>',
country: '<string>',
monitoring_radius_km: 123
},
threat_config: {
enabled: true,
alert_classes: [],
custom_instructions: '<string>',
monitored_event_types: ['<string>'],
lookback_days: 45
},
physical_threat_config: {
enabled: true,
alert_classes: [],
custom_instructions: '<string>',
monitored_event_types: ['<string>'],
max_age_hours_by_category: {}
}
})
};
fetch('https://api.intrace.ai/v1/assets', 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.intrace.ai/v1/assets",
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([
'asset_id' => '<string>',
'name' => '<string>',
'role' => '<string>',
'status' => 'active',
'attributes' => [
'lat' => 123,
'lng' => 123,
'address' => '<string>',
'country' => '<string>',
'monitoring_radius_km' => 123
],
'threat_config' => [
'enabled' => true,
'alert_classes' => [
],
'custom_instructions' => '<string>',
'monitored_event_types' => [
'<string>'
],
'lookback_days' => 45
],
'physical_threat_config' => [
'enabled' => true,
'alert_classes' => [
],
'custom_instructions' => '<string>',
'monitored_event_types' => [
'<string>'
],
'max_age_hours_by_category' => [
]
]
]),
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.intrace.ai/v1/assets"
payload := strings.NewReader("{\n \"asset_id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"status\": \"active\",\n \"attributes\": {\n \"lat\": 123,\n \"lng\": 123,\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"monitoring_radius_km\": 123\n },\n \"threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"lookback_days\": 45\n },\n \"physical_threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"max_age_hours_by_category\": {}\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.intrace.ai/v1/assets")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"asset_id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"status\": \"active\",\n \"attributes\": {\n \"lat\": 123,\n \"lng\": 123,\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"monitoring_radius_km\": 123\n },\n \"threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"lookback_days\": 45\n },\n \"physical_threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"max_age_hours_by_category\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.intrace.ai/v1/assets")
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 \"asset_id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"status\": \"active\",\n \"attributes\": {\n \"lat\": 123,\n \"lng\": 123,\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"monitoring_radius_km\": 123\n },\n \"threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"lookback_days\": 45\n },\n \"physical_threat_config\": {\n \"enabled\": true,\n \"alert_classes\": [],\n \"custom_instructions\": \"<string>\",\n \"monitored_event_types\": [\n \"<string>\"\n ],\n \"max_age_hours_by_category\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_id": "<string>",
"type": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"role": "<string>",
"attributes": {
"lat": 123,
"lng": 123,
"address": "<string>",
"country": "<string>",
"monitoring_radius_km": 123
},
"threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"lookback_days": 45
},
"physical_threat_config": {
"enabled": true,
"alert_classes": [],
"custom_instructions": "<string>",
"monitored_event_types": [
"<string>"
],
"max_age_hours_by_category": {}
}
}