{"info":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","description":"<html><head></head><body><p>This collection may be useful to get started with RESTful interactions with PingDirectory and may be executed as a sequence with postman collection runner or newman.</p>\n<p>For a full reference of the API, see <a href=\"https://apidocs.pingidentity.com/pingdirectory/directory/v1/api/guide/\">https://apidocs.pingidentity.com/pingdirectory/directory/v1/api/guide/</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"1355701","collectionId":"805148e9-6784-4ab6-8027-dbce3850299c","publishedId":"SW7c27j1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-11-22T19:07:46.000Z"},"item":[{"name":"Get Schemas","id":"b79926b6-3a14-40fc-86ac-c659e1d5a6ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:1443/directory/v1/schemas/person","description":"<p>A schema is the set of directory server rules that define the structures, contents, and constraints of a Directory Information Tree (DIT). The schema guarantees that any new data entries or modifications meet and conform to these predetermined set of definitions. It also reduces redundant data definitions and provides a uniform method for clients or applications to access its Directory Server objects. The PingDirectory Server ships with a default set of read-only schema files that define the core properties for the directory server.</p>\n<p>Schemas endpoints provide operations to get all defined schemas.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","schemas","person"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b79926b6-3a14-40fc-86ac-c659e1d5a6ec"},{"name":"Get Server Metadata","event":[{"listen":"test","script":{"id":"04fce92d-74db-4f87-ab2d-7ff02d5ef561","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});","var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"base_dn\", jsonData.publicBaseDNs[0]);"],"type":"text/javascript"}}],"id":"2ea84bfb-096f-4477-9f89-21fde93bf91a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:1443/directory/v1/","description":"<p>A GET request on the base endpoint, /directory/v1, returns metadata about the server and API. It also returns a list of configured schemas allowed on the server.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2ea84bfb-096f-4477-9f89-21fde93bf91a"},{"name":"Create User","event":[{"listen":"prerequest","script":{"id":"cc4d0f7e-4c14-49f8-a6d4-a5b9f8f76e5e","exec":["pm.environment.set(\"userID\",Math.floor(Math.random()*1000000));"],"type":"text/javascript"}},{"listen":"test","script":{"id":"f4ecff27-49d5-48fd-aa9e-12d2e0766660","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(201);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});","","var jsonData = JSON.parse(responseBody);","","","var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"userURL\", jsonData[\"_links\"].self.href);","postman.setEnvironmentVariable(\"userDN\", jsonData[\"_dn\"]);"],"type":"text/javascript"}}],"id":"35ff7253-9b55-4b1c-b6cb-eaef09e9f879","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"_parentDN\": \"dc=example,dc=com\",\n  \"objectClass\": [ \"person\" ],\n  \"cn\": [\"user.{{userID}}\"],\n  \"sn\": [\"pm-test-user\"],\n  \"userPassword\": [\"2Federate!\"]\n}"},"url":"https://localhost:1443/directory/v1/","description":"<p>The POST /directory/v1 operation adds a new entry to the directory. The request body must contain all of the required attributes as defined in the schema. If there are no required attributes defined in the schema, you can submit a valid create request with only the _dn attribute in the request body.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"35ff7253-9b55-4b1c-b6cb-eaef09e9f879"},{"name":"Get User (by DN)","event":[{"listen":"test","script":{"id":"b2ff802e-ff95-46e1-b770-dda971b3c8ea","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});",""],"type":"text/javascript"}}],"id":"400839f9-67e8-45d7-b7fe-15d41e33724b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:1443/directory/v1/{{userDN}}","description":"<p>This operation returns the entry specified by its disstinguished name (DN).</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","{{userDN}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"400839f9-67e8-45d7-b7fe-15d41e33724b"},{"name":"Get User (by self URL)","event":[{"listen":"test","script":{"id":"b2ff802e-ff95-46e1-b770-dda971b3c8ea","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});",""],"type":"text/javascript"}}],"id":"be6bcf5b-2bed-4453-9e0c-cb8554c6f831","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{userURL}}","description":"<p>This operation retrieves the user entry created by using the URL returned by the previous POST call.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"host":["{{userURL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"be6bcf5b-2bed-4453-9e0c-cb8554c6f831"},{"name":"Search User by cn","event":[{"listen":"test","script":{"id":"9fdef161-2f45-4b6d-9477-d69ef2df1467","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});",""],"type":"text/javascript"}}],"id":"f11896aa-af72-4e16-8afc-6652ec33b64a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:1443/directory/v1/dc=example,dc=com/subtree?searchScope=wholeSubtree&filter=cn eq \"user.{{userID}}\"","description":"<p>This request leverages the search API with filtering and paging facilities.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","dc=example,dc=com","subtree"],"host":["localhost"],"query":[{"description":{"content":"<p>baseObject or singleLevel or wholeSubtree or subordinateSubtree</p>\n","type":"text/plain"},"key":"searchScope","value":"wholeSubtree"},{"description":{"content":"<p>SCIM filtering parameter to limit the returned result set to those entries meeting the specified criteria.</p>\n","type":"text/plain"},"key":"filter","value":"cn eq \"user.{{userID}}\""}],"variable":[]}},"response":[],"_postman_id":"f11896aa-af72-4e16-8afc-6652ec33b64a"},{"name":"Search all users","event":[{"listen":"test","script":{"id":"cd12833b-8aeb-4ae2-86af-ff8846371ab8","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});",""],"type":"text/javascript"}}],"id":"884472be-70f2-49be-8a80-32ba469069a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:1443/directory/v1/dc=example,dc=com/subtree?searchScope=wholeSubtree&filter=sn eq \"pm-test-user\"","description":"<p>This request leverages the search API with filtering and paging facilities.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","dc=example,dc=com","subtree"],"host":["localhost"],"query":[{"description":{"content":"<p>baseObject or singleLevel or wholeSubtree or subordinateSubtree</p>\n","type":"text/plain"},"key":"searchScope","value":"wholeSubtree"},{"description":{"content":"<p>SCIM filtering parameter to limit the returned result set to those entries meeting the specified criteria.</p>\n","type":"text/plain"},"key":"filter","value":"sn eq \"pm-test-user\""}],"variable":[]}},"response":[],"_postman_id":"884472be-70f2-49be-8a80-32ba469069a8"},{"name":"Update User (set description)","event":[{"listen":"test","script":{"id":"7fb307bf-907c-4ddd-8b35-bfabf3d7a5c3","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});",""],"type":"text/javascript"}}],"id":"1a4a532d-7768-41f6-acd2-ed3a9909a303","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"description\": [\"This user is created via the PingDirectory REST API\"]\n}"},"url":"https://localhost:1443/directory/v1/{{userDN}}","description":"<p>Modify an entry in PingDirectory.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","{{userDN}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1a4a532d-7768-41f6-acd2-ed3a9909a303"},{"name":"Update User (add description)","event":[{"listen":"test","script":{"id":"05b59aab-a314-49e4-ba0e-8f1a6c1532a5","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(200);","    ","});","","pm.test(\"response is JSON\", function(){","    pm.response.to.be.json;","});",""],"type":"text/javascript"}}],"id":"fad80bf9-964b-4c8d-898f-71f92d6b108b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"modifications\": \n\t\t[\n\t\t\t{\n\t\t\t\t\"attributeName\": \"description\",\n\t\t\t\t\"modificationType\": \"add\",\n\t\t\t\t\"values\": [\"furthermore, these are set via a Postman collection\"]\n\t\t\t}\n\t\t]\n}"},"url":"https://localhost:1443/directory/v1/{{userDN}}","description":"<p>Modify an entry in PingDirectory.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","{{userDN}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fad80bf9-964b-4c8d-898f-71f92d6b108b"},{"name":"Delete User","event":[{"listen":"test","script":{"id":"2757d70b-5a27-44d0-abdd-dda0d9304eff","exec":["pm.test(\"response is ok\", function(){","    pm.response.to.have.status(204);","});"],"type":"text/javascript"}}],"id":"8b7129ca-5aa2-4c50-8ad4-1e73287eed66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://localhost:1443/directory/v1/{{userDN}}","description":"<p>Delete an entry from PingDirectory</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]},"isInherited":true,"source":{"_postman_id":"805148e9-6784-4ab6-8027-dbce3850299c","id":"805148e9-6784-4ab6-8027-dbce3850299c","name":"PingDirectory REST Simple","type":"collection"}},"urlObject":{"protocol":"https","port":"1443","path":["directory","v1","{{userDN}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8b7129ca-5aa2-4c50-8ad4-1e73287eed66"}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"cn=administrator"},{"key":"password","value":"2FederateM0re"}]}},"event":[{"listen":"prerequest","script":{"id":"72bff18c-6efe-4e0a-b9ad-75b07bc82faf","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0a0c40cb-6cc1-4647-a4b8-06b05b9461ad","type":"text/javascript","exec":[""]}}],"variable":[{"key":"pingdirectory_host","value":"localhost"},{"key":"pingdirectory_https_port","value":"1443"},{"key":"base_dn","value":"dc=example,dc=com"},{"key":"pingdirectory_admin_user","value":"cn=administrator"},{"key":"pingdirectory_admin_pwd","value":"2FederateM0re"}]}