Update an asset service.
curl --request PATCH \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/{service_uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confidence": 0.5,
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"endpoint": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"hostname": "<string>",
"http_status_code": 349,
"http_title": "<string>",
"ip": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"port": 32768,
"product": "<string>",
"protocol": "<string>",
"service_key": "<string>",
"service_name": "<string>",
"source_name": "<string>",
"source_ref": "<string>",
"technologies": [
"<string>"
],
"tls_certificate_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tls_enabled": true,
"url": "<string>",
"version": "<string>"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/{service_uuid}"
payload = {
"asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confidence": 0.5,
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"endpoint": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"hostname": "<string>",
"http_status_code": 349,
"http_title": "<string>",
"ip": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"port": 32768,
"product": "<string>",
"protocol": "<string>",
"service_key": "<string>",
"service_name": "<string>",
"source_name": "<string>",
"source_ref": "<string>",
"technologies": ["<string>"],
"tls_certificate_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tls_enabled": True,
"url": "<string>",
"version": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
confidence: 0.5,
discovery_channel: '<string>',
discovery_provider: '<string>',
endpoint: '<string>',
first_seen_at: '2023-11-07T05:31:56Z',
hostname: '<string>',
http_status_code: 349,
http_title: '<string>',
ip: '<string>',
last_observed_at: '2023-11-07T05:31:56Z',
last_seen_at: '2023-11-07T05:31:56Z',
metadata: {},
port: 32768,
product: '<string>',
protocol: '<string>',
service_key: '<string>',
service_name: '<string>',
source_name: '<string>',
source_ref: '<string>',
technologies: ['<string>'],
tls_certificate_asset_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tls_enabled: true,
url: '<string>',
version: '<string>'
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/{service_uuid}', 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/services/{service_uuid}"
payload := strings.NewReader("{\n \"asset_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confidence\": 0.5,\n \"discovery_channel\": \"<string>\",\n \"discovery_provider\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"first_seen_at\": \"2023-11-07T05:31:56Z\",\n \"hostname\": \"<string>\",\n \"http_status_code\": 349,\n \"http_title\": \"<string>\",\n \"ip\": \"<string>\",\n \"last_observed_at\": \"2023-11-07T05:31:56Z\",\n \"last_seen_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"port\": 32768,\n \"product\": \"<string>\",\n \"protocol\": \"<string>\",\n \"service_key\": \"<string>\",\n \"service_name\": \"<string>\",\n \"source_name\": \"<string>\",\n \"source_ref\": \"<string>\",\n \"technologies\": [\n \"<string>\"\n ],\n \"tls_certificate_asset_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tls_enabled\": true,\n \"url\": \"<string>\",\n \"version\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"service": {
"asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confidence": 0.5,
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"protocol": "<string>",
"service_key": "<string>",
"technologies": [
"<string>"
],
"tls_enabled": true,
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"endpoint": "<string>",
"hostname": "<string>",
"http_status_code": 349,
"http_title": "<string>",
"ip": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"port": 32768,
"product": "<string>",
"service_name": "<string>",
"source_name": "<string>",
"source_ref": "<string>",
"tls_certificate_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"version": "<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>"
}
}{
"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>"
}
}Services
Update an asset service.
Sparse update. Requires esi.services.manage or project manager access.
PATCH
https://api.infrawatch.com/api/v1
/
projects
/
{project_uuid}
/
esi
/
services
/
{service_uuid}
Update an asset service.
curl --request PATCH \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/{service_uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confidence": 0.5,
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"endpoint": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"hostname": "<string>",
"http_status_code": 349,
"http_title": "<string>",
"ip": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"port": 32768,
"product": "<string>",
"protocol": "<string>",
"service_key": "<string>",
"service_name": "<string>",
"source_name": "<string>",
"source_ref": "<string>",
"technologies": [
"<string>"
],
"tls_certificate_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tls_enabled": true,
"url": "<string>",
"version": "<string>"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/{service_uuid}"
payload = {
"asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confidence": 0.5,
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"endpoint": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"hostname": "<string>",
"http_status_code": 349,
"http_title": "<string>",
"ip": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"port": 32768,
"product": "<string>",
"protocol": "<string>",
"service_key": "<string>",
"service_name": "<string>",
"source_name": "<string>",
"source_ref": "<string>",
"technologies": ["<string>"],
"tls_certificate_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tls_enabled": True,
"url": "<string>",
"version": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
confidence: 0.5,
discovery_channel: '<string>',
discovery_provider: '<string>',
endpoint: '<string>',
first_seen_at: '2023-11-07T05:31:56Z',
hostname: '<string>',
http_status_code: 349,
http_title: '<string>',
ip: '<string>',
last_observed_at: '2023-11-07T05:31:56Z',
last_seen_at: '2023-11-07T05:31:56Z',
metadata: {},
port: 32768,
product: '<string>',
protocol: '<string>',
service_key: '<string>',
service_name: '<string>',
source_name: '<string>',
source_ref: '<string>',
technologies: ['<string>'],
tls_certificate_asset_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tls_enabled: true,
url: '<string>',
version: '<string>'
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/{service_uuid}', 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/services/{service_uuid}"
payload := strings.NewReader("{\n \"asset_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confidence\": 0.5,\n \"discovery_channel\": \"<string>\",\n \"discovery_provider\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"first_seen_at\": \"2023-11-07T05:31:56Z\",\n \"hostname\": \"<string>\",\n \"http_status_code\": 349,\n \"http_title\": \"<string>\",\n \"ip\": \"<string>\",\n \"last_observed_at\": \"2023-11-07T05:31:56Z\",\n \"last_seen_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"port\": 32768,\n \"product\": \"<string>\",\n \"protocol\": \"<string>\",\n \"service_key\": \"<string>\",\n \"service_name\": \"<string>\",\n \"source_name\": \"<string>\",\n \"source_ref\": \"<string>\",\n \"technologies\": [\n \"<string>\"\n ],\n \"tls_certificate_asset_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tls_enabled\": true,\n \"url\": \"<string>\",\n \"version\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"service": {
"asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confidence": 0.5,
"created_at": "2023-11-07T05:31:56Z",
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"metadata": {},
"protocol": "<string>",
"service_key": "<string>",
"technologies": [
"<string>"
],
"tls_enabled": true,
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_channel": "<string>",
"discovery_provider": "<string>",
"endpoint": "<string>",
"hostname": "<string>",
"http_status_code": 349,
"http_title": "<string>",
"ip": "<string>",
"last_observed_at": "2023-11-07T05:31:56Z",
"port": 32768,
"product": "<string>",
"service_name": "<string>",
"source_name": "<string>",
"source_ref": "<string>",
"tls_certificate_asset_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"version": "<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>"
}
}{
"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
Required range:
0 <= x <= 1Maximum string length:
256Maximum string length:
256Maximum string length:
2048Maximum string length:
256Required range:
100 <= x <= 599Maximum string length:
256Required range:
1 <= x <= 65535Maximum string length:
256Maximum string length:
256Available options:
manual, auto_discovered, import, api, integration Maximum string length:
256Maximum string length:
256Maximum string length:
256Available options:
tcp, udp Maximum string length:
2048Maximum string length:
256Response
Asset service updated.
Show child attributes
Show child attributes
⌘I