Audit log
What was done in the calling project key's project, and by whom.
| Operation | Method | SDK |
|---|---|---|
| List the audit log | GET | hixel.auditLog.list |
List the audit log#
GET/v1/audit_loghixel.auditLog.list
A page of what was done in the project and its environments, newest first: by people in the dashboard and by keys through this API. The organization's own changes (its settings, members, invitations) are not in it..
Takes a project key with the admin role.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
cursor | query | string | The next_cursor of the previous page, to read the next one; left out for the first page. Pass the same filters with it. |
limit | query | integer | How many items the page holds: an integer from 1 to 100; 50 when left out. |
Response 200: AuditEntryList
| Field | Type | Description |
|---|---|---|
data required | array of AuditEntry | |
data[].id required | string | The entry's id (aud_…). |
data[].actor required | object | |
data[].actor.user_id required | string | null | The person who acted; null when a key or Hixel itself did. |
data[].actor.label required | string | Who acted, as they were then: a person's email address, or a key's id. |
data[].action required | string | <subject>.<verb>, such as environment.created. |
data[].target_type required | string | What was acted on: environment, key, customer, … |
data[].target_id required | string | The id of what was acted on. |
data[].metadata required | object | null | What the change was, as the action records it; never a secret. |
data[].created_at required | string (date-time) | |
next_cursor required | string | null | Pass back as cursor for the next page; null on the last page. |
Errors
- 400
invalid_request: The request is malformed or fails validation;paramnames the field.invalid_cursor: The cursor is not one this audit log gave.invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
- 401
api_key_required,invalid_api_key,expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired. - 403
key_inactive: the project key was revoked or expired while the request ran.project_key_required: an environment's key was sent; the project's endpoints take a project key.role_not_allowed: the project key'smemberrole does not allow this; it takesadmin.
- 500
internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned. - 503
database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/audit_log" \
-H "Authorization: Bearer $HIXEL_PROJECT_KEY"for await (const item of hixel.auditLog.list()) {
console.log(item);
}