This post will cover
1. Ensure that you have created your API Credentials as covered under the step 1 of the Getting Started Guide in the Sophos Developer Portal, detailed below for convenience
2. Build an Authentication API request
Example HTTP Authentication Request:
POST /api/v2/oauth2/token HTTP/1.1Host: id.sophos.comContent-Type: application/x-www-form-urlencoded
Example HTTP Authentication Response:
grant_type=client_credentials&client_id=<Client_ID>&client_secret=<Client_Secret>&scope=token
Example Postman Authentication Request:
3. Building subsequent API requests
Once authenticated, subsequent API requests into Sophos Central may contain the following items
Example HTTP Request to retrieve all Tenants of a Partner:
Example HTTP Request to retrieve all Endpoints of a Tenant:
Note the differences between the two requests above. In the URL and Headers where the first call is at the partner level, is a generic URL, and contains the Partner ID. Whereas the second request is at a lower tenant level and contains a specific regional URL, and a Tenant ID.