Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 06:06:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 06:06:34 +0300
commit41d446ba3f0518097eb350b142ecfbeeb6be83e6 (patch)
tree465127e4d63fe9d0c61ab7f281737e588a04a4ae /doc
parent386e5740f68fc7f49bc7692a28e927d6ea5ab056 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/audit_events.md4
-rw-r--r--doc/api/audit_events.md114
-rw-r--r--doc/api/groups.md4
3 files changed, 119 insertions, 3 deletions
diff --git a/doc/administration/audit_events.md b/doc/administration/audit_events.md
index 61ea673071e..ccb4ccbd525 100644
--- a/doc/administration/audit_events.md
+++ b/doc/administration/audit_events.md
@@ -59,6 +59,8 @@ From there, you can see the following actions:
- 2FA enforcement/grace period changed
- Roles allowed to create project changed
+Group events can also be accessed via the [Group Audit Events API](../api/audit_events.md#group-audit-events-starter)
+
### Project events **(STARTER)**
NOTE: **Note:**
@@ -107,6 +109,8 @@ the filter drop-down. You can further filter by specific group, project or user
![audit log](img/audit_log.png)
+Instance events can also be accessed via the [Instance Audit Events API](../api/audit_events.md#instance-audit-events-premium-only)
+
### Missing events
Some events are not being tracked in Audit Events. Please see the following
diff --git a/doc/api/audit_events.md b/doc/api/audit_events.md
index 0b8351062e5..e451b975d42 100644
--- a/doc/api/audit_events.md
+++ b/doc/api/audit_events.md
@@ -1,10 +1,12 @@
-# Audit Events API **(PREMIUM ONLY)**
+# Audit Events API
+
+## Instance Audit Events **(PREMIUM ONLY)**
The Audit Events API allows you to retrieve [instance audit events](../administration/audit_events.md#instance-events-premium-only).
To retrieve audit events using the API, you must [authenticate yourself](README.html#authentication) as an Administrator.
-## Retrieve all instance audit events
+### Retrieve all instance audit events
```
GET /audit_events
@@ -83,7 +85,7 @@ Example response:
]
```
-## Retrieve single instance audit event
+### Retrieve single instance audit event
```
GET /audit_events/:id
@@ -113,3 +115,109 @@ Example response:
"created_at": "2019-08-30T07:00:41.885Z"
}
```
+
+## Group Audit Events **(STARTER)**
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/34078) in GitLab 12.5.
+
+The Group Audit Events API allows you to retrieve [group audit events](../administration/audit_events.html#group-events-starter).
+
+To retrieve group audit events using the API, you must [authenticate yourself](README.html#authentication) as an Administrator or an owner of the group.
+
+### Retrieve all group audit events
+
+```
+GET /groups/:id/audit_events
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.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](README.md#pagination).
+
+```bash
+curl --header "PRIVATE-TOKEN: <your_access_token>" https://primary.example.com/api/v4/groups/60/audit_events
+```
+
+Example response:
+
+```json
+[
+ {
+ "id": 2,
+ "author_id": 1,
+ "entity_id": 60,
+ "entity_type": "Group",
+ "details": {
+ "custom_message": "Group marked for deletion",
+ "author_name": "Administrator",
+ "target_id": "flightjs",
+ "target_type": "Group",
+ "target_details": "flightjs",
+ "ip_address": "127.0.0.1",
+ "entity_path": "flightjs"
+ },
+ "created_at": "2019-08-28T19:36:44.162Z"
+ },
+ {
+ "id": 1,
+ "author_id": 1,
+ "entity_id": 60,
+ "entity_type": "Group",
+ "details": {
+ "add": "group",
+ "author_name": "Administrator",
+ "target_id": "flightjs",
+ "target_type": "Group",
+ "target_details": "flightjs",
+ "ip_address": "127.0.0.1",
+ "entity_path": "flightjs"
+ },
+ "created_at": "2019-08-27T18:36:44.162Z"
+ }
+]
+```
+
+### Retrieve a specific group audit event
+
+Only available to group owners and administrators.
+
+```
+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](README.md#namespaced-path-encoding) |
+| `audit_event_id` | integer | yes | ID of the audit event |
+
+```bash
+curl --header "PRIVATE-TOKEN: <your_access_token>" https://primary.example.com/api/v4/groups/60/audit_events/2
+```
+
+Example response:
+
+```json
+{
+ "id": 2,
+ "author_id": 1,
+ "entity_id": 60,
+ "entity_type": "Group",
+ "details": {
+ "custom_message": "Group marked for deletion",
+ "author_name": "Administrator",
+ "target_id": "flightjs",
+ "target_type": "Group",
+ "target_details": "flightjs",
+ "ip_address": "127.0.0.1",
+ "entity_path": "flightjs"
+ },
+ "created_at": "2019-08-28T19:36:44.162Z"
+}
+```
diff --git a/doc/api/groups.md b/doc/api/groups.md
index 312bd04e24c..94f46b11a0f 100644
--- a/doc/api/groups.md
+++ b/doc/api/groups.md
@@ -611,6 +611,10 @@ GET /groups?search=foobar
]
```
+## Group Audit Events **(STARTER)**
+
+Group audit events can be accessed via the [Group Audit Events API](audit_events.md#group-audit-events-starter)
+
## Sync group with LDAP **(CORE ONLY)**
Syncs the group with its linked LDAP group. Only available to group owners and administrators.