cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Account Management API for Subscriptions is blank

tjay
Contributor

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": [] }.

4 REPLIES 4

LawrenceBarratt
Dynatrace Advisor
Dynatrace Advisor

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

Hi @LawrenceBarratt 

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":[]}

LawrenceBarratt
Dynatrace Advisor
Dynatrace Advisor

Hi @tjay,

Are you on full DPS or classic licensing?

I tested an account in postman and got this result:

LawrenceBarratt_2-1702628466378.png

Have you input your bearer token  for Authorization?

Thanks,

Lawrence

Hi @LawrenceBarratt 

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.

https://api.dynatrace.com/spec/#/Dynatrace%20Platform%20Subscription/SubscriptionsController_listSub...

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>'

Featured Posts