summaryrefslogtreecommitdiff
path: root/doc/administration/audit_event_streaming.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-05 15:08:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-05 15:08:48 +0000
commit205b6baf2677879c35968d2b659225b58e8a1227 (patch)
tree10ed06185aae2f6ed6e7c61349a92acab605daca /doc/administration/audit_event_streaming.md
parentf34077e88198da754b4efecd1ce1d996ce982286 (diff)
downloadgitlab-ce-205b6baf2677879c35968d2b659225b58e8a1227.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/audit_event_streaming.md')
-rw-r--r--doc/administration/audit_event_streaming.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/administration/audit_event_streaming.md b/doc/administration/audit_event_streaming.md
index 18070942813..1e87b3c65bf 100644
--- a/doc/administration/audit_event_streaming.md
+++ b/doc/administration/audit_event_streaming.md
@@ -506,3 +506,52 @@ X-Gitlab-Audit-Event-Type: audit_operation
"event_type": "audit_operation"
}
```
+
+## Audit event streaming on merge request create actions
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90911) in GitLab 15.2.
+
+Stream audit events that relate to merge request create actions using the `/logs` endpoint.
+
+Send API requests that contain the `X-Gitlab-Audit-Event-Type` header with value `merge_request_create`. GitLab responds with JSON payloads with an
+`event_type` field set to `merge_request_create`.
+
+### Headers
+
+Headers are formatted as follows:
+
+```plaintext
+POST /logs HTTP/1.1
+Host: <DESTINATION_HOST>
+Content-Type: application/x-www-form-urlencoded
+X-Gitlab-Audit-Event-Type: merge_request_create
+X-Gitlab-Event-Streaming-Token: <DESTINATION_TOKEN>
+```
+
+### Example payload
+
+```json
+{
+ "id": 1,
+ "author_id": 1,
+ "entity_id": 24,
+ "entity_type": "Project",
+ "details": {
+ "author_name": "example_user",
+ "target_id": 132,
+ "target_type": "MergeRequest",
+ "target_details": "Update test.md",
+ "custom_message": "Added merge request",
+ "ip_address": "127.0.0.1",
+ "entity_path": "example-group/example-project"
+ },
+ "ip_address": "127.0.0.1",
+ "author_name": "Administrator",
+ "entity_path": "example-group/example-project",
+ "target_details": "Update test.md",
+ "created_at": "2022-07-04T00:19:22.675Z",
+ "target_type": "MergeRequest",
+ "target_id": 132,
+ "event_type": "merge_request_create"
+}
+```