I have recently began testing the Sophos API for Sophos central.
I have created an API key within the Sophos Central Console
And using this , I have downloaded the Central SEIM Integration script and I have been able to execute the file script successfully.
community.sophos.com/.../125169
However, I now want to see what other capabilities the API offers.
I have followed the instructions in the following doc.
community.sophos.com/.../125398
When I try and test any of the API commands I get errors.
I have no changed the API is any way, however testing any individual command from within the Swagger Editor fails.
Its intimates that the error may well be a "cross origin call issue", but the KB article does not provide any information on whether the Sophos server allows this and if not, how to test with the Swagger editor. _ I feel that the documentation is missing some additional instructions to get this to work.
Has anyone managed to get any API commands to work within the swagger editor ?
Any advice would be welcome.
For reference for anyone else trying to do more with the API.
Use swagger only as an api doumentation/interpretation tool.
Any attempt to call/test the api direct from the swagger interface fails, due to a cross-origin-call issue.
Solution: - use Postman API Runner plugin for Chrome.
Sample below enumerates endpoints using http://api1.central.sophos.com/gateway/migration-tool/v1/endpoints
Create Authorization Key and x-api-key and enter values generated within Sophos Central fro client.
** important** include the whole of the Authorization key including the word Basic otherwise it will fail
Hope this helps someone else
Si