events

Retrieve contribution events for a user

Retrieves the contribution events for a specified user. Does not return events associated with epics or merge requests. Returns bulk push events with limited commit details.

get/api/v4/users/{id}/events

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or username of the user

Query parameters

pageinteger

Current page number

per_pageinteger

Number of items per page

actionstring

Event action to filter on

target_type'issue' | 'milestone' | 'merge_request' | 'note' | 'project' | 'snippet' | 'user' | 'wiki' | 'design'

Event target type to filter on

beforestring date

Include only events created before this date

afterstring date

Include only events created after this date

sort'asc' | 'desc'

Return events sorted in ascending and descending order

Response

Retrieve contribution events for a user

idinteger required
project_idinteger required
action_namestring required
target_idinteger required
target_iidinteger required
target_typestring required
author_idinteger required
target_titlestring required
created_atstring required
importedboolean required
imported_fromstring required
author_usernamestring required

Example response

[
  {
    "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",
      "noteable_id": 1,
      "noteable_type": "Issue",
      "project_id": 1,
      "commit_id": "7b09ce7e6f80347baf0316c8c94cdba9a0a7e91d",
      "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,
        "from_content": "Original content\n",
        "to_content": "New content\n"
      },
      "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_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"
  }
]

Changes

No recorded changes to this operation across all 5 revisions of this API.