How To
ForgeRock Identity Platform
ForgeRock Identity Cloud

How do I understand the underlying REST call being used in web requests in Identity Cloud or AM (All versions)?

Last updated Jan 24, 2023

The purpose of this article is to provide information on finding out what is included in REST calls being made in ForgeRock Identity Cloud or AM. This technique can be useful to help you formulate REST calls based on an existing web request or to troubleshoot why a REST call is not working as expected.


You can use the Developer Tools in your browser to copy a web request as a curl command and replay it on the command line. The resulting curl command includes all the headers, options, and data that was sent for the particular web request you are interested in. You can then use the information and REST syntax as the basis of your own REST calls or for comparison analysis when a request or endpoint is failing.

See How do I avoid common issues with REST calls in AM (All versions)? for other troubleshooting tips.

Copying to curl

You can copy a web request to curl as follows:

  1. Launch the Developer Tools in your browser and select the Network tab.
  2. Enter the URL that you want to examine web requests for and let it load fully.
  3. Right-click on the required web request on the Network tab , select Copy followed by Copy as cURL.
  4. Paste the resulting curl command into a text file or onto the command line as needed.

These instructions apply to Chrome™, Firefox® and Microsoft® Edge.


Copying the web request for creating a basic authentication tree produces the following curl command:

curl '' \ -X 'PUT' \ -H 'Connection: keep-alive' \ -H 'Pragma: no-cache' \ -H 'Cache-Control: no-cache' \ -H 'accept-api-version: protocol=2.1,resource=1.0' \ -H 'accept: application/json' \ -H 'if-none-match: *' \ -H 'x-requested-with: ForgeRock CREST.js' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36' \ -H 'content-type: application/json' \ -H 'Origin:' \ -H 'Referer:' \ -H 'Accept-Language: en-GB,en;q=0.9' \ -H 'Cookie: amlbcookie=01; iPlanetDirectoryPro=ji_S58bZ7iuOeRgdbny74vqJK5Y.*AAJTSQACMDEAAlNLABx5S3h5SHd3Y29HT1BRZGpoaVlkQS9VbERJc2M9AAR0eXBlAANDVFMAAlMxAAA.*' \ --data-binary '{"entryNodeId":"e301438c-0bd0-429c-ab0c-66126501069a","nodes":{},"staticNodes":{}}' \ --compressed \ --insecure

See Also

How do I avoid common issues with REST calls in AM (All versions)?

Online REST API reference

Related Training


Related Issue Tracker IDs


Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.