Title: audit: how can I programmatically consume the audit logs? · Issue #5535 · coder/coder · GitHub
Open Graph Title: audit: how can I programmatically consume the audit logs? · Issue #5535 · coder/coder
X Title: audit: how can I programmatically consume the audit logs? · Issue #5535 · coder/coder
Description: We need to document this :) REST API: @mtojek is working on autogenerated docs for all the routes, including /api/v2/audit Tracked in #3522. For example: https://coder.bpmct.net/api/v2/audit?offset=0&limit=25&q=resource_type:user+actio...
Open Graph Description: We need to document this :) REST API: @mtojek is working on autogenerated docs for all the routes, including /api/v2/audit Tracked in #3522. For example: https://coder.bpmct.net/api/v2/audit?offset...
X Description: We need to document this :) REST API: @mtojek is working on autogenerated docs for all the routes, including /api/v2/audit Tracked in #3522. For example: https://coder.bpmct.net/api/v2/audit?offset...
Opengraph URL: https://github.com/coder/coder/issues/5535
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"audit: how can I programmatically consume the audit logs?","articleBody":"We need to document this :)\r\n\r\n- [x] REST API: @mtojek is working on autogenerated docs for all the routes, including `/api/v2/audit`\r\n\r\n Tracked in #3522. For example:\r\n\r\n ```text\r\n https://coder.bpmct.net/api/v2/audit?offset=0&limit=25&q=resource_type%3Auser+action%3Acreate\r\n ```\r\n\r\n Documented here: https://coder.com/docs/coder-oss/latest/api/audit#get-audit-logs\r\n\r\n- [ ] Server logs: `coder server` will export audited events to `/dev/stderr` by default\r\n\r\n For example:\r\n \r\n ```sh\r\n 2023-01-02 14:07:48.634 [INFO]\t(coderd)\t\u003c./enterprise/audit/backends/slog.go:32>\tslogBackend.Export\taudit_log\t{\"ID\": \"4fa877ad-92e5-425d-8aba-7b66bb7c01d2\", \"Action\": \"create\", \"Diff\": {\"id\": {\"Old\": \"\", \"New\": \"fb1c1df2-4d9a-44df-b606-abc4ec6d5ee5\", \"Secret\": false}, \"name\": {\"Old\": \"\", \"New\": \"new-workspace\", \"Secret\": false}, \"owner_id\": {\"Old\": \"\", \"New\": \"eaef1d37-125b-4b73-b05d-33401230baca\", \"Secret\": false}, \"template_id\": {\"Old\": \"\", \"New\": \"f5ceaa98-fe3a-4103-b0fb-15d7d340f2ad\", \"Secret\": false}, \"ttl\": {\"Old\": 0, \"New\": 86400000000000, \"Secret\": false}}, \"RequestID\": \"c210f24c-3a1c-4770-ad0c-8d13ceae9cf2\", \"UserAgent\": {\"String\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36\", \"Valid\": true}, \"ResourceID\": \"fb1c1df2-4d9a-44df-b606-abc4ec6d5ee5\", \"OrganizationID\": \"00000000-0000-0000-0000-000000000000\", \"ResourceTarget\": \"new-workspace\", \"ResourceIcon\": \"\", \"Time\": \"2023-01-02T14:07:48.632729Z\", \"UserID\": \"eaef1d37-125b-4b73-b05d-33401230baca\", \"Ip\": {\"IPNet\": {\"IP\": \"::1\", \"Mask\": \"/////////////////////w==\"}, \"Valid\": true}, \"ResourceType\": \"workspace\", \"StatusCode\": 201, \"AdditionalFields\": {\"workspaceOwner\": \"bpmct\"}}\r\n ```\r\n\r\n In Coder v1, we have detailed [documentation on exporting logs](https://coder.com/docs/coder/latest/guides/admin/logging) so we can use that as a reference.","author":{"url":"https://github.com/bpmct","@type":"Person","name":"bpmct"},"datePublished":"2023-01-02T14:36:47Z","url":"https://github.com/coder/coder/issues/5535"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cb95dc76-a297-21f6-81fa-246d9264f084 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4DA:19B6A2:944811:C402E5:6B01B4BD |
| html-safe-nonce | 16d219f84b5ae60ab63a838855873572d9abf8989229117e976bd59a3a15930f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNERBOjE5QjZBMjo5NDQ4MTE6QzQwMkU1OjZCMDFCNEJEIiwidmlzaXRvcl9pZCI6IjYwMDY4MjgyOTU3NTEwNTQ1MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3900567e16ca2c0020e46a384bd281aa17eb23c9d2f95c482d53662581f524bb |
| hovercard-subject-tag | issue:1516463359 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/5535/issue_layout |
| twitter:image | https://opengraph.githubassets.com/79b25ddbb46a891df2f8ee802a4350bf8944c97859770ff9b759175c7d519c1a/coder/coder/issues/5535 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/79b25ddbb46a891df2f8ee802a4350bf8944c97859770ff9b759175c7d519c1a/coder/coder/issues/5535 |
| og:image:alt | We need to document this :) REST API: @mtojek is working on autogenerated docs for all the routes, including /api/v2/audit Tracked in #3522. For example: https://coder.bpmct.net/api/v2/audit?offset... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bpmct |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width