Unsolved
1 Rookie
•
1 Message
0
40
AppSync and RestAPI
Hi all,
Hoping someone can help me out with the restapi for AppSync (v4.6). I'm following the guide but not able to query a list of the service plans. I've take the below from the "AppSync REST APIs used by UI and CLI." doc on developer.dell.com but doesn't work for me. I get the token and try to use it to list out the Service Plans, but getting a 401 Unauthorized error. Not leaving any time in between the commands, so token shouldn't have expired as I understand it.
Get Token
-----------
curl -k -X POST -d "username=<user>" -d "password=<password>" -d "client_id=appsync_rest" -d "grant_type=password" -d "scope=openid" https://<appsync_host>:8444/auth/realms/appsync/protocol/openid-connect/token
List Service Plans
-------------------
curl -k -X GET -H "Authorization:Bearer <token>" -H "Accept:application/json" https://<appsync_host>:8445/appsync/rest/types/servicePlan/instances
Any help appreciated.
Thanks
Jon