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: 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:
741
Contributors