05 Dec 2023 07:50 AM - last edited on 05 Dec 2023 08:32 AM by MaciejNeumann
I can list groups and environments, but subscriptions returns blank. The status code is 200 and there is no token error.
https://api.dynatrace.com/sub/v2/accounts/<uuid>/subscriptions
I used scope=account-uac-read to generate a token.
Does anyone know what is causing this?
The output shows { "data": [] }.
14 Dec 2023 07:17 PM
Hi @tjay
What license are you currently on with your Dynatrace tenant?
Depending on your license currently, you can try the v1 api and see what the return is:
https://api.dynatrace.com/sub/v1/accounts/<uuid>/subscriptions
Thanks,
Lawrence
15 Dec 2023 02:53 AM
Thank you for your comment.
We use Host Units, DDU, DEM and ASU.
I tried v1 and here is the result.
https://api.dynatrace.com/sub/v1/accounts/<uuid>/subscriptions
{"totalCount":0,"records":[]}
15 Dec 2023 08:23 AM
Hi @tjay,
Are you on full DPS or classic licensing?
I tested an account in postman and got this result:
Have you input your bearer token for Authorization?
Thanks,
Lawrence
18 Dec 2023 12:05 AM
Thank you for your reply.
I believe we use the DPS license. Regarding the bearer token, I do use it. Without it there is an error - Incorrect Authorization header in request.
I tired the GUI example to get the subscriptions.
For v1 the curl command as follows. I tried v2 as well.
curl -X 'GET' 'https://api.dynatrace.com/sub/v1/accounts/<accountUuid>/subscriptions' -H 'accept: application/json' -H 'Authorization: Bearer <token>'