-
Notifications
You must be signed in to change notification settings - Fork 22
[auditbox] Add usage guide #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| ```bash | ||
| curl "${keycloak_url}/realms/auditbox/protocol/openid-connect/token" \ | ||
| -H "Content-Type: application/x-www-form-urlencoded" \ | ||
| -d "grant_type=password" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client_credentials?
| This guide describes using an Auditbox server programmatically. | ||
| Whenever you see *${...}* in this page, replace it mentally with | ||
| a value that applies to you. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я бы добавил table of contents:
- Auth
- Write events (single/bulk)
- Read events
| As the title suggests, */AuditEvent* endpoint is used for uploading | ||
| a single AuditEvent to Auditbox. | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут сложно понять какой http method вызывать - нужно додумывать что это post из "curl -d".
Я бы явно указал, что метод api - "POST /AuditEvent", а дальше пример
| @@ -0,0 +1,208 @@ | |||
| # Intro | |||
|
|
|||
| This guide describes using an Auditbox server programmatically. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"an Auditbox server programmatically" -> "API methods"
| ## Creating AuditEvents | ||
|
|
||
| One of the main operations you'll do on Auditbox is storing | ||
| AuditEvents. There are two options to upload events - single resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут вординг "resource", а в другом месте "event", надо что-то одно использовать
|
|
||
| ### Single event upload | ||
|
|
||
| As the title suggests, */AuditEvent* endpoint is used for uploading |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я бы убрал "As the title suggests" и явно указал имя метода - "POST /AuditEvent"
|
|
||
| As the title suggests, */AuditEvent* endpoint is used for uploading | ||
| a single AuditEvent to Auditbox. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
еще бы указал, что мы перезаписываем входящий id
| # Intro | ||
|
|
||
| This guide describes using an Auditbox server programmatically. | ||
| Whenever you see *${...}* in this page, replace it mentally with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
посмотрел как в доке по aidbox это решают - пишут [base] - https://www.health-samurai.io/docs/aidbox/api/rest-api/crud/create#201-created

Note
Adds a new guide for programmatic use and simplifies the API reference.
getting-started/using-backend.mdcovering auth (token retrieval), healthcheck, single/bulk AuditEvent uploads, read by ID, and example responsesSUMMARY.mdapi.md; keeps high-level endpoint docs and renamesCreate BundletoUpload BundleWritten by Cursor Bugbot for commit 480b6c3. This will update automatically on new commits. Configure here.