Update Asset Annotation

Cortex Xpanse REST API

post /public_api/v1/assets/assets_internet_exposure/annotation/

Adds an annotation (also called a note) to an asset or IP range. If an asset or IP range has an existing annotation, you can append a new annotation to the existing annotation or replace the existing annotation with a new one.
Required License: Cortex Xpanse Expander

Request headers
authorization
String
required
api-key
Example: {{api_key}}
x-xdr-auth-id
String
required
api-key-id
Example: {{api_key_id}}
Body parameters
required
request_dataObject

A dictionary containing the API request fields.

assetsArray

List of dictionaries that refer to assets.

[
entity_idString

entity_typeString (Enum)

Values are asset or ip_range.

Allowed values:"asset""ip_range"
annotationString

Annotation text.

Free-Form object
]
should_appendBoolean

True append the annotation to the existing annotation.
False replaces the existing annotation.
The default is true.

Free-Form object
Free-Form object
REQUEST BODY
{ "request_data": { "assets": [ { "annotation": "annotation", "entity_type": "asset", "entity_id": "entity_id" }, { "annotation": "annotation", "entity_type": "asset", "entity_id": "entity_id" } ], "should_append": true } }
CURL
curl -X 'POST'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'authorization: {{api_key}}' -H 'x-xdr-auth-id: {{api_key_id}}'
'https://api-}/public_api/v1/assets/assets_internet_exposure/annotation/'
-d '{ "request_data" : { "assets" : [ { "annotation" : "annotation", "entity_type" : "asset", "entity_id" : "entity_id" }, { "annotation" : "annotation", "entity_type" : "asset", "entity_id" : "entity_id" } ], "should_append" : true } }'
Responses

OK

Body
replyString

Reply indicates succeeded if the annotation was updated.

Free-Form object
RESPONSE
{ "reply": "reply_example" }

Bad Request. Got an invalid JSON.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Unauthorized access. User does not have the required license type to run this API.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Unprocessable Entity

Body
codeInteger

Error code

statusString

Error name

messageString

Error message

errorsObject

Errors

RESPONSE
{ "code": 0, "status": "status_example", "message": "message_example", "errors": {} }

Internal server error. A unified status for API communication type errors.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }