{"action":"created","comment":{"url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/comments/196529404","pull_request_review_id":130092039,"id":196529404,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjUyOTQwNA==","diff_hunk":"@@ -0,0 +1,128 @@\n+---\n+layout: default\n+title: \"Relative Time\"\n+version: 1.0\n+---\n+\n+# <a href=\"#rel-time-introduction\" id=\"rel-time-introduction\" class=\"headerlink\"></a> Relative Time Introduction\n+\n+Some APIs need to provide the ability to query data by using a relative datetime range. Some use cases are when returning analytics or report data. \n+\n+# <a href=\"#rel-time-conformance\" id=\"rel-time-conformance\" class=\"headerlink\"></a> Conformance\n+\n+The key words may, must, must not, recommended, should, and should not are to be interpreted as described in [[RFC2119](http://tools.ietf.org/html/rfc2119)].\n+\n+# <a href=\"#rel-time-conventions\" id=\"rel-time-conventions\" class=\"headerlink\"></a> Conventions\n+\n+## <a href=\"#rel-time-conventions-uri\" id=\"rel-time-conventions-uri\" class=\"headerlink\"></a> URI\n+\n+Anywhere a **URI** is specified, it **MUST** follow the rules defined in the [Hyperion]({{site.url}}/versions/{{site.latest_version}}) specification.\n+\n+## <a href=\"#rel-time-conventions-query-params\" id=\"rel-time-conventions-query-params\" class=\"headerlink\"></a> Query Params\n+\n+APIs **MAY** have the following query string parameters:\n+\n+* `start` accepts a string value with the start date as datetime format.\n+\n+* `end` accepts a string value with the end date as datetime format.\n+\n+If _no_ query parameters are specified, the API **MUST** return a response with a default value for both fields.\n+\n+## <a href=\"#rel-time-reflected-date\" id=\"rel-time-reflected-date\" class=\"headerlink\"></a> Reflected date\n+\n+To ensure that the client's request was properly executed, APIs **MUST** return the `start` and `end` datetimes as reflected values in the response body.\n+\n+APIs **MUST** return the datetime value following [ISO 8601](https://www.w3.org/TR/NOTE-datetime) standard as defined in the [Hyperion]({{site.url}}/versions/{{site.latest_version}}) specification.\n+\n+> Note: The actual properties to store those values can be API specific.\n+\n+Example of the `start` and `end` time range _reflected_ in the response body.\n+\n+`https://api.vdms.io/analytics/v1/time-series?start=now-1M`\n+\n+```json\n+{\n+    \"@id\": \"/analytics/v1/time-series\",\n+    \"@type\": \"TimeSeries\",\n+    \"start\": \"2018-05-18T21:43:25Z\",\n+    \"end\": \"2018-06-18T21:43:25Z\",\n+    ...\n+}\n+```\n+\n+# <a href=\"#rel-time-datetime\" id=\"rel-time-datetime\" class=\"headerlink\"></a> Datetime Format\n+\n+Accepted values for `start` and `end` query string parameters **MUST** use the `now` keyword with optional modifiers.","path":"versions/1.0/relative-time/index.md","position":55,"original_position":55,"commit_id":"bd07664eaed2f528c8408748b071685e2e51d86e","original_commit_id":"bd07664eaed2f528c8408748b071685e2e51d86e","user":{"login":"teehill","id":1118095,"node_id":"MDQ6VXNlcjExMTgwOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1118095?v=4","gravatar_id":"","url":"https://api.github.com/users/teehill","html_url":"https://github.com/teehill","followers_url":"https://api.github.com/users/teehill/followers","following_url":"https://api.github.com/users/teehill/following{/other_user}","gists_url":"https://api.github.com/users/teehill/gists{/gist_id}","starred_url":"https://api.github.com/users/teehill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teehill/subscriptions","organizations_url":"https://api.github.com/users/teehill/orgs","repos_url":"https://api.github.com/users/teehill/repos","events_url":"https://api.github.com/users/teehill/events{/privacy}","received_events_url":"https://api.github.com/users/teehill/received_events","type":"User","site_admin":false},"body":"sorry I must've tuned out when we dropped the ability to query using explicit datetimes. I'm not advocating for a mixture of both in the same param, but seems like having the ability to use either/or would make sense.\r\n\r\ne.g. start=2018-05-18T21:43:25Z&end=now","created_at":"2018-06-19T18:18:29Z","updated_at":"2018-06-19T18:19:04Z","html_url":"https://github.com/VerizonDigital/hyperion/pull/8#discussion_r196529404","pull_request_url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/comments/196529404"},"html":{"href":"https://github.com/VerizonDigital/hyperion/pull/8#discussion_r196529404"},"pull_request":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8","id":195692999,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NjkyOTk5","html_url":"https://github.com/VerizonDigital/hyperion/pull/8","diff_url":"https://github.com/VerizonDigital/hyperion/pull/8.diff","patch_url":"https://github.com/VerizonDigital/hyperion/pull/8.patch","issue_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues/8","number":8,"state":"open","locked":false,"title":"Relative time date handling ","user":{"login":"ardiesaeidi","id":47733,"node_id":"MDQ6VXNlcjQ3NzMz","avatar_url":"https://avatars3.githubusercontent.com/u/47733?v=4","gravatar_id":"","url":"https://api.github.com/users/ardiesaeidi","html_url":"https://github.com/ardiesaeidi","followers_url":"https://api.github.com/users/ardiesaeidi/followers","following_url":"https://api.github.com/users/ardiesaeidi/following{/other_user}","gists_url":"https://api.github.com/users/ardiesaeidi/gists{/gist_id}","starred_url":"https://api.github.com/users/ardiesaeidi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ardiesaeidi/subscriptions","organizations_url":"https://api.github.com/users/ardiesaeidi/orgs","repos_url":"https://api.github.com/users/ardiesaeidi/repos","events_url":"https://api.github.com/users/ardiesaeidi/events{/privacy}","received_events_url":"https://api.github.com/users/ardiesaeidi/received_events","type":"User","site_admin":false},"body":"Introduces new specifications on how to implement relative time handling in APIs\r\n- new query params specific to relative time \r\n- date format conventions","created_at":"2018-06-19T01:57:59Z","updated_at":"2018-06-19T18:19:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82fadf0f8da102ce7426d22ab4ba91add9fb8658","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8/commits","review_comments_url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8/comments","review_comment_url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues/8/comments","statuses_url":"https://api.github.com/repos/VerizonDigital/hyperion/statuses/bd07664eaed2f528c8408748b071685e2e51d86e","head":{"label":"VerizonDigital:rel-time","ref":"rel-time","sha":"bd07664eaed2f528c8408748b071685e2e51d86e","user":{"login":"VerizonDigital","id":12649886,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQ5ODg2","avatar_url":"https://avatars0.githubusercontent.com/u/12649886?v=4","gravatar_id":"","url":"https://api.github.com/users/VerizonDigital","html_url":"https://github.com/VerizonDigital","followers_url":"https://api.github.com/users/VerizonDigital/followers","following_url":"https://api.github.com/users/VerizonDigital/following{/other_user}","gists_url":"https://api.github.com/users/VerizonDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/VerizonDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VerizonDigital/subscriptions","organizations_url":"https://api.github.com/users/VerizonDigital/orgs","repos_url":"https://api.github.com/users/VerizonDigital/repos","events_url":"https://api.github.com/users/VerizonDigital/events{/privacy}","received_events_url":"https://api.github.com/users/VerizonDigital/received_events","type":"Organization","site_admin":false},"repo":{"id":114041021,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQwNDEwMjE=","name":"hyperion","full_name":"VerizonDigital/hyperion","owner":{"login":"VerizonDigital","id":12649886,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQ5ODg2","avatar_url":"https://avatars0.githubusercontent.com/u/12649886?v=4","gravatar_id":"","url":"https://api.github.com/users/VerizonDigital","html_url":"https://github.com/VerizonDigital","followers_url":"https://api.github.com/users/VerizonDigital/followers","following_url":"https://api.github.com/users/VerizonDigital/following{/other_user}","gists_url":"https://api.github.com/users/VerizonDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/VerizonDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VerizonDigital/subscriptions","organizations_url":"https://api.github.com/users/VerizonDigital/orgs","repos_url":"https://api.github.com/users/VerizonDigital/repos","events_url":"https://api.github.com/users/VerizonDigital/events{/privacy}","received_events_url":"https://api.github.com/users/VerizonDigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VerizonDigital/hyperion","description":"Lightweight JSON specification","fork":false,"url":"https://api.github.com/repos/VerizonDigital/hyperion","forks_url":"https://api.github.com/repos/VerizonDigital/hyperion/forks","keys_url":"https://api.github.com/repos/VerizonDigital/hyperion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VerizonDigital/hyperion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VerizonDigital/hyperion/teams","hooks_url":"https://api.github.com/repos/VerizonDigital/hyperion/hooks","issue_events_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues/events{/number}","events_url":"https://api.github.com/repos/VerizonDigital/hyperion/events","assignees_url":"https://api.github.com/repos/VerizonDigital/hyperion/assignees{/user}","branches_url":"https://api.github.com/repos/VerizonDigital/hyperion/branches{/branch}","tags_url":"https://api.github.com/repos/VerizonDigital/hyperion/tags","blobs_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/refs{/sha}","trees_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VerizonDigital/hyperion/statuses/{sha}","languages_url":"https://api.github.com/repos/VerizonDigital/hyperion/languages","stargazers_url":"https://api.github.com/repos/VerizonDigital/hyperion/stargazers","contributors_url":"https://api.github.com/repos/VerizonDigital/hyperion/contributors","subscribers_url":"https://api.github.com/repos/VerizonDigital/hyperion/subscribers","subscription_url":"https://api.github.com/repos/VerizonDigital/hyperion/subscription","commits_url":"https://api.github.com/repos/VerizonDigital/hyperion/commits{/sha}","git_commits_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/commits{/sha}","comments_url":"https://api.github.com/repos/VerizonDigital/hyperion/comments{/number}","issue_comment_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues/comments{/number}","contents_url":"https://api.github.com/repos/VerizonDigital/hyperion/contents/{+path}","compare_url":"https://api.github.com/repos/VerizonDigital/hyperion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VerizonDigital/hyperion/merges","archive_url":"https://api.github.com/repos/VerizonDigital/hyperion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VerizonDigital/hyperion/downloads","issues_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues{/number}","pulls_url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls{/number}","milestones_url":"https://api.github.com/repos/VerizonDigital/hyperion/milestones{/number}","notifications_url":"https://api.github.com/repos/VerizonDigital/hyperion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VerizonDigital/hyperion/labels{/name}","releases_url":"https://api.github.com/repos/VerizonDigital/hyperion/releases{/id}","deployments_url":"https://api.github.com/repos/VerizonDigital/hyperion/deployments","created_at":"2017-12-12T21:29:36Z","updated_at":"2018-06-01T19:52:56Z","pushed_at":"2018-06-19T01:58:00Z","git_url":"git://github.com/VerizonDigital/hyperion.git","ssh_url":"git@github.com:VerizonDigital/hyperion.git","clone_url":"https://github.com/VerizonDigital/hyperion.git","svn_url":"https://github.com/VerizonDigital/hyperion","homepage":null,"size":32,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":2,"open_issues":2,"watchers":2,"default_branch":"gh-pages"}},"base":{"label":"VerizonDigital:gh-pages","ref":"gh-pages","sha":"fdfad6a259e3c2a3bb03f14d54f77336a02d2e5b","user":{"login":"VerizonDigital","id":12649886,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQ5ODg2","avatar_url":"https://avatars0.githubusercontent.com/u/12649886?v=4","gravatar_id":"","url":"https://api.github.com/users/VerizonDigital","html_url":"https://github.com/VerizonDigital","followers_url":"https://api.github.com/users/VerizonDigital/followers","following_url":"https://api.github.com/users/VerizonDigital/following{/other_user}","gists_url":"https://api.github.com/users/VerizonDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/VerizonDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VerizonDigital/subscriptions","organizations_url":"https://api.github.com/users/VerizonDigital/orgs","repos_url":"https://api.github.com/users/VerizonDigital/repos","events_url":"https://api.github.com/users/VerizonDigital/events{/privacy}","received_events_url":"https://api.github.com/users/VerizonDigital/received_events","type":"Organization","site_admin":false},"repo":{"id":114041021,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQwNDEwMjE=","name":"hyperion","full_name":"VerizonDigital/hyperion","owner":{"login":"VerizonDigital","id":12649886,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQ5ODg2","avatar_url":"https://avatars0.githubusercontent.com/u/12649886?v=4","gravatar_id":"","url":"https://api.github.com/users/VerizonDigital","html_url":"https://github.com/VerizonDigital","followers_url":"https://api.github.com/users/VerizonDigital/followers","following_url":"https://api.github.com/users/VerizonDigital/following{/other_user}","gists_url":"https://api.github.com/users/VerizonDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/VerizonDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VerizonDigital/subscriptions","organizations_url":"https://api.github.com/users/VerizonDigital/orgs","repos_url":"https://api.github.com/users/VerizonDigital/repos","events_url":"https://api.github.com/users/VerizonDigital/events{/privacy}","received_events_url":"https://api.github.com/users/VerizonDigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VerizonDigital/hyperion","description":"Lightweight JSON specification","fork":false,"url":"https://api.github.com/repos/VerizonDigital/hyperion","forks_url":"https://api.github.com/repos/VerizonDigital/hyperion/forks","keys_url":"https://api.github.com/repos/VerizonDigital/hyperion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VerizonDigital/hyperion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VerizonDigital/hyperion/teams","hooks_url":"https://api.github.com/repos/VerizonDigital/hyperion/hooks","issue_events_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues/events{/number}","events_url":"https://api.github.com/repos/VerizonDigital/hyperion/events","assignees_url":"https://api.github.com/repos/VerizonDigital/hyperion/assignees{/user}","branches_url":"https://api.github.com/repos/VerizonDigital/hyperion/branches{/branch}","tags_url":"https://api.github.com/repos/VerizonDigital/hyperion/tags","blobs_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/refs{/sha}","trees_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VerizonDigital/hyperion/statuses/{sha}","languages_url":"https://api.github.com/repos/VerizonDigital/hyperion/languages","stargazers_url":"https://api.github.com/repos/VerizonDigital/hyperion/stargazers","contributors_url":"https://api.github.com/repos/VerizonDigital/hyperion/contributors","subscribers_url":"https://api.github.com/repos/VerizonDigital/hyperion/subscribers","subscription_url":"https://api.github.com/repos/VerizonDigital/hyperion/subscription","commits_url":"https://api.github.com/repos/VerizonDigital/hyperion/commits{/sha}","git_commits_url":"https://api.github.com/repos/VerizonDigital/hyperion/git/commits{/sha}","comments_url":"https://api.github.com/repos/VerizonDigital/hyperion/comments{/number}","issue_comment_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues/comments{/number}","contents_url":"https://api.github.com/repos/VerizonDigital/hyperion/contents/{+path}","compare_url":"https://api.github.com/repos/VerizonDigital/hyperion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VerizonDigital/hyperion/merges","archive_url":"https://api.github.com/repos/VerizonDigital/hyperion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VerizonDigital/hyperion/downloads","issues_url":"https://api.github.com/repos/VerizonDigital/hyperion/issues{/number}","pulls_url":"https://api.github.com/repos/VerizonDigital/hyperion/pulls{/number}","milestones_url":"https://api.github.com/repos/VerizonDigital/hyperion/milestones{/number}","notifications_url":"https://api.github.com/repos/VerizonDigital/hyperion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VerizonDigital/hyperion/labels{/name}","releases_url":"https://api.github.com/repos/VerizonDigital/hyperion/releases{/id}","deployments_url":"https://api.github.com/repos/VerizonDigital/hyperion/deployments","created_at":"2017-12-12T21:29:36Z","updated_at":"2018-06-01T19:52:56Z","pushed_at":"2018-06-19T01:58:00Z","git_url":"git://github.com/VerizonDigital/hyperion.git","ssh_url":"git@github.com:VerizonDigital/hyperion.git","clone_url":"https://github.com/VerizonDigital/hyperion.git","svn_url":"https://github.com/VerizonDigital/hyperion","homepage":null,"size":32,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":2,"open_issues":2,"watchers":2,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8"},"html":{"href":"https://github.com/VerizonDigital/hyperion/pull/8"},"issue":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/issues/8"},"comments":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/VerizonDigital/hyperion/statuses/bd07664eaed2f528c8408748b071685e2e51d86e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"teehill"}}