Sumo Logic supports the following options for API authentication:
- Access ID and access key
- Base64 encoded access id and access key
See Access Keys to generate an access key. Make sure to copy the key you create, because it is displayed only once.
Access ID and access key
When you have an
accessKey you can execute requests such as the following:
curl -u "<accessId>:<accessKey>" -X GET https://api.<YOUR_DEPLOYMENT>.sumologic.com/api/v1/collectors?limit=2
Where YOUR_DEPLOYMENT is either au, ca, de, eu, 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.
Basic access (Base64 encoded) authentication
If you prefer to use basic access authentication, you can do a Base64 encoding of your
<accessId>:<accessKey> to authenticate your HTTPS request. The following is an example request, replace the placeholder
<encoded> with your encoded access id and access key string:
curl -H "Authorization: Basic <encoded>" -X GET https://api.<YOUR_DEPLOYMENT>.sumologic.com/api/v1/collectors?limit=2
In most Linux distributions you can use the 'base64' command. If the access id was
Aladdin and your access key was
OpenSesame then the command would be as follows:
echo -n "Aladdin:OpenSesame" | base64
This would yield a Base64 encoded string 'QWxhZGRpbjpPcGVuU2VzYW1l' that is used like this:
"Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l"
- A rate limit of four API requests per second (240 requests per minute) applies to all API calls from a user.
- A rate limit of 10 concurrent requests to any API endpoint applies to an access key.
If a rate is exceeded, a rate limit exceeded 429 status code is returned.