Chilkat Online Tools

Python / ForgeRock Identity Cloud Collection / Step 2: Get a Managed Identity

Back to Collection Items

import sys
import chilkat

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = chilkat.CkHttp()

# Adds the "Authorization: Bearer <access_token>" header.
http.put_AuthToken("<access_token>")

sbResponseBody = chilkat.CkStringBuilder()
success = http.QuickGetSb("https://<tenant-name>.forgeblocks.com/openidm/managed/alpha_user/:_id",sbResponseBody)
if (success == False):
    print(http.lastErrorText())
    sys.exit()

print("Response status code = " + str(http.get_LastStatus()))
print(sbResponseBody.getAsString())

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://<tenant-name>.forgeblocks.com/openidm/managed/alpha_user/:_id

Postman Collection Item JSON

{
  "name": "Step 2: Get a Managed Identity",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{platformUrl}}/openidm/managed/alpha_user/:_id",
      "host": [
        "{{platformUrl}}"
      ],
      "path": [
        "openidm",
        "managed",
        "alpha_user",
        ":_id"
      ],
      "query": [
        {
          "key": "_fields",
          "value": "",
          "description": "Optional parameter containing a comma separated list of field references specifying which fields of the targeted JSON resource should be returned.",
          "disabled": true
        }
      ],
      "variable": [
        {
          "key": "_id",
          "value": "{{managedUserId}}"
        }
      ]
    }
  },
  "response": [
    {
      "name": "Success",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "(Required) ",
            "key": "Accept-API-Version",
            "value": "<string>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/openidm/managed/user#1.0_query_filter?_fields=&_prettyPrint=true&_queryFilter=<string>&_pageSize=<integer>&_totalPagedResultsPolicy=<string>&_sortKeys=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "openidm",
            "managed",
            "user"
          ],
          "hash": "1.0_query_filter?_fields=&_prettyPrint=true&_queryFilter=<string>&_pageSize=<integer>&_totalPagedResultsPolicy=<string>&_sortKeys=<string>"
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "*/*"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}