A collection of the REST interface commands and syntax

This topic contains 2 replies, has 2 voices, and was last updated by  pryton 1 year, 11 months ago.

  • Author
    Posts
  • #19180
     pryton 
    Participant

    Hello guys,

    i am searching for a collection of the syntax for the REST interface for openIDM
    commands like:

    `curl -u openidm-admin:openidm-admin “http://localhost:8080/openidm/managed/role?_queryId=query-all-ids” | jq .

    i am new to openIDM and it would be cool to have all that commands collected in one place

    thx

    • This topic was modified 1 year, 11 months ago by  pryton.
    #19182
     laurent.bristiel 
    Participant

    Hello,
    you can use the API explorer to have a list of endpoints and their description/usage.
    See the doc: https://backstage.forgerock.com/docs/idm/5/integrators-guide/#ui-api-descriptor
    Regards,
    Laurent

    #19183
     pryton 
    Participant

    Thank you @laurent-bristiel you saved my day

    #19184
     timfeldmann 
    Participant

    I don’t see an option to attach a file… so I am pasting it here.
    This is an export from Postman for the most common commands that I use.
    Anywhere you see something in <>, those would be values from your environment. (hopefully I have sanitized all of our values out of it!)
    Cut and paste all lines below and save to a .json file… then in postman you should be able to import it.

    {
    “variables”: [],
    “info”: {
    “name”: “Openidm”,
    “_postman_id”: “73855b03-ac2c-57a7-8d48-b8be5c4d6051”,
    “description”: “”,
    “schema”: “https://schema.getpostman.com/json/collection/v2.0.0/collection.json”
    },
    “item”: [
    {
    “name”: “Get Scheduled Events”,
    “request”: {
    “url”: “https://<server>:8443/openidm/scheduler?_queryId=query-all-ids”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Config”,
    “request”: {
    “url”: “https://<server>:8443/openidm/config”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Managed Config”,
    “request”: {
    “url”: “https://<server>:8443/openidm/config/managed”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    },
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Start Recon with QueryFilter and runTargetPhase”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/recon?_action=recon&mapping=<mappingname>”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “recon”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “recon”,
    “equals”: true,
    “description”: “”
    },
    {
    “key”: “mapping”,
    “value”: “<mappingname>”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    },
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    }
    ],
    “body”: {
    “mode”: “raw”,
    “raw”: “{\r\n \”sourceQuery\”: {\r\n\”_queryFilter\”: \”(/employeeID eq \\\”<value>\\\”)\”},\r\n \”runTargetPhase\”: false\r\n\r\n\r\n}”
    },
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “ResumeJobs”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/scheduler?_action=resumeJobs”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “scheduler”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “resumeJobs”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “PauseJobs”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/scheduler?_action=pauseJobs”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “scheduler”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “pauseJobs”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Put Sync Config”,
    “request”: {
    “url”: “https://<server>:8443/openidm/config/sync”,
    “method”: “PUT”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {
    “mode”: “raw”,
    “raw”: “”
    },
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Sync Config”,
    “request”: {
    “url”: “https://<server>:8443/openidm/config/sync”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {
    “mode”: “raw”,
    “raw”: “”
    },
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Provisioner Config”,
    “request”: {
    “url”: “https://<server>:8443/openidm/config/provisioner.openicf/<ConnectorName>”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {
    “mode”: “raw”,
    “raw”: “”
    },
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Put Provisioner Config”,
    “request”: {
    “url”: “https://<server>:8443/openidm/config/provisioner.openicf/<ConnectorName>”,
    “method”: “PUT”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {
    “mode”: “raw”,
    “raw”: “”
    },
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Recon results”,
    “request”: {
    “url”: “https://<server>:8443/openidm/recon”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Cancel Recon”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/recon/b255e05c-0c1a-4afc-8dc6-08a4aa781c2c-3194936?_action=cancel”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “recon”,
    “b255e05c-0c1a-4afc-8dc6-08a4aa781c2c-3194936”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “cancel”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Create Internal Role”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/repo/internal/role?_action=create”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “repo”,
    “internal”,
    “role”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “create”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {
    “mode”: “raw”,
    “raw”: “{ \”_id\” : \”HelpDesk Administrator2\”, \”description\”: \”Help Desk admin 2\”, \”name\”:\”helpdesk-admin2\” }”
    },
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Delete Link”,
    “request”: {
    “url”: “https://<server>:8443/openidm/repo/link/8bdb3f3f-00d2-4cbd-b4e2-064c2e6eebeb”,
    “method”: “DELETE”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    },
    {
    “key”: “If-Match”,
    “value”: “0”,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Delete Scheduled event”,
    “request”: {
    “url”: “https://<server>:8443/openidm/scheduler/835931aa-7b34-47a5-849c-579f6c00897f”,
    “method”: “DELETE”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get connector user (AD)”,
    “request”: {
    “url”: “https://<server>:8443/openidm/system/TestAD/account/<GUID=517156b009b065498f0db2f849fc0dbc>”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get connector userby attribute”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/system/TestAD/account?_queryFilter=%2FsAMAccountName+eq+%22<value>%22&_fields=userAccountControl,givenName,lockoutTime,isActive”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “system”,
    “TestAD”,
    “account”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “%2FsAMAccountName+eq+%22<value>%22”,
    “equals”: true,
    “description”: “”
    },
    {
    “key”: “_fields”,
    “value”: “userAccountControl,givenName,lockoutTime,isActive”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Internal Roles”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/repo/internal/role?_queryId=query-all-ids”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “repo”,
    “internal”,
    “role”
    ],
    “query”: [
    {
    “key”: “_queryId”,
    “value”: “query-all-ids”,
    “equals”: true
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Link”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/repo/link/?_queryFilter=firstId eq \”d3675ea8-9372-435b-91fc-e18928a8a276\””,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “repo”,
    “link”,
    “”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “firstId eq \”d3675ea8-9372-435b-91fc-e18928a8a276\””,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Link by attributemapping”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/repo/link/?_queryFilter=secondId eq \”843489ea-74e0-4939-a9f0-997fbe86bbef\” and linkType eq \”systemTestADAccount_managedUser\””,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “repo”,
    “link”,
    “”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “secondId eq \”843489ea-74e0-4939-a9f0-997fbe86bbef\” and linkType eq \”systemTestADAccount_managedUser\””,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Managed User”,
    “request”: {
    “url”: “https://<server>:8443/openidm/managed/user/267eaa3b-28d2-40da-bc20-83ab683b132e”,
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Managed User by attribute”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/managed/user?_queryFilter=%2FuserName+eq+%22<value>%22&_fields=EMPLOYEE_ID,LAST_NAME”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “managed”,
    “user”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “%2FuserName+eq+%22<value>%22”,
    “equals”: true,
    “description”: “”
    },
    {
    “key”: “_fields”,
    “value”: “EMPLOYEE_ID,LAST_NAME”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Assignments”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/managed/assignment?_queryFilter=true”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “managed”,
    “assignment”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “true”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “List Executing Jobs”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/scheduler?_action=listCurrentlyExecutingJobs”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “scheduler”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “listCurrentlyExecutingJobs”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Repo Config”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/config/repo.jdbc”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “repo”,
    “config”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “true”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Test Script”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/script?_action=eval”,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “script”
    ],
    “query”: [
    {
    “key”: “_action”,
    “value”: “eval”,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “POST”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    },
    {
    “name”: “Get Link by firstId”,
    “request”: {
    “url”: {
    “raw”: “https://<server>:8443/openidm/repo/link/?_queryFilter=firstId eq \”<value>\” and linkType eq \”systemTestAD__ACCOUNT___managedUser\””,
    “protocol”: “https”,
    “host”: [
    “<server>”
    ],
    “port”: “8443”,
    “path”: [
    “openidm”,
    “repo”,
    “link”,
    “”
    ],
    “query”: [
    {
    “key”: “_queryFilter”,
    “value”: “firstId eq \”<value>\” and linkType eq \”systemTestAD__ACCOUNT___managedUser\””,
    “equals”: true,
    “description”: “”
    }
    ],
    “variable”: []
    },
    “method”: “GET”,
    “header”: [
    {
    “key”: “Content-Type”,
    “value”: “application/json”,
    “description”: “”
    },
    {
    “key”: “Authorization”,
    “value”: “Basic “,
    “description”: “”
    }
    ],
    “body”: {},
    “description”: “”
    },
    “response”: []
    }
    ]
    }

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

©2019 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?