Using RestAPI with Curl for Carbon Black EDR Server.
search cancel

Using RestAPI with Curl for Carbon Black EDR Server.

book

Article ID: 384060

calendar_today

Updated On:

Products

Carbon Black EDR (formerly Cb Response)

Issue/Introduction

How to use curl against the EDR Rest API

Environment

  • Carbon Black EDR Server: All Versions
  • Rest API
  • Curl

Resolution

Examples of GET, PUT and PUSH with Rest API and Curl.

GET

curl -k -X GET "https://server_address/api/v1/sensor/1"  -H "X-Auth-Token: $TOKEN"  -H "Accept: application/json"

PUT (Update)

curl -k -X PUT "https://server_address/api/v1/sensor/1"  -H "X-Auth-Token: $TOKEN"  -H "Content-Type: application/json" -d  "{\"uninstall\":true"}"

POST (Create)

curl -k -X POST "https://server_address/api/approvedlist/entries"  -H "X-Auth-Token: $TOKEN"  -H "Content-Type: application/json" -d  "{\"ipaddr\":\"192.168.0.22\"}"

 

Additional Information

  • The EDR server requires a content-type of application/json to accepted new or updated data.