Hello,
Between this: https://developer.sophos.com/docs/endpoint-v1/1/routes/downloads/get
and this: https://developer.sophos.com/getting-started
I got as far as trying to submit a 'curl' command to get the downloadURL value for a given tenant. I wouldn't even be bothering but the thin-installer deployment page makes a prominent note of saying "hey, use the API instead" without actually giving a concrete example of HOW to use the API.
But my results are...
{ "tenant": { "id": "ID REDACTED" }, "licensedProducts": [], "installers": []}
Not helpful. What am I missing?
Thanks,
- KPK
I have been talking to the development team about this and they would like some more data.
Can you please DM me a screenshot of the licenses page from that tenant?
Hi,
The primary thing is that you need to get the tenant id and data region.
The curl call will look like this:curl \ 'api-us01.central.sophos.com/.../downloads \ --header 'X-Tenant-ID: 0de7...b683' \ --header 'Authorization: Bearer eyJ...JU' \ --header 'Accept: application/json' \ --compressed
This is for the product set requested - modify as you see fit.
In the https section the us01 is specific to this account and you need to get that from this call:
curl -XGET -H "Authorization: Bearer <jwt>" https://api.central.sophos.com/whoami/v1If you are a direct tenant. If the account is under an Enterprise Dashboard or Partner Portal - you need to list tenants first to get the tenant id:
curl -XGET -H "Authorization: Bearer <jwt>" https://api.central.sophos.com/whoami/v1
curl -XGET -H "Authorization: Bearer <jwt>" \ -H "X-Organization-ID: <organization-id>" \ api.central.sophos.com/.../tenantsThis will return an array with the tenant ids and their data regions. Just slot that into the call above to get the download.Remember, your API account need access to these lower levels for the call to work.
curl -XGET -H "Authorization: Bearer <jwt>" \ -H "X-Organization-ID: <organization-id>" \ api.central.sophos.com/.../tenants
RichardP
Program Manager, Support Readiness | CISSP | Sophos Technical SupportSupport Videos | Product Documentation | @SophosSupport | Sign up for SMS AlertsIf a post solves your question use the 'Verify Answer' link.
Right. We're using the Partner Portal, so I'd done the bit to get the tenant ID. My request had the X-Tenant-ID and the JWT auth block. My results were as posted above. It didn't give an error of any kind, just kind of empty results.
(Also, I did note the region string and used that in the curl command. It was us03 for this particular tenant.)
what was the product array you passed?
?requestedProducts=coreAgent&platforms=windows
Hmm, I'm not sure what is happening unless that ID was the wrong one and you don't have the products for that level.
I will ask the dev to look at this thread.