Create or update a brand asset link.
curl --request POST \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"target_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"relationship_type": "associated_with"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links"
payload = {
"target_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"relationship_type": "associated_with"
}
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({
target_asset_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
first_seen_at: '2023-11-07T05:31:56Z',
last_seen_at: '2023-11-07T05:31:56Z',
metadata: {},
relationship_type: 'associated_with'
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links"
payload := strings.NewReader("{\n \"target_asset_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"first_seen_at\": \"2023-11-07T05:31:56Z\",\n \"last_seen_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"relationship_type\": \"associated_with\"\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))
}{
"link": {
"brand_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"relationship_type": "associated_with",
"target_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Inventory
Create or update a brand asset link.
Creates or refreshes an associated_with link from a brand_name asset to another current inventory asset. Requires esi.inventory.manage or project manager access.
POST
https://api.infrawatch.com/api/v1
/
projects
/
{project_uuid}
/
esi
/
inventory
/
assets
/
{asset_uuid}
/
links
Create or update a brand asset link.
curl --request POST \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"target_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"relationship_type": "associated_with"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links"
payload = {
"target_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"relationship_type": "associated_with"
}
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({
target_asset_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
first_seen_at: '2023-11-07T05:31:56Z',
last_seen_at: '2023-11-07T05:31:56Z',
metadata: {},
relationship_type: 'associated_with'
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/{asset_uuid}/links"
payload := strings.NewReader("{\n \"target_asset_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"first_seen_at\": \"2023-11-07T05:31:56Z\",\n \"last_seen_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"relationship_type\": \"associated_with\"\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))
}{
"link": {
"brand_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"relationship_type": "associated_with",
"target_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Authorizations
Infrawatch API key. Supply the complete key directly as the header value.
Body
application/json
Response
Brand asset link created or updated.
Show child attributes
Show child attributes
⌘I