{"info":{"_postman_id":"5adee7ef-c847-4d38-866d-f09b82f042ab","name":"Teamie External APIs","description":"<html><head></head><body><h3 id=\"creating-an-app\">Creating an App</h3>\n<p>Accessing Teamie APIs for your site requires the creation of a Teamie app and the generation of consumer keys and access tokens. To create a Teamie app, please contact <a href=\"mailto:support@theteamie.com\">support@theteamie.com</a> and the Teamie support team should provide you the following. </p>\n<ul>\n<li>client_name - This is the Teamie app name </li>\n<li>client_id - Unique identifier of the Teamie app created. </li>\n<li>redirect_uri - Redirect URI for the Teamie site. Ex: <a href=\"https://demo.theteamie.com\">https://demo.theteamie.com</a> </li>\n<li>username - Unique identifier of the api user account created </li>\n<li>password - Password for the api user account created.</li>\n</ul>\n<h3 id=\"placeholders-used-in-the-documentation\">Placeholders used in the documentation</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Placeholder</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>{{site-url}}</td>\n<td>This is your Teamie Site url. Ex: <a href=\"https://demo.theteamie.com\">https://demo.theteamie.com</a></td>\n</tr>\n<tr>\n<td>{{client-id}}</td>\n<td>Unique identifier of the teamie app created.</td>\n</tr>\n<tr>\n<td>{{redirect-uri}}</td>\n<td>Redirect uri of the teamie site. Ex: <a href=\"https://demo.theteamie.com\">https://demo.theteamie.com</a></td>\n</tr>\n<tr>\n<td>{{username}}</td>\n<td>Unique identifier of the api user account created</td>\n</tr>\n<tr>\n<td>{{password}}</td>\n<td>Password for the api user account created.</td>\n</tr>\n<tr>\n<td>{{access-token}}</td>\n<td>Sample access token used in the request</td>\n</tr>\n<tr>\n<td>{{refresh-token}}</td>\n<td>Sample refresh token used in the request</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6516655","collectionId":"5adee7ef-c847-4d38-866d-f09b82f042ab","publishedId":"S11Ex1BC","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-02-21T13:08:29.000Z"},"item":[{"name":"Authentication","item":[{"name":"Get Access Token - User Credentials","event":[{"listen":"prerequest","script":{"id":"effabd9a-0334-4de6-9f58-6d7878aa49af","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"fd530387-ce37-4f95-8041-5d1906d829fe","exec":["pm.test(\"Set-AccessToken\", function () {","   let response = pm.response.json();","    pm.environment.set(\"access-token\", response.access_token);","});"],"type":"text/javascript"}}],"id":"998234f9-aca6-4c52-9a47-f5378554a84b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"<p><strong>Mandatory</strong> </p>\n<p>This Value has to be <em>password</em> , since Teamie APIs follow User Credentials grant.</p>\n","key":"grant_type","type":"text","value":"password"},{"description":"<p><strong>Mandatory</strong> </p>\n<p>Unique identifier of the Teamie app created and this will be provided by the Teamie support team.</p>\n","key":"client_id","type":"text","value":"{{client-id}}"},{"description":"<p><strong>Mandatory</strong> </p>\n<p>Unique identifier of the API user created on the site and this will be provided by Teamie Support team.</p>\n","key":"username","type":"text","value":"{{username}}"},{"description":"<p><strong>Mandatory</strong> </p>\n<p>Password for the API user created on the site.</p>\n","key":"password","type":"text","value":"{{password}}"},{"description":"<p><strong>Optional</strong> </p>\n<p>Redirect URI provided for the application and this will be provided by the Teamie Support team.</p>\n","key":"redirect_uri","type":"text","value":"{{redirect-uri}}"}]},"url":"https://{{site-url}}/oauth2/token","description":"<p>Gets access token for a user using User Credentials grant.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"access_token\": \"a8a2988ae9b723ff2cd2c2c930cf7e62566d2055\",\n    \"expires_in\": 3888000,\n    \"token_type\": \"bearer\",\n    \"scope\": null,\n    \"refresh_token\": \"eafcfe797419d12233580d2b4ffd2b7ed38a0168\",\n    \"user\": {\n        \"user\": {\n            \"name\": \"admin\",\n            \"uid\": \"1\",\n            \"mail\": \"test@theteamie.com\",\n            \"real_name\": \"Teamie Buddy\",\n            \"first_name\": \"Teamie\",\n            \"last_name\": \"Buddy\",\n            \"user_profile_image\": {\n                \"html\": \"&lt;div class=\\\"user-picture\\\"&gt;&lt;a href=\\\"https://release-qa.teamieapp.com/people/teamie-buddy\\\"&gt;&lt;img src=\\\"https://d3b3a9xkhsmah9.cloudfront.net/sites/qa.teamieapp.com/files/styles/core_image_style_default/public/pictures/picture-1-1418619258.jpg?itok=jPs6bhbk\\\" width=\\\"70\\\" height=\\\"70\\\" alt=\\\"Teamie Buddy\\\" title=\\\"Teamie Buddy\\\" /&gt;&lt;/a&gt;&lt;/div&gt;\",\n                \"path\": \"https://d3b3a9xkhsmah9.cloudfront.net/sites/qa.teamieapp.com/files/styles/core_image_style_default/public/pictures/picture-1-1418619258.jpg?itok=jPs6bhbk\",\n                \"width\": 70,\n                \"height\": 70,\n                \"href\": \"https://release-qa.teamieapp.com/api/profile/1\"\n            },\n            \"status\": 1,\n            \"additional_data_fields\": []\n        },\n        \"uid\": \"1\",\n        \"name\": \"admin\"\n    },\n    \"user_roles\": [\n        \"authenticated user\",\n        \"site administrator\"\n    ],\n    \"site\": \"release-qa.teamieapp.com\"\n}\n</code></pre><p>From this JSON response, <em>access_token</em> key needs to be used as the Authorization header for \ncalling other APIs. </p>\n<p>Authorization header needs to be sent in this format. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{Access-Token-Needs-To-Be-Replaced-Here}}\n</code></pre><p>Based on the samle JSON given above, this is how the Authorization header will look like.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer a8a2988ae9b723ff2cd2c2c930cf7e62566d2055\n</code></pre>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"5adee7ef-c847-4d38-866d-f09b82f042ab","id":"5adee7ef-c847-4d38-866d-f09b82f042ab","name":"Teamie External APIs","type":"collection"}},"urlObject":{"protocol":"https","path":["oauth2","token"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"a6b3482a-50ea-47e5-b33d-66f348ecf43b","name":"200 - Ok","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","type":"text","value":"password"},{"key":"client_id","type":"text","value":"global-schools"},{"key":"username","type":"text","value":"*****"},{"key":"password","type":"text","value":"*****"},{"key":"redirect_uri","type":"text","value":"https://globalschools.teamieapp.com"},{"key":"site","type":"text","value":"globalschools.teamieapp.com"}]},"url":"https://{{site-url}}/oauth2/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 Feb 2019 08:29:12 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Teamie"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Expires","value":"Sun, 19 Nov 1978 05:00:00 GMT"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive"},{"key":"Cache-Control","value":"no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Language","value":"en"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Server-Name","value":"server-main"},{"key":"Strict-Transport-Security","value":"max-age=300; includeSubDomains"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"Access-Control-Allow-Origin","value":"https://api-console.teamieapp.com https://scorm-dev.teamieapp.com https://scorm.teamieapp.com"},{"key":"Access-Control-Allow-Origin","value":"https://api-console.teamieapp.com https://scorm-dev.teamieapp.com https://scorm.teamieapp.com"},{"key":"Access-Control-Allow-Methods","value":"GET,PUT,POST,DELETE,HEAD,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"X-Teamie-Api-Version,Authorization"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"X-Teamie-Server","value":"Teamie-Staging-1"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"a8a2988ae9b723ff2cd2c2c930cf7e62566d2055\",\n    \"expires_in\": 3888000,\n    \"token_type\": \"bearer\",\n    \"scope\": null,\n    \"refresh_token\": \"eafcfe797419d12233580d2b4ffd2b7ed38a0168\",\n    \"user\": {\n        \"user\": {\n            \"name\": \"admin\",\n            \"uid\": \"1\",\n            \"mail\": \"test@theteamie.com\",\n            \"real_name\": \"Teamie Buddy\",\n            \"first_name\": \"Teamie\",\n            \"last_name\": \"Buddy\",\n            \"user_profile_image\": {\n                \"html\": \"<div class=\\\"user-picture\\\"><a href=\\\"https://release-qa.teamieapp.com/people/teamie-buddy\\\"><img src=\\\"https://d3b3a9xkhsmah9.cloudfront.net/sites/qa.teamieapp.com/files/styles/core_image_style_default/public/pictures/picture-1-1418619258.jpg?itok=jPs6bhbk\\\" width=\\\"70\\\" height=\\\"70\\\" alt=\\\"Teamie Buddy\\\" title=\\\"Teamie Buddy\\\" /></a></div>\",\n                \"path\": \"https://d3b3a9xkhsmah9.cloudfront.net/sites/qa.teamieapp.com/files/styles/core_image_style_default/public/pictures/picture-1-1418619258.jpg?itok=jPs6bhbk\",\n                \"width\": 70,\n                \"height\": 70,\n                \"href\": \"https://release-qa.teamieapp.com/api/profile/1\"\n            },\n            \"status\": 1,\n            \"additional_data_fields\": []\n        },\n        \"uid\": \"1\",\n        \"name\": \"admin\"\n    },\n    \"user_roles\": [\n        \"authenticated user\",\n        \"site administrator\"\n    ],\n    \"site\": \"release-qa.teamieapp.com\"\n}"}],"_postman_id":"998234f9-aca6-4c52-9a47-f5378554a84b"},{"name":"Get Access Token - Using Refresh Token","id":"786c9529-e074-4703-b263-2d26532959d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"<p><strong>Mandatory</strong> </p>\n<p>This Value has to be <em>refesh_token</em>.</p>\n","key":"grant_type","type":"text","value":"refresh_token"},{"description":"<p><strong>Mandatory</strong> </p>\n<p>Unique identifier of the Teamie app created and this will be provided by the Teamie support team.</p>\n","key":"client_id","type":"text","value":"{{client-id}}"},{"description":"<p><strong>Mandatory</strong> </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"access_token\": \"a8a2988ae9b723ff2cd2c2c930cf7e62566d2055\",\n    \"expires_in\": 3888000,\n    \"token_type\": \"bearer\",\n    \"scope\": null,\n    \"refresh_token\": \"eafcfe797419d12233580d2b4ffd2b7ed38a0168\",\n    ---\n}\n</code></pre>","key":"refresh_token","type":"text","value":"{{refresh-token}}"}]},"url":"https://{{site-url}}/oauth2/token","description":"<p>Gets access token using refresh token. This needs to be called when the access token has expired.</p>\n<p>Refresh token will be sent along with the access token request /oauth2/token. \nWhen access token is expired (3888000 seconds - 45 days), refresh_token needs to be sent to get the new access token.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"5adee7ef-c847-4d38-866d-f09b82f042ab","id":"5adee7ef-c847-4d38-866d-f09b82f042ab","name":"Teamie External APIs","type":"collection"}},"urlObject":{"protocol":"https","path":["oauth2","token"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"95f7ca4f-2d68-4b23-a6fb-3aeec3e3be4c","name":"Get Access Token - Using Refresh Token","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","type":"text","value":"refresh_token"},{"key":"client_id","type":"text","value":"global-schools"},{"key":"refresh_token","value":"eafcfe797419d12233580d2b4ffd2b7ed38a0168","type":"text"}]},"url":"https://{{site-url}}/oauth2/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 Feb 2019 08:32:27 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Teamie"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Expires","value":"Sun, 19 Nov 1978 05:00:00 GMT"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive"},{"key":"Cache-Control","value":"no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Language","value":"en"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Server-Name","value":"server-main"},{"key":"Strict-Transport-Security","value":"max-age=300; includeSubDomains"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"Access-Control-Allow-Origin","value":"https://api-console.teamieapp.com https://scorm-dev.teamieapp.com https://scorm.teamieapp.com"},{"key":"Access-Control-Allow-Origin","value":"https://api-console.teamieapp.com https://scorm-dev.teamieapp.com https://scorm.teamieapp.com"},{"key":"Access-Control-Allow-Methods","value":"GET,PUT,POST,DELETE,HEAD,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"X-Teamie-Api-Version,Authorization"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"X-Teamie-Server","value":"Teamie-Staging-1"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"8ef440cd475fed36ead3a1c9aa923c9a385cef24\",\n    \"expires_in\": 3888000,\n    \"token_type\": \"bearer\",\n    \"scope\": null,\n    \"refresh_token\": \"61d17b3a159c211d3c04ca8767e1f3377bddb817\",\n    \"user\": {\n        \"user\": {\n            \"name\": \"admin\",\n            \"uid\": \"1\",\n            \"mail\": \"test@theteamie.com\",\n            \"real_name\": \"Teamie Buddy\",\n            \"first_name\": \"Teamie\",\n            \"last_name\": \"Buddy\",\n            \"user_profile_image\": {\n                \"html\": \"<div class=\\\"user-picture\\\"><a href=\\\"https://release-qa.teamieapp.com/people/teamie-buddy\\\"><img src=\\\"https://d3b3a9xkhsmah9.cloudfront.net/sites/qa.teamieapp.com/files/styles/core_image_style_default/public/pictures/picture-1-1418619258.jpg?itok=jPs6bhbk\\\" width=\\\"70\\\" height=\\\"70\\\" alt=\\\"Teamie Buddy\\\" title=\\\"Teamie Buddy\\\" /></a></div>\",\n                \"path\": \"https://d3b3a9xkhsmah9.cloudfront.net/sites/qa.teamieapp.com/files/styles/core_image_style_default/public/pictures/picture-1-1418619258.jpg?itok=jPs6bhbk\",\n                \"width\": 70,\n                \"height\": 70,\n                \"href\": \"https://release-qa.teamieapp.com/api/profile/1\"\n            },\n            \"status\": 1,\n            \"additional_data_fields\": []\n        },\n        \"uid\": \"1\",\n        \"name\": \"admin\"\n    },\n    \"user_roles\": [\n        \"authenticated user\",\n        \"site administrator\"\n    ],\n    \"site\": \"release-qa.teamieapp.com\"\n}"}],"_postman_id":"786c9529-e074-4703-b263-2d26532959d5"}],"id":"bfa0b00c-dee5-43b2-a37a-e37fdba95960","description":"<p>Teamie APIs uses OAuth2.0 and access tokens are generated using the User Credentials grant. A user account is created on your site, which will be used to access all the API endpoints listed below. </p>\n<h3 id=\"accessing-api-endpoints-using-access-token\">Accessing API Endpoints using Access Token.</h3>\n<p>Following header needs to be sent along with the access token generated. </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header Name</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer {{access-token}}</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Sample Request</strong> </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-sh\">curl --location --request GET \"https://{{site-url}}/app/v1/reference.json\" \\\n  --header \"Authorization: Bearer c6938c3ab40e05c0cbe76c1c3f37b76feebbe320\" \\\n  --data \"\"\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"89da0123-7e7b-4a66-9a28-b781b7755e40","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"116b0538-f6ad-4d07-a5ce-41ac9b5dea6d","type":"text/javascript","exec":[""]}}],"_postman_id":"bfa0b00c-dee5-43b2-a37a-e37fdba95960","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"5adee7ef-c847-4d38-866d-f09b82f042ab","id":"5adee7ef-c847-4d38-866d-f09b82f042ab","name":"Teamie External APIs","type":"collection"}}},{"name":"Reference","item":[{"name":"Get Reference Types","id":"476977fc-cbf8-4158-8474-6751c1455715","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/reference.json","description":"<p>Get list of reference types available.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"f15539f1-4362-40aa-b4aa-b881709057a7","id":"f15539f1-4362-40aa-b4aa-b881709057a7","name":"Reference","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","reference.json"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"df60f8ca-3a8c-411c-bcdf-80ecb5873507","name":"list","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer c6938c3ab40e05c0cbe76c1c3f37b76feebbe320","type":"text"}],"url":"https://{{site-url}}/app/v1/reference_value.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 Feb 2019 08:37:47 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Teamie"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Expires","value":"Sun, 19 Nov 1978 05:00:00 GMT"},{"key":"Cache-Control","value":"no-cache, must-revalidate"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive"},{"key":"X-Server-Name","value":"server-main"},{"key":"Strict-Transport-Security","value":"max-age=300; includeSubDomains"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"Access-Control-Allow-Origin","value":"https://api-console.teamieapp.com https://scorm-dev.teamieapp.com https://scorm.teamieapp.com"},{"key":"Access-Control-Allow-Origin","value":"https://api-console.teamieapp.com https://scorm-dev.teamieapp.com https://scorm.teamieapp.com"},{"key":"Access-Control-Allow-Methods","value":"GET,PUT,POST,DELETE,HEAD,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"X-Teamie-Api-Version,Authorization"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"X-Teamie-Server","value":"Teamie-Staging-1"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"site-roles\",\n        \"lable\": \"Site Level Roles\",\n        \"description\": \"\"\n    },\n    {\n        \"id\": \"group-roles\",\n        \"lable\": \"Group Level Roles\",\n        \"description\": \"\"\n    }\n]"}],"_postman_id":"476977fc-cbf8-4158-8474-6751c1455715"},{"name":"Get Reference Type Values","id":"71248631-6e27-4172-bf80-c27119ec33d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/reference/:type.json","description":"<p>Get list of values available for a given reference type.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"f15539f1-4362-40aa-b4aa-b881709057a7","id":"f15539f1-4362-40aa-b4aa-b881709057a7","name":"Reference","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","reference",":type.json"],"host":["{{site-url}}"],"query":[],"variable":[{"description":{"content":"<p>The reference value identifier</p>\n","type":"text/plain"},"type":"string","value":"site-roles","key":"type"}]}},"response":[{"id":"82a66b2f-f9f3-4d1d-9b97-e2946db23da9","name":"Reference Type Values For Site Roles","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/reference/:type.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","reference",":type.json"],"variable":[{"description":"The reference value identifier","enabled":true,"key":"type","type":"text","value":"site-roles"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    \"school administrator\",\n    \"teacher\",\n    \"learner\",\n    \"interim learner\",    \n    \"parent\"\n]"}],"_postman_id":"71248631-6e27-4172-bf80-c27119ec33d2"}],"id":"f15539f1-4362-40aa-b4aa-b881709057a7","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"7c151bf7-f122-4203-ab19-2b8f5aa549eb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6420d004-db97-48ae-b413-f60d9b107570","type":"text/javascript","exec":[""]}}],"_postman_id":"f15539f1-4362-40aa-b4aa-b881709057a7","description":""},{"name":"User","item":[{"name":"Get List Of Users","id":"3d3fa079-e544-4be6-aea1-6d942fb10b48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/user.json?format=list&load=1&page=6&items_per_page=2&filters[mail]=","description":"<p>List all the users in the system. With parameters can filter users as needed also. A maximum of 100 results will be returned by this call.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","name":"User","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","user.json"],"host":["{{site-url}}"],"query":[{"description":{"content":"<p>This can take either of the following values:</p>\n<ul>\n<li><strong>list</strong>: This is the default value. It returns the list of records.</li>\n<li><strong>count</strong>: It returns the total count for all records</li>\n</ul>\n","type":"text/plain"},"key":"format","value":"list"},{"description":{"content":"<p>When set to either 1 or 0 statuses will returned data with user objects or jut a list of User identifies. (Default:1)</p>\n","type":"text/plain"},"key":"load","value":"1"},{"description":{"content":"<p>The collection of list members to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page.\" set of records.</p>\n","type":"text/plain"},"key":"page","value":"6"},{"description":{"content":"<p>Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100.</p>\n","type":"text/plain"},"key":"items_per_page","value":"2"},{"description":{"content":"<p><strong>Optional</strong></p>\n<p>Will return only users that contain the value as part of their mail</p>\n","type":"text/plain"},"key":"filters[mail]","value":""}],"variable":[]}},"response":[{"id":"0604be67-b1eb-4acc-a8f2-87b66fb70a4a","name":"Get user Ids by mail","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/user.json?format=list&load=0&filters[mail]=sampleusermail@theteamie.com","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user.json"],"query":[{"key":"format","value":"list","description":"This can take either of the following values:\n\n- **list**: This is the default value. It returns the list of records.\n- **count**: It returns the total count for all records"},{"key":"load","value":"0","description":"When set to either 1 or 0 statuses will returned data with user objects or jut a list of User identifies. (Default:1)"},{"key":"filters[mail]","value":"sampleusermail@theteamie.com","description":"**Optional**\n\nWill return only users that contain the value as part of their mail"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[\n    \"efbf0782-9f57-4d7d-9ff9-20ae1974f021\"\n]"},{"id":"3fd00499-b787-4709-bddb-07284c057ed5","name":"Get list of user identifiers only","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/user.json?format=list&load=0&items_per_page=3","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user.json"],"query":[{"key":"format","value":"list"},{"key":"load","value":"0"},{"key":"items_per_page","value":"3"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    \"aa78b606-390e-4165-b8a2-034a62118e84\",\n    \"1882d6c0-4a89-4303-bc37-317f262cda3c\",\n    \"2846c6c8-8744-45d4-b9e8-3fc6dfe3e7d1\"\n]"},{"id":"c41a2aa4-957b-4d2f-9875-54478a7bd7d2","name":"Get list of users with data","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/user.json?format=list&load=1&page=34&items_per_page=3","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user.json"],"query":[{"key":"format","value":"list","description":"Specifies results to return as a list or number of items. \npossible values: list, count"},{"key":"load","value":"1","description":"When set to either 1 or 0 statuses will returned data with user objects or jut a list of User identifies. (Default:1)"},{"key":"page","value":"34","description":"The collection of list members to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page.\" set of records."},{"key":"items_per_page","value":"3","description":"Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100."}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"b599cb53-ac13-4651-9dc6-323e69d8a32d\",\n        \"name\": \"learner\",\n        \"mail\": \"learner@theteamie.com\",\n        \"timezone\": \"Asia/Singapore\",\n        \"status\": \"Active\",\n        \"created\": 1536214561,\n        \"displayname\": \"Sample Learner\",\n        \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-654345.png\",\n        \"roles\": [\n            \"learner\"\n        ],\n        \"fields\": {\n            \"first_name\": \"sample\",\n            \"last_name\": \"learner\",\n            \"gender\": \"Male\"\n        }\n    },\n    {\n        \"id\": \"1f1a037c-2d47-46cb-a506-d98c165bba0b\",\n        \"name\": \"teacher\",\n        \"mail\": \"teacher@theteamie.com\",\n        \"timezone\": \"Asia/Singapore\",\n        \"status\": \"Active\",\n        \"created\": 1536317276,\n        \"displayname\": \"Sample Teacher\",\n        \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-4563.png\",\n        \"roles\": [\n            \"teacher\"\n        ],\n        \"fields\": {\n            \"first_name\": \"sample\",\n            \"last_name\": \"teacher\",\n            \"gender\": \"Male\"\n        }\n    },\n    {\n        \"id\": \"b3d3feef-0b2c-498d-898e-308229f4b8cf\",\n        \"name\": \"testuser\",\n        \"mail\": \"testuser@example.com\",\n        \"timezone\": \"Asia/Singapore\",\n        \"status\": \"Active\",\n        \"created\": 1536317278,\n        \"displayname\": \"Test User\",\n        \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-32687.png\",\n        \"roles\": [\n            \"Learner\"\n        ],\n        \"fields\": {\n            \"first_name\": \"Test\",\n            \"last_name\": \"User\",\n            \"gender\": \"Male\"\n        }\n    }\n]"},{"id":"e32b6e56-5568-42ae-b1af-6a87d808fed8","name":"Get number of users","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/user.json?format=count","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user.json"],"query":[{"key":"format","value":"count","description":"Specifies results to return as a list or number of items. \npossible values: list, count"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    65\n]"}],"_postman_id":"3d3fa079-e544-4be6-aea1-6d942fb10b48"},{"name":"Get User Details","id":"439c3238-74bc-4ee7-ab14-ad8077fc897e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/user/:userID.json","description":"<p>Returns user details for the given user.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","name":"User","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","user",":userID.json"],"host":["{{site-url}}"],"query":[],"variable":[{"description":{"content":"<p>The ID of the user for whom to return results.</p>\n","type":"text/plain"},"type":"any","value":"efbf0782-9f57-4d7d-9ff9-20ae1974f021","key":"userID"}]}},"response":[{"id":"3c4f3521-1780-4d25-be82-6f5fd73e5621","name":"Get User Details","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/user/:userID.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user",":userID.json"],"variable":[{"key":"userID","value":"efbf0782-9f57-4d7d-9ff9-20ae1974f021","description":"The ID of the user for whom to return results."}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"efbf0782-9f57-4d7d-9ff9-20ae1974f021\",\n    \"name\": \"sampleusername\",\n    \"mail\": \"sampleusermail@theteamie.com\",\n    \"timezone\": \"Asia/Singapore\",\n    \"status\": \"Active\",\n    \"created\": 1550648230,\n    \"displayname\": \"Sample User Name\",\n    \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-32687.png\",\n    \"roles\": [\n        \"learner\"\n    ],\n    \"fields\": {\n        \"first_name\": \"sample\",\n        \"last_name\": \"User Name\",\n        \"gender\": \"Male\",\n        \"department\": \"Electronic\"\n    }\n}"}],"_postman_id":"439c3238-74bc-4ee7-ab14-ad8077fc897e"},{"name":"Create User ","id":"ce4c6f67-acd8-49d1-afde-292d33e53527","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"","description":"<p><strong>Mandatory</strong> </p>\n<p>All the user fields that are required to create a user account.</p>\n","type":"text"}]},"url":"https://{{site-url}}/app/v1/user.json","description":"<p>Creates a new authenticated user.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","name":"User","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","user.json"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"0712a237-692d-47e0-9a05-326627ec8457","name":"Create User ","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user[name]","value":"sampleusername","type":"text"},{"key":"user[mail]","value":"sampleusermail@theteamie.com","type":"text"},{"key":"user[status]","value":"Active","type":"text"},{"key":"user[roles][]","value":"learner","type":"text"},{"key":"user[fields][first_name]","value":"sample","type":"text"},{"key":"user[fields][last_name]","value":"user name","type":"text"},{"key":"user[fields][gender]","value":"Male","type":"text"},{"key":"user[fields][department]","value":"Electronic","type":"text"}]},"url":""},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"efbf0782-9f57-4d7d-9ff9-20ae1974f021\",\n    \"name\": \"sampleusername\",\n    \"mail\": \"sampleusermail@theteamie.com\",\n    \"timezone\": \"Asia/Singapore\",\n    \"status\": \"Active\",\n    \"created\": 1550648230,\n    \"displayname\": \"Sample User Name\",\n    \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-32687.png\",\n    \"roles\": [\n        \"learner\"\n    ],\n    \"fields\": {\n        \"first_name\": \"sample\",\n        \"last_name\": \"user name\",\n        \"gender\": \"Male\",\n        \"department\": \"Electronic\"\n    }\n}"}],"_postman_id":"ce4c6f67-acd8-49d1-afde-292d33e53527"},{"name":"Update User ","id":"ab871f09-0921-4f9b-b607-f74ceeb97f0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"","description":"<p><strong>Mandatory</strong> </p>\n<p>User Data fields that need to be updated. The fields which are not editable are:</p>\n<ul>\n<li>The primary identifier (either <em>name</em> or <em>mail</em>)</li>\n<li><em>created</em></li>\n<li><em>displayname</em></li>\n<li><em>timezone</em></li>\n<li><em>picture</em></li>\n</ul>\n<p>Please check the examples for sample update requests.</p>\n","type":"text"}]},"url":"https://{{site-url}}/app/v1/user/:userID.json","description":"<p>Update user details for the given user.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","name":"User","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","user",":userID.json"],"host":["{{site-url}}"],"query":[],"variable":[{"description":{"content":"<p>The ID of the user for whom to update results.</p>\n","type":"text/plain"},"type":"any","value":"efbf0782-9f57-4d7d-9ff9-20ae1974f021","key":"userID"}]}},"response":[{"id":"c0d8e831-0955-41a0-86ef-8cd6b856df3a","name":"Update User ","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user[status]","value":"Blocked","type":"text"},{"key":"user[fields][first_name]","value":"Sample","type":"text"},{"key":"user[fields][last_name]","value":"User","type":"text"},{"key":"user[fields][department]","value":"Matematicas","type":"text"}]},"url":{"raw":"https://{{site-url}}/app/v1/user/:userID.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user",":userID.json"],"variable":[{"key":"userID","value":"efbf0782-9f57-4d7d-9ff9-20ae1974f021","description":"The ID of the user for whom to update results."}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"efbf0782-9f57-4d7d-9ff9-20ae1974f021\",\n    \"name\": \"sampleusername\",\n    \"mail\": \"sampleusermail@theteamie.com\",\n    \"timezone\": \"Asia/Singapore\",\n    \"status\": \"Blocked\",\n    \"created\": 1550648230,\n    \"displayname\": \"Sample User\",\n    \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-32687.png\",\n    \"roles\": [\n        \"learner\"\n    ],\n    \"fields\": {\n        \"first_name\": \"Sample\",\n        \"last_name\": \"User\",\n        \"gender\": \"Male\",\n        \"department\" : \"Matematicas\"\n    }\n}"},{"id":"f024b3e8-2312-4de8-a076-167b9bca652a","name":"Active/Block User ","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user['status']","value":"Blocked","description":"User Data fileds that need to be updated","type":"text"}]},"url":{"raw":"https://{{site-url}}/app/v1/user/:userID.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","user",":userID.json"],"variable":[{"key":"userID","value":"efbf0782-9f57-4d7d-9ff9-20ae1974f021","description":"The ID of the user for whom to update results."}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"efbf0782-9f57-4d7d-9ff9-20ae1974f021\",\n    \"name\": \"sampleusername\",\n    \"mail\": \"sampleusermail@theteamie.com\",\n    \"timezone\": \"Asia/Singapore\",\n    \"status\": \"Blocked\",\n    \"created\": 1550648230,\n    \"displayname\": \"Sample User Name\",\n    \"picture\": \"https://d3wer.cloudfront.net/files/pictures/picture-32687.png\",\n    \"roles\": [\n        \"learner\"\n    ],\n    \"fields\": {\n        \"first_name\": \"sample\",\n        \"last_name\": \"User Name\",\n        \"gender\": \"Male\",\n        \"department\": \"Electronic\"\n    }\n}"}],"_postman_id":"ab871f09-0921-4f9b-b607-f74ceeb97f0a"},{"name":"Notify User","id":"ca983263-52ec-46b1-9779-a8b43c73cde2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://{{site-url}}/app/v1/user/:userID/notify.json","description":"<p>Sends an email to the specified user with a one-time login link to access the platform and setup their password</p>\n<ul>\n<li>Returns <strong>200</strong> on success</li>\n<li>Returns <strong>404</strong> if no user was found with the given id</li>\n<li>Returns <strong>406</strong> if the user with the given id is blocked at the site level</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","name":"User","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","user",":userID","notify.json"],"host":["{{site-url}}"],"query":[],"variable":[{"type":"string","value":"","key":"userID"}]}},"response":[],"_postman_id":"ca983263-52ec-46b1-9779-a8b43c73cde2"}],"id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca","description":"<p>User accounts can have a username (<em>name</em>) and email address (<em>mail</em>). One of these will be configured to be the primary identifier for your site, and this cannot be modified using the API endpoint. The primary identifier (either <em>name</em> or <em>mail</em>) will need to be non-empty and unique.</p>\n<p>The secondary identifier (either <em>name</em> or <em>mail</em>) is optional.</p>\n<p>For the other fields associated with the user account, their properties will be configured during setup. If they are set to be mandatory, they will need to be present in the API request while creating the user. We recommend that <em>first_name</em> and <em>last_name</em> are to be set as mandatory for ease of identifying users and a consistent experience.</p>\n<p>The user <em>status</em> if not passed in will default to <strong>Active</strong></p>\n<p>The following fields are for retrieval only and cannot be edited through the API:</p>\n<ul>\n<li><strong>created</strong>: The created timestamp of the user</li>\n<li><strong>timezone</strong></li>\n<li><strong>displaytitle</strong>: This is configured during setup, usually set to be the combination of the user's first and last name fields</li>\n<li><strong>picture</strong></li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"43c5f32d-9831-4155-a46c-dfba0abf0eda","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9c97086d-5dbb-42c6-abd7-f84a4c6fc491","type":"text/javascript","exec":[""]}}],"_postman_id":"92b8bb0f-8b9f-40a9-99d9-361b8e5b2cca"},{"name":"Group","item":[{"name":"Get List Of Groups","id":"ced9b589-381c-4951-a56e-f72030347cea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/group.json?format=list&load=1&page=1&items_per_page=1&filters[unique_code]=","description":"<p>List all the groups in the system. With parameters can filter groups as needed also. A maximum of 100 results will be returned by this call.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"4095e164-4716-46ba-a7c1-da6e205f951f","id":"4095e164-4716-46ba-a7c1-da6e205f951f","name":"Group","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group.json"],"host":["{{site-url}}"],"query":[{"description":{"content":"<p>This can take either of the following values:</p>\n<ul>\n<li><strong>list</strong>: This is the default value. It returns the list of records.</li>\n<li><strong>count</strong>: It returns the total count for all records</li>\n</ul>\n","type":"text/plain"},"key":"format","value":"list"},{"description":{"content":"<p>When set to either 1 or 0 statuses will returned data with group objects or jut a list of group identifies. (Default:1)</p>\n","type":"text/plain"},"key":"load","value":"1"},{"description":{"content":"<p>The collection of records to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page.\" set of records.</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100.</p>\n","type":"text/plain"},"key":"items_per_page","value":"1"},{"description":{"content":"<p><strong>Optional</strong></p>\n<p>Will return only groups that contain the value in their unique code</p>\n","type":"text/plain"},"key":"filters[unique_code]","value":""}],"variable":[]}},"response":[{"id":"36781534-581f-4c45-a390-5f5ea78800ae","name":"Get list of group identifiers only","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group.json?format=list&load=0&items_per_page=3","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group.json"],"query":[{"key":"format","value":"list"},{"key":"load","value":"0"},{"key":"items_per_page","value":"3"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    \"58896028-f99b-407d-9b7d-3f42cef6c7d6\",\n    \"f0caf1d3-e665-4dc6-af34-e8535d3345a4\",\n    \"deadab1c-0c90-4df0-a477-eaf9ad28472d\"\n]"},{"id":"45d14891-211c-48d7-8c63-7b04bb3bd129","name":"Get group Id by group unique code","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group.json?format=list&load=0&filters[unique_code]=Explore_Teamie","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group.json"],"query":[{"key":"format","value":"list","description":"This can take either of the following values:\n\n- **list**: This is the default value. It returns the list of records.\n- **count**: It returns the total count for all records"},{"key":"load","value":"0","description":"When set to either 1 or 0 statuses will returned data with group objects or jut a list of group identifies. (Default:1)"},{"key":"filters[unique_code]","value":"Explore_Teamie","description":"**Optional**\n\nWill return only groups that contain the value in their unique code"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[\n  \"71594f3a-e9aa-4091-b6c1-dec60bc9a88d\"\n}"},{"id":"4ebb1baa-2b9b-4e06-a272-c1ceecf1891d","name":"Get number of groups","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group.json?format=count","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group.json"],"query":[{"key":"format","value":"count"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    43\n]"},{"id":"b685d9fd-1852-4998-b6ce-e4181ddc09bb","name":"Get list of groups with data","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group.json?format=list&load=1&page=34&items_per_page=3","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group.json"],"query":[{"key":"format","value":"list"},{"key":"load","value":"1","description":"When set to either 1 or 0 statuses will returned data with group objects or jut a list of group identifies. (Default:1)"},{"key":"page","value":"34","description":"The collection of list members to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page.\" set of records."},{"key":"items_per_page","value":"3","description":"Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"71594f3a-e9aa-4091-b6c1-dec60bc9a88d\",\n        \"unique_code\": \"explore_teamie\",\n        \"title\": \"Explore Teamie\",\n        \"description\": \"\",\n        \"status\": \"Published\",\n        \"created\": 1528887315,\n        \"displaytitle\": \"Explore Teamie\",\n        \"fields\": {\n            \"group_type\": \"Classroom\",\n            \"sample_section\": \"Value One\"\n        }\n    },\n    {\n        \"id\": \"6b162443-412f-47e4-b53b-e4397036253c\",\n        \"unique_code\": \"ComputerScienceNetworking\",\n        \"title\": \"Computer Networking\",\n        \"description\": \"A network connects computers, mobile phones, peripherals, and even IoT \\ndevices. Switches, routers, and wireless access points are the essential \\nnetworking basics. Through them, devices connected to your network can \\ncommunicate with one another and with other networks, like the Internet.\\n\",\n        \"status\": \"Published\",\n        \"created\": 1529049207,\n        \"displaytitle\": \"Computer Networking\",\n        \"fields\": {\n            \"group_type\": \"Classroom\",\n            \"sample_section\": \"\"\n        }\n    },\n    {\n        \"id\": \"8de8f5ec-3bf9-4e51-9a89-ebaf0ad956fc\",\n        \"unique_code\": \"TeamieOne\",\n        \"title\": \"Teamie One\",\n        \"description\": \"\",\n        \"status\": \"Published\",\n        \"created\": 1529080968,\n        \"displaytitle\": \"Teamie One\",\n        \"fields\": {\n            \"group_type\": \"Classroom\",\n            \"sample_section\": \"Value Two\"\n        }\n    }\n]"}],"_postman_id":"ced9b589-381c-4951-a56e-f72030347cea"},{"name":"Get Group Details","id":"3a375be6-10d2-47d8-85c5-318cb4df39ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"https://{{site-url}}/app/v1/group/:groupID.json","description":"<p>Returns group details for the given group.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"4095e164-4716-46ba-a7c1-da6e205f951f","id":"4095e164-4716-46ba-a7c1-da6e205f951f","name":"Group","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group",":groupID.json"],"host":["{{site-url}}"],"query":[],"variable":[{"type":"any","value":"{{group-id}}","key":"groupID.json"}]}},"response":[{"id":"d3ce1def-e353-4af0-8960-9ac57b561575","name":"Get Group Details","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID.json"],"variable":[{"description":"The ID of the group for which need to return results.","key":"groupID","value":"83113648-32fc-4b77-a427-5f86f8e12746"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"71594f3a-e9aa-4091-b6c1-dec60bc9a88d\",\n    \"unique_code\": \"Explore_Teamie\",\n    \"title\": \"Explore Teamie\",\n    \"description\": \"<p>This is a sample <strong>rich text</strong> description</p>\",\n    \"status\": \"Published\",\n    \"created\": 1528887315,\n    \"displaytitle\": \"Explore Teamie\",\n    \"fields\": {\n        \"group_type\": \"Classroom\",\n        \"sample_section\": \"Value One\"\n    }\n}"}],"_postman_id":"3a375be6-10d2-47d8-85c5-318cb4df39ba"},{"name":"Create Group","id":"faa9778c-6a94-4c77-9d43-2e8317452c8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"group","value":"","type":"text"}]},"url":"https://{{site-url}}/app/v1/group.json","description":"<p>Creates a new group</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"4095e164-4716-46ba-a7c1-da6e205f951f","id":"4095e164-4716-46ba-a7c1-da6e205f951f","name":"Group","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group.json"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"4794bf45-aaf0-4604-b4ad-c091b190b2df","name":"Create Group","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"group[unique_code]","value":"Explore_Teamie","description":"**Mandatory**","type":"text"},{"key":"group[title]","value":"Explore Teamie","description":"**Mandatory**","type":"text"},{"key":"group[description]","value":"<p>This is a sample <strong>rich text</strong> description</p>","type":"text"},{"key":"group[status]","value":"Published","description":"If not set, will default to **Published**","type":"text"},{"key":"group[fields][sample_section]","value":"Value One","type":"text"},{"key":"group[fields][group_type]","value":"Classroom","description":"If not set, will default to the first group type.","type":"text"}]},"url":"https://{{site-url}}/app/v1/group.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"71594f3a-e9aa-4091-b6c1-dec60bc9a88d\",\n    \"unique_code\": \"Explore_Teamie\",\n    \"title\": \"Explore Teamie\",\n    \"description\": \"<p>This is a sample <strong>rich text</strong> description</p>\",\n    \"status\": \"Published\",\n    \"created\": 1528887315,\n    \"displaytitle\": \"Explore Teamie\",\n    \"fields\": {\n        \"group_type\": \"Classroom\",\n        \"sample_section\": \"Value One\"\n    }\n}"}],"_postman_id":"faa9778c-6a94-4c77-9d43-2e8317452c8c"},{"name":"Update Group","id":"4975c252-ed04-4da7-8a3b-18049ff5ba09","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"group","value":"","type":"text"}]},"url":"https://{{site-url}}/app/v1/group/:groupID.json","description":"<p>Update group details for the given group.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"4095e164-4716-46ba-a7c1-da6e205f951f","id":"4095e164-4716-46ba-a7c1-da6e205f951f","name":"Group","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group",":groupID.json"],"host":["{{site-url}}"],"query":[],"variable":[{"description":{"content":"<p>The ID of the group for which need to update results.</p>\n","type":"text/plain"},"type":"any","value":"","key":"groupID"}]}},"response":[{"id":"b550ba96-d368-4d3b-8714-c310c07a093e","name":"Published/Archived Groups ","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"group[status]","value":"Archived","type":"text"}]},"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID.json"],"variable":[{"key":"groupID","value":"71594f3a-e9aa-4091-b6c1-dec60bc9a88d","description":"The ID of the group for which need to update results."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"71594f3a-e9aa-4091-b6c1-dec60bc9a88d\",\n    \"unique_code\": \"00H_003\",\n    \"title\": \"New Title\",\n    \"description\": \"H3\",\n    \"status\": \"Archived\",\n    \"created\": 1542344706,\n    \"displaytitle\": \"New Title\",\n    \"fields\": {\n        \"group_type\": \"Classroom\",\n        \"sample_dynamic_field\": \"\",\n        \"sample_section\": \"Value Two\"\n    }\n}"},{"id":"d8a7a996-22b1-44b7-84e7-8cd7a3a6208b","name":"Update Group","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"group[title]","value":"Teamie one-to-one","type":"text"},{"key":"group[fields][sample_section]","value":"Value Two","type":"text"}]},"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID.json"],"variable":[{"key":"groupID","value":"71594f3a-e9aa-4091-b6c1-dec60bc9a88d","description":"The ID of the group for which need to update results."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"71594f3a-e9aa-4091-b6c1-dec60bc9a88d\",\n    \"unique_code\": \"Explore_Teamie\",\n    \"title\": \"Teamie one-to-one\",\n    \"description\": \"\",\n    \"status\": \"Published\",\n    \"created\": 1528887315,\n    \"displaytitle\": \"Teamie one-to-one\",\n    \"fields\": {\n        \"group_type\": \"Classroom\",\n        \"sample_section\": \"Value Two\"\n    }\n}"}],"_postman_id":"4975c252-ed04-4da7-8a3b-18049ff5ba09"}],"id":"4095e164-4716-46ba-a7c1-da6e205f951f","description":"<p>Groups have a <em>Group Unique Code</em> which is considered as a user-facing unique identifier. This can take in an alphanumeric value and is mandatory. It cannot be changed after the creation of the group.</p>\n<p>The other mandatory field for the group is the <em>Title</em>, which is the display title for the group. Groups also have a <em>status</em>:</p>\n<ul>\n<li><strong>Published</strong>: The group can be accessed by members of the group</li>\n<li><strong>Archived</strong>: Only limited roles have access to the content inside of the group</li>\n</ul>\n<p>For the other fields associated with the group, their properties will be configured during setup. If they are set to be mandatory, they will need to be present in the API request while creating the group.</p>\n<p>The following fields are for retrieval only and will cannot be edited through the API:</p>\n<ul>\n<li><strong>created</strong>: The timestamp when the group was created</li>\n<li><strong>displaytitle</strong>: Can be configured during setup, usually set to be the same as the group title.</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"b8228499-0c2e-48e0-84f0-5c152fb143e5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fea44390-e926-464f-b741-90300c86921b","type":"text/javascript","exec":[""]}}],"_postman_id":"4095e164-4716-46ba-a7c1-da6e205f951f"},{"name":"Membership","item":[{"name":"Get Memberships","id":"f49a74f9-a613-4a54-a606-91931dec2534","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/membership.json?format=list&group&user&page&items_per_page","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","name":"Membership","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","membership.json"],"host":["{{site-url}}"],"query":[{"description":{"content":"<p>This can take either of the following values:</p>\n<ul>\n<li><strong>list</strong>: This is the default value. It returns the list of records matching the given filters.</li>\n<li><strong>count</strong>: It returns the total count for all records matching the given filters.</li>\n</ul>\n","type":"text/plain"},"key":"format","value":"list"},{"description":{"content":"<p>Can take in a single group's id to filter the result for all memberships from that group</p>\n","type":"text/plain"},"key":"group","value":null},{"description":{"content":"<p>Can take in a single user's id to filter the result for all memberships for that user</p>\n","type":"text/plain"},"key":"user","value":null},{"description":{"content":"<p>The collection of records to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page\" set of records.</p>\n","type":"text/plain"},"key":"page","value":null},{"description":{"content":"<p>Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100.</p>\n","type":"text/plain"},"key":"items_per_page","value":null}],"variable":[]}},"response":[{"id":"0876121f-a5a6-40af-ae77-4d7a5532e461","name":"Get Memberships for a given User","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/api/membership.json?format=list&user=889f79b2-3415-4339-a0ae-969f3d25ee9f&page=1&items_per_page=100","protocol":"https","host":["{{site-url}}"],"path":["api","membership.json"],"query":[{"key":"format","value":"list","description":"This can take either of the following values:\n\n- **list**: This is the default value. It returns the list of records matching the given filters.\n- **count**: It returns the total count for all records matching the given filters."},{"key":"user","value":"889f79b2-3415-4339-a0ae-969f3d25ee9f","description":"Can take in a single user's id to filter the result for all memberships for that user"},{"key":"page","value":"1","description":"The collection of records to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page\" set of records."},{"key":"items_per_page","value":"100","description":"Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n    \t\"user\": \"889f79b2-3415-4339-a0ae-969f3d25ee9f\",\n        \"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Instructor\"\n        ],\n        \"created\": 1401190604\n    },\n    {\n    \t\"user\": \"889f79b2-3415-4339-a0ae-969f3d25ee9f\",    \t\n        \"group\": \"4c3892c5-ad8e-4f65-aaa5-c41ec922d89b\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Learner\"\n        ],\n        \"created\": 1427173209\n    },\n    {\n    \t\"user\": \"889f79b2-3415-4339-a0ae-969f3d25ee9f\",    \t\n        \"group\": \"3643b43b-2006-4c53-8d9f-5747ab44490b\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Learner\"\n        ],\n        \"created\": 1493141967\n    },\n    {\n    \t\"user\": \"889f79b2-3415-4339-a0ae-969f3d25ee9f\",    \t\n        \"group\": \"709a450e-09a2-409c-b07b-4124a0a146c8\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Learner\"\n        ],\n        \"created\": 1511368691\n    },\n    {\n    \t\"user\": \"889f79b2-3415-4339-a0ae-969f3d25ee9f\",    \t\n        \"group\": \"ab467b0d-6424-4921-a060-9ff3ef635380\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Learner\"\n        ],\n        \"created\": 1523887451\n    },\n    {\n    \t\"user\": \"889f79b2-3415-4339-a0ae-969f3d25ee9f\",    \t\n        \"group\": \"3d31245c-47a8-4bc2-a275-b0128ca596a9\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Learner\"\n        ],\n        \"created\": 1548295433\n    }\n]"},{"id":"176bb602-87f3-4230-9fea-d683fe21061c","name":"Get number of memberships in given group","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/api/membership.json?format=count&group=9e0950d8-99d1-4733-8ee7-8217ff8f7b94","protocol":"https","host":["{{site-url}}"],"path":["api","membership.json"],"query":[{"key":"format","value":"count","description":"This can take either of the following values:\n\n- **list**: This is the default value. It returns the list of records matching the given filters.\n- **count**: It returns the total count for all records matching the given filters."},{"key":"group","value":"9e0950d8-99d1-4733-8ee7-8217ff8f7b94","description":"Can take in a single group's id to filter the result for all memberships from that group"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    96\n]"},{"id":"64d3509e-99cb-4113-b08e-b38042ae62cd","name":"Get Memberships for a given Group","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/api/membership.json?format=list&group=9e0950d8-99d1-4733-8ee7-8217ff8f7b94&page=1&items_per_page=3","protocol":"https","host":["{{site-url}}"],"path":["api","membership.json"],"query":[{"key":"format","value":"list","description":"This can take either of the following values:\n\n- **list**: This is the default value. It returns the list of records matching the given filters.\n- **count**: It returns the total count for all records matching the given filters."},{"key":"group","value":"9e0950d8-99d1-4733-8ee7-8217ff8f7b94","description":"Can take in a single user's id to filter the result for all memberships for that user"},{"key":"page","value":"1","description":"The collection of records to be broken into \"pages\" of consistent sizes (specified by the items_per_page parameter). The default is 1 which is the first \"page\" set of records."},{"key":"items_per_page","value":"3","description":"Specifies the number of results to return per page (see page above). The default is 20, with a maximum of 100."}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n    \t\"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",    \t\n        \"user\": \"0045f164-5dd6-429c-8048-89b1fb11704d\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"administrator member\"\n        ],\n        \"created\": 1369650705\n    },\n    {\n    \t\"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",    \t\n        \"user\": \"1d348e60-f739-4692-82a1-defc7aaca6a9\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Instructor\"\n        ],\n        \"created\": 1369650710\n    },\n    {\n    \t\"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",\n        \"user\": \"89c619dd-bc30-48fe-afd2-4653b3d714b0\",\n        \"membership_status\": \"Active\",\n        \"roles\": [\n            \"Instructor\"\n        ],\n        \"created\": 1369650722\n    }\n]    "}],"_postman_id":"f49a74f9-a613-4a54-a606-91931dec2534"},{"name":"Create Membership","id":"84dfa76c-31b8-49f1-8320-dad1b373cb61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"","description":"<p><strong>Mandatory</strong></p>\n<p>The user identifier being added to the group.</p>\n","type":"text"},{"key":"group","value":"","description":"<p><strong>Mandatory</strong></p>\n<p>The group identifier that the user is being added to</p>\n","type":"text"},{"key":"roles","value":"","description":"<p><strong>Mandatory</strong></p>\n<p>Accepts a single role as a string.</p>\n","type":"text"},{"key":"status","value":"","description":"<p>If not passed in, will be set to <strong>Active</strong></p>\n","type":"text"}]},"url":"https://{{site-url}}/app/v1/membership.json","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","name":"Membership","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","membership.json"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"a299e8d1-583f-4adb-aa34-efb85abd6a1c","name":"Create Membership","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"0045f164-5dd6-429c-8048-89b1fb11704d","description":"**Mandatory**\n\nThe user identifier being added to the group.","type":"text"},{"key":"group","value":"9e0950d8-99d1-4733-8ee7-8217ff8f7b94","description":"**Mandatory**\n\nThe group identifier that the user is being added to","type":"text"},{"key":"roles","value":"Instructor","type":"text"},{"key":"status","value":"Active","description":"If not passed in, will be set to **Active**","type":"text"}]},"url":"https://{{site-url}}/api/membership.json"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n\t\"user\": \"0045f164-5dd6-429c-8048-89b1fb11704d\",\n    \"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",\n    \"membership_status\": \"Active\",\n    \"roles\": [\n        \"Instructor\"\n    ],\n    \"created\": 1401190604\n}"}],"_postman_id":"84dfa76c-31b8-49f1-8320-dad1b373cb61"},{"name":"Update Membership","id":"a39c54e7-397a-4158-9cfd-cef5dfafbbf1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"","description":"<p><strong>Mandatory</strong></p>\n","type":"text"},{"key":"group","value":"","description":"<p><strong>Mandatory</strong></p>\n","type":"text"},{"key":"roles","value":"","type":"text"},{"key":"status","value":"","type":"text"}]},"url":"https://{{site-url}}/app/v1/membership/update.json","description":"<p>One of either <strong>roles</strong> or <strong>status</strong> needs to be present, otherwise there is no update to be made.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","name":"Membership","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","membership","update.json"],"host":["{{site-url}}"],"query":[],"variable":[]}},"response":[{"id":"2c8cab12-4f6b-491e-9d7b-8761664175f0","name":"Update Membership Roles","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"0045f164-5dd6-429c-8048-89b1fb11704d","description":"**Mandatory**","type":"text"},{"key":"group","value":"9e0950d8-99d1-4733-8ee7-8217ff8f7b94","description":"**Mandatory**","type":"text"},{"key":"roles","value":"Learner","type":"text"}]},"url":"https://{{site-url}}/api/membership.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": \"0045f164-5dd6-429c-8048-89b1fb11704d\",\n    \"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",\n    \"membership_status\": \"Active\",\n    \"roles\": [\n        \"Learner\"\n    ],\n    \"created\": 1401190604\n}"},{"id":"7c962439-7c36-4761-b592-f0be1361b31e","name":"Block/Active Memberships","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"0045f164-5dd6-429c-8048-89b1fb11704d","description":"**Mandatory**","type":"text"},{"key":"group","value":"9e0950d8-99d1-4733-8ee7-8217ff8f7b94","description":"**Mandatory**","type":"text"},{"key":"status","value":"Blocked","type":"text"}]},"url":"https://{{site-url}}/api/membership.json"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n\t\"user\" : \"0045f164-5dd6-429c-8048-89b1fb11704d\",\n    \"group\": \"9e0950d8-99d1-4733-8ee7-8217ff8f7b94\",\n    \"membership_status\": \"Blocked\",\n    \"roles\": [\n            \"Instructor\"\n        ],\n    \"created\": 1401190604\n}"}],"_postman_id":"a39c54e7-397a-4158-9cfd-cef5dfafbbf1"},{"name":"Remove Membership","id":"c468d9c0-f17b-46d1-8cf9-058db953cd46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"https://{{site-url}}/app/v1/membership/cancel.json?user&group","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","name":"Membership","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","membership","cancel.json"],"host":["{{site-url}}"],"query":[{"description":{"content":"<p><strong>Mandatory</strong></p>\n<p>The identifier of the user to remove from the group</p>\n","type":"text/plain"},"key":"user","value":null},{"description":{"content":"<p><strong>Mandatory</strong></p>\n<p>The identifier of the group to be removed from</p>\n","type":"text/plain"},"key":"group","value":null}],"variable":[]}},"response":[{"id":"aebc7419-a244-439b-8a05-2ba9e746080f","name":"Remove Membership","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"user","value":"889f79b2-3415-4339-a0ae-969f3d25ee9f","description":"**Mandatory**\n\nThe identifier of the user to remove from the group","type":"text"},{"key":"group","value":"9e0950d8-99d1-4733-8ee7-8217ff8f7b94","description":"**Mandatory**\n\nThe identifier of the group to be removed from","type":"text"}]},"url":"https://{{site-url}}/api/membership.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":""}],"_postman_id":"c468d9c0-f17b-46d1-8cf9-058db953cd46"}],"id":"0c14b2b1-fe89-4fb6-9437-18aca3788083","description":"<p>Users can belong to one or many groups on the site, with different group-level roles and group-level statuses. The list of group-level roles are different from the site-level roles, and the group-level statuses are:</p>\n<ul>\n<li><strong>Active</strong>: The user is able to access the content and all actions inside the group</li>\n<li><strong>Blocked</strong>: The user is unable to access the group</li>\n<li><strong>Pending</strong>: The user has applied to be part of the group but the request has not been approved or rejected. <em>Note that this status cannot be set through the API, though can be present in the API response.</em></li>\n</ul>\n<p>The following fields are for retrieval only and are not available to be modified through the API:</p>\n<ul>\n<li><strong>created</strong>: The timestamp when the membership was created, ie, when the user was added to the group</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"8c3d75d1-e786-4201-b12f-ca632819be31","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9e75338e-ce76-40b8-ada5-edeefa2e57e6","type":"text/javascript","exec":[""]}}],"_postman_id":"0c14b2b1-fe89-4fb6-9437-18aca3788083"},{"name":"Dashboard","item":[{"name":"Get completion rule","event":[{"listen":"test","script":{"id":"8172d7c9-2201-4ff5-bcff-f2e70eb3f288","exec":["if(pm.response.code === 200){","","    pm.test(\"Check if body has all the mandatory keys\", function () {","        res = pm.response.json();","        pm.expect(res).to.have.all.keys('rules', 'min_score');","    });","","    pm.test(\"Check the type of each keys\", function () {","        res = pm.response.json();","        pm.expect(res.rules).to.be.a('array');","        pm.expect(res.min_score).to.be.a('number');","    });","","    pm.test(\"Check if valid rule is sent\", function () {","        res = pm.response.json();","        for(var i=0; i < res.rules; i++) { ","          pm.expect(res.rules[i]).to.contain.oneOf(['minimum_assessment_score','finish_all_materials','minimum_final_weighted_score']);","        }","    });","","       pm.test(\"Check if valid min score is sent\", function () {","        res = pm.response.json();","        pm.expect(res.min_score).to.be.within(0, 100);","    });","","}",""],"type":"text/javascript"}}],"id":"85ded011-7439-4e52-af14-5f6ec6d66fa0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/group/:groupID/completion-rule.json","description":"<p>To get the classroom completion rule.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","name":"Dashboard","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group",":groupID","completion-rule.json"],"host":["{{site-url}}"],"query":[],"variable":[{"description":{"content":"<p><strong>Mandatory</strong></p>\n<p>UUID of classroom</p>\n","type":"text/plain"},"type":"any","value":"350bb8f7-ab91-403f-a037-3541a8651988","key":"groupID"}]}},"response":[{"id":"e372d12d-5f4a-41d8-8ac0-0226c436241f","name":"200 - Get completion rule (Finish all materials)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID/completion-rule.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID","completion-rule.json"],"variable":[{"key":"groupID","value":"","description":"*Mandatory*\n\nUUID of classroom"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"rules\": [\n        \"finish_all_materials\"\n    ],\n    \"min_score\": 0\n}"}],"_postman_id":"85ded011-7439-4e52-af14-5f6ec6d66fa0"},{"name":"Get materials in dashboard","event":[{"listen":"test","script":{"id":"df57847b-5921-4a22-9ac4-fc211b3bf4de","exec":["if (pm.response.code === 200) {","  pm.test(\"Check if body has all the mandatory keys\", function () {","    res = pm.response.json();","    pm.expect(res).to.have.all.keys(\"tasks\", \"sections\");","  });","","  pm.test(\"Check the type response object\", function () {","    res = pm.response.json();","    pm.expect(res.tasks).to.be.a(\"array\");","    pm.expect(res.sections).to.be.a(\"array\");","  });","","  pm.test(\"Check if task has valid keys\", function () {","    res = pm.response.json();","","    //Checks tasks","    for (var i = 0; i < res.tasks.length; i++) {","      pm.expect(res.tasks[i]).to.have.all.keys(\"uuid\", \"text\", \"deadline\");","      pm.expect(res.tasks[i].uuid).to.be.a(\"string\");","      pm.expect(res.tasks[i].text).to.be.a(\"string\");","      pm.expect(res.tasks[i].deadline).to.be.a(\"number\");","    }","  });","","  pm.test(\"Check if section has valid keys\", function () {","    res = pm.response.json();","","    //Checks sections","    for (var i = 0; i < res.sections.length; i++) {","      pm.expect(res.sections[i]).to.have.all.keys(\"uuid\", \"title\", \"materials\");","      pm.expect(res.sections[i].uuid).to.be.a(\"string\");","      pm.expect(res.sections[i].title).to.be.a(\"string\");","      pm.expect(res.sections[i].materials).to.be.an(\"array\");","    }","  });","","  pm.test(\"Check if material has valid keys\", function () {","    res = pm.response.json();","","    //Checks sections","    for (var i = 0; i < res.sections.length; i++) {","      pm.expect(res.sections[i].materials).to.be.an(\"array\");","      //Checks materials","      for (var j = 0; j < res.sections[i].materials.length; j++) {","        pm.expect(res.sections[i].materials[j].type).to.be.oneOf([","          \"lesson\",","          \"quiz\",","          \"assignment\",","          \"offline\"","        ]);","","        //Lesson","        if (res.sections[i].materials[j].type === \"lesson\") {","          pm.expect(res.sections[i].materials[j]).to.have.all.keys(","            \"uuid\",","            \"title\",","            \"type\",","            \"assessment_uuid\",","            \"url\",","            \"details\"","          );","          pm.expect(res.sections[i].materials[j].uuid).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].type).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].title).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].url).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].details).to.be.an(\"object\");","          pm.expect(res.sections[i].materials[j].assessment_uuid).to.be.an(\"array\");","        }","","        //Quiz","        if (res.sections[i].materials[j].type === \"quiz\" || ","            res.sections[i].materials[j].type === \"assignment\" ||","            res.sections[i].materials[j].type === \"offline\") {","          pm.expect(res.sections[i].materials[j]).to.have.all.keys(","            \"uuid\",","            \"title\",","            \"type\",","            \"url\",","            \"details\"","          );","          pm.expect(res.sections[i].materials[j].uuid).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].type).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].title).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].url).to.be.a(\"string\");","          pm.expect(res.sections[i].materials[j].details).to.be.an(\"object\");","          pm.expect(res.sections[i].materials[j].details.max_score).to.be.a(\"number\");","        }","      }","    }","  });","}",""],"type":"text/javascript"}}],"id":"4ec88b00-85d7-49f6-880e-6bbb0064f5ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/group/:groupID/completion-materials.json","description":"<p>Retrieves the materials which are part of the classroom dashboard. This contains \nlessons, assessments as well as task posts. </p>\n<p>Overall schema for the response looks like this. </p>\n<ul>\n<li>tasks <ul>\n<li>Array of all task posts created in newsfeed.</li>\n</ul>\n</li>\n<li>sections <ul>\n<li>Array of all sections in materials tab. Under each section, we have all our materials (lessons, assessments, student projects) under materials.</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"tasks\": [\n\n  ],\n  \"sections\": [\n    {\n      \"uuid\": \"\",\n      \"title\": \"Learning Resources\",\n      \"materials\": [\n      \n      ]\n    }\n  ]\n}\n</code></pre>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","name":"Dashboard","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group",":groupID","completion-materials.json"],"host":["{{site-url}}"],"query":[],"variable":[{"description":{"content":"<p><strong>Mandatory</strong></p>\n<p>UUID of classroom</p>\n","type":"text/plain"},"type":"any","value":"a8c04173-9b41-4428-9d91-ee631a0d091a","key":"groupID"}]}},"response":[{"id":"9261fc3f-3021-4ca1-aa1d-6a7a42384a28","name":"Get materials in dashboard","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID/completion-materials.json","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID","completion-materials.json"],"variable":[{"key":"groupID","value":"","description":"**Mandatory**\n\nUUID of classroom"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"tasks\": [\n        {\n            \"bundle\": \"thought\",\n            \"tid\": 392,\n            \"text\": \"Task post1 \",\n            \"type\": \"homework\",\n            \"deadline\": 1642413600\n        },\n        {\n            \"bundle\": \"thought\",\n            \"tid\": 394,\n            \"text\": \"Older Task post \",\n            \"type\": \"homework\",\n            \"deadline\": 1642586400\n        }\n    ],\n    \"sections\": [\n        {\n            \"uuid\": \"04ea316e-d6b9-43f2-a7cb-0a48fa3020bb\",\n            \"title\": \"Learning Resources\",\n            \"materials\": [\n                {\n                    \"title\": \"L1 (Completed)\",\n                    \"type\": \"lesson\",\n                    \"uuid\": \"ea0fc4d6-ec8a-4b28-a481-03d1ebad8572\",\n                    \"assessment_uuid\": [],\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/lesson/4462\",\n                    \"details\": {}\n                },\n                {\n                    \"title\": \"L1 (Inprogress)\",\n                    \"type\": \"lesson\",\n                    \"uuid\": \"b75bd8ef-0b86-4f81-91c4-e2a1f988bbde\",\n                    \"assessment_uuid\": [],\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/lesson/4481\",\n                    \"details\": {}\n                },\n                {\n                    \"title\": \"Lesson deadline in past (Incomplete)\",\n                    \"type\": \"lesson\",\n                    \"uuid\": \"bee369bd-8dfb-41f0-9472-ad6f04dcf384\",\n                    \"assessment_uuid\": [],\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/lesson/4475\",\n                    \"details\": {}\n                },\n                {\n                    \"title\": \"Lesson deadline in past (Completed late)\",\n                    \"type\": \"lesson\",\n                    \"uuid\": \"1dc1b2a0-131d-4bfb-91b7-01d06ec913ad\",\n                    \"assessment_uuid\": [],\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/lesson/4477\",\n                    \"details\": {}\n                },\n                {\n                    \"title\": \"Lesson (shared with st1 alone)\",\n                    \"type\": \"lesson\",\n                    \"uuid\": \"ed987467-1617-4ae1-8da8-be95aae42de1\",\n                    \"assessment_uuid\": [],\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/lesson/4479\",\n                    \"details\": {}\n                },\n                {\n                    \"title\": \"Online Quiz\",\n                    \"uuid\": \"502e12c0-ae7b-4f11-8ff3-f540aa5ae9e6\",\n                    \"type\": \"quiz\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/quiz/709\",\n                    \"details\": {\n                        \"max_score\": 1\n                    }\n                },\n                {\n                    \"title\": \"Offline Task\",\n                    \"uuid\": \"9530eae4-cb9b-44c1-ad5f-26d60bd5d06f\",\n                    \"type\": \"offline\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/offline-test/710\",\n                    \"details\": {\n                        \"max_score\": 10\n                    }\n                },\n                {\n                    \"title\": \"Assignment in Lesson\",\n                    \"uuid\": \"e8816161-39a9-468a-9a98-2d41428b2e9f\",\n                    \"type\": \"assignment\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/assignment/711\",\n                    \"details\": {\n                        \"max_score\": 1\n                    }\n                },\n                {\n                    \"title\": \"Lesson with assignments\",\n                    \"type\": \"lesson\",\n                    \"uuid\": \"c411e043-a33b-4936-aa35-f83bfbb64ea6\",\n                    \"assessment_uuid\": [\n                        \"e8816161-39a9-468a-9a98-2d41428b2e9f\"\n                    ],\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/lesson/4471\",\n                    \"details\": {}\n                }\n            ]\n        },\n        {\n            \"uuid\": \"e32eff7a-37cb-4a4b-9c38-facf45ac49a1\",\n            \"title\": \"Assignment\",\n            \"materials\": [\n                {\n                    \"title\": \"Assignment\",\n                    \"uuid\": \"76d94a05-e90e-4bd9-83ed-107f70b60780\",\n                    \"type\": \"assignment\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/assignment/708\",\n                    \"details\": {\n                        \"max_score\": 1\n                    }\n                },\n                {\n                    \"title\": \"Assignment (Completed late)\",\n                    \"uuid\": \"b56f07c5-9fdb-4df2-b445-88f2047301ec\",\n                    \"type\": \"assignment\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/assignment/712\",\n                    \"details\": {\n                        \"max_score\": 1\n                    }\n                },\n                {\n                    \"title\": \"Assignment (Incomplete)\",\n                    \"uuid\": \"cdebc53b-2523-444b-a562-ca73f050fdd5\",\n                    \"type\": \"assignment\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/assignment/713\",\n                    \"details\": {\n                        \"max_score\": 1\n                    }\n                },\n                {\n                    \"title\": \"Assignment (In progress)\",\n                    \"uuid\": \"894f73e8-026b-4a86-a2fc-9479707f413d\",\n                    \"type\": \"assignment\",\n                    \"url\": \"https://teamie1.ll/dash/#/classroom/4461/sections/assignment/714\",\n                    \"details\": {\n                        \"max_score\": 1\n                    }\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"4ec88b00-85d7-49f6-880e-6bbb0064f5ca"},{"name":"Get dashboard status","event":[{"listen":"test","script":{"id":"3cd9d32b-c188-4b0a-bcb0-6e209f5f23ba","exec":["if (pm.response.code === 200) {","  var formatValue = pm.request.url.query.toObject().format;","  if (formatValue == \"count\") {","    checkCountResponse();","  } else if (formatValue == \"list\") {","    checkListResponse();","  }","}","","function checkCountResponse() {","  res = pm.response.json();","  pm.test(\"Check if count response has valid keys\", function () {","    pm.expect(res).to.be.an(\"object\");","    pm.expect(res.total_progress_data_count).to.be.a(\"number\");","  });","}","","function checkListResponse() {","  res = pm.response.json();","","  pm.test(\"Check if response has valid keys\", function () {","    pm.expect(res).to.be.a(\"array\");","    for (var i = 0; i < res.length; i++) {","      pm.expect(res[i]).to.have.all.keys(","        \"user\",","        \"membership\",","        \"progress\",","        \"stats\",","        \"completion\"","      );","    }","  });","","  pm.test(\"Check if user object has valid keys\", function () {","    res = pm.response.json();","","    for (var i = 0; i < res.length; i++) {","      pm.expect(res[i].user).to.be.an(\"object\");","      pm.expect(res[i].user).to.have.all.keys(","        \"id\",","        \"name\",","        \"mail\",","        \"timezone\",","        \"status\",","        \"created\",","        \"last_accessed\",","        \"displayname\",","        \"picture\",","        \"roles\",","        \"fields\"","      );","    }","  });","","  pm.test(\"Check if membership object has valid keys\", function () {","    res = pm.response.json();","","    //","    for (var i = 0; i < res.length; i++) {","      pm.expect(res[i].membership).to.be.an(\"object\");","      pm.expect(res[i].membership).to.have.all.keys(\"status\", \"created\");","    }","  });","","  pm.test(\"Check if progress object has valid keys\", function () {","    res = pm.response.json();","","    //","    for (var i = 0; i < res.length; i++) {","      pm.expect(res[i].progress).to.be.an(\"object\");","      pm.expect(res[i].progress).to.have.all.keys(\"lesson\", \"quiz\", \"tasks\");","    }","  });","","  pm.test(\"Check if stats object has valid keys\", function () {","    res = pm.response.json();","","    //","    for (var i = 0; i < res.length; i++) {","      pm.expect(res[i].stats).to.be.an(\"object\");","      pm.expect(res[i].stats).to.have.all.keys(","        \"posts\",","        \"comments\",","        \"replies\",","        \"complete_lessons\",","        \"complete_assessments\"","      );","    }","  });","","  pm.test(\"Check if completion object has valid keys\", function () {","    res = pm.response.json();","","    //","    for (var i = 0; i < res.length; i++) {","      pm.expect(res[i].completion).to.be.an(\"object\");","      pm.expect(res[i].completion).to.have.all.keys(","        \"status\",","        \"created\",","        \"updated\"","      );","    }","  });","}",""],"type":"text/javascript"}}],"id":"bb974211-cba3-4abd-96d1-3b994171516a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{site-url}}/app/v1/group/:groupID/completion-status.json?format=list&page=2&items_per_page=1","description":"<p>Retrieves the dashboard status of all members in the classroom </p>\n<p>This is the overall schema of the response sent. An array of progress objects for \nall users are sent. </p>\n<ul>\n<li>user</li>\n<li>membership</li>\n<li>progress</li>\n<li>stats</li>\n<li>completion</li>\n<li>credit</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[\n  {\n    \"user\": {},\n    \"membership\": {},\n    \"progress\": {\n      \"lesson\": {\n   \n      },\n      \"quiz\": {\n      },\n      \"tasks\": {\n      }\n    },\n    \"stats\": {\n    },\n    \"completion\": {\n\n    },\n    \"credit\": {\n    }\n  }\n]\n</code></pre><p><em>Different statuses of materials</em> </p>\n<ul>\n<li>NOT_STARTED</li>\n<li>COMPLETED</li>\n<li>IN_PROGRESS</li>\n<li>NOT_SUCCESSFULLY_COMPLETED</li>\n<li>INCOMPLETE</li>\n<li>COMPLETED_LATE</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":true,"source":{"_postman_id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","name":"Dashboard","type":"folder"}},"urlObject":{"protocol":"https","path":["app","v1","group",":groupID","completion-status.json"],"host":["{{site-url}}"],"query":[{"description":{"content":"<p><strong>Mandatory</strong> </p>\n<p>Accepted values </p>\n<ul>\n<li>count  <ul>\n<li>This will return the number of active learners in the classroom dashboard</li>\n</ul>\n</li>\n<li>list</li>\n</ul>\n<ul>\n<li>This will return the list of all learners and their status of all materials in the group</li>\n</ul>\n","type":"text/plain"},"key":"format","value":"list"},{"description":{"content":"<p><strong>Optional</strong> </p>\n<p>Number indicating the paginated set of items to be returned</p>\n","type":"text/plain"},"key":"page","value":"2"},{"description":{"content":"<p><strong>Optional</strong> </p>\n<p>Maximum number of items in one page</p>\n","type":"text/plain"},"key":"items_per_page","value":"1"}],"variable":[{"description":{"content":"<p><strong>Mandatory</strong></p>\n<p>UUID of classroom</p>\n","type":"text/plain"},"type":"any","value":"a8c04173-9b41-4428-9d91-ee631a0d091a","key":"groupID"}]}},"response":[{"id":"e622da5f-0dab-4a69-8a70-aa950bfa0f23","name":"Get dashboard status (count)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID/completion-status.json?format=count&page&items_per_page","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID","completion-status.json"],"query":[{"key":"format","value":"count","description":"**Optional** \n\nAccepted values \n* count  \n  - This will return the number of active learners in the classroom dashboard\n* list \n - This will return the list of all learners and their status of all materials in the group\n\n"},{"key":"page","value":null,"description":"**Optional** \n\nNumber indicating the paginated set of items to be returned\n"},{"key":"items_per_page","value":null,"description":"**Optional** \n\nMaximum number of items in one page"}],"variable":[{"key":"groupID","value":"","description":"**Mandatory**\n\nUUID of classroom"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"total_progress_data_count\": 7\n}"},{"id":"7c264e80-aee4-471a-adce-cf65b1608482","name":"Get dashboard status (list)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://{{site-url}}/app/v1/group/:groupID/completion-status.json?format=list&page=1&items_per_page=1","protocol":"https","host":["{{site-url}}"],"path":["app","v1","group",":groupID","completion-status.json"],"query":[{"key":"format","value":"list","description":"**Mandatory** \n\nAccepted values \n* count  \n  - This will return the number of active learners in the classroom dashboard\n* list \n - This will return the list of all learners and their status of all materials in the group\n\n"},{"key":"page","value":"1","description":"**Optional** \n\nNumber indicating the paginated set of items to be returned\n"},{"key":"items_per_page","value":"1","description":"**Optional** \n\nMaximum number of items in one page"}],"variable":[{"key":"groupID","value":"","description":"**Mandatory**\n\nUUID of classroom"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n        \"user\": {\n            \"id\": \"e1449fe9-7f75-4a08-b03f-b62bb852a093\",\n            \"name\": \"isb_student\",\n            \"mail\": \"isb_student-test@example.com\",\n            \"timezone\": \"Asia/Singapore\",\n            \"status\": \"Active\",\n            \"created\": 1481275667,\n            \"last_accessed\": 1642583693,\n            \"displayname\": \"IT Student1\",\n            \"picture\": \"https://dev-subu.teamieapp.com/sites/dev-subu.teamieapp.com/files/image-1553174047553.png\",\n            \"roles\": [\n                \"student\"\n            ],\n            \"fields\": []\n        },\n        \"membership\": {\n            \"status\": \"1\",\n            \"created\": \"1642220090\"\n        },\n        \"progress\": {\n            \"lesson\": {\n                \"ea0fc4d6-ec8a-4b28-a481-03d1ebad8572\": {\n                    \"status\": 1,\n                    \"first_accessed\": 1642481448,\n                    \"last_accessed\": 1642497997\n                },\n                \"c411e043-a33b-4936-aa35-f83bfbb64ea6\": {\n                    \"status\": 0\n                },\n                \"bee369bd-8dfb-41f0-9472-ad6f04dcf384\": {\n                    \"status\": 4,\n                    \"first_accessed\": 0,\n                    \"last_accessed\": 0\n                },\n                \"1dc1b2a0-131d-4bfb-91b7-01d06ec913ad\": {\n                    \"status\": 5,\n                    \"first_accessed\": 1642483427,\n                    \"last_accessed\": 1642483427\n                },\n                \"b75bd8ef-0b86-4f81-91c4-e2a1f988bbde\": {\n                    \"status\": 2,\n                    \"first_accessed\": 1642498455,\n                    \"last_accessed\": 1642498455\n                }\n            },\n            \"quiz\": {\n                \"894f73e8-026b-4a86-a2fc-9479707f413d\": {\n                    \"first_accessed\": 1642564053,\n                    \"status\": 2\n                },\n                \"cdebc53b-2523-444b-a562-ca73f050fdd5\": {\n                    \"status\": 4\n                },\n                \"b56f07c5-9fdb-4df2-b445-88f2047301ec\": {\n                    \"first_accessed\": 1642563904,\n                    \"last_accessed\": 1642564033,\n                    \"score\": -1,\n                    \"status\": 5\n                },\n                \"e8816161-39a9-468a-9a98-2d41428b2e9f\": {\n                    \"status\": 0\n                },\n                \"502e12c0-ae7b-4f11-8ff3-f540aa5ae9e6\": {\n                    \"status\": 0\n                },\n                \"76d94a05-e90e-4bd9-83ed-107f70b60780\": {\n                    \"first_accessed\": 1642504731,\n                    \"last_accessed\": 1642504764,\n                    \"score\": 0,\n                    \"status\": 1\n                },\n                \"9530eae4-cb9b-44c1-ad5f-26d60bd5d06f\": {\n                    \"first_accessed\": 1642241431,\n                    \"last_accessed\": 1642241431,\n                    \"status\": 0\n                }\n            },\n            \"tasks\": {\n                \"d0819fb1-894c-4c67-83f3-15a800d69042\": {\n                    \"status\": 1,\n                    \"timestamp\": 1642324793\n                },\n                \"a364d0e3-5e77-44cc-8872-43744f073eff\": {\n                    \"status\": 1,\n                    \"timestamp\": 1642412034\n                }\n            }\n        },\n        \"stats\": {\n            \"posts\": 0,\n            \"comments\": 0,\n            \"replies\": 0,\n            \"complete_lessons\": 2,\n            \"complete_assessments\": 2\n        },\n        \"completion\": {\n            \"status\": \"2\",\n            \"created\": 1642481448,\n            \"updated\": 1642564053\n        },\n        \"credit\": {\n            \"awarded_credit\": null,\n            \"group_credit\": null\n        }\n    }\n]"}],"_postman_id":"bb974211-cba3-4abd-96d1-3b994171516a"}],"id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"ab94ca9b-5f68-44c7-83de-6136451784ab","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b3c0cb00-8e88-4c19-b0cb-675d25c7751a","type":"text/javascript","exec":[""]}}],"_postman_id":"85513470-f2dd-4f21-ae53-f4eb5933b83b","description":""}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access-token}}"}]}},"event":[{"listen":"prerequest","script":{"id":"604998cf-02ba-4436-8fe7-7e7a1a953532","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"45a1f5cb-edb0-4482-8ce7-f6d988d95110","type":"text/javascript","exec":[""]}}]}