I'm trying to query my Portal's REST API via my-portal-hostname/webadapter/sharing/rest
in POSTMAN. I am able to generate a token via /sharing/rest/oauth2/token
however I am not able to then use the token to call other endpoints. After sending a POST request in postman I receive HTML code displaying the portal directory login page. I am trying to call the endpoint to unshare an item from a group.
For the POST request I am sending the token as a key in the form-data body.
Any ideas what I am doing wrong?
-
You should probably follow a trace of the network requests when it works before trying to go commando.Vince– Vince2022年03月22日 03:27:49 +00:00Commented Mar 22, 2022 at 3:27
-
I guess you do not provide to much information about what are you sending and what is the real answer. Anyway, you can find in this GitHub repo some Postman collections for the ArcGIS-REST-API. I hope it helps!Katah– Katah2022年03月22日 09:41:20 +00:00Commented Mar 22, 2022 at 9:41
-
Thanks for the replies, the answer was missing a query parameter 'f' to return response as json rather than the default HTML.Jack– Jack2022年03月23日 11:40:54 +00:00Commented Mar 23, 2022 at 11:40
1 Answer 1
The answer was missing a query parameter f
to return response as json rather than the default HTML.