{"action":"created","issue":{"url":"https://api.github.com/repos/rackerlabs/mimic/issues/377","labels_url":"https://api.github.com/repos/rackerlabs/mimic/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/rackerlabs/mimic/issues/377/comments","events_url":"https://api.github.com/repos/rackerlabs/mimic/issues/377/events","html_url":"https://github.com/rackerlabs/mimic/issues/377","id":103147811,"number":377,"title":"Support MaaS Audit Log","user":{"login":"ksheedlo","id":1271410,"avatar_url":"https://avatars.githubusercontent.com/u/1271410?v=3","gravatar_id":"","url":"https://api.github.com/users/ksheedlo","html_url":"https://github.com/ksheedlo","followers_url":"https://api.github.com/users/ksheedlo/followers","following_url":"https://api.github.com/users/ksheedlo/following{/other_user}","gists_url":"https://api.github.com/users/ksheedlo/gists{/gist_id}","starred_url":"https://api.github.com/users/ksheedlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksheedlo/subscriptions","organizations_url":"https://api.github.com/users/ksheedlo/orgs","repos_url":"https://api.github.com/users/ksheedlo/repos","events_url":"https://api.github.com/users/ksheedlo/events{/privacy}","received_events_url":"https://api.github.com/users/ksheedlo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rackerlabs/mimic/labels/needed%20by:%20cloud%20intelligence","name":"needed by: cloud intelligence","color":"e05020"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-26T01:06:38Z","updated_at":"2015-08-27T00:08:41Z","closed_at":null,"body":"http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/GET_listAudits_audits_service-account.html\r\n\r\nMaaS keeps a log of requests the user performed against their service. Intelligence uses this log to power a widget in the dashboard, which we want to test in Mimic. Log entries map roughly 1:1 to API requests and carry the following information:\r\n\r\n- `id` - a UUID, presumably for the API transaction.\r\n- `timestamp` - self explanatory\r\n- `headers` - a hash of all the headers that were sent with the API call.\r\n- `url` - the HTTP url that was used, for instance `/v1.0/123456/entities/enaBcDeFg/test-check`\r\n- `app` - varies depending on the resource. The following apps exist, but may not be the complete set:\r\n    - `agent_installers`\r\n    - `alarms`\r\n    - `checks`\r\n    - `entities`\r\n    - `notification_plans`\r\n    - `notifications`\r\n    - `rollups`\r\n    - `suppressions`\r\n- `query` - a hash of the query string parameters\r\n- `txnId` - a long string including parts of the internal URL for MaaS, a timestamp, and other things. I would fake this with a number or generally some random string.\r\n- `payload` - The HTTP request body, if any.\r\n- `method` - The HTTP method\r\n- `account_id` - The tenant ID\r\n- `who` - I see this always come back as an empty string, don't know what it's for.\r\n- `why` - Ditto.\r\n- `statusCode` - The HTTP status code that was returned.\r\n\r\nTo implement this feature, we need to get the data, or a reasonable-looking fake, and stash it somewhere in case the user asks for it. I want to look at doing it with a decorator, as it would otherwise be a lot of boilerplate that potentially every new MaaS op needs to be aware of. @glyph what are your thoughts about this? Can we fit what's needed into our existing klein routes?"},"comment":{"url":"https://api.github.com/repos/rackerlabs/mimic/issues/comments/135212163","html_url":"https://github.com/rackerlabs/mimic/issues/377#issuecomment-135212163","issue_url":"https://api.github.com/repos/rackerlabs/mimic/issues/377","id":135212163,"user":{"login":"ynachiket","id":5800520,"avatar_url":"https://avatars.githubusercontent.com/u/5800520?v=3","gravatar_id":"","url":"https://api.github.com/users/ynachiket","html_url":"https://github.com/ynachiket","followers_url":"https://api.github.com/users/ynachiket/followers","following_url":"https://api.github.com/users/ynachiket/following{/other_user}","gists_url":"https://api.github.com/users/ynachiket/gists{/gist_id}","starred_url":"https://api.github.com/users/ynachiket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynachiket/subscriptions","organizations_url":"https://api.github.com/users/ynachiket/orgs","repos_url":"https://api.github.com/users/ynachiket/repos","events_url":"https://api.github.com/users/ynachiket/events{/privacy}","received_events_url":"https://api.github.com/users/ynachiket/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T00:08:41Z","updated_at":"2015-08-27T00:08:41Z","body":"@lekhajee lets sync up on this soon."}}