Yes, you can get a collector by Name using the Collector Management API. Sumo Logic added this feature to our Collector Management API on June 26th' 2019.
For example: To get the Collector with the name "mycollector"
curl -u '<accessId>:<accessKey>' -X GET https://api.sumologic.com/api/v1/collectors/name/mycollector
The name parameter is required in the API GET request and is a string.
Following rules should be followed while making an API GET request:
- Names with special characters are not supported, such as; / % \ even if they are URL encoded.
- Spaces in names are supported when they are URL encoded. A space character URL encoded is %20. For example, a Collector named Staging Area would be encoded as https://api.sumologic.com/api/v1/collectors/name/Staging%20Area.
- Names with a period need to have a trailing forward slash / at the end of the request URL. For example, a Collector named Staging.Area should be provided as https://api.sumologic.com/api/v1/collectors/name/Staging.Area/
Please note that Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. You need to specify your deployment in the endpoint. For example, api.YOUR_DEPLOYMENT.sumologic.com you would specify YOUR_DEPLOYMENT as either au, ca, de, eu, fed, jp, us1, or us2. For us1, use api.sumologic.com. For the others, use api.us2.sumologic.com, and so on. For more information, see Sumo Logic Endpoints.