Remote proxy advanced usage
In addition to basic remote proxy calls, you can manage external configurations directly through the REST API. The following examples show how to use REST access paths to query data through the proxy, and how to list, view, and delete remote proxy configurations.
REST access paths
|
For PingIDM systems, the configuration file is named
|
Use the runtime data access path (slash form) to query data through the proxy.
For example:
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Accept-API-Version: resource=1.0" \
--request GET \
"https://<local-instance-fqdn>/openidm/external/idm/<remote-instance-name>/managed/user?_queryFilter=true"
{
"result": [
{
"_id": "95b2b43c-621e-4bca-8a97-efc768f17751",
"_rev": "00000000f20217df",
"userName": "testUser",
"accountStatus": "active",
"givenName": "Test",
"sn": "User",
"mail": "testUser@test.com"
}
],
"resultCount": 1,
"pagedResultsCookie": null,
"totalPagedResultsPolicy": "NONE",
"totalPagedResults": -1,
"remainingPagedResults": -1
}
List all external configurations
Use the config management path (dot form) to list external configurations.
For example:
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Accept-API-Version: resource=1.0" \
--request GET \
'https://<local-instance-fqdn>/openidm/config?_queryFilter=_id+sw+"external.idm"'
{
"result": [
{
"_id": "external.idm/<remote-instance-name>",
"enabled": true,
"authType": "bearer",
"instanceUrl": "https://<remote-instance-fqdn>/openidm/",
"clientId": "<clientIDName>",
"clientSecret": {
"$crypto": {
"type": "x-simple-encryption",
"value": { <encryptedValue> }
}
},
"scope": [
"fr:idm:*"
],
"tokenEndpoint": "https://<remote-instance-fqdn>/am/oauth2/realms/root/realms/alpha/access_token",
"tokenEndpointAuthMethod": "client_secret_post",
"scopeDelimiter": " "
}
],
"resultCount": 1,
"pagedResultsCookie": null,
"totalPagedResultsPolicy": "EXACT",
"totalPagedResults": 1,
"remainingPagedResults": -1
}