Skip to content

List all visible events for a project

GET
/api/v4/projects/{id}/events

Lists all visible events for a specified project. When a push exceeds the Push event activities limit, a single bulk push event is returned instead of individual commit events. Bulk push events have limited commit details: commit_count is 0, ref_count shows the number of refs pushed, and individual commit attributes are null.

id
required
One of:
string

The ID or URL-encoded path of the project

action
string
nullable

Event action to filter on

target_type
string
nullable
Allowed values: issue milestone merge_request note project snippet user wiki design

Event target type to filter on

before
string format: date
nullable

Include only events created before this date

after
string format: date
nullable

Include only events created after this date

sort
string
default: desc nullable
Allowed values: asc desc

Return events sorted in ascending and descending order

page
integer
default: 1 nullable

Current page number

Example
1
per_page
integer
default: 20 nullable

Number of items per page

Example
20

OK

Media type application/json
object
id
integer format: int64
project_id
integer format: int64
action_name
string
target_id
integer format: int64
target_iid
integer
target_type
string
author_id
integer format: int64
target_title
string
created_at
string
note
object
id
integer format: int64
type
string
body
string
author
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
created_at
string format: date-time
updated_at
string format: date-time
system
boolean
noteable_id
integer format: int64
noteable_type
string
project_id
integer format: int64
commit_id
string
position
object
resolvable
boolean
resolved
boolean
resolved_by
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
resolved_at
string format: date-time
suggestions
object
id
integer format: int64
from_line
integer
to_line
integer
appliable
boolean
applied
boolean
from_content
string
to_content
string
confidential
boolean
internal
boolean
imported
boolean
imported_from
string
noteable_iid
integer
commands_changes
object
author
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
wiki_page
object
format
string
slug
string
title
string
wiki_page_meta_id
integer format: int64
imported
boolean
imported_from
string
push_data
object
commit_count
integer
action
string
ref_type
string
commit_from
string
commit_to
string
ref
string
commit_title
string
ref_count
integer
author_username
string
Example
{
"id": 1,
"project_id": 2,
"action_name": "closed",
"target_id": 160,
"target_iid": 157,
"target_type": "Issue",
"author_id": 25,
"target_title": "Public project search field",
"created_at": "2017-02-09T10:43:19.667Z",
"note": {
"id": 1,
"type": "DiscussionNote",
"body": "Note body.",
"author": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
},
"created_at": "2022-01-31T15:10:44.988Z",
"updated_at": "2022-01-31T15:10:44.988Z",
"system": false,
"noteable_id": 1,
"noteable_type": "Issue",
"project_id": 1,
"commit_id": "7b09ce7e6f80347baf0316c8c94cdba9a0a7e91d",
"resolvable": false,
"resolved": false,
"resolved_by": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
},
"resolved_at": "2022-01-31T15:10:44.988Z",
"suggestions": {
"id": 1,
"from_line": 1,
"to_line": 1,
"appliable": true,
"applied": false,
"from_content": "Original content\n",
"to_content": "New content\n"
},
"confidential": false,
"internal": false,
"imported": false,
"imported_from": "github",
"noteable_iid": 1
},
"author": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
},
"wiki_page": {
"format": "markdown",
"slug": "deploy",
"title": "deploy",
"wiki_page_meta_id": 123
},
"imported": false,
"imported_from": "none",
"push_data": {
"commit_count": 1,
"action": "pushed",
"ref_type": "branch",
"commit_from": "50d4420237a9de7be1304607147aec22e4a14af7",
"commit_to": "c5feabde2d8cd023215af4d2ceeb7a64839fc428",
"ref": "master",
"commit_title": "Add simple search to projects in public area",
"ref_count": 1
},
"author_username": "root"
}

Bad Request

Not Found