Endpoint Standard API Connector: How to write a CURL command to query for any string for the V6 Devices API.
search cancel

Endpoint Standard API Connector: How to write a CURL command to query for any string for the V6 Devices API.

book

Article ID: 290879

calendar_today

Updated On:

Products

Carbon Black Cloud Endpoint Standard (formerly Cb Defense)

Issue/Introduction

How to query using a CURL command for Endpoint Standard V6 Device API for strings.

Environment

  • Endpoint Standard V6 Devices API: All versions

Resolution

  1. This curl command will return records that are both ACTIVE and have the string "default" (Note that the curl command is formatted for a Linux shell).
curl -H X-Auth-Token:{secret_token/org_id} "https://{defense.server.url.here}/appservices/v6/orgs/Z7VLS6G7/devices/_search/download?status=ACTIVE&query_string=%27default%27"
returns:
name,email,firstName,lastName,middleName,targetValue,status,registeredTime,deregisteredTime,lastContactTime,lastInternalIpAddress,lastExternalIpAddress,deviceType,policyName,windowsPlatform,osVersion,sensorVersion,avEngine,virtualMachine,virtualizationProvider,subDeploymentType,macAddress,avVdfVersion,groupName

"OpsPC","","","","",MEDIUM,ACTIVE,2016-08-25-194616,"",2016-08-25-194708,10.0.1.1,54.80.1.27,WINDOWS,"default","",XP x86,1.0.1.168,"",false,"","","","",""
"RelationsPC","","","","",MEDIUM,ACTIVE,2016-08-25-194617,"",2016-08-25-194747,10.0.2.2,54.80.1.27,MAC,"default","",MAC OS X 10.9.0,1.0.1.91,"",false,"","","","",""
"DevMac","","","","",MEDIUM,ACTIVE,2016-08-25-194620,"",2016-08-25-194814,10.0.3.3,54.80.1.1,MAC,"default","",MAC OS X 10.9.0,1.0.2.15,"",false,"","","","",""

 

Additional Information

  • For Windows 10 and Windows 2016, the curl command is built in.
  • Use the "curl -v" option to troubleshoot connectivity and other possible issues as so:
curl -v -H X-Auth-Token:{secret_token/org_id} "https://{defense.server.url.here}/appservices/v6/orgs/Z7VLS6G7/devices/_search/download?status=ACTIVE&query_string=%27default%27"