OpenIDM2: REST Interface

 

Get All Users

curl \
 --header "X-OpenIDM-Username: openidm-admin" \
 --header "X-OpenIDM-Password: openidm-admin" http://localhost:8080/openidm/managed/user/?_query-id=query-all-ids

Add a New User: joe

curl \
 --header "X-OpenIDM-Username: openidm-admin" \
 --header "X-OpenIDM-Password: openidm-admin" \
 --request PUT \
 --data "{ \
 \"userName\":\"joe\", \
 \"givenName\":\"joe\", \
 \"familyName\":\"smith\", \
 \"email\":[\"joe@example.com\"], \
 \"description\":\"My first user\" \
 }" http://localhost:8080/openidm/managed/user/joe

* Output

 

List User: joe

curl \
  --header "X-OpenIDM-Username: openidm-admin" \
  --header "X-OpenIDM-Password: openidm-admin" http://localhost:8080/openidm/managed/user/joe

* Output

{"familyName":"smith","userName":"joe","givenName":"joe","_id":"joe","_rev":"0","email":["joe@example.com"],"description":"My first user"}

Add a New User: jane

curl \
  --header "X-OpenIDM-Username: openidm-admin" \
  --header "X-OpenIDM-Password: openidm-admin" \
  --request PUT \
  --data "{ \
  \"userName\":\"jane\", \
  \"givenName\":\"jame\", \
  \"familyName\":\"doe\", \
  \"email\":[\"jane@example.com\"], \
  \"description\":\"My second user\" \
  }" http://localhost:8080/openidm/managed/user/jane

List User: joe

 curl \
   --header "X-OpenIDM-Username: openidm-admin" \
   --header "X-OpenIDM-Password: openidm-admin" http://localhost:8080/openidm/managed/user/jane

* Output

{"familyName":"doe","userName":"jane","givenName":"jame","_id":"jane","_rev":"0","email":["jane@example.com"],"description":"My second user"}
This entry was posted in OpenIdm and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.