From dc20fe512965f5cf5b41017eb0eaf38957a905f8 Mon Sep 17 00:00:00 2001 From: Raheel Mohiuddin Date: Mon, 9 May 2022 15:43:09 +0100 Subject: [PATCH] Update postman scripts --- ....ScimExamples.Env.postman_environment.json | 27 - .../Rsk.ScimExamples.postman_collection.json | 52 +- .../Rsk.ScimExamples.postman_environment.json | 0 Rsk.ScimExamples.postman_collection.json | 517 ------------------ 4 files changed, 47 insertions(+), 549 deletions(-) delete mode 100644 Postman/Rsk.Scim.ScimExamples.Env.postman_environment.json rename Rsk.ScimExamples.postman_environment.json => Postman/Rsk.ScimExamples.postman_environment.json (100%) delete mode 100644 Rsk.ScimExamples.postman_collection.json diff --git a/Postman/Rsk.Scim.ScimExamples.Env.postman_environment.json b/Postman/Rsk.Scim.ScimExamples.Env.postman_environment.json deleted file mode 100644 index d071621..0000000 --- a/Postman/Rsk.Scim.ScimExamples.Env.postman_environment.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "id": "2921409c-7d46-4c0b-a616-ab98f4376bbe", - "name": "Rsk.ScimExamples.Env", - "values": [ - { - "key": "SCIM_Path_Local", - "value": "http://localhost:5001/SCIM", - "type": "default", - "enabled": true - }, - { - "key": "User_Id", - "value": "5580d3d3-2d80-46c9-83ac-4173270d2d47", - "type": "default", - "enabled": true - }, - { - "key": "Group_Id", - "value": "5580d3d3-2d80-46c9-83ac-4173270d2d48", - "type": "default", - "enabled": true - } - ], - "_postman_variable_scope": "environment", - "_postman_exported_at": "2022-05-06T13:25:21.275Z", - "_postman_exported_using": "Postman/9.15.2" -} diff --git a/Postman/Rsk.ScimExamples.postman_collection.json b/Postman/Rsk.ScimExamples.postman_collection.json index 6061bdf..ad0a403 100644 --- a/Postman/Rsk.ScimExamples.postman_collection.json +++ b/Postman/Rsk.ScimExamples.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "f5cedf2a-b807-4bef-a038-ce0e6f08ed4a", + "_postman_id": "03c512d9-6c39-4880-ae2c-ba6be4533001", "name": "Rsk.ScimExamples", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -275,7 +275,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"schemas\": [ \"urn:ietf:params:scim:api:messages:2.0:PatchOp\" ],\r\n \"Operations\": [\r\n {\r\n \"op\": \"add\",\r\n \"path\": \"members\",\r\n \"value\": [\r\n {\r\n \"value\": \"{{User_Id}}\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"schemas\": [ \"urn:ietf:params:scim:api:messages:2.0:PatchOp\" ],\r\n \"Operations\": [\r\n {\r\n \"op\": \"add\",\r\n \"path\": \"members\",\r\n \"value\": [\r\n {\r\n \"value\": \"{{User_Id}}\",\r\n \"type\": \"User\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -464,10 +464,52 @@ "response": [] }, { - "name": "Add user to group", + "name": "Create Extension - Organization", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var jsonData = JSON.parse(responseBody);\r", + "postman.setEnvironmentVariable(\"User_Id\", jsonData.id);" + ], + "type": "text/javascript" + } + } + ], "request": { - "method": "GET", - "header": [] + "method": "POST", + "header": [ + { + "key": "Accept", + "value": " application/scim+json", + "type": "text" + }, + { + "key": "Content-Type", + "value": " application/scim+json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"johndoe@example.com\",\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:schemas:RSK:2.0:Organization\",\r\n \"urn:ietf:params:scim:schemas:RSK:extension:charity:2.0:Organization\"\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{SCIM_Path_Local}}/organizations/", + "host": [ + "{{SCIM_Path_Local}}" + ], + "path": [ + "organizations", + "" + ] + } }, "response": [] } diff --git a/Rsk.ScimExamples.postman_environment.json b/Postman/Rsk.ScimExamples.postman_environment.json similarity index 100% rename from Rsk.ScimExamples.postman_environment.json rename to Postman/Rsk.ScimExamples.postman_environment.json diff --git a/Rsk.ScimExamples.postman_collection.json b/Rsk.ScimExamples.postman_collection.json deleted file mode 100644 index ad0a403..0000000 --- a/Rsk.ScimExamples.postman_collection.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "info": { - "_postman_id": "03c512d9-6c39-4880-ae2c-ba6be4533001", - "name": "Rsk.ScimExamples", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "User - Create", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var jsonData = JSON.parse(responseBody);\r", - "postman.setEnvironmentVariable(\"User_Id\", jsonData.id);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userName\": \"johndoe@example.com\",\r\n \"name\": {\r\n \"givenName\": \"John\",\r\n \"familyName\": \"Doe\"\r\n },\r\n \"locale\": \"en-US\",\r\n \"active\": true,\r\n \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\": {\r\n \"department\": \"HR\"\r\n },\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:schemas:core:2.0:User\",\r\n \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\"\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/users/", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "users", - "" - ] - } - }, - "response": [] - }, - { - "name": "User - Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"id\":\"{{User_Id}}\",\r\n \"name\":{\r\n \"familyName\":\"Doe 1\",\r\n \"givenName\":\"John 1\"\r\n },\r\n \"locale\": \"en-gb\",\r\n \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\": {\r\n \"department\": \"Human Resources\"\r\n },\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:schemas:core:2.0:User\",\r\n \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\"\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/users/", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "users", - "" - ] - } - }, - "response": [] - }, - { - "name": "User - Update name", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"schemas\": [\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\r\n \"Operations\": [\r\n {\r\n \"op\": \"replace\",\r\n \"path\" : \"name.givenName\",\r\n \"value\": \"newGivenName\"\r\n \r\n }\r\n ]\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/users/{{User_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "users", - "{{User_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "User - DeActivate", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n ],\r\n \"Operations\": [\r\n {\r\n \"op\": \"replace\",\r\n \"value\": {\r\n \"active\": false\r\n }\r\n }\r\n ]\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/users/{{User_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "users", - "{{User_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "Group - Create", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var jsonData = JSON.parse(responseBody);\r", - "postman.setEnvironmentVariable(\"Group_Id\", jsonData.id);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"displayName\": \"Programmers\",\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/groups/", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups", - "" - ] - } - }, - "response": [] - }, - { - "name": "Group - Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"id\": \"{{Group_Id}}\",\r\n \"displayName\": \"Programmers - c#\",\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/groups/", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups", - "" - ] - } - }, - "response": [] - }, - { - "name": "Group - Add Member", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"schemas\": [ \"urn:ietf:params:scim:api:messages:2.0:PatchOp\" ],\r\n \"Operations\": [\r\n {\r\n \"op\": \"add\",\r\n \"path\": \"members\",\r\n \"value\": [\r\n {\r\n \"value\": \"{{User_Id}}\",\r\n \"type\": \"User\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/groups/{{Group_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups", - "{{Group_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "Groups - Remove Member", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n ],\r\n \"Operations\": [\r\n {\r\n \"op\": \"Remove\",\r\n \"path\": \"members\",\r\n \"value\": [\r\n {\r\n \"value\": \"{{User_Id}}\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/groups/{{Group_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups", - "{{Group_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "Users - All", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "accept": true, - "user-agent": true - } - }, - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{SCIM_Path_Local}}/users?sortBy=userName&sortOrder=ascending", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "users" - ], - "query": [ - { - "key": "sortBy", - "value": "userName" - }, - { - "key": "sortOrder", - "value": "ascending" - } - ] - } - }, - "response": [] - }, - { - "name": "Users - By ID", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "accept": true - } - }, - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{SCIM_Path_Local}}/users/{{User_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "users", - "{{User_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "Groups - All", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "accept": true - } - }, - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{SCIM_Path_Local}}/groups?filter=displayName sw \"Prog\"", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups" - ], - "query": [ - { - "key": "filter", - "value": "displayName sw \"Prog\"" - } - ] - } - }, - "response": [] - }, - { - "name": "Groups - By ID", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "accept": true - } - }, - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{SCIM_Path_Local}}/groups/{{Group_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups", - "{{Group_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "Groups - DELETE", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "accept": true - } - }, - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{SCIM_Path_Local}}/groups/{{Group_Id}}", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "groups", - "{{Group_Id}}" - ] - } - }, - "response": [] - }, - { - "name": "Create Extension - Organization", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var jsonData = JSON.parse(responseBody);\r", - "postman.setEnvironmentVariable(\"User_Id\", jsonData.id);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": " application/scim+json", - "type": "text" - }, - { - "key": "Content-Type", - "value": " application/scim+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"name\": \"johndoe@example.com\",\r\n \"schemas\": [\r\n \"urn:ietf:params:scim:schemas:RSK:2.0:Organization\",\r\n \"urn:ietf:params:scim:schemas:RSK:extension:charity:2.0:Organization\"\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{SCIM_Path_Local}}/organizations/", - "host": [ - "{{SCIM_Path_Local}}" - ], - "path": [ - "organizations", - "" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file