From 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Feb 2023 13:49:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-9-stable-ee --- doc/api/audit_events.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'doc/api/audit_events.md') diff --git a/doc/api/audit_events.md b/doc/api/audit_events.md index db89262c84f..fec719b189c 100644 --- a/doc/api/audit_events.md +++ b/doc/api/audit_events.md @@ -6,14 +6,15 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Audit Events API **(PREMIUM)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/121) in GitLab 12.4. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/121) in GitLab 12.4. +> - [Author Email added to the response body](https://gitlab.com/gitlab-org/gitlab/-/issues/386322) in GitLab 15.9. ## Instance Audit Events **(PREMIUM SELF)** The Audit Events API allows you to retrieve [instance audit events](../administration/audit_events.md#instance-events). This API cannot retrieve group or project audit events. -To retrieve audit events using the API, you must [authenticate yourself](index.md#authentication) as an Administrator. +To retrieve audit events using the API, you must [authenticate yourself](rest/index.md#authentication) as an Administrator. ### Retrieve all instance audit events @@ -31,7 +32,7 @@ GET /audit_events By default, `GET` requests return 20 results at a time because the API results are paginated. -Read more on [pagination](index.md#pagination). +Read more on [pagination](rest/index.md#pagination). ```shell curl --header "PRIVATE-TOKEN: " "https://primary.example.com/api/v4/audit_events" @@ -49,6 +50,7 @@ Example response: "details": { "custom_message": "Project archived", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": "flightjs/flight", "target_type": "Project", "target_details": "flightjs/flight", @@ -65,6 +67,7 @@ Example response: "details": { "add": "group", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": "flightjs", "target_type": "Group", "target_details": "flightjs", @@ -83,6 +86,7 @@ Example response: "from": "hello@flightjs.com", "to": "maintainer@flightjs.com", "author_name": "Andreas", + "author_email": "admin@example.com", "target_id": 51, "target_type": "User", "target_details": "Andreas", @@ -119,6 +123,7 @@ Example response: "details": { "custom_message": "Project archived", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": "flightjs/flight", "target_type": "Project", "target_details": "flightjs/flight", @@ -142,7 +147,7 @@ A user with: - The Owner role can retrieve group audit events of all users. - The Developer or Maintainer role is limited to group audit events based on their individual actions. -This endpoint supports both offset-based and [keyset-based](index.md#keyset-based-pagination) pagination. Keyset-based +This endpoint supports both offset-based and [keyset-based](rest/index.md#keyset-based-pagination) pagination. Keyset-based pagination is recommended when requesting consecutive pages of results. ### Retrieve all group audit events @@ -153,14 +158,14 @@ GET /groups/:id/audit_events | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | | `created_after` | string | no | Return group audit events created on or after the given time. Format: ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ)` | | `created_before` | string | no | Return group audit events created on or before the given time. Format: ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`) | By default, `GET` requests return 20 results at a time because the API results are paginated. -Read more on [pagination](index.md#pagination). +Read more on [pagination](rest/index.md#pagination). ```shell curl --header "PRIVATE-TOKEN: " "https://primary.example.com/api/v4/groups/60/audit_events" @@ -178,6 +183,7 @@ Example response: "details": { "custom_message": "Group marked for deletion", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": "flightjs", "target_type": "Group", "target_details": "flightjs", @@ -194,6 +200,7 @@ Example response: "details": { "add": "group", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": "flightjs", "target_type": "Group", "target_details": "flightjs", @@ -215,7 +222,7 @@ GET /groups/:id/audit_events/:audit_event_id | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | | `audit_event_id` | integer | yes | The ID of the audit event | ```shell @@ -233,6 +240,7 @@ Example response: "details": { "custom_message": "Group marked for deletion", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": "flightjs", "target_type": "Group", "target_details": "flightjs", @@ -260,14 +268,14 @@ GET /projects/:id/audit_events | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) | | `created_after` | string | no | Return project audit events created on or after the given time. Format: ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`) | | `created_before` | string | no | Return project audit events created on or before the given time. Format: ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`) | By default, `GET` requests return 20 results at a time because the API results are paginated. -Read more on [pagination](index.md#pagination). +Read more on [pagination](rest/index.md#pagination). ```shell curl --header "PRIVATE-TOKEN: " "https://primary.example.com/api/v4/projects/7/audit_events" @@ -287,6 +295,7 @@ Example response: "from": "", "to": "true", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": 7, "target_type": "Project", "target_details": "twitter/typeahead-js", @@ -305,6 +314,7 @@ Example response: "from": "false", "to": "true", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": 7, "target_type": "Project", "target_details": "twitter/typeahead-js", @@ -326,7 +336,7 @@ GET /projects/:id/audit_events/:audit_event_id | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) | | `audit_event_id` | integer | yes | The ID of the audit event | ```shell @@ -346,6 +356,7 @@ Example response: "from": "", "to": "true", "author_name": "Administrator", + "author_email": "admin@example.com", "target_id": 7, "target_type": "Project", "target_details": "twitter/typeahead-js", -- cgit v1.2.3