{ "info": { "_postman_id": "73043646-f766-4adc-96ee-05316cc59bdd", "name": "SCIM PHP Collection", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Users", "item": [ { "name": "Create a single user", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 201\", () => {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains user with userName \\\"createdtestuser\\\"\", () => {", " pm.expect(pm.response.json().userName).to.eql(\"createdtestuser\");", "});", "", "pm.test(\"Response body contains a valid non-null user ID (the ID of the user which was created)\", () => {", " pm.expect(pm.response.json().id).to.not.be.null;", "});", "", "pm.collectionVariables.set(\"testUserId\", pm.response.json().id);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/scim+json", "type": "default" } ], "body": { "mode": "raw", "raw": "{\n \"userName\": \"createdtestuser\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/Users", "host": [ "{{url}}" ], "path": [ "Users" ] } }, "response": [] }, { "name": "Read a single user", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains the user ID of the user we want to read\", () => {", " pm.expect(pm.response.json().id).to.eql(pm.collectionVariables.get('testUserId'));", "});", "", "pm.test(\"Response body contains user with userName \\\"createdtestuser\\\"\", () => {", " pm.expect(pm.response.json().userName).to.eql(\"createdtestuser\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/Users/{{testUserId}}", "host": [ "{{url}}" ], "path": [ "Users", "{{testUserId}}" ] } }, "response": [] }, { "name": "Read all users", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json().Resources).to.not.be.empty;", "});", "", "pm.test(\"Response body contains user with userName \\\"createdtestuser\\\"\", () => {", " pm.expect(pm.response.json().Resources[0].userName).to.eql(\"createdtestuser\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/Users", "host": [ "{{url}}" ], "path": [ "Users" ] } }, "response": [] }, { "name": "Update a single user", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains the user ID of the user we want to read\", () => {", " pm.expect(pm.response.json().id).to.eql(pm.collectionVariables.get('testUserId'));", "});", "", "pm.test(\"Response body contains user with userName \\\"updatedtestuser\\\"\", () => {", " pm.expect(pm.response.json().userName).to.eql(\"updatedtestuser\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/scim+json", "type": "default" } ], "body": { "mode": "raw", "raw": "{\n \"userName\": \"updatedtestuser\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/Users/{{testUserId}}", "host": [ "{{url}}" ], "path": [ "Users", "{{testUserId}}" ] } }, "response": [] }, { "name": "Delete a single user", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 204\", () => {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/scim+json", "type": "default" } ], "body": { "mode": "raw", "raw": "{\n \"userName\": \"updatedtestuser\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/Users/{{testUserId}}", "host": [ "{{url}}" ], "path": [ "Users", "{{testUserId}}" ] } }, "response": [] } ] }, { "name": "Groups", "item": [ { "name": "Create a single group", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 201\", () => {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains group with displayName \\\"createdtestgroup\\\"\", () => {", " pm.expect(pm.response.json().displayName).to.eql(\"createdtestgroup\");", "});", "", "pm.test(\"Response body contains a valid non-null group ID (the ID of the group which was created)\", () => {", " pm.expect(pm.response.json().id).to.not.be.null;", "});", "", "pm.collectionVariables.set(\"testGroupId\", pm.response.json().id);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/scim+json", "type": "default" } ], "body": { "mode": "raw", "raw": "{\n \"displayName\": \"createdtestgroup\",\n \"members\": []\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/Groups", "host": [ "{{url}}" ], "path": [ "Groups" ] } }, "response": [] }, { "name": "Read a single group", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains the group ID of the group we want to read\", () => {", " pm.expect(pm.response.json().id).to.eql(pm.collectionVariables.get('testGroupId'));", "});", "", "pm.test(\"Response body contains group with displayName \\\"createdtestgroup\\\"\", () => {", " pm.expect(pm.response.json().displayName).to.eql(\"createdtestgroup\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/Groups/{{testGroupId}}", "host": [ "{{url}}" ], "path": [ "Groups", "{{testGroupId}}" ] } }, "response": [] }, { "name": "Read all groups", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json().Resources).to.not.be.empty;", "});", "", "pm.test(\"Response body contains group with displayName \\\"createdtestgroup\\\"\", () => {", " pm.expect(pm.response.json().Resources[0].displayName).to.eql(\"createdtestgroup\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/Groups", "host": [ "{{url}}" ], "path": [ "Groups" ] } }, "response": [] }, { "name": "Update a single group", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 201\", () => {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains the group ID of the group we want to read\", () => {", " pm.expect(pm.response.json().id).to.eql(pm.collectionVariables.get('testGroupId'));", "});", "", "pm.test(\"Response body contains group with displayName \\\"updatedtestgroup\\\"\", () => {", " pm.expect(pm.response.json().displayName).to.eql(\"updatedtestgroup\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"displayName\": \"updatedtestgroup\",\n \"members\": []\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/Groups/{{testGroupId}}", "host": [ "{{url}}" ], "path": [ "Groups", "{{testGroupId}}" ] } }, "response": [] }, { "name": "Delete a single group", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "{{url}}/Groups/{{testGroupId}}", "host": [ "{{url}}" ], "path": [ "Groups", "{{testGroupId}}" ] } }, "response": [] } ] }, { "name": "ResourceTypes", "item": [ { "name": "Read all ResourceTypes", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json().Resources).to.not.be.empty;", "});", "", "pm.test(\"Response body contains exactly two entries\", () => {", " pm.expect(pm.response.json().Resources.length).to.eql(2);", "});", "", "pm.test(\"Response body contains ResourceType with id \\\"User\\\"\", () => {", " pm.expect(pm.response.json().Resources[0].id).to.eql(\"User\");", "});", "", "pm.test(\"Response body contains ResourceType with id \\\"Group\\\"\", () => {", " pm.expect(pm.response.json().Resources[1].id).to.eql(\"Group\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/ResourceTypes", "host": [ "{{url}}" ], "path": [ "ResourceTypes" ] } }, "response": [] } ] }, { "name": "Schemas", "item": [ { "name": "Read all Schemas", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json().Resources).to.not.be.empty;", "});", "", "pm.test(\"Response body contains exactly five entries\", () => {", " pm.expect(pm.response.json().Resources.length).to.eql(5);", "});", "", "pm.test(\"Response body contains Schema with id \\\"urn:ietf:params:scim:schemas:core:2.0:Group\\\"\", () => {", " pm.expect(pm.response.json().Resources[0].id).to.eql(\"urn:ietf:params:scim:schemas:core:2.0:Group\");", "});", "", "pm.test(\"Response body contains Schema with id \\\"urn:ietf:params:scim:schemas:core:2.0:ResourceType\\\"\", () => {", " pm.expect(pm.response.json().Resources[1].id).to.eql(\"urn:ietf:params:scim:schemas:core:2.0:ResourceType\");", "});", "", "pm.test(\"Response body contains Schema with id \\\"urn:ietf:params:scim:schemas:core:2.0:Schema\\\"\", () => {", " pm.expect(pm.response.json().Resources[2].id).to.eql(\"urn:ietf:params:scim:schemas:core:2.0:Schema\");", "});", "", "pm.test(\"Response body contains Schema with id \\\"urn:ietf:params:scim:schemas:core:2.0:User\\\"\", () => {", " pm.expect(pm.response.json().Resources[3].id).to.eql(\"urn:ietf:params:scim:schemas:core:2.0:User\");", "});", "", "pm.test(\"Response body contains Schema with id \\\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\\\"\", () => {", " pm.expect(pm.response.json().Resources[4].id).to.eql(\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/Schemas", "host": [ "{{url}}" ], "path": [ "Schemas" ] } }, "response": [] } ] }, { "name": "ServiceProviderConfigs", "item": [ { "name": "Read all ServiceProviderConfigs", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response status code is 200\", () => {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"Content-Type header is application/scim+json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/scim+json');", "});", "", "pm.test(\"Response body is not empty\", () => {", " pm.expect(pm.response.json()).to.not.be.empty;", "});", "", "pm.test(\"Response body contains a ServiceProviderConfig with a correct schema\", () => {", " pm.expect(pm.response.json().schemas).to.include(\"urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/ServiceProviderConfig", "host": [ "{{url}}" ], "path": [ "ServiceProviderConfig" ] } }, "response": [] } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "testUserId", "value": "" }, { "key": "testGroupId", "value": "" } ] }