Sumo Logic supports the following options for API authentication:
- Access ID and access key
- Base 64-encoded token
See Access Keys to generate an access key. Make sure to copy the key your create, because it is displayed only once.
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 us1, us2, eu, or au. For us1, use api.sumologic.com. For the others, use api.us2.sumologic.com, and so on. For more information, see Sumo Logic Endpoints.
If you prefer to use a basic authentication token, you can do a Base64 encoding of
<accessId>:<accessKey> and run the following:
curl -H "Authorization: Basic <token>" -X GET https://api.YOUR_DEPLOYMENT.sumologic.com/api/v1/collectors?limit=2