Event Logs
Retrieve event logs for pull request activity.
Get the events log
/repos/{owner}/{repository}/logs
Get the events logs of the requested repository
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
pull_request
integer
Get the events for the specified pull request
min: 1 · exclusive max: 2147483647
base_ref
string
Get events for PRs to the given base ref
min length: 1 · max length: 255
event_type
"action.assign" | "action.backport" | "action.close" | "action.comment" | "action.copy" | "action.delete_head_branch" | "action.dismiss_reviews" | "action.edit" | "action.github_actions" | "action.label" | "action.merge" | "action.post_check" | "action.queue.batch_bisection_end" | "action.queue.batch_bisection_start" | "action.queue.change" | "action.queue.checks.change" | "action.queue.checks_end" | "action.queue.checks_not_started" | "action.queue.checks_start" | "action.queue.enter" | "action.queue.leave" | "action.queue.merged" | "action.rebase" | "action.refresh" | "action.request_reviews" | "action.requeue" | "action.review" | "action.squash" | "action.unqueue" | "action.update" | "ci_issue.created" | "ci_issue.linked" | "ci_issue.merged" | "ci_issue.renamed" | "ci_issue.reopened" | "ci_issue.resolved" | "ci_issue.unresolved" | "command.dequeue" | "command.queue" | "command.requeue" | "queue.pause.create" | "queue.pause.delete" | "queue.pause.update" | "scheduled_freeze.create" | "scheduled_freeze.delete" | "scheduled_freeze.update"[]
The specific types of events to select
received_from
string <date-time>
Get the events received from this date
received_to
string <date-time>
Get the events received until this date
cursor
string
The opaque cursor of the current page. Must be extracted from RFC 5988 pagination links to get first/previous/next/last pages
per_page
integer
The number of items per page
min: 1 · max: 100
200 Successful Response
The number of items in this page
The number of items per page
Example Response
{
"size": 0,
"per_page": 0,
"events": [
{
"id": 0,
"received_at": "2024-01-15T09:00:00Z",
"trigger": "string",
"repository": "string",
"pull_request": 0,
"base_ref": "string",
"type": "action.assign",
"metadata": {}
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/logs" \
-H "Authorization: Bearer <token>"
Was this page helpful?
Thanks for your feedback!