Endpoint API hostnameContains character limit?

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?

specifically: /endpoint/v1/endpoints?hostnameContains=<SOMESTRING>

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?


Respectfully,

Parents
  • -- UPDATE --
    Support has official said that this is as designed. Please see response below:
    _________________________________________________________________Begin Support Email_______________________________________________

    Hi Jay,

     

    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.

     

    Thanks,

    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!


    Respectfully,
    Jay

  • Thank you for your contribution, and for sharing your findings on the Sophos Community Forum.

    Kushal Lakhan
    Team Lead, Global Community Support
    Connect with Sophos Support, get alerted, and be informed.
    If a post solves your question, please use the "Verify Answer" button.
    The New Home of Sophos Support Videos!  Visit Sophos Techvids
Reply Children
No Data