Bulk create inventory assets.
curl --request POST \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"assets": [
{
"value": "<string>",
"activity": "<string>",
"asn": 2147483648,
"asset_family": "<string>",
"asset_type": "<string>",
"brand_main_website_url": "<string>",
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"name_servers": [
"<string>"
],
"normalized_value": "<string>",
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"on_conflict": "skip"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/batch"
payload = {
"assets": [
{
"value": "<string>",
"activity": "<string>",
"asn": 2147483648,
"asset_family": "<string>",
"asset_type": "<string>",
"brand_main_website_url": "<string>",
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": ["<string>"],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": ["<string>"],
"dns_aaaa_records": ["<string>"],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"host": "<string>",
"ip": "<string>",
"ip_addresses": ["<string>"],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"name_servers": ["<string>"],
"normalized_value": "<string>",
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"on_conflict": "skip"
}
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({
assets: [
{
value: '<string>',
activity: '<string>',
asn: 2147483648,
asset_family: '<string>',
asset_type: '<string>',
brand_main_website_url: '<string>',
certificate_issuer: '<string>',
certificate_not_after: '2023-11-07T05:31:56Z',
certificate_not_before: '2023-11-07T05:31:56Z',
certificate_sha256: '<string>',
certificate_subject: '<string>',
cname_records: ['<string>'],
contact_email: 'jsmith@example.com',
contact_name: '<string>',
contact_type: '<string>',
discovery_channel: '<string>',
discovery_provider: '<string>',
display_name: '<string>',
dns_a_records: ['<string>'],
dns_aaaa_records: ['<string>'],
dns_name: '<string>',
domain_status: '<string>',
favicon_sha256: '<string>',
final_url: '<string>',
first_seen_at: '2023-11-07T05:31:56Z',
host: '<string>',
ip: '<string>',
ip_addresses: ['<string>'],
ip_block: '<string>',
last_observed_at: '2023-11-07T05:31:56Z',
last_seen_at: '2023-11-07T05:31:56Z',
metadata: {},
name_servers: ['<string>'],
normalized_value: '<string>',
os_family: '<string>',
owner_group_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner_membership_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
page_sha256: '<string>',
parent_domain: '<string>',
primary_source_name: '<string>',
primary_source_ref: '<string>',
provider: '<string>',
registered_at: '2023-11-07T05:31:56Z',
registrar: '<string>',
root_domain: '<string>',
screenshot_sha256: '<string>',
title: '<string>',
url: '<string>'
}
],
on_conflict: 'skip'
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/batch', 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/batch"
payload := strings.NewReader("{\n \"assets\": [\n {\n \"value\": \"<string>\",\n \"activity\": \"<string>\",\n \"asn\": 2147483648,\n \"asset_family\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"brand_main_website_url\": \"<string>\",\n \"certificate_issuer\": \"<string>\",\n \"certificate_not_after\": \"2023-11-07T05:31:56Z\",\n \"certificate_not_before\": \"2023-11-07T05:31:56Z\",\n \"certificate_sha256\": \"<string>\",\n \"certificate_subject\": \"<string>\",\n \"cname_records\": [\n \"<string>\"\n ],\n \"contact_email\": \"jsmith@example.com\",\n \"contact_name\": \"<string>\",\n \"contact_type\": \"<string>\",\n \"discovery_channel\": \"<string>\",\n \"discovery_provider\": \"<string>\",\n \"display_name\": \"<string>\",\n \"dns_a_records\": [\n \"<string>\"\n ],\n \"dns_aaaa_records\": [\n \"<string>\"\n ],\n \"dns_name\": \"<string>\",\n \"domain_status\": \"<string>\",\n \"favicon_sha256\": \"<string>\",\n \"final_url\": \"<string>\",\n \"first_seen_at\": \"2023-11-07T05:31:56Z\",\n \"host\": \"<string>\",\n \"ip\": \"<string>\",\n \"ip_addresses\": [\n \"<string>\"\n ],\n \"ip_block\": \"<string>\",\n \"last_observed_at\": \"2023-11-07T05:31:56Z\",\n \"last_seen_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"name_servers\": [\n \"<string>\"\n ],\n \"normalized_value\": \"<string>\",\n \"os_family\": \"<string>\",\n \"owner_group_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_membership_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"page_sha256\": \"<string>\",\n \"parent_domain\": \"<string>\",\n \"primary_source_name\": \"<string>\",\n \"primary_source_ref\": \"<string>\",\n \"provider\": \"<string>\",\n \"registered_at\": \"2023-11-07T05:31:56Z\",\n \"registrar\": \"<string>\",\n \"root_domain\": \"<string>\",\n \"screenshot_sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"on_conflict\": \"skip\"\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))
}{
"bulk_create": {
"assets": [
{
"asset_family": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"normalized_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"activity": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"asn": 2147483648,
"asset_type": "<string>",
"brand_favicon_count": 1,
"brand_linked_asset_count": 1,
"brand_main_website_url": "<string>",
"brand_term_count": 1,
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"created_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"name_servers": [
"<string>"
],
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"removed_at": "2023-11-07T05:31:56Z",
"removed_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"conflicts": 123,
"created": 123,
"errors": [
{
"code": "<string>",
"index": 0,
"message": "<string>",
"value": "<string>"
}
],
"failed": 123
}
}{
"bulk_create": {
"assets": [
{
"asset_family": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"normalized_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"activity": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"asn": 2147483648,
"asset_type": "<string>",
"brand_favicon_count": 1,
"brand_linked_asset_count": 1,
"brand_main_website_url": "<string>",
"brand_term_count": 1,
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"created_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"name_servers": [
"<string>"
],
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"removed_at": "2023-11-07T05:31:56Z",
"removed_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"conflicts": 123,
"created": 123,
"errors": [
{
"code": "<string>",
"index": 0,
"message": "<string>",
"value": "<string>"
}
],
"failed": 123
}
}{
"bulk_create": {
"assets": [
{
"asset_family": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"normalized_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"activity": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"asn": 2147483648,
"asset_type": "<string>",
"brand_favicon_count": 1,
"brand_linked_asset_count": 1,
"brand_main_website_url": "<string>",
"brand_term_count": 1,
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"created_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"name_servers": [
"<string>"
],
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"removed_at": "2023-11-07T05:31:56Z",
"removed_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"conflicts": 123,
"created": 123,
"errors": [
{
"code": "<string>",
"index": 0,
"message": "<string>",
"value": "<string>"
}
],
"failed": 123
}
}{
"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
Bulk create inventory assets.
Requires esi.inventory.manage or project manager access. Bulk creates are intended for backend imports and discovery loaders; each asset records source_kind plus source/provider attribution. on_conflict=fail is atomic: a conflict or invalid row leaves every row in the request uncommitted.
POST
https://api.infrawatch.com/api/v1
/
projects
/
{project_uuid}
/
esi
/
inventory
/
assets
/
batch
Bulk create inventory assets.
curl --request POST \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"assets": [
{
"value": "<string>",
"activity": "<string>",
"asn": 2147483648,
"asset_family": "<string>",
"asset_type": "<string>",
"brand_main_website_url": "<string>",
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"name_servers": [
"<string>"
],
"normalized_value": "<string>",
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"on_conflict": "skip"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/batch"
payload = {
"assets": [
{
"value": "<string>",
"activity": "<string>",
"asn": 2147483648,
"asset_family": "<string>",
"asset_type": "<string>",
"brand_main_website_url": "<string>",
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": ["<string>"],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": ["<string>"],
"dns_aaaa_records": ["<string>"],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"host": "<string>",
"ip": "<string>",
"ip_addresses": ["<string>"],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"name_servers": ["<string>"],
"normalized_value": "<string>",
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"on_conflict": "skip"
}
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({
assets: [
{
value: '<string>',
activity: '<string>',
asn: 2147483648,
asset_family: '<string>',
asset_type: '<string>',
brand_main_website_url: '<string>',
certificate_issuer: '<string>',
certificate_not_after: '2023-11-07T05:31:56Z',
certificate_not_before: '2023-11-07T05:31:56Z',
certificate_sha256: '<string>',
certificate_subject: '<string>',
cname_records: ['<string>'],
contact_email: 'jsmith@example.com',
contact_name: '<string>',
contact_type: '<string>',
discovery_channel: '<string>',
discovery_provider: '<string>',
display_name: '<string>',
dns_a_records: ['<string>'],
dns_aaaa_records: ['<string>'],
dns_name: '<string>',
domain_status: '<string>',
favicon_sha256: '<string>',
final_url: '<string>',
first_seen_at: '2023-11-07T05:31:56Z',
host: '<string>',
ip: '<string>',
ip_addresses: ['<string>'],
ip_block: '<string>',
last_observed_at: '2023-11-07T05:31:56Z',
last_seen_at: '2023-11-07T05:31:56Z',
metadata: {},
name_servers: ['<string>'],
normalized_value: '<string>',
os_family: '<string>',
owner_group_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner_membership_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
page_sha256: '<string>',
parent_domain: '<string>',
primary_source_name: '<string>',
primary_source_ref: '<string>',
provider: '<string>',
registered_at: '2023-11-07T05:31:56Z',
registrar: '<string>',
root_domain: '<string>',
screenshot_sha256: '<string>',
title: '<string>',
url: '<string>'
}
],
on_conflict: 'skip'
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/inventory/assets/batch', 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/batch"
payload := strings.NewReader("{\n \"assets\": [\n {\n \"value\": \"<string>\",\n \"activity\": \"<string>\",\n \"asn\": 2147483648,\n \"asset_family\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"brand_main_website_url\": \"<string>\",\n \"certificate_issuer\": \"<string>\",\n \"certificate_not_after\": \"2023-11-07T05:31:56Z\",\n \"certificate_not_before\": \"2023-11-07T05:31:56Z\",\n \"certificate_sha256\": \"<string>\",\n \"certificate_subject\": \"<string>\",\n \"cname_records\": [\n \"<string>\"\n ],\n \"contact_email\": \"jsmith@example.com\",\n \"contact_name\": \"<string>\",\n \"contact_type\": \"<string>\",\n \"discovery_channel\": \"<string>\",\n \"discovery_provider\": \"<string>\",\n \"display_name\": \"<string>\",\n \"dns_a_records\": [\n \"<string>\"\n ],\n \"dns_aaaa_records\": [\n \"<string>\"\n ],\n \"dns_name\": \"<string>\",\n \"domain_status\": \"<string>\",\n \"favicon_sha256\": \"<string>\",\n \"final_url\": \"<string>\",\n \"first_seen_at\": \"2023-11-07T05:31:56Z\",\n \"host\": \"<string>\",\n \"ip\": \"<string>\",\n \"ip_addresses\": [\n \"<string>\"\n ],\n \"ip_block\": \"<string>\",\n \"last_observed_at\": \"2023-11-07T05:31:56Z\",\n \"last_seen_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"name_servers\": [\n \"<string>\"\n ],\n \"normalized_value\": \"<string>\",\n \"os_family\": \"<string>\",\n \"owner_group_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_membership_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"page_sha256\": \"<string>\",\n \"parent_domain\": \"<string>\",\n \"primary_source_name\": \"<string>\",\n \"primary_source_ref\": \"<string>\",\n \"provider\": \"<string>\",\n \"registered_at\": \"2023-11-07T05:31:56Z\",\n \"registrar\": \"<string>\",\n \"root_domain\": \"<string>\",\n \"screenshot_sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"on_conflict\": \"skip\"\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))
}{
"bulk_create": {
"assets": [
{
"asset_family": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"normalized_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"activity": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"asn": 2147483648,
"asset_type": "<string>",
"brand_favicon_count": 1,
"brand_linked_asset_count": 1,
"brand_main_website_url": "<string>",
"brand_term_count": 1,
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"created_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"name_servers": [
"<string>"
],
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"removed_at": "2023-11-07T05:31:56Z",
"removed_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"conflicts": 123,
"created": 123,
"errors": [
{
"code": "<string>",
"index": 0,
"message": "<string>",
"value": "<string>"
}
],
"failed": 123
}
}{
"bulk_create": {
"assets": [
{
"asset_family": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"normalized_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"activity": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"asn": 2147483648,
"asset_type": "<string>",
"brand_favicon_count": 1,
"brand_linked_asset_count": 1,
"brand_main_website_url": "<string>",
"brand_term_count": 1,
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"created_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"name_servers": [
"<string>"
],
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"removed_at": "2023-11-07T05:31:56Z",
"removed_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"conflicts": 123,
"created": 123,
"errors": [
{
"code": "<string>",
"index": 0,
"message": "<string>",
"value": "<string>"
}
],
"failed": 123
}
}{
"bulk_create": {
"assets": [
{
"asset_family": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"normalized_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"activity": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"asn": 2147483648,
"asset_type": "<string>",
"brand_favicon_count": 1,
"brand_linked_asset_count": 1,
"brand_main_website_url": "<string>",
"brand_term_count": 1,
"certificate_issuer": "<string>",
"certificate_not_after": "2023-11-07T05:31:56Z",
"certificate_not_before": "2023-11-07T05:31:56Z",
"certificate_sha256": "<string>",
"certificate_subject": "<string>",
"cname_records": [
"<string>"
],
"contact_email": "jsmith@example.com",
"contact_name": "<string>",
"contact_type": "<string>",
"created_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"display_name": "<string>",
"dns_a_records": [
"<string>"
],
"dns_aaaa_records": [
"<string>"
],
"dns_name": "<string>",
"domain_status": "<string>",
"favicon_sha256": "<string>",
"final_url": "<string>",
"host": "<string>",
"ip": "<string>",
"ip_addresses": [
"<string>"
],
"ip_block": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"name_servers": [
"<string>"
],
"os_family": "<string>",
"owner_group_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_sha256": "<string>",
"parent_domain": "<string>",
"primary_source_name": "<string>",
"primary_source_ref": "<string>",
"provider": "<string>",
"registered_at": "2023-11-07T05:31:56Z",
"registrar": "<string>",
"removed_at": "2023-11-07T05:31:56Z",
"removed_by_api_key_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed_by_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"root_domain": "<string>",
"screenshot_sha256": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"conflicts": 123,
"created": 123,
"errors": [
{
"code": "<string>",
"index": 0,
"message": "<string>",
"value": "<string>"
}
],
"failed": 123
}
}{
"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.
Path Parameters
Body
application/json
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
skip records conflicts in the result and continues. fail writes every row in one transaction and rejects the whole request without committing any rows when validation or a conflict fails.
Available options:
skip, fail Response
Inventory assets partially processed, or no assets created because all conflicts were skipped.
Show child attributes
Show child attributes
⌘I