{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/comments/55381237","id":55381237,"diff_hunk":"@@ -1,9 +1,64 @@\n-Securely creating survey respondent sessions\n---------------------------------------------\n+Respondent survey session schema\n+--------------------------------\n \n+When a respondent is ready to take a survey hosted on the eq system, a set of details\n+need to be passed to eq to setup the survey correctly. This data is wrapped inside a json web\n+token which is attached to the end of a url, digitally signed and authorised by a respondent\n+management system. This creates a clean interface for any respondent management system\n+to integrate with the eq system.\n \n-JWT\n+Schema definition\n+  user_id\n+    The id assigned by the respondent management system\n+  ru_ref\n+    The responding unit reference id.\n+  eq_id\n+    The eQ questionnaire instance id.\n+  collection_exercise_sid\n+    A reference number used to represent the collection exercise inside the ONS\n+  period_id\n+    A numerical reference to either a month or quarter time period\n+  period_str\n+    A display name for the period referenced above\n+  ref_p_start_date\n+    A start date for the relevant reference period\n+  ref_p_end_date\n+    An end date for the relevant reference period\n+  form_type\n+    The particular form_type for a responding unit\n \n-Keys\n+* All dates are represented in ISO_8607 and are assumed to be UTC unless a timezone element is supplied.\n \n-Session timeouts\n+\n+\n+An example JSON claim\n+=====================\n+\n+.. code-block:: javascript\n+\n+  {\n+    \"user_id\": \"64389274239\",","path":"docs/rm-eq.rst","position":45,"original_position":45,"commit_id":"e1af645e2898702c3d6cc40ce653d4367ad6f7f2","original_commit_id":"e1af645e2898702c3d6cc40ce653d4367ad6f7f2","user":{"login":"collisdigital","id":14041600,"avatar_url":"https://avatars.githubusercontent.com/u/14041600?v=3","gravatar_id":"","url":"https://api.github.com/users/collisdigital","html_url":"https://github.com/collisdigital","followers_url":"https://api.github.com/users/collisdigital/followers","following_url":"https://api.github.com/users/collisdigital/following{/other_user}","gists_url":"https://api.github.com/users/collisdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/collisdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collisdigital/subscriptions","organizations_url":"https://api.github.com/users/collisdigital/orgs","repos_url":"https://api.github.com/users/collisdigital/repos","events_url":"https://api.github.com/users/collisdigital/events{/privacy}","received_events_url":"https://api.github.com/users/collisdigital/received_events","type":"User","site_admin":false},"body":"Add type/version/origin as per sdx?","created_at":"2016-03-08T16:07:58Z","updated_at":"2016-03-08T16:07:58Z","html_url":"https://github.com/ONSdigital/ons-schema-definitions/pull/3#discussion_r55381237","pull_request_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/comments/55381237"},"html":{"href":"https://github.com/ONSdigital/ons-schema-definitions/pull/3#discussion_r55381237"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3","id":62089323,"html_url":"https://github.com/ONSdigital/ons-schema-definitions/pull/3","diff_url":"https://github.com/ONSdigital/ons-schema-definitions/pull/3.diff","patch_url":"https://github.com/ONSdigital/ons-schema-definitions/pull/3.patch","issue_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/3","number":3,"state":"open","locked":false,"title":"Add respondent management session schema","user":{"login":"dhilton","id":47292,"avatar_url":"https://avatars.githubusercontent.com/u/47292?v=3","gravatar_id":"","url":"https://api.github.com/users/dhilton","html_url":"https://github.com/dhilton","followers_url":"https://api.github.com/users/dhilton/followers","following_url":"https://api.github.com/users/dhilton/following{/other_user}","gists_url":"https://api.github.com/users/dhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/dhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhilton/subscriptions","organizations_url":"https://api.github.com/users/dhilton/orgs","repos_url":"https://api.github.com/users/dhilton/repos","events_url":"https://api.github.com/users/dhilton/events{/privacy}","received_events_url":"https://api.github.com/users/dhilton/received_events","type":"User","site_admin":false},"body":"__What__\r\nThis PR adds the claim definition for a respondent management system creating a\r\nnew session on eq for a user to coimplete a survey.\r\n\r\n__How to review__\r\n\r\n1. Look at the documentation added in this PR\r\n2. Ensure it matches the understanding you have of the process\r\n\r\n__Who can review__\r\n\r\nAnyone but @dhilton\r\n","created_at":"2016-03-08T15:45:03Z","updated_at":"2016-03-08T16:07:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a7de8f0ff2b0b1c72530f77ea593ed3df714861","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/3/comments","statuses_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/statuses/e1af645e2898702c3d6cc40ce653d4367ad6f7f2","head":{"label":"ONSdigital:eq-rm-jwt-integration","ref":"eq-rm-jwt-integration","sha":"e1af645e2898702c3d6cc40ce653d4367ad6f7f2","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars.githubusercontent.com/u/6865137?v=3","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":51750283,"name":"ons-schema-definitions","full_name":"ONSdigital/ons-schema-definitions","owner":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars.githubusercontent.com/u/6865137?v=3","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/ons-schema-definitions","description":"Schema definitions for the ONS system ecosystem","fork":false,"url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions","forks_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/forks","keys_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/teams","hooks_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/events","assignees_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/tags","blobs_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/subscription","commits_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/merges","archive_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/downloads","issues_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/deployments","created_at":"2016-02-15T11:10:56Z","updated_at":"2016-03-08T12:53:28Z","pushed_at":"2016-03-08T15:45:03Z","git_url":"git://github.com/ONSdigital/ons-schema-definitions.git","ssh_url":"git@github.com:ONSdigital/ons-schema-definitions.git","clone_url":"https://github.com/ONSdigital/ons-schema-definitions.git","svn_url":"https://github.com/ONSdigital/ons-schema-definitions","homepage":"http://blog.ons.digital/","size":20,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"db422b35d451df9b8cc1201f875698324eb27db0","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars.githubusercontent.com/u/6865137?v=3","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":51750283,"name":"ons-schema-definitions","full_name":"ONSdigital/ons-schema-definitions","owner":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars.githubusercontent.com/u/6865137?v=3","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/ons-schema-definitions","description":"Schema definitions for the ONS system ecosystem","fork":false,"url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions","forks_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/forks","keys_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/teams","hooks_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/events","assignees_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/tags","blobs_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/subscription","commits_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/merges","archive_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/downloads","issues_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/deployments","created_at":"2016-02-15T11:10:56Z","updated_at":"2016-03-08T12:53:28Z","pushed_at":"2016-03-08T15:45:03Z","git_url":"git://github.com/ONSdigital/ons-schema-definitions.git","ssh_url":"git@github.com:ONSdigital/ons-schema-definitions.git","clone_url":"https://github.com/ONSdigital/ons-schema-definitions.git","svn_url":"https://github.com/ONSdigital/ons-schema-definitions","homepage":"http://blog.ons.digital/","size":20,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3"},"html":{"href":"https://github.com/ONSdigital/ons-schema-definitions/pull/3"},"issue":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/3"},"comments":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/ons-schema-definitions/statuses/e1af645e2898702c3d6cc40ce653d4367ad6f7f2"}}}}