Follow

Enhanced Notes in the v2.2 API

Cognito Release 6.0 introduced Enhanced Notes, which gave Detect users the ability to add multiple notes to hosts, accounts and detection objects. Enhanced Notes also support markdown syntax which allow for improved formatting, linking and readability. Cognito Release 6.4 makes interacting with Enhanced Notes available via v2.2 API endpoints.

The following methods are supported for Enhanced Notes:

  • GET
  • POST
  • PATCH
  • DELETE

Here are some reference examples of each method for working with the Enhanced Notes API endpoints:

GET notes

URL=https://detect.myorg.com/api/v2.2/accounts/50/notes

curl -k \

  -H "Content-Type: application/json"  \

  --header "Authorization: Token 35xc698xldnw8rq6f8wrupviyi6y4rg01g2fe3vj" \

  $URL

 

POST note

curl 'https://detect.myorg.com/api/v2.2/host/999999/notes' \

  -X 'POST' \

  -H "Content-Type: application/json"  \

  --header "Authorization: Token 35xc698xldnw8rq6f8wrupviyi6y4rg01g2fe3vj" \

  --data-binary '{"note":"create this note"}' \

  --compressed \

  --insecure

 

GET note

URL=https://detect.myorg.com/api/v2.2/hosts/99999/notes/1

curl -k \

  -H "Content-Type: application/json"  \

  --header "Authorization: Token 35xc698xldnw8rq6f8wrupviyi6y4rg01g2fe3vj" \

  $URL

 

PATCH note

curl 'https://detect.myorg.comc/api/v2.2/hosts/1/notes/1' \

  -X 'PATCH' \

  -H "Content-Type: application/json"  \

  --header "Authorization: Token 35xc698xldnw8rq6f8wrupviyi6y4rg01g2fe3vj" \

  --data-binary '{"note":""}' \

  --compressed \

  --insecure

 

DELETE note

curl 'https://detect.myorg.com/api/v2.2/abcd/999999/notes/4' \

  -X 'DELETE' \

  -H "Content-Type: application/json"  \

  --header "Authorization: Token 35xc698xldnw8rq6f8wrupviyi6y4rg01g2fe3vj" \

  --compressed \

  --insecure

 

For more information on the v2.2 API updates and working with enhanced notes, please see the v2.2 API guide attached below.

 

Was this article helpful?
0 out of 0 found this helpful

Download PDF

0 Comments

Article is closed for comments.