IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

Carbon Black Cloud: How To Use API Pagination

Carbon Black Cloud: How To Use API Pagination

Environment

  • Carbon Black Cloud Web Console: All Versions (Formerly CB Defense)

Objective

Explain how to modify API calls/queries to use pagination parameters

Resolution

  1. Using curl
    1. curl -X GET '{API_URLForYourEnvironment}/integrationServices/v3/device?start=1&rows=1000' -H 'x-auth-token: {API Key}' - Returns rows 1-1000
      1. .../v3/device?start=1001&rows=1000' -H 'x-auth-token: {API Key}' - Returns rows 1001-2000
      2. .../v3/device?start=2001&rows=1000' -H 'x-auth-token: {API Key}' - Returns rows 2001-3000
  2. Using Invoke-WebRequest
    1. Invoke-WebRequest -Uri {API_URLForYourEnvironment}/integrationServices/v3/device?start=1&rows=1000 -Headers @{'X-Auth-Token'= API Key}' - Returns rows 1-1000
      1. .../v3/device?start=1001&rows=1000 -Headers @{'X-Auth-Token'= API Key}' - Returns rows 1001-2000
      2. .../v3/device?start=2001&rows=1000 -Headers @{'X-Auth-Token'= API Key}'  - Returns rows 2001-3000

Additional Notes

  • Use the 'start' and 'rows' parameters to return large result sets
    • start: specify which row to begin the query from
    • rows: specify the number of rows from start to return
  • There is a hard limit of 5k rows on the /devices API per call, and a hard limit of 10k rows on the /events API at maximum
  • For more information on using the Carbon Black Cloud API follow these steps to view the current reference document
    1. Log into the Web Console
    2. Go to the Connectors page
    3. Click the Download button
    4. Click on the API Specification button

Related Content


Was this article helpful? Yes No
100% helpful (1/1)
Article Information
Author:
Creation Date:
‎12-21-2017
Views:
2040
Contributors