Just Published! Threat Report: Exposing Malware in Linux-Based Multi-Cloud Environments | Download Now

Carbon Black Cloud: Getting "Internal Server Error" While Attempting to Run the Device API Script on More Than 200K Machines

Carbon Black Cloud: Getting "Internal Server Error" While Attempting to Run the Device API Script on More Than 200K Machines

Environment

  • Carbon Black Cloud Console: All Supported Versions
  • Linux: All Supported Versions

Symptoms

Getting the below error while running the API Script on more than 200k Endpoints.
 
cbc_sdk.errors.ServerError: Received Error code 500 from API : {"Success": False, "message": "Internal server error"}

 

Cause

The issue is due to the hardcoded limit of 200K endpoints for the Device API query.

Resolution

  • Our Engineering team is currently working on extending the Device API query limit
  • This article will be updated soon once when the resolution is available
  • The Current Workaround is to limiting the API query to certain batch of machines that does not exceeds the limit.
Example Query: 
cb_api = CBCloudAPI(url=url, token=tkn, org_key=org)
batch = list(cb_api.select(Device).set_max_rows(10000))
devices.extend(batch)
print(len(devices))

 

Related Content


Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎03-10-2022
Views:
172
Contributors