{"action":"opened","issue":{"url":"https://api.github.com/repos/pcon/sfdc-eventMonitoring/issues/20","repository_url":"https://api.github.com/repos/pcon/sfdc-eventMonitoring","labels_url":"https://api.github.com/repos/pcon/sfdc-eventMonitoring/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/pcon/sfdc-eventMonitoring/issues/20/comments","events_url":"https://api.github.com/repos/pcon/sfdc-eventMonitoring/issues/20/events","html_url":"https://github.com/pcon/sfdc-eventMonitoring/issues/20","id":347631842,"node_id":"MDU6SXNzdWUzNDc2MzE4NDI=","number":20,"title":"Provide the ability to login / logout information over a period of time","user":{"login":"pcon","id":522876,"node_id":"MDQ6VXNlcjUyMjg3Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/522876?v=4","gravatar_id":"","url":"https://api.github.com/users/pcon","html_url":"https://github.com/pcon","followers_url":"https://api.github.com/users/pcon/followers","following_url":"https://api.github.com/users/pcon/following{/other_user}","gists_url":"https://api.github.com/users/pcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcon/subscriptions","organizations_url":"https://api.github.com/users/pcon/orgs","repos_url":"https://api.github.com/users/pcon/repos","events_url":"https://api.github.com/users/pcon/events{/privacy}","received_events_url":"https://api.github.com/users/pcon/received_events","type":"User","site_admin":false},"labels":[{"id":971290619,"node_id":"MDU6TGFiZWw5NzEyOTA2MTk=","url":"https://api.github.com/repos/pcon/sfdc-eventMonitoring/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-04T16:45:17Z","updated_at":"2018-08-04T16:45:17Z","closed_at":null,"author_association":"OWNER","body":"Provide new blame command\r\n\r\n```bash\r\neventmonitoring blame login\r\n```\r\n\r\nThis should have a flag of `--api` only include API users and add the `--userid` flag to filter based on specific user ids\r\n\r\nThe `--format json` output should look like\r\n\r\n```json\r\n{\r\n    \"005A0000000gchi\": {\r\n        \"counts\": {\r\n            \"login\": 5,\r\n            \"explicitLogout\": 2,\r\n            \"implicitLogout\": 1\r\n        },\r\n        \"averages\": {\r\n            \"sessionLength\": 56473 /* In ms */\r\n        },\r\n        \"sessions\": {\r\n            \"4JTnBCotp3mrau-qbvxO3-\": {\r\n                \"Login\": { ... },\r\n                \"Logout\": { ... },\r\n                \"duration\": 25000 /* in ms */\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nIn table output\r\n```text\r\nUsername: bob@example.com\r\nTotal Logins: 5\r\nTotal Logouts: 3      Explicit: 2     Implicit 1\r\nAverage Session Length: 1hr 30min 56s\r\n\r\n╔═══════╤══════════╤═════════╗\r\n║ Type  │ Duration │ Version ║\r\n╟───────┼──────────┼─────────╢\r\n║ Api   │ 25s      │ 8       ║\r\n╟───────┼──────────┼─────────╢\r\n║ UI    │ 3hr      │ N/A     ║\r\n╚═══════╧══════════╧═════════╝\r\n```"}}
{"actor":{"display_login":"pcon"}}