{"action":"closed","number":470,"pull_request":{"url":"https://api.github.com/repos/project-koku/koku/pulls/470","id":230962398,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwOTYyMzk4","html_url":"https://github.com/project-koku/koku/pull/470","diff_url":"https://github.com/project-koku/koku/pull/470.diff","patch_url":"https://github.com/project-koku/koku/pull/470.patch","issue_url":"https://api.github.com/repos/project-koku/koku/issues/470","number":470,"state":"closed","locked":false,"title":"Ocp charge api endpoint","user":{"login":"adberglund","id":3845021,"node_id":"MDQ6VXNlcjM4NDUwMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/3845021?v=4","gravatar_id":"","url":"https://api.github.com/users/adberglund","html_url":"https://github.com/adberglund","followers_url":"https://api.github.com/users/adberglund/followers","following_url":"https://api.github.com/users/adberglund/following{/other_user}","gists_url":"https://api.github.com/users/adberglund/gists{/gist_id}","starred_url":"https://api.github.com/users/adberglund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adberglund/subscriptions","organizations_url":"https://api.github.com/users/adberglund/orgs","repos_url":"https://api.github.com/users/adberglund/repos","events_url":"https://api.github.com/users/adberglund/events{/privacy}","received_events_url":"https://api.github.com/users/adberglund/received_events","type":"User","site_admin":false},"body":"## Summary\r\nThis adds the basic functionality for the OCP charge endpoint via `api/v1/reports/charges/ocp/`\r\n\r\n## Examples\r\n\r\n`GET /api/v1/reports/charges/ocp/`\r\n\r\n```\r\nHTTP 200 OK\r\nAllow: OPTIONS, GET\r\nContent-Type: application/json\r\nVary: Accept\r\n\r\n{\r\n    \"data\": [\r\n        {\r\n            \"date\": \"2018-11-05\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-06\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-07\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-08\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-09\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-10\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-11\",\r\n            \"values\": []\r\n        },\r\n        {\r\n            \"date\": \"2018-11-12\",\r\n            \"values\": [\r\n                {\r\n                    \"date\": \"2018-11-12\",\r\n                    \"charge\": 3.2\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"date\": \"2018-11-13\",\r\n            \"values\": [\r\n                {\r\n                    \"date\": \"2018-11-13\",\r\n                    \"charge\": 3.0\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"date\": \"2018-11-14\",\r\n            \"values\": []\r\n        }\r\n    ],\r\n    \"total\": {\r\n        \"charge\": 6.2\r\n    }\r\n}\r\n```\r\n\r\n`\r\nGET /api/v1/reports/charges/ocp/?filter[time_scope_units]=month&filter[time_scope_value]=-1&filter[resolution]=monthly&group_by[project]=*&order_by[charge]=asc\r\n`\r\n\r\n\r\n```\r\nHTTP 200 OK\r\nAllow: OPTIONS, GET\r\nContent-Type: application/json\r\nVary: Accept\r\n\r\n{\r\n    \"group_by\": {\r\n        \"project\": [\r\n            \"*\"\r\n        ]\r\n    },\r\n    \"filter\": {\r\n        \"resolution\": \"monthly\",\r\n        \"time_scope_value\": \"-1\",\r\n        \"time_scope_units\": \"month\"\r\n    },\r\n    \"order_by\": {\r\n        \"charge\": \"asc\"\r\n    },\r\n    \"data\": [\r\n        {\r\n            \"date\": \"2018-11\",\r\n            \"projects\": [\r\n                {\r\n                    \"project\": \"metering-hccm\",\r\n                    \"values\": [\r\n                        {\r\n                            \"date\": \"2018-11\",\r\n                            \"project\": \"metering-hccm\",\r\n                            \"charge\": 3.0\r\n                        }\r\n                    ]\r\n                },\r\n                {\r\n                    \"project\": \"monitoring\",\r\n                    \"values\": [\r\n                        {\r\n                            \"date\": \"2018-11\",\r\n                            \"project\": \"monitoring\",\r\n                            \"charge\": 3.2\r\n                        }\r\n                    ]\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"total\": {\r\n        \"charge\": 6.2\r\n    }\r\n}\r\n```","created_at":"2018-11-14T19:58:08Z","updated_at":"2018-11-15T16:40:24Z","closed_at":"2018-11-15T16:40:24Z","merged_at":"2018-11-15T16:40:24Z","merge_commit_sha":"7ee7d8cb3a27afd90af0020ff8226aa861406f00","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/project-koku/koku/milestones/14","html_url":"https://github.com/project-koku/koku/milestone/14","labels_url":"https://api.github.com/repos/project-koku/koku/milestones/14/labels","id":3652511,"node_id":"MDk6TWlsZXN0b25lMzY1MjUxMQ==","number":14,"title":"Sprint 13","description":"","creator":{"login":"chambridge","id":29379759,"node_id":"MDQ6VXNlcjI5Mzc5NzU5","avatar_url":"https://avatars3.githubusercontent.com/u/29379759?v=4","gravatar_id":"","url":"https://api.github.com/users/chambridge","html_url":"https://github.com/chambridge","followers_url":"https://api.github.com/users/chambridge/followers","following_url":"https://api.github.com/users/chambridge/following{/other_user}","gists_url":"https://api.github.com/users/chambridge/gists{/gist_id}","starred_url":"https://api.github.com/users/chambridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chambridge/subscriptions","organizations_url":"https://api.github.com/users/chambridge/orgs","repos_url":"https://api.github.com/users/chambridge/repos","events_url":"https://api.github.com/users/chambridge/events{/privacy}","received_events_url":"https://api.github.com/users/chambridge/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":9,"state":"open","created_at":"2018-09-13T17:54:33Z","updated_at":"2018-11-15T16:40:24Z","due_on":"2018-11-23T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/project-koku/koku/pulls/470/commits","review_comments_url":"https://api.github.com/repos/project-koku/koku/pulls/470/comments","review_comment_url":"https://api.github.com/repos/project-koku/koku/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-koku/koku/issues/470/comments","statuses_url":"https://api.github.com/repos/project-koku/koku/statuses/dc4a962aded4fda850204352f5e80cab3b84c8f6","head":{"label":"project-koku:ocp_charge_api_endpoint","ref":"ocp_charge_api_endpoint","sha":"dc4a962aded4fda850204352f5e80cab3b84c8f6","user":{"login":"project-koku","id":37702693,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzAyNjkz","avatar_url":"https://avatars1.githubusercontent.com/u/37702693?v=4","gravatar_id":"","url":"https://api.github.com/users/project-koku","html_url":"https://github.com/project-koku","followers_url":"https://api.github.com/users/project-koku/followers","following_url":"https://api.github.com/users/project-koku/following{/other_user}","gists_url":"https://api.github.com/users/project-koku/gists{/gist_id}","starred_url":"https://api.github.com/users/project-koku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-koku/subscriptions","organizations_url":"https://api.github.com/users/project-koku/orgs","repos_url":"https://api.github.com/users/project-koku/repos","events_url":"https://api.github.com/users/project-koku/events{/privacy}","received_events_url":"https://api.github.com/users/project-koku/received_events","type":"Organization","site_admin":false},"repo":{"id":126496611,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY0OTY2MTE=","name":"koku","full_name":"project-koku/koku","private":false,"owner":{"login":"project-koku","id":37702693,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzAyNjkz","avatar_url":"https://avatars1.githubusercontent.com/u/37702693?v=4","gravatar_id":"","url":"https://api.github.com/users/project-koku","html_url":"https://github.com/project-koku","followers_url":"https://api.github.com/users/project-koku/followers","following_url":"https://api.github.com/users/project-koku/following{/other_user}","gists_url":"https://api.github.com/users/project-koku/gists{/gist_id}","starred_url":"https://api.github.com/users/project-koku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-koku/subscriptions","organizations_url":"https://api.github.com/users/project-koku/orgs","repos_url":"https://api.github.com/users/project-koku/repos","events_url":"https://api.github.com/users/project-koku/events{/privacy}","received_events_url":"https://api.github.com/users/project-koku/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/project-koku/koku","description":"An open source solution for cost management of cloud and hybrid cloud environments.","fork":false,"url":"https://api.github.com/repos/project-koku/koku","forks_url":"https://api.github.com/repos/project-koku/koku/forks","keys_url":"https://api.github.com/repos/project-koku/koku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-koku/koku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-koku/koku/teams","hooks_url":"https://api.github.com/repos/project-koku/koku/hooks","issue_events_url":"https://api.github.com/repos/project-koku/koku/issues/events{/number}","events_url":"https://api.github.com/repos/project-koku/koku/events","assignees_url":"https://api.github.com/repos/project-koku/koku/assignees{/user}","branches_url":"https://api.github.com/repos/project-koku/koku/branches{/branch}","tags_url":"https://api.github.com/repos/project-koku/koku/tags","blobs_url":"https://api.github.com/repos/project-koku/koku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-koku/koku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-koku/koku/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-koku/koku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-koku/koku/statuses/{sha}","languages_url":"https://api.github.com/repos/project-koku/koku/languages","stargazers_url":"https://api.github.com/repos/project-koku/koku/stargazers","contributors_url":"https://api.github.com/repos/project-koku/koku/contributors","subscribers_url":"https://api.github.com/repos/project-koku/koku/subscribers","subscription_url":"https://api.github.com/repos/project-koku/koku/subscription","commits_url":"https://api.github.com/repos/project-koku/koku/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-koku/koku/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-koku/koku/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-koku/koku/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-koku/koku/contents/{+path}","compare_url":"https://api.github.com/repos/project-koku/koku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-koku/koku/merges","archive_url":"https://api.github.com/repos/project-koku/koku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-koku/koku/downloads","issues_url":"https://api.github.com/repos/project-koku/koku/issues{/number}","pulls_url":"https://api.github.com/repos/project-koku/koku/pulls{/number}","milestones_url":"https://api.github.com/repos/project-koku/koku/milestones{/number}","notifications_url":"https://api.github.com/repos/project-koku/koku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-koku/koku/labels{/name}","releases_url":"https://api.github.com/repos/project-koku/koku/releases{/id}","deployments_url":"https://api.github.com/repos/project-koku/koku/deployments","created_at":"2018-03-23T14:29:23Z","updated_at":"2018-11-14T16:16:36Z","pushed_at":"2018-11-15T16:40:24Z","git_url":"git://github.com/project-koku/koku.git","ssh_url":"git@github.com:project-koku/koku.git","clone_url":"https://github.com/project-koku/koku.git","svn_url":"https://github.com/project-koku/koku","homepage":"https://koku.readthedocs.io/","size":992,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":9,"open_issues":45,"watchers":6,"default_branch":"master"}},"base":{"label":"project-koku:master","ref":"master","sha":"ed8f5d851591625323af0922661814146e4f2f88","user":{"login":"project-koku","id":37702693,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzAyNjkz","avatar_url":"https://avatars1.githubusercontent.com/u/37702693?v=4","gravatar_id":"","url":"https://api.github.com/users/project-koku","html_url":"https://github.com/project-koku","followers_url":"https://api.github.com/users/project-koku/followers","following_url":"https://api.github.com/users/project-koku/following{/other_user}","gists_url":"https://api.github.com/users/project-koku/gists{/gist_id}","starred_url":"https://api.github.com/users/project-koku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-koku/subscriptions","organizations_url":"https://api.github.com/users/project-koku/orgs","repos_url":"https://api.github.com/users/project-koku/repos","events_url":"https://api.github.com/users/project-koku/events{/privacy}","received_events_url":"https://api.github.com/users/project-koku/received_events","type":"Organization","site_admin":false},"repo":{"id":126496611,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY0OTY2MTE=","name":"koku","full_name":"project-koku/koku","private":false,"owner":{"login":"project-koku","id":37702693,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzAyNjkz","avatar_url":"https://avatars1.githubusercontent.com/u/37702693?v=4","gravatar_id":"","url":"https://api.github.com/users/project-koku","html_url":"https://github.com/project-koku","followers_url":"https://api.github.com/users/project-koku/followers","following_url":"https://api.github.com/users/project-koku/following{/other_user}","gists_url":"https://api.github.com/users/project-koku/gists{/gist_id}","starred_url":"https://api.github.com/users/project-koku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-koku/subscriptions","organizations_url":"https://api.github.com/users/project-koku/orgs","repos_url":"https://api.github.com/users/project-koku/repos","events_url":"https://api.github.com/users/project-koku/events{/privacy}","received_events_url":"https://api.github.com/users/project-koku/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/project-koku/koku","description":"An open source solution for cost management of cloud and hybrid cloud environments.","fork":false,"url":"https://api.github.com/repos/project-koku/koku","forks_url":"https://api.github.com/repos/project-koku/koku/forks","keys_url":"https://api.github.com/repos/project-koku/koku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-koku/koku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-koku/koku/teams","hooks_url":"https://api.github.com/repos/project-koku/koku/hooks","issue_events_url":"https://api.github.com/repos/project-koku/koku/issues/events{/number}","events_url":"https://api.github.com/repos/project-koku/koku/events","assignees_url":"https://api.github.com/repos/project-koku/koku/assignees{/user}","branches_url":"https://api.github.com/repos/project-koku/koku/branches{/branch}","tags_url":"https://api.github.com/repos/project-koku/koku/tags","blobs_url":"https://api.github.com/repos/project-koku/koku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-koku/koku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-koku/koku/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-koku/koku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-koku/koku/statuses/{sha}","languages_url":"https://api.github.com/repos/project-koku/koku/languages","stargazers_url":"https://api.github.com/repos/project-koku/koku/stargazers","contributors_url":"https://api.github.com/repos/project-koku/koku/contributors","subscribers_url":"https://api.github.com/repos/project-koku/koku/subscribers","subscription_url":"https://api.github.com/repos/project-koku/koku/subscription","commits_url":"https://api.github.com/repos/project-koku/koku/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-koku/koku/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-koku/koku/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-koku/koku/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-koku/koku/contents/{+path}","compare_url":"https://api.github.com/repos/project-koku/koku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-koku/koku/merges","archive_url":"https://api.github.com/repos/project-koku/koku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-koku/koku/downloads","issues_url":"https://api.github.com/repos/project-koku/koku/issues{/number}","pulls_url":"https://api.github.com/repos/project-koku/koku/pulls{/number}","milestones_url":"https://api.github.com/repos/project-koku/koku/milestones{/number}","notifications_url":"https://api.github.com/repos/project-koku/koku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-koku/koku/labels{/name}","releases_url":"https://api.github.com/repos/project-koku/koku/releases{/id}","deployments_url":"https://api.github.com/repos/project-koku/koku/deployments","created_at":"2018-03-23T14:29:23Z","updated_at":"2018-11-14T16:16:36Z","pushed_at":"2018-11-15T16:40:24Z","git_url":"git://github.com/project-koku/koku.git","ssh_url":"git@github.com:project-koku/koku.git","clone_url":"https://github.com/project-koku/koku.git","svn_url":"https://github.com/project-koku/koku","homepage":"https://koku.readthedocs.io/","size":992,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":9,"open_issues":45,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-koku/koku/pulls/470"},"html":{"href":"https://github.com/project-koku/koku/pull/470"},"issue":{"href":"https://api.github.com/repos/project-koku/koku/issues/470"},"comments":{"href":"https://api.github.com/repos/project-koku/koku/issues/470/comments"},"review_comments":{"href":"https://api.github.com/repos/project-koku/koku/pulls/470/comments"},"review_comment":{"href":"https://api.github.com/repos/project-koku/koku/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-koku/koku/pulls/470/commits"},"statuses":{"href":"https://api.github.com/repos/project-koku/koku/statuses/dc4a962aded4fda850204352f5e80cab3b84c8f6"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"adberglund","id":3845021,"node_id":"MDQ6VXNlcjM4NDUwMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/3845021?v=4","gravatar_id":"","url":"https://api.github.com/users/adberglund","html_url":"https://github.com/adberglund","followers_url":"https://api.github.com/users/adberglund/followers","following_url":"https://api.github.com/users/adberglund/following{/other_user}","gists_url":"https://api.github.com/users/adberglund/gists{/gist_id}","starred_url":"https://api.github.com/users/adberglund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adberglund/subscriptions","organizations_url":"https://api.github.com/users/adberglund/orgs","repos_url":"https://api.github.com/users/adberglund/repos","events_url":"https://api.github.com/users/adberglund/events{/privacy}","received_events_url":"https://api.github.com/users/adberglund/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":12,"additions":459,"deletions":128,"changed_files":11}}
{"actor":{"display_login":"adberglund"}}