Commit 54c2546c authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch '238141-inclusion-of-event-it-in-api-return' into 'master'

Expose ID in API Event Entity

Closes #238141

See merge request gitlab-org/gitlab!39669
parents 06ff0223 39c0cb9d
---
title: 'Expose ID in Event object returned from the public API.'
merge_request: 39669
author: Killian Brackey @kbrackey
type: changed
...@@ -80,6 +80,7 @@ Example response: ...@@ -80,6 +80,7 @@ Example response:
```json ```json
[ [
{ {
"id": 1,
"title":null, "title":null,
"project_id":1, "project_id":1,
"action_name":"opened", "action_name":"opened",
...@@ -99,6 +100,7 @@ Example response: ...@@ -99,6 +100,7 @@ Example response:
"author_username":"user3" "author_username":"user3"
}, },
{ {
"id": 2,
"title":null, "title":null,
"project_id":1, "project_id":1,
"action_name":"opened", "action_name":"opened",
...@@ -152,6 +154,7 @@ Example response: ...@@ -152,6 +154,7 @@ Example response:
```json ```json
[ [
{ {
"id": 3,
"title": null, "title": null,
"project_id": 15, "project_id": 15,
"action_name": "closed", "action_name": "closed",
...@@ -170,6 +173,7 @@ Example response: ...@@ -170,6 +173,7 @@ Example response:
"author_username": "root" "author_username": "root"
}, },
{ {
"id": 4,
"title": null, "title": null,
"project_id": 15, "project_id": 15,
"action_name": "pushed", "action_name": "pushed",
...@@ -197,6 +201,7 @@ Example response: ...@@ -197,6 +201,7 @@ Example response:
"target_title": null "target_title": null
}, },
{ {
"id": 5,
"title": null, "title": null,
"project_id": 15, "project_id": 15,
"action_name": "closed", "action_name": "closed",
...@@ -215,6 +220,7 @@ Example response: ...@@ -215,6 +220,7 @@ Example response:
"author_username": "root" "author_username": "root"
}, },
{ {
"id": 7,
"title": null, "title": null,
"project_id": 15, "project_id": 15,
"action_name": "commented on", "action_name": "commented on",
...@@ -286,6 +292,7 @@ Example response: ...@@ -286,6 +292,7 @@ Example response:
```json ```json
[ [
{ {
"id": 8
"title":null, "title":null,
"project_id":1, "project_id":1,
"action_name":"opened", "action_name":"opened",
...@@ -306,6 +313,7 @@ Example response: ...@@ -306,6 +313,7 @@ Example response:
"author_username":"user3" "author_username":"user3"
}, },
{ {
"id": 9,
"title":null, "title":null,
"project_id":1, "project_id":1,
"action_name":"opened", "action_name":"opened",
...@@ -326,6 +334,7 @@ Example response: ...@@ -326,6 +334,7 @@ Example response:
"author_username":"ted" "author_username":"ted"
}, },
{ {
"id": 10,
"title": null, "title": null,
"project_id": 1, "project_id": 1,
"action_name": "commented on", "action_name": "commented on",
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
module API module API
module Entities module Entities
class Event < Grape::Entity class Event < Grape::Entity
expose :id
expose :project_id, :action_name expose :project_id, :action_name
expose :target_id, :target_iid, :target_type, :author_id expose :target_id, :target_iid, :target_type, :author_id
expose :target_title expose :target_title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment