SPB Git

Repository Public

audit.md 2.2 KB 81 lines markdown

1<!-- source: https://docs.x.ai/developers/rest-api-reference/management/audit (from https://docs.x.ai/llms-full.txt, retrieved 2026-09-19T05:28:55Z) -->2#### Management API34# Audit Logs56***78## GET /audit/teams/\{teamId}/events910API endpoint for GET requests to /audit/teams/\{teamId}/events.1112### Path Parameters1314* `teamId` (string, required) — The team id to get events for.1516### Query Parameters1718* `pageSize` (integer) — The number of events to list per page.1920* `pageToken` (string) — When querying the next page, the offset token.2122* `eventFilter.userId` (string) — Filter events to this user only.2324* `eventFilter.query` (string) — A general search term that is used for full-text description search.2526* `eventFilter.eventId` (string) — Search for a specific event by id.2728* `eventTimeFrom` (string) — Filter events from and/or to certain time (optional).2930* `eventTimeTo` (string)3132* `orderBy` ("TIME\_ASCENDING" | "TIME\_DESCENDING")3334### Response Body3536* `events` (array\<object>) — Requested events. Ordered by event\_time.3738  * `eventTime` (string)3940  * `eventId` (string) — Identifier to reference this log. Not bound to anything else in the system.4142  * `description` (string) — Free form description of the event in English.4344  * `user` (object)4546    * `userId` (string) — User ID.4748    * `email` (string) — User's email. May not always populated.4950    * `profileImage` (string) — The key of the profile image under which it can be fetched from our assets server.5152    * `givenName` (string) — User's given name.5354    * `familyName` (string) — User's family name.5556    * `profileImageUrl` (string) — The full URL path to the user's profile image.5758* `nextPageToken` (string) — If there are more events, the token to be used to59  retrieve the next page of the search results.6061\*\*Response example:\*\*6263```json64{65  "events": [66    {67      "eventTime": "2025-01-15T10:30:00Z",68      "eventId": "550e8400-e29b-41d4-a716-446655440000",69      "description": "API key 'Production Key' was created",70      "user": {71        "userId": "user-123",72        "email": "admin@example.com",73        "givenName": "John",74        "familyName": "Doe"75      }76    }77  ],78  "nextPageToken": "550e8400-e29b-41d4-a716-446655440000"79}80```81
Files main
Menu

Theme