{"info":{"_postman_id":"f3df3598-5742-4bf4-b0b9-bf0249021498","name":"Synap API Documentation","description":"<html><head></head><body><p>Please get in touch with Synap's Customer Success team for your API credentials if you do not already have them. You can get in touch with us via the live chat widget on your Synap platform. You will require:</p>\n<ul>\n<li>Organisation Secret Key</li>\n<li>API Usage Key</li>\n<li>Organisation Identifier</li>\n</ul>\n<p>Ensure you configure your connection to the following url. Note, our API mandates the use of SSL and so, you must not omit nor replace the https protocol from the url.</p>\n<p><code>https://api-org.synap.ac</code></p>\n<p>Clients who have been specifically given access to US hosted infrastructure can make use of our API hosted in US East. Replace the above URL with:</p>\n<p><code>https://use1-api-org.synap.ac</code></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"801775","collectionId":"f3df3598-5742-4bf4-b0b9-bf0249021498","publishedId":"2sA35A6jBt","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-03-21T11:40:13.000Z"},"item":[{"name":"General","item":[{"name":"/status","event":[{"listen":"test","script":{"id":"975b3bf6-e9e0-4d4e-8b96-29f8bced91f5","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Api status is returned as healthy\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.status).to.eql(\"healthy\");","});"],"type":"text/javascript"}}],"id":"6146a1b2-ba30-499e-9e17-333386ef794d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's Identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":"https://api-org.synap.ac/status","description":"<p>This method allows you to test if your connection is configured properly and to check the status of the API</p>\n","urlObject":{"protocol":"https","path":["status"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"e5eda457-cb26-4432-9c61-a027eccc1890","name":"401/Unauthorised","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":"https://api-org.synap.ac/status"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"94bb167f-ab29-44b3-b7e0-f524d36f7b4a","name":"200/OK","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"}],"url":"https://api-org.synap.ac/status"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"status\": \"healthy\",\n  \"timestamp\": \"2020-03-30T10:05:16.754Z\"\n}"}],"_postman_id":"6146a1b2-ba30-499e-9e17-333386ef794d"}],"id":"f00d0ea9-8237-467c-89ac-fda0e39a7619","_postman_id":"f00d0ea9-8237-467c-89ac-fda0e39a7619","description":""},{"name":"Assignments","item":[{"name":"/assignment/:assignmentId","event":[{"listen":"test","script":{"id":"fdf1ea36-aa7e-4854-a9fb-d714cb5ef39c","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"f8806d94-a84d-4345-b958-491087e23f03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":"https://api-org.synap.ac/assignment/:assignmentId","description":"<p>Get information regarding a specific assignment on your portal.</p>\n","urlObject":{"protocol":"https","path":["assignment",":assignmentId"],"host":["api-org","synap","ac"],"query":[],"variable":[{"id":"fa584181-630f-440d-841d-e7f36a2a190e","type":"string","value":"","key":"assignmentId"}]}},"response":[{"id":"b1edf662-21d7-4526-b6a4-f4045410b3ef","name":"401/Unauthorised","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/assignment/:assignmentId","protocol":"https","host":["api-org","synap","ac"],"path":["assignment",":assignmentId"],"variable":[{"key":"assignmentId","value":"aBc12345Hb"}]}},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"26f6ce1f-5984-487a-8a1e-35283eddb2bd","name":"404/Not Found","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/assignment/:assignmentId","protocol":"https","host":["api-org","synap","ac"],"path":["assignment",":assignmentId"],"variable":[{"key":"assignmentId","value":"DOES_NOT_EXIST"}]}},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Not Found\"\n}"},{"id":"d5fb2f2e-7d2a-4e40-b455-9156a7535721","name":"200/OK","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":"https://api-org.synap.ac/assignment/123ID456"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"assignment\": {\n        \"objectId\": \"123ID456\",\n        \"createdAt\": \"2020-11-30T18:40:11.214Z\",\n        \"updatedAt\": \"2020-12-02T23:51:55.667Z\",\n        \"startDate\": \"2020-11-30T18:40:17.709Z\",\n        \"endDate\": \"2020-12-30T18:40:17.709Z\",\n        \"status\": \"In progress\",\n        \"progress\": 0.6,\n        \"totalItems\": 10,\n        \"itemsComplete\": 6,\n        \"assignmentUrl\": {\n            \"admin\": \"https://your-host-name.ac/portal-dashboard/user-assignment/123ID456\",\n            \"student\": \"https://your-host-name.ac/assignment/123ID456\"\n        },\n        \"name\": \"Node.js on docker\",\n        \"user\": {\n            \"objectId\": \"User123456\",\n            \"name\": \"John Smith\",\n            \"email\": \"john.smith@email.ac\"\n        },\n        \"portal\": {\n            \"objectId\": \"Portal1234\",\n            \"name\": \"Portal Name\",\n            \"hostname\": \"your-host-name.ac\"\n        },\n        \"usergroup\": {\n            \"objectId\": \"uG12345678\",\n            \"name\": \"Best Users\"\n        },\n        \"assignmentGroup\": {\n            \"objectId\": \"Ag12345678\",\n            \"name\": \"Node.js on docker\"\n        }\n    },\n    \"meta\": {\n        \"timestamp\": \"2020-12-03T20:48:26.892Z\"\n    }\n}"}],"_postman_id":"f8806d94-a84d-4345-b958-491087e23f03"}],"id":"8bf843d6-adbe-4c4f-91f5-9b30541a80fb","description":"<p>Interact with your user's assignments.</p>\n","event":[{"listen":"prerequest","script":{"id":"56a3e076-3b51-4221-b6a9-f819af8dfc6a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"59a65a91-26e9-4d18-8f8f-f0b21c36f712","type":"text/javascript","exec":[""]}}],"_postman_id":"8bf843d6-adbe-4c4f-91f5-9b30541a80fb"},{"name":"Attempt","item":[{"name":"/attempt/:attemptId","event":[{"listen":"test","script":{"id":"a495143b-b576-4297-b4fb-b7925518896f","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"94fe7c29-a235-49b8-89f9-16bf106f107a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":"https://api-org.synap.ac/attempt/:attemptId","description":"<p>Get detailed information regarding a specific attempt on your portal.</p>\n<p>This includes:</p>\n<ul>\n<li>An overall score breakdown by Facet Tag</li>\n<li>Response Data:</li>\n<li>Question Information</li>\n<li>Tag Information</li>\n<li>Marks</li>\n<li>Overall score data not arranged by Tag</li>\n</ul>\n","urlObject":{"protocol":"https","path":["attempt",":attemptId"],"host":["api-org","synap","ac"],"query":[],"variable":[{"id":"89bff02a-c22c-4e60-bfbf-3926e854e806","description":{"content":"<p>The objectId of the attempt you wish to retrieve from your organisation</p>\n","type":"text/plain"},"type":"string","value":"ABC12DEF34","key":"attemptId"}]}},"response":[{"id":"e699e357-9080-461b-a998-7b10a85370a4","name":"401/Unauthorised","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/attempt/:attemptId","protocol":"https","host":["api-org","synap","ac"],"path":["attempt",":attemptId"],"variable":[{"description":"The objectId of the attempt you wish to retrieve from your organisation","key":"attemptId","value":"ABC12DEF34"}]}},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"ef4b8f21-287b-4a43-8a17-b067144daa98","name":"404/Not Found","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/attempt/:attemptId","protocol":"https","host":["api-org","synap","ac"],"path":["attempt",":attemptId"],"variable":[{"description":"An invalid userId","key":"attemptId","value":"Does_Not_Exist"}]}},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Not Found\"\n}"},{"id":"0845b647-226b-42e3-bae8-b265be3c42cc","name":"200/OK","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/attempt/:attemptId","protocol":"https","host":["api-org","synap","ac"],"path":["attempt",":attemptId"],"variable":[{"key":"attemptId","value":"ABC12DEF34","description":"The ID of the attempt"}]}},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"attempt\": {\n    \"objectId\": \"ID12345678\",\n    \"createdAt\": \"2021-10-28T06:20:51.021Z\",\n    \"updatedAt\": \"2021-10-28T06:49:43.598Z\",\n    \"totalQuestions\": 4,\n    \"isFinalised\": true,\n    \"timeStarted\": \"2021-10-28T06:20:51.021Z\",\n    \"timeCompleted\":\"2021-11-28T06:20:51.021Z\",\n    \"totalAnsweredCorrectly\": 3,\n    \"totalAnsweredIncorrectly\": 1,\n    \"totalAnsweredPartiallyCorrect\": 0,\n    \"resitCount\": 4,\n    \"certificate\": {\n        \"filePath\": \"/certificate.pdf\",\n        \"url\": \"https://www.study-memory.co.uk/certificate\"\n    },\n    \"tagScoreBreakdown\": [\n      {\n        \"objectId\": \"ID12345678\",\n        \"label\": \"Easy\",\n        \"type\": \"difficulty\",\n        \"numberOfQuestions\": 4,\n        \"totalAnsweredCorrectly\": 3,\n        \"totalAnsweredIncorrectly\": 1,\n        \"totalAnsweredPartiallyCorrect\": 0,\n        \"maxPoints\": 4,\n        \"points\": 3,\n        \"score\": 0.75\n      },\n      {\n        \"objectId\": \"ID12345678\",\n        \"label\": \"Poems\",\n        \"type\": \"topic\",\n        \"numberOfQuestions\": 4,\n        \"totalAnsweredCorrectly\": 3,\n        \"totalAnsweredIncorrectly\": 1,\n        \"totalAnsweredPartiallyCorrect\": 0,\n        \"maxPoints\": 4,\n        \"points\": 3,\n        \"score\": 0.75\n      }\n    ],\n    \"marks\": {\n      \"maxPoints\": 4,\n      \"credits\": 3,\n      \"penalties\": 0,\n      \"points\": 3\n    },\n    \"user\": {\n      \"objectId\": \"ID12345678\",\n      \"name\": \"John Smith\",\n      \"email\": \"j.smith@email.ac\"\n    },\n    \"test\": {\n      \"objectId\": \"ID12345678\"\n    },\n    \"responses\": [\n      {\n        \"objectId\": \"ID12345678\",\n        \"question\": {\n          \"objectId\": \"ID12345678\",\n          \"doi\": \"DOI1234567\"\n        },\n        \"outcome\": \"correct\",\n        \"type\": \"phrase:singleCorrect\",\n        \"marks\": {\n          \"maxPoints\": 1,\n          \"credit\": 1,\n          \"penalty\": null,\n          \"points\": 1\n        },\n        \"exam\": null,\n        \"module\": null,\n        \"subject\": null,\n        \"topic\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Poems\"\n        },\n        \"subtopic\": null,\n        \"difficulty\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Easy\"\n        },\n        \"skill\": null\n      },\n      {\n        \"objectId\": \"ID12345678\",\n        \"question\": {\n          \"objectId\": \"ID12345678\",\n          \"doi\": \"DOI1234567\"\n        },\n        \"outcome\": \"correct\",\n        \"type\": \"phrase:singleCorrect\",\n        \"marks\": {\n          \"maxPoints\": 1,\n          \"credit\": 1,\n          \"penalty\": null,\n          \"points\": 1\n        },\n        \"exam\": null,\n        \"module\": null,\n        \"subject\": null,\n        \"topic\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Poems\"\n        },\n        \"subtopic\": null,\n        \"difficulty\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Easy\"\n        },\n        \"skill\": null\n      },\n      {\n        \"objectId\": \"ID12345678\",\n        \"question\": {\n          \"objectId\": \"ID12345678\",\n          \"doi\": \"DOI1234567\"\n        },\n        \"outcome\": \"correct\",\n        \"type\": \"phrase:singleCorrect\",\n        \"marks\": {\n          \"maxPoints\": 1,\n          \"credit\": 1,\n          \"penalty\": null,\n          \"points\": 1\n        },\n        \"exam\": null,\n        \"module\": null,\n        \"subject\": null,\n        \"topic\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Poems\"\n        },\n        \"subtopic\": null,\n        \"difficulty\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Easy\"\n        },\n        \"skill\": null\n      },\n      {\n        \"objectId\": \"ID12345678\",\n        \"question\": {\n          \"objectId\": \"ID12345678\",\n          \"doi\": \"DOI1234567\"\n        },\n        \"outcome\": \"correct\",\n        \"type\": \"phrase:singleCorrect\",\n        \"marks\": {\n          \"maxPoints\": 1,\n          \"credit\": 1,\n          \"penalty\": null,\n          \"points\": 1\n        },\n        \"exam\": null,\n        \"module\": null,\n        \"subject\": null,\n        \"topic\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Poems\"\n        },\n        \"subtopic\": null,\n        \"difficulty\": {\n          \"objectId\": \"ID12345678\",\n          \"label\": \"Easy\"\n        },\n        \"skill\": null\n      }\n    ]\n  },\n  \"meta\": {\n    \"timestamp\": \"2021-10-28T10:01:39.635Z\"\n  }\n}"}],"_postman_id":"94fe7c29-a235-49b8-89f9-16bf106f107a"}],"id":"89902d82-4b06-4b11-a001-4c2cde569f2e","description":"<p>Interact with the attempts your users have taken.</p>\n","_postman_id":"89902d82-4b06-4b11-a001-4c2cde569f2e"},{"name":"Portal","item":[{"name":"/portal/user-attributes","id":"8819c22d-b70e-4a19-9114-dbf53b928c38","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api-org.synap.ac/portal/user-attributes","description":"<p>Responds with an array of user attribute objects.</p>\n<p>This end point uses the <code>X-syn-org-id</code> header to perform the search</p>\n","urlObject":{"protocol":"https","path":["portal","user-attributes"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"97b46647-33f8-4881-9f8d-f6933178b17f","name":"200/OK","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://api-org.synap.ac/portal/user-attributes"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n   \"user-attributes\":[\n       { \"id\": \"custom-attribute\",\n         \"label\": \"Custom Attribute\",\n         \"required\": false,\n         \"type\": \"text\"\n          }\n       ]\n}"},{"id":"f37bc6b9-7ce5-4396-8d06-974e6e703128","name":"401/Unauthorised Copy","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"password\": \"Password123\",\r\n        \"name\": \"John Smith\",\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/portal/user-attributes"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"}],"_postman_id":"8819c22d-b70e-4a19-9114-dbf53b928c38"}],"id":"a4296b7f-2537-4dd0-8bcf-9bd38134e410","_postman_id":"a4296b7f-2537-4dd0-8bcf-9bd38134e410","description":""},{"name":"Study Items","item":[{"name":"/study-item/add","id":"ae62e0fa-5bad-47a5-9b9e-127b23a2704d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"john@email.ac\",\n    \"testId\": \"123Test123\",\n    \"subPortalId\": \"123abc\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/add","description":"<p>Add a test to a user's study</p>\n","urlObject":{"protocol":"https","path":["study-item","add"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"2430b778-49a9-4f92-9f89-eb10fa6238f4","name":"404/Not Found","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"userEmail","value":"does_not_exist@email.ac","type":"text","description":"The user's emai address"},{"key":"testId","value":"Invalid3ID","type":"text","description":"The ID of the test you wish to add to the user's study"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/add"},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object not found\"\n}"},{"id":"67f24cb7-122a-4514-b2d4-7cb3f18017f9","name":"200/OK","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"userEmail","value":"john@email.ac","description":"The user's emai address","type":"text"},{"key":"testId","value":"123Test123","description":"The ID of the test you wish to add to the user's study","type":"text"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/add"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Test Physics Exam has been added to john@email.ac study\",\n    \"user\": {\n        \"objectId\": \"123aBc45TY\", \n        \"name\": \"John\", \n        \"email\": \"john@email.ac\"},\n    \"test\": {\n        \"objectId\": \"wB6TestXDN\", \n        \"title\": \"Physics Exam\"},\n    \"meta\": {\n        \"timestamp\": \"2020-11-27T09:06:59.002Z\"\n        }\n}"},{"id":"07f866cc-8650-48d2-8577-6cb1bc4ee296","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"userEmail","value":"john@email.ac","description":"The user's emai address","type":"text"},{"key":"testId","value":"123Test123","description":"The ID of the test you wish to add to the user's study","type":"text"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/add"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"}],"_postman_id":"ae62e0fa-5bad-47a5-9b9e-127b23a2704d"},{"name":"/study-item/remove","id":"9624aabd-b9d9-417c-86e5-2a3c871bc5b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"john@email.ac\",\n    \"testId\": \"123Test123\",\n    \"subPortalId\": \"123abc\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/remove","description":"<p>Remove a test from a user's study</p>\n","urlObject":{"protocol":"https","path":["study-item","remove"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"59907890-ce76-43b2-9002-6987806a8a3b","name":"404/Not Found","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"userEmail","value":"does_not_exist@email.ac","type":"text","description":"The user's emai address"},{"key":"testId","value":"Invalid3ID","type":"text","description":"The ID of the test you wish to remove from the user's study"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/remove"},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object not found\"\n}"},{"id":"9064172d-800c-4779-8aee-24e954ee4672","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"userEmail","value":"john@email.ac","type":"text","description":"The user's emai address"},{"key":"testId","value":"123Test123","type":"text","description":"The ID of the test you wish to remove from the user's study"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/remove"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"2b8b1c72-6d97-477b-a1b9-ce135998eb41","name":"200/OK","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"userEmail","value":"john@email.ac","type":"text","description":"The user's emai address"},{"key":"testId","value":"wB6TestXDN","type":"text","description":"The ID of the test you wish to remove from the user's study"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/study-item/remove"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Test Physics Exam has been removed from john@email.ac study\",\n    \"user\": {\n        \"objectId\": \"123aBc45TY\",\n        \"name\": \"John\",\n        \"email\": \"john@email.ac\"\n    },\n    \"test\": {\n        \"objectId\": \"wB6TestXDN\",\n        \"title\": \"Physics Exam\"\n    },\n    \"meta\": {\n        \"timestamp\": \"2020-11-27T09:06:59.002Z\"\n    }\n}"}],"_postman_id":"9624aabd-b9d9-417c-86e5-2a3c871bc5b5"}],"id":"02d7d84a-58d3-4223-b877-eb7685a2c667","description":"<p>Add and remove tests from your user's studies</p>\n","event":[{"listen":"prerequest","script":{"id":"168991c9-d4e3-4873-b1f8-494a1a46a3df","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"41f62194-f8bd-4d15-9794-ae65e5864071","type":"text/javascript","exec":[""]}}],"_postman_id":"02d7d84a-58d3-4223-b877-eb7685a2c667"},{"name":"Users","item":[{"name":"/users","event":[{"listen":"test","script":{"id":"17034121-6159-4f36-b6b1-0a8547f1c8bd","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});","","pm.test(\"Request body values match those returned in the response\", function () {","    const reqBody = JSON.parse(pm.request.body)","    const res = pm.response.json();","    pm.expect(res.user.email).to.eql(reqBody.user.email);","    pm.expect(res.user.name).to.eql(reqBody.user.name);","});"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"146309c2-ce29-4539-b20a-5bacd33365c8","exec":[""],"type":"text/javascript"}}],"id":"db903918-2549-4da5-b6aa-7b356b7b8c27","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","type":"text","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","type":"text","value":" < Your organisation's identifier >"},{"key":"X-api-key","type":"text","value":" < Your API Key >"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"password\": \"Password123\",\r\n        \"name\": \"John Smith\",\r\n        \"subPortalId\": \"IJKLMNOP88\",\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users","description":"<p>Register a new user to your organisation.</p>\n<p>The password must be at least 8 characters long and include at least:</p>\n<ul>\n<li>1 upper case letter</li>\n<li>1 number</li>\n</ul>\n<p>If you make use of sub portals then you can generate a user directly into a sub portal by setting the optional <code>subPortalId</code> field.</p>\n<p><strong>Actions</strong><br />Add any of the below flags to your request body to alter the behaviour of the user creation:</p>\n<ul>\n<li><code>addToUserGroup</code> - provide the id of the usergroup you wish to add the user to</li>\n<li><code>setDefaultPassword</code> - omit the password from the user and set this flag to true and a password is generated for the user. Please note that the generated password will be returned in the response body</li>\n<li><code>disableWelcomeEmail</code> - prevents the synap welcome email from being sent to the new user</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"user\": {}\n    \"actions\": {\n         \"addToUserGroup\": \"A6BcDEFHI7\",\n         \"setDefaultPassword\": true,\n         \"disableWelcomeEmail\": true\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["users"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"5975ba0b-2a84-43a2-a686-a859c0fa94c6","name":"200/OK","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"user\": {\n        \"email\": \"j.smith@synap.ac\",\n        \"name\": \"John Smith\",\n        \"password\": \"Password123\",\n        \"externalId\": \"007\",\n        \"subPortalId\": \"IJKLMNOP88\",\n        \"attr\": {\n            \"customAttribute\": \"Premium Member\",\n            \"foo\": true,\n            \"bar\": 123\n        }\n    },\n    \"actions\": {\n        \"addToUserGroup\": \"A6BcDEFHI7\",\n        \"disableWelcomeEmail\": false,\n        \"setDefaultPassword\": false\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"ABCDEFGH12\",\n        \"email\": \"j.smith@synap.ac\",\n        \"name\": \"John Smith\",\n        \"externalId\": \"007\",\n        \"createdAt\": \"2020-11-14T21:16:20.754Z\",\n        \"updatedAt\": \"2020-11-14T21:16:20.754Z\"\n    },\n    \"timestamp\": \"2020-11-14T21:16:22.549Z\"\n}"},{"id":"64845876-5238-444f-92e1-bb1beff57b98","name":"200/OK (set default password)","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"name\": \"John Smith\",\r\n        \"externalId\": \"007\",\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\",\r\n        \"disableWelcomeEmail\": true,\r\n        \"setDefaultPassword\": true\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"ABCDEFGH12\",\n        \"email\": \"j.smith@synap.ac\",\n        \"name\": \"John Smith\",\n        \"externalId\": \"007\",\n        \"password\": \"A54bh£$fgjt123\",\n        \"createdAt\": \"2020-11-14T21:16:20.754Z\",\n        \"updatedAt\": \"2020-11-14T21:16:20.754Z\"\n    },\n    \"timestamp\": \"2020-11-14T21:16:22.549Z\"\n}"},{"id":"7955c3b3-801e-415a-a8c2-1bc66a9708c2","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"password\": \"Password123\",\r\n        \"name\": \"John Smith\",\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"eeaa1bc2-5bfb-49d2-824f-6aadea22b901","name":"400/Bad Request","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"password\": \"Password123\",\r\n        \"name\": 123,\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"name must be a string\"\n}"}],"_postman_id":"db903918-2549-4da5-b6aa-7b356b7b8c27"},{"name":"/users/attributes","event":[{"listen":"test","script":{"id":"884effc2-c0d8-4fb7-9c5a-eb332cfdf420","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});","","pm.test(\"Request body values match those returned in the response\", function () {","    const reqBody = JSON.parse(pm.request.body)","    const res = pm.response.json();","    pm.expect(res.user.email).to.eql(reqBody.user.email);","    pm.expect(res.user.name).to.eql(reqBody.user.name);","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"543d529e-aef9-4bb4-9a26-ae0431754b3b","exec":[""],"type":"text/javascript","packages":{}}}],"id":"e959f62b-6f80-4013-bc79-2d376cc04c8f","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"method":"PUT","header":[{"key":"X-Syn-Org-Secret","type":"text","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","type":"text","value":" < Your organisation's identifier >"},{"key":"X-api-key","type":"text","value":" < Your API Key >"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"subPortal\": \"subPortal123\"\r\n    },\r\n    \"attr\": {\r\n        \"customAttribute\": \"Premium Member\",\r\n        \"location\": \"Leeds\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users/attributes","description":"<p>Update a user's custom attributes.</p>\n<p>For a list of the available attributes to update on your portal use the following end point.</p>\n<p><code>/portal/user-attributes</code></p>\n","urlObject":{"protocol":"https","path":["users","attributes"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"8062998d-64a8-481d-a85b-ea16283c32ba","name":"200/OK (Search by email)","originalRequest":{"method":"PUT","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"user\": {\n        \"email\": \"j.smith@synap.ac\",\n        \"subPortal\": \"subPortal123\"\n    },\n    \"attr\": {\n        \"customAttribute\": \"Premium Member\",\n        \"location\": \"Leeds\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users/attributes"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"ABCDEFGH12\",\n        \"updatedAt\": \"2020-11-14T21:16:20.754Z\",\n        \"attr\": {\n            \"customAttribute\": \"Premium Member\",\n            \"location\": \"Leeds\"\n    }\n    }\n}"},{"id":"c48da356-598e-4823-8cd9-a5f913bb5cba","name":"200/OK (Search by ID)","originalRequest":{"method":"PUT","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"user\": {\n        \"objectId\": \"ABCDEFGH12\"\n    },\n    \"attr\": {\n        \"customAttribute\": \"Premium Member\",\n        \"location\": \"Leeds\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users/attributes"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"ABCDEFGH12\",\n        \"updatedAt\": \"2020-11-14T21:16:20.754Z\",\n        \"attr\": {\n            \"customAttribute\": \"Premium Member\",\n            \"location\": \"Leeds\"\n    }\n    }\n}"},{"id":"bd8c3246-dcdf-4cc1-9693-fa58b091c6e6","name":"401/Unauthorised","originalRequest":{"method":"PUT","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"password\": \"Password123\",\r\n        \"name\": \"John Smith\",\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users/attributes"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"bfcd490b-8560-4219-beef-bbc205e75b07","name":"400/Bad Request","originalRequest":{"method":"PUT","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"objectId\": \"ABCDEFGH12\"\r\n    },\r\n    \"attr\": {\r\n        \"Invalid Attribute\": \"Invalid Atrribute\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users/attributes"},"code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Invalid Attribute is not a valid attribute\"\n}"},{"id":"6986abaa-c299-4265-8cd2-ee23141dd2b0","name":"404/Not Found","originalRequest":{"method":"PUT","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"Does_Not_Exist\",\r\n    \"name\": \"John Anderson\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users/attributes"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object Not Found\"\n}"}],"_postman_id":"e959f62b-6f80-4013-bc79-2d376cc04c8f"},{"name":"users/:userId","event":[{"listen":"test","script":{"id":"884effc2-c0d8-4fb7-9c5a-eb332cfdf420","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});","","pm.test(\"Request body values match those returned in the response\", function () {","    const reqBody = JSON.parse(pm.request.body)","    const res = pm.response.json();","    pm.expect(res.user.email).to.eql(reqBody.user.email);","    pm.expect(res.user.name).to.eql(reqBody.user.name);","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"543d529e-aef9-4bb4-9a26-ae0431754b3b","exec":[""],"type":"text/javascript","packages":{}}}],"id":"785c84ef-02eb-4aeb-b855-4932d24ac022","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"},{"key":"X-Syn-Org-Secret","value":"< Your organisation's secret key >"},{"key":"X-Syn-Org-Id","value":"< Your organisation's identifier >"},{"key":"x-api-key","value":"< Your API Key >","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"John Smith\",\n    \"password\": \"NewPasword123!\",\n    \"externalId\": \"008\"\n}"},"url":"https://api-org.synap.ac/users/:userId","description":"<p>Update a User</p>\n","urlObject":{"protocol":"https","path":["users",":userId"],"host":["api-org","synap","ac"],"query":[],"variable":[{"type":"any","value":"","key":"userId"}]}},"response":[{"id":"6f9ce865-67b3-41c3-bd3a-9d2907066a7e","name":"204/OK","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"new name\",\n    \"externalId\": \"new external identifier\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/users/:userId","protocol":"https","host":["api-org","synap","ac"],"path":["users",":userId"],"variable":[{"key":"userId","value":""}]}},"code":204,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"9aaa6024-2a7d-4979-838d-768f4c4baa7d","name":"401/Unauthorised","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"email\": \"j.smith@synap.ac\",\r\n        \"password\": \"Password123\",\r\n        \"name\": \"John Smith\",\r\n        \"attr\": {\r\n            \"customAttribute\": \"Premium Member\",\r\n            \"foo\": true,\r\n            \"bar\": 123\r\n        }\r\n    },\r\n    \"actions\": {\r\n        \"addToUserGroup\": \"A6BcDEFHI7\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/users/:id","protocol":"https","host":["api-org","synap","ac"],"path":["users",":id"],"variable":[{"key":"id","value":""}]}},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"391e8b60-d8e9-4e8c-a927-877b347e4910","name":"400/Bad Request","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"user\": {\r\n        \"objectId\": \"ABCDEFGH12\"\r\n    },\r\n    \"attr\": {\r\n        \"Invalid Attribute\": \"Invalid Atrribute\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/users/:userId","protocol":"https","host":["api-org","synap","ac"],"path":["users",":userId"],"variable":[{"key":"userId","value":""}]}},"code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Invalid Attribute is not a valid attribute\"\n}"},{"id":"96cdd555-a6ef-4c98-8c7f-848ad7f5afd5","name":"404/Not Found","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"Does_Not_Exist\",\r\n    \"name\": \"John Anderson\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/users/:userId","protocol":"https","host":["api-org","synap","ac"],"path":["users",":userId"],"variable":[{"key":"userId","value":""}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object Not Found\"\n}"}],"_postman_id":"785c84ef-02eb-4aeb-b855-4932d24ac022"},{"name":"/users","event":[{"listen":"test","script":{"id":"0afe9407-8d1a-45e9-bfdb-3f6bcae5dbc6","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"86dd430e-946b-47c9-bc69-78666e1db425","exec":["encodeURI()","","const url = pm.request.url","const encodedURI = encodeURI(url)","console.log(encodedURI)","pm.request.url = encodedURI"],"type":"text/javascript"}}],"id":"5a7a6bb4-b73d-4236-bcd7-8ff93395a1ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://api-org.synap.ac/users?email=foobar@email.ac","description":"<p>Gets information relating to a specific user. \nThe user is searchable by their ID or email address</p>\n","urlObject":{"protocol":"https","path":["users"],"host":["api-org","synap","ac"],"query":[{"key":"email","value":"foobar@email.ac"}],"variable":[]}},"response":[{"id":"66d30060-672f-462b-93fd-b234033a3714","name":"200/OK (Search by email)","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/users?email=foobar@email.ac","protocol":"https","host":["api-org","synap","ac"],"path":["users"],"query":[{"key":"email","value":"foobar@email.ac"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"userID12345\",\n        \"email\": \"email@foobar.ac\",\n        \"name\": \"John Smith\",\n        \"externalId\": \"007\",\n        \"createdAt\": \"2020-09-24T09:19:02.545Z\",\n        \"updatedAt\": \"2021-05-14T08:22:07.025Z\",\n        \"attr\": {},\n        \"userGroups\": [\n            {\n                \"objectId\": \"UserGroupID456\",\n                \"name\": \"All Users\"\n            },\n            {\n                \"objectId\": \"UserGroupID123\",\n                \"name\": \"Students\"\n            }\n        ]\n    },\n    \"timestamp\": \"2021-06-14T15:33:52.136Z\"\n}"},{"id":"acea7a31-790f-4076-9e42-4e18e179bc50","name":"200/OK (Search by ID)","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/users?id=userID12345","protocol":"https","host":["api-org","synap","ac"],"path":["users"],"query":[{"key":"id","value":"userID12345"}]}},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"userID12345\",\n        \"email\": \"email@foobar.ac\",\n        \"name\": \"John Smith\",\n        \"externalId\": \"007\",\n        \"createdAt\": \"2020-09-24T09:19:02.545Z\",\n        \"updatedAt\": \"2021-05-14T08:22:07.025Z\",\n        \"attr\": {},\n        \"userGroups\": [\n            {\n                \"objectId\": \"UserGroupID456\",\n                \"name\": \"All Users\"\n            },\n            {\n                \"objectId\": \"UserGroupID123\",\n                \"name\": \"Students\"\n            }\n        ]\n    },\n    \"timestamp\": \"2021-06-14T15:33:52.136Z\"\n}"},{"id":"566a09f2-492f-4f53-ba65-b4fc95217276","name":"404/Not Found","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"Does_Not_Exist\",\r\n    \"name\": \"John Anderson\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/usersusers?id=badId12345","protocol":"https","host":["api-org","synap","ac"],"path":["usersusers"],"query":[{"key":"id","value":"badId12345"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object Not Found\"\n}"},{"id":"8b2b7edc-2eef-494f-9c47-86c9d5f3e051","name":"401/Unauthorised","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"1234Test\",\r\n    \"name\": \"John Anderson\"\r\n}"},"url":"https://api-org.synap.ac/users"},"code":401,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"}],"_postman_id":"5a7a6bb4-b73d-4236-bcd7-8ff93395a1ab"},{"name":"/users/invite","event":[{"listen":"test","script":{"id":"5d646813-8bc9-476e-a1a6-74acb9a71c35","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"5a738d01-3938-4424-a565-010d6830f03f","exec":[""],"type":"text/javascript"}}],"id":"60dcc825-7f29-48e9-8d8e-d64e63cbf16e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","type":"text","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","type":"text","value":" < Your organisation's identifier >"},{"key":"X-api-key","type":"text","value":" < Your API Key >"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"john@email.ac\",\n    \"userGroupId\": \"wB6WkTeDNz\",\n    \"name\": \"John Smith\",\n    \"personalMessage\": \"It's great to have you on board\"\n}"},"url":"https://api-org.synap.ac/users/invite","description":"<p>Sends an invite to a potential new user and adds them to a specific user group. </p>\n<p>If that person already has an account they will be added to the requested user group.</p>\n","urlObject":{"protocol":"https","path":["users","invite"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"b2821cfd-3946-4e5e-b916-c125ddf99105","name":"200/OK (new user)","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"john@email.ac\",\n    \"userGroupId\": \"wB6WkTeDNz\",\n    \"name\": \"John Smith\",\n    \"personalMessage\": \"Additions to the body of the email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"An invite has been sent to john@email.ac\",\n    \"user\": { \n        \"isNew\": true, \n        \"name\": \"John Smith\"\n        }\n}"},{"id":"ba27db8b-b3f5-4f6c-8e48-58eedb25b12b","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"1234Test\",\r\n    \"name\": \"John Anderson\"\r\n}"},"url":"https://api-org.synap.ac/users"},"code":401,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"c93eeffc-3519-40d3-bb12-c83e1efac166","name":"400/Bad Request","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"1234Test\",\r\n    \"name\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"name must be a string\"\n}"},{"id":"5caa8dc0-b195-449b-9ea9-a77fe323914f","name":"404/Not Found","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@synap.ac\",\r\n    \"userGroupId\": \"Does_Not_Exist\",\r\n    \"name\": \"John Anderson\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object Not Found\"\n}"},{"id":"1864fd40-0cfb-4485-a404-9c32b5567ade","name":"200/OK (existing user)","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"Has_An_Account_Already@synap.ac\",\r\n    \"userGroupId\": \"1234Test\",\r\n    \"name\": \"John Smith\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/users"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"John Smith has been added to user group: 1234Test\",\n    \"user\": { \n        \"isNew\": false, \n        \"name\": \"John Smith\"\n        }\n}"}],"_postman_id":"60dcc825-7f29-48e9-8d8e-d64e63cbf16e"},{"name":"/users/:userId","event":[{"listen":"test","script":{"id":"ab9fbfe5-59ea-4a2a-b61b-15487f8b958e","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Responds with the correct user details\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.user.objectId).to.eql(pm.environment.get(\"userId\"));","    pm.environment.set(\"userId\", \"\")","});"],"type":"text/javascript"}}],"id":"ed2307f2-b294-4969-a377-0965b3db0b78","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://api-org.synap.ac/users/:userId","description":"<p>Permanently remove the user and all their data from your organisation.</p>\n","urlObject":{"protocol":"https","path":["users",":userId"],"host":["api-org","synap","ac"],"query":[],"variable":[{"id":"01d12c45-745e-47cb-ac39-b19192fd366f","description":{"content":"<p>The objectId of the user you wish to remove from your organisation</p>\n","type":"text/plain"},"type":"string","value":"ABC12DEF34","key":"userId"}]}},"response":[{"id":"1c598d03-6b26-414f-b8b2-d7e2aa9da0d7","name":"404/Not Found","originalRequest":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/users/:userId","protocol":"https","host":["api-org","synap","ac"],"path":["users",":userId"],"variable":[{"key":"userId","value":"Does_Not_Exist","description":"An invalid userId"}]}},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Not Found\"\n}"},{"id":"6eaf4ae2-986e-4a9e-a2cb-5eaed5629051","name":"200/OK","originalRequest":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"https://api-org.synap.ac/users?userId=ABC12DEF34","protocol":"https","host":["api-org","synap","ac"],"path":["users"],"query":[{"key":"userId","value":"ABC12DEF34"}]}},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"objectId\": \"ABC12DEF34\",\n        \"email\": \"j.smith@synap.ac\",\n        \"name\": \"John Smith\",\n        \"externalId\": \"007\",\n        \"createdAt\": \"2020-11-14T21:16:20.754Z\",\n        \"updatedAt\": \"2020-11-14T21:16:23.977Z\"\n    },\n    \"timestamp\": \"2020-11-14T21:41:00.613Z\"\n}"},{"id":"b11bc5fe-d00b-4eb3-ba0a-1404174cecd6","name":"401/Unauthorised","originalRequest":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"https://api-org.synap.ac/users/:userId","protocol":"https","host":["api-org","synap","ac"],"path":["users",":userId"],"variable":[{"key":"userId","value":"ABC12DEF34","description":"The objectId of the user you wish to remove from your organisation"}]}},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"}],"_postman_id":"ed2307f2-b294-4969-a377-0965b3db0b78"}],"id":"eae4114f-579b-4461-8600-468f95a12b0b","description":"<p>Interact with your current and potential users.\nInvite or create new users.\nDelete exisiting.</p>\n","_postman_id":"eae4114f-579b-4461-8600-468f95a12b0b"},{"name":"User Groups","item":[{"name":"/usergroup/add","id":"3fe1bfaf-68b9-48b0-a394-58009cb57923","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"userEmail\":\"john@email.ac\",\n    \"userGroupId\":\"wB6TestXDN\",\n    \"subPortalId\": \"hjgk1pr890\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/add","description":"<p>Add one of your users to a specific user group.</p>\n","urlObject":{"protocol":"https","path":["usergroup","add"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"86f94d2d-f6b2-4011-86ba-c366377a7aa0","name":"200/OK","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\":\"john@email.ac\",\r\n    \"userGroupId\":\"wB6TestXDN\",\r\n    \"subPortalId\": \"hjgk1pr890\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/add"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"john@email.ac has been added to Physics Students (wB6TestXDN)\",\n    \"user\": {\n        \"objectId\": \"123aBc45TY\", \n        \"name\": \"John\", \n        \"email\": \"john@email.ac\"},\n    \"userGroup\": {\n        \"objectId\": \"wB6TestXDN\", \n        \"name\": \"Physics Students\"},\n    \"meta\": {\n        \"timestamp\": \"2020-11-27T09:06:59.002Z\"\n        }\n}"},{"id":"b24d89e3-3010-45d4-b76d-ed2969505adc","name":"404/Not Found","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\":\"does-not-exist@email.ac\",\r\n    \"userGroupId\":\"wB6TestXDN\",\r\n    \"subPortalId\": \"hjgk1pr890\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/add"},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object not found\"\n}"},{"id":"5729b95e-d235-4cee-91b4-c7f17013abb6","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\":\"john@email.ac\",\r\n    \"userGroupId\":\"wB6TestXDN\",\r\n    \"subPortalId\": \"hjgk1pr890\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/add"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"}],"_postman_id":"3fe1bfaf-68b9-48b0-a394-58009cb57923"},{"name":"/usergroup/remove","id":"eefebf40-5c50-4b19-adce-3015d5947aaa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"john@email.ac\",\n    \"userGroupId\": \"wB6TestXDN\",\n    \"subPortalId\": \"hjgk1pr890\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/remove","description":"<p>Remove one of your users from a specific user group.</p>\n","urlObject":{"protocol":"https","path":["usergroup","remove"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"a5a90724-9957-42f8-a17d-5b06e4e8a588","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Invalid organisation secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Invalid organisation identifier >","type":"text"},{"key":"X-api-key","value":" < Invalid API key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@email.ac\",\r\n    \"userGroupId\": \"wB6TestXDN\",\r\n    \"subPortalId\": \"hjgk1pr890\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/remove"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"361d231a-2592-4f1c-951a-8d959168b185","name":"404/Not Found","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"does-not-exist@email.ac\",\r\n    \"userGroupId\": \"wB6TestXDN\",\r\n    \"subPortalId\": \"hjgk1pr890\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/remove"},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object not found\"\n}"},{"id":"5f27f218-be4a-4b4b-8072-93f3c300c4e3","name":"200/OK","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >","type":"text"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >","type":"text"},{"key":"X-api-key","value":" < Your API Key >","type":"text"},{"key":"Accept","value":"*/*","type":"text"},{"key":"Content-Type","value":" application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userEmail\": \"john@email.ac\",\r\n    \"userGroupId\": \"wB6TestXDN\",\r\n    \"subPortalId\": \"hjgk1pr890\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/usergroup/remove"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"john@email.ac has been removed from Physics Students (wB6TestXDN)\",\n    \"user\": {\n        \"objectId\": \"123aBc45TY\",\n        \"name\": \"John\",\n        \"email\": \"john@email.ac\"\n    },\n    \"userGroup\": {\n        \"objectId\": \"wB6TestXDN\",\n        \"name\": \"Physics Students\"\n    },\n    \"meta\": {\n        \"timestamp\": \"2020-11-27T09:06:59.002Z\"\n        }\n}"}],"_postman_id":"eefebf40-5c50-4b19-adce-3015d5947aaa"}],"id":"e65b95ef-a0ec-47c0-ac48-2ceb9ce5045a","description":"<p>Add and remove users from your user groups</p>\n","event":[{"listen":"prerequest","script":{"id":"12ca44f7-a521-4a6f-a708-8d043a0ffec0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b0f9031f-8043-48b0-9e80-35b5a0f6ad62","type":"text/javascript","exec":[""]}}],"_postman_id":"e65b95ef-a0ec-47c0-ac48-2ceb9ce5045a"},{"name":"Learning Records","item":[{"name":"/learning-records","event":[{"listen":"test","script":{"id":"e471d3da-182b-446d-bfa2-6912533cec8e","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"12e92abe-d49b-4699-8783-be4d41637bd3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"6dd782a8-9400-4f18-8643-0cc37841950c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"},{"key":"Accept","value":"*/*"}],"body":{"mode":"formdata","formdata":[{"key":"userId","value":"USER123","type":"text"},{"key":"name","value":"Example record name","type":"text"},{"key":"achievedOn","value":"2023-11-20T15:48:05.300Z","type":"text"},{"key":"score","value":"50","type":"text"},{"key":"visibleToStudent","value":"true","type":"text"},{"key":"attr[fileAttributeName]","description":"<p>Data type should be set to 'File' and only .pdf files are supported. Files must be no larger than 10mb.</p>\n","type":"text","value":"file-path.pdf"}]},"url":"https://api-org.synap.ac/learning-records","urlObject":{"protocol":"https","path":["learning-records"],"host":["api-org","synap","ac"],"query":[],"variable":[]}},"response":[{"id":"40c36fec-bb66-4ca6-8892-e8d8dff057a9","name":"200/OK","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":"< Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":"< Your organisation's identifier >"},{"key":"X-api-key","value":"< Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"},{"key":"Accept","value":"*/*"}],"body":{"mode":"formdata","formdata":[{"key":"userId","value":"USER123","type":"text"},{"key":"name","value":"Example record name","type":"text"},{"key":"achievedOn","value":"2023-11-20T15:48:05.300Z","type":"text"},{"key":"score","value":"50","type":"text"},{"key":"visibleToStudent","value":"true","type":"text"},{"key":"attr[fileAttributeName]","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/Users/johnanderson/Downloads/Synap.pdf"],"src":"postman-cloud:///1ef1824e-f34a-49f0-a8b7-2d17f46b107a"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/learning-records"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"learningRecord\": {\n        \"objectId\": \"4LpDxV3YxwH\",\n        \"name\": \"Example record name\",\n        \"achievedOn\": \"2023-11-20T15:48:05.300Z\",\n        \"visibleToStudent\": true,\n        \"score\": 50,\n        \"attr\": {\n            \"fileAttributeName\": {\n                \"url\": \"https://sighned-url-for-file\",\n                \"filePath\": \"../file/Synap.pdf\",\n                \"fileName\": \"Synap.pdf\",\n                \"mimeType\": \"application/pdf\",\n                \"size\": 55312\n            }\n        }\n    },\n    \"meta\": {\n        \"timestamp\": \"2024-05-09T13:59:59.039Z\"\n    }\n}"},{"id":"dad6a014-7d5e-41a2-a2f1-e43f61ebb781","name":"401/Unauthorised","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"},{"key":"Accept","value":"*/*"}],"body":{"mode":"formdata","formdata":[{"key":"userId","value":"USER123","type":"text"},{"key":"name","value":"Example record name","type":"text"},{"key":"achievedOn","value":"2023-11-20T15:48:05.300Z","type":"text"},{"key":"score","value":"50","type":"text"},{"key":"visibleToStudent","value":"true","type":"text"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/learning-records"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"},{"id":"de3816c6-a87c-400f-84f6-0605304a1146","name":"400/Bad Request","originalRequest":{"method":"POST","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"},{"key":"Accept","value":"*/*"}],"body":{"mode":"formdata","formdata":[{"key":"userId","value":"USER123","type":"text"},{"key":"name","type":"file","value":null},{"key":"achievedOn","value":"2023-11-20T15:48:05.300Z","type":"text"},{"key":"score","value":"50","type":"text"},{"key":"visibleToStudent","value":"true","type":"text"}],"options":{"raw":{"language":"json"}}},"url":"https://api-org.synap.ac/learning-records"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"name must be a string\"\n}"}],"_postman_id":"6dd782a8-9400-4f18-8643-0cc37841950c"},{"name":"/learning-records/:userId","event":[{"listen":"test","script":{"id":"e471d3da-182b-446d-bfa2-6912533cec8e","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"12e92abe-d49b-4699-8783-be4d41637bd3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"633ccbaa-ea56-4a3a-a795-29df373b893f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"}],"body":{"mode":"formdata","formdata":[{"key":"userId","value":"USER123","type":"text"},{"key":"name","value":"New record Name","type":"text"},{"key":"achievedOn","value":"2023-11-20T15:48:05.300Z ","type":"text"},{"key":"attr[fileAttributeName]","value":"file-path.pdf","type":"text","description":"<p>Data type should be set to 'File' and only .pdf files are supported. Files must be no larger than 10mb.</p>\n"}]},"url":"https://api-org.synap.ac/learning-records/:learningRecordId","urlObject":{"protocol":"https","path":["learning-records",":learningRecordId"],"host":["api-org","synap","ac"],"query":[],"variable":[{"type":"any","value":"","key":"learningRecordId"}]}},"response":[{"id":"2301dbcf-e47e-45ab-b84f-1f2a69dcff54","name":"200/OK","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Update Record Name","type":"text"},{"key":"attr[fileAttributeName]","type":"file","src":"postman-cloud:///1ef1824e-f34a-49f0-a8b7-2d17f46b107a"}],"options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/learning-records/:learningRecordId","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":learningRecordId"],"variable":[{"key":"learningRecordId","value":""}]}},"code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"learningRecord\": {\n        \"objectId\": \"ABCD12345\",\n        \"name\": \"Updated Record name\",\n        \"achievedOn\": \"2023-11-20T15:48:05.300Z\",\n        \"visibleToStudent\": true,\n        \"score\": 55.43,\n        \"attr\": {\n               \"fileAttributeName\": {\n                \"url\": \"https://sighned-url-for-file\",\n                \"filePath\": \"../file/Synap.pdf\",\n                \"fileName\": \"Synap.pdf\",\n                \"mimeType\": \"application/pdf\",\n                \"size\": 55312\n            }\n        }\n    },\n    \"meta\": {\n        \"timestamp\": \"2024-05-09T14:13:02.524Z\"\n    }\n}"},{"id":"8b57cd1b-385e-495a-8ae7-7527e757921e","name":"400/Bad Request","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"100","type":"text"}],"options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/learning-records/:learningRecordId","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":learningRecordId"],"variable":[{"key":"learningRecordId","value":""}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"[\\n  {\\n    \\\"code\\\": \\\"invalid_type\\\",\\n    \\\"expected\\\": \\\"string\\\",\\n    \\\"received\\\": \\\"number\\\",\\n    \\\"path\\\": [\\n      \\\"name\\\"\\n    ],\\n    \\\"message\\\": \\\"Expected string, received number\\\"\\n  }\\n]\"\n}"},{"id":"2a7d1b52-3e2e-465d-a0ae-c476dff0e44b","name":"404/Not Found","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Update Record Name","type":"text"}],"options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/learning-records/:learningRecordId","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":learningRecordId"],"variable":[{"key":"learningRecordId","value":""}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object not found.\"\n}"},{"id":"8bc062fa-f4e0-48b3-90fe-60a871d3250a","name":"401/Unauthorised","originalRequest":{"method":"PATCH","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"multipart/form-data"}],"body":{"mode":"raw","raw":"{\n    \"name\": 100\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api-org.synap.ac/learning-records/:learningRecordId","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":learningRecordId"],"variable":[{"key":"learningRecordId","value":""}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorised Request\"\n}"}],"_postman_id":"633ccbaa-ea56-4a3a-a795-29df373b893f"},{"name":"/learning-records/:learningRecordId","event":[{"listen":"test","script":{"id":"e471d3da-182b-446d-bfa2-6912533cec8e","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"12e92abe-d49b-4699-8783-be4d41637bd3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"d9af68da-96af-4bf8-b9a1-188b074cde80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"application/json"}],"url":"https://api-org.synap.ac/learning-records/:learningRecordId","urlObject":{"protocol":"https","path":["learning-records",":learningRecordId"],"host":["api-org","synap","ac"],"query":[],"variable":[{"type":"any","value":"","key":"learningRecordId"}]}},"response":[{"id":"b43874b9-8244-46dd-9608-072d7379cfa1","name":"204/OK","originalRequest":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"https://api-org.synap.ac/learning-records/:learningRecordId","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":learningRecordId"],"variable":[{"key":"learningRecordId","value":""}]}},"status":"OK","code":204,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"848c327a-7694-4bde-8bba-b234649061a8","name":"404/Not Found","originalRequest":{"method":"DELETE","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"https://api-org.synap.ac/learning-records/:learningRecordId","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":learningRecordId"],"variable":[{"key":"learningRecordId","value":""}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object not found.\"\n}"}],"_postman_id":"d9af68da-96af-4bf8-b9a1-188b074cde80"},{"name":"/learning-records/:userId","event":[{"listen":"test","script":{"id":"e471d3da-182b-446d-bfa2-6912533cec8e","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","    const body = JSON.parse(pm.response.stream)","    pm.environment.set(\"userId\", body.user.objectId)","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"12e92abe-d49b-4699-8783-be4d41637bd3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"6cafe918-4c04-4305-b4c2-806925c4b170","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"application/json"}],"url":"https://api-org.synap.ac/learning-records?userId=USER123&limit=1&offset=1","urlObject":{"protocol":"https","path":["learning-records"],"host":["api-org","synap","ac"],"query":[{"key":"userId","value":"USER123"},{"key":"limit","value":"1"},{"key":"offset","value":"1"}],"variable":[]}},"response":[{"id":"0b4f39a9-6bc6-49ad-b670-a86edc637239","name":"200/OK","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"https://api-org.synap.ac/learning-records/:userId=USER123&limit=1&offset=1?userId=USER123","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":userId=USER123&limit=1&offset=1"],"query":[{"key":"userId","value":"USER123"},{"key":"limit","value":"1","disabled":true},{"key":"offset","value":"1","disabled":true}],"variable":[{"key":"userId=USER123&limit=1&offset=1","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"learningRecords\": [\n        {\n            \"learningRecord\": {\n                \"objectId\": \"ABCD1234\",\n                \"name\": \"ABCD1234\",\n                \"achievedOn\": \"2023-11-20T15:48:05.300Z\",\n                \"visibleToStudent\": true,\n                \"score\": 50,\n                \"attr\": {}\n            }\n        }\n    ],\n    \"meta\": {\n        \"timestamp\": \"2024-05-09T14:28:08.762Z\",\n        \"totalCount\": 1\n    }\n}"},{"id":"365d3cc4-aa7e-44d4-8e01-b8f7ada03559","name":"404/Not Found","originalRequest":{"method":"GET","header":[{"key":"X-Syn-Org-Secret","value":" < Your organisation's secret key >"},{"key":"X-Syn-Org-id","value":" < Your organisation's identifier >"},{"key":"X-api-key","value":" < Your API Key >"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"https://api-org.synap.ac/learning-records/:userId=USER123&limit=1&offset=1?userId=USER123&limit=1&offset=1","protocol":"https","host":["api-org","synap","ac"],"path":["learning-records",":userId=USER123&limit=1&offset=1"],"query":[{"key":"userId","value":"USER123"},{"key":"limit","value":"1"},{"key":"offset","value":"1"}],"variable":[{"key":"userId=USER123&limit=1&offset=1","value":""}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Object Not Found\"\n}"}],"_postman_id":"6cafe918-4c04-4305-b4c2-806925c4b170"}],"id":"ce7d0f9f-d634-4998-8260-167acc9a54d7","description":"<p>Interact with your records of previous learning</p>\n","_postman_id":"ce7d0f9f-d634-4998-8260-167acc9a54d7"}]}