Hey all new to the community... Just started using the API's and have already hit a snag. has anyone else ran into a 10 character limit in the endpoint api?
If I enter a device name longer than 10 characters it appears to truncate it and return results as if I only sent the first 10 characters.
So something like SOMESTRING or SOMESTRING1 or SOMESTRINGasfasdfasdfa will all return the same data.
Is there a way past this limitation or is there a better way to search for a host?
-- UPDATE --Support has official said that this is as designed. Please see response below:_________________________________________________________________Begin Support Email__________________________…
-- UPDATE --Support has official said that this is as designed. Please see response below:_________________________________________________________________Begin Support Email_______________________________________________
Firstly, we appreciate you using our APIs and reporting this issue. The engineering team responsible for this API investigated it and reported back that although this behavior is surprising, it is as we designed it to work. To implement this function, we use a search technology where we maintain two separate indexes for endpoint hostnames: one that allows a fast prefix match, and another that allows searching for substrings up to 10 characters long. This gives us a good balance between performance and usability. However, this means that if the “hostnameContains” value is longer than 10, only the first 10 characters will be used for a match. We will update our documentation to make that clearer.
Ram_________________________________________________________________End Support Email__________________________________________________
Please note it appears all search fields are limited by this 10 character limit. If you are using the API to help find a specific device with a name longer than 10characters you will have to address client side in your script/code. Hope this helps someone else!
Thank you for your contribution, and for sharing your findings on the Sophos Community Forum.