Guest User!

You are not Sophos Staff.

Sophos Central API Start help

Hi,

I did follow the manual with cURL but i couldnt connect to sophos, i try with ps and worked but it didnt bring me any endpoint, could you point me in the right direction.

Thanks

Parents
  • Hi Jhon,

    Let me know what your PowerShell looks like, I was able to get a list of devices returned by running the following. 

    $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
    $headers.Add("X-Tenant-ID", "<Tenant-ID>")
    $headers.Add("Authorization", "Bearer <Token>")

    $response = Invoke-RestMethod 'https://api-<Region>.central.sophos.com/endpoint/v1/endpoints' -Method 'GET' -Headers $headers
    $response | ConvertTo-Json

Reply
  • Hi Jhon,

    Let me know what your PowerShell looks like, I was able to get a list of devices returned by running the following. 

    $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
    $headers.Add("X-Tenant-ID", "<Tenant-ID>")
    $headers.Add("Authorization", "Bearer <Token>")

    $response = Invoke-RestMethod 'https://api-<Region>.central.sophos.com/endpoint/v1/endpoints' -Method 'GET' -Headers $headers
    $response | ConvertTo-Json

Children