Activity Log

Activity Log endpoints for the Mergify API.


Get the activity log #

GET /repos/{owner}/{repository}/logs

Get the activity log of the requested repository. Supports filtering by `event_type`, derived `outcome` (`success` / `failure` / `pending` / `neutral`), `trigger` (include only these trigger strings — Datadog `Only`), and `not_trigger` (exclude). `trigger` and `not_trigger` are mutually exclusive.

Application Key GitHub Token
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[]

Filter events by pull-request number. Repeatable to match several PRs at once (e.g. `?pull_request=1&pull_request=2`).

base_ref string

Get events for PRs to the given base ref

min length: 1 · max length: 255

batch_pull integer[]

Filter to batch (draft) pull requests' own lifecycle events by number (surfaced in the dashboard as "Batch Pull Request"). Repeatable to match several batches at once. The draft PR is the Mergify-opened pull request that speculatively checks a batch; this returns each batch's `action.queue.checks_start` / `action.queue.checks_end` events (which snapshot the draft PR number) plus the batch's bisection events. When `in_place` is true the number is the user's own PR rather than a Mergify draft. The number rotates on checks-retry — each event snapshots the number at that attempt. Mutually exclusive with `not_batch_pull` (exclusion).

not_batch_pull integer[]

Exclude batch (draft) pull requests' own lifecycle events by number — the same event set `batch_pull` includes, negated. Repeatable. Mirrors Datadog's facet semantics: unchecking a batch pull request in the dashboard sidebar adds it to the exclusion list. Mutually exclusive with `batch_pull` (positive include).

event_type "action.assign" | "action.backport" | "action.close" | "action.comment" | "action.copy" | "action.delete_head_branch" | "action.dequeue" | "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.review" | "action.squash" | "action.update" | "ci_insights.auto_quarantine.disabled" | "ci_insights.auto_quarantine.enabled" | "ci_insights.auto_quarantine.modified" | "ci_insights.job_retried" | "command.dequeue" | "command.queue" | "queue.pause.create" | "queue.pause.delete" | "queue.pause.update" | "scheduled_freeze.create" | "scheduled_freeze.delete" | "scheduled_freeze.update" | "test.dequarantined" | "test.quarantined"[]

The specific types of events to select

not_event_type "action.assign" | "action.backport" | "action.close" | "action.comment" | "action.copy" | "action.delete_head_branch" | "action.dequeue" | "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.review" | "action.squash" | "action.update" | "ci_insights.auto_quarantine.disabled" | "ci_insights.auto_quarantine.enabled" | "ci_insights.auto_quarantine.modified" | "ci_insights.job_retried" | "command.dequeue" | "command.queue" | "queue.pause.create" | "queue.pause.delete" | "queue.pause.update" | "scheduled_freeze.create" | "scheduled_freeze.delete" | "scheduled_freeze.update" | "test.dequarantined" | "test.quarantined"[]

Exclude events whose type matches any of the given values. Mutually exclusive with `event_type` (positive include).

outcome "success" | "failure" | "pending" | "neutral"[]

Filter events by derived outcome label (`success` / `failure` / `pending` / `neutral`). Repeatable to match several outcomes at once (e.g. `?outcome=success&outcome=failure`).

not_outcome "success" | "failure" | "pending" | "neutral"[]

Exclude events whose derived outcome label matches any of the given values (`success` / `failure` / `pending` / `neutral`). Repeatable. Mirrors Datadog's facet semantics: unchecking an outcome in the dashboard sidebar adds it to the exclusion list. Mutually exclusive with `outcome` (positive include).

trigger string[]

Include only events whose `trigger` matches one of the given values (exact match). Repeatable. Mirrors Datadog's facet behaviour after clicking `Only`: the URL switches from exclusion mode to inclusion mode with a positive list — shorter than `not_trigger=<everything else>`. Mutually exclusive with `not_trigger`.

not_trigger string[]

Exclude events whose `trigger` matches any of the given values (exact match). Repeatable. Mirrors Datadog's facet semantics: the default state is `all triggers included`, and unchecking a trigger in the dashboard sidebar adds it to the exclusion list. Mutually exclusive with `trigger` (positive include).

not_pull_request integer[]

Exclude events whose pull request matches any of the given numbers. Mutually exclusive with `pull_request` (positive include).

received_from string <date-time>

Start of the time range (ISO 8601 with timezone, e.g. 2024-01-01T00:00:00Z). Defaults to `received_to - 1 day`.

received_to string <date-time>

End of the time range (ISO 8601 with timezone, e.g. 2024-01-01T00:00:00Z). Defaults to `now`.

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
sizeintegerrequired

The number of items in this page

per_pageintegerrequired

The number of items per page

eventsobject (43 types)[]required

The list of events

Discriminated by type — 43 types
action.assignEventAssign
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventAssignMetadatarequired
addedstring[]required
removedstring[]required
action.backportEventBackport
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCopyMetadatarequired
tostringrequired
pull_request_numberintegerrequired
conflictsbooleanrequired
action.closeEventClose
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCloseMetadatarequired
messagestringrequired
action.commentEventComment
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCommentMetadatarequired
messagestringrequired
action.copyEventCopy
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCopyMetadatarequired
tostringrequired
pull_request_numberintegerrequired
conflictsbooleanrequired
action.delete_head_branchEventDeleteHeadBranch
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventDeleteHeadBranchMetadatarequired
branchstringrequired
action.dequeueEventDequeue
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
metadataEventNoMetadatarequired
typestringrequired
action.dismiss_reviewsEventDismissReviews
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventDismissReviewsMetadatarequired
usersstring[]required
action.editEventEdit
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventEditMetadatarequired
draftbooleanrequired
action.github_actionsEventGithubActions
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventGithubActionsMetadatarequired
workflowstringrequired
inputsobjectrequired
action.labelEventLabel
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventLabelMetadatarequired
addedstring[]required
removedstring[]required
action.mergeEventMerge
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventMergeMetadatarequired
branchstringrequired
action.post_checkEventPostCheck
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventPostCheckMetadatarequired
conclusionstringrequired
titlestringrequired
summarystringrequired
action.queue.batch_bisection_endEventQueueBatchBisectionEnd
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueBatchBisectionEndMetadatarequired
queue_namestringrequired
partition_namestringrequired
priority_rule_namestring | nullrequired
original_batch_pr_numbersinteger[]required
culprit_foundbooleanrequired
culprit_pr_numbersinteger[]required
confirmed_culprit_pr_numbersinteger[] | nullrequired
dropped_unverified_pr_numbersinteger[] | nullrequired
remaining_pr_numbersinteger[]required
max_failure_resolution_reachedbooleanrequired
session_idstring <uuid>required
batch_idstring <uuid> | nullrequired

The batch this event concerns. Correlate the queue events for a batch (checks_start / checks_end / leave / bisection) on this id. Null on events persisted before this field was added.

train_car_idstring <uuid> | nullrequired

Deprecated: use `batch_id` instead (same value).

action.queue.batch_bisection_startEventQueueBatchBisectionStart
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueBatchBisectionStartMetadatarequired
queue_namestringrequired
partition_namestringrequired
priority_rule_namestring | nullrequired
original_batch_pr_numbersinteger[]required
batch_size_before_splitintegerrequired
number_of_sub_batchesintegerrequired
bisection_depthintegerrequired
is_top_levelbooleanrequired
session_idstring <uuid>required
batch_idstring <uuid> | nullrequired

The batch this event concerns. Correlate the queue events for a batch (checks_start / checks_end / leave / bisection) on this id. Null on events persisted before this field was added.

train_car_idstring <uuid> | nullrequired

Deprecated: use `batch_id` instead (same value).

action.queue.changeEventQueueChange
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueChangeMetadatarequired
queue_namestringrequired
partition_namestringrequired
priority_rule_namestring | nullrequired
sizeintegerrequired
action.queue.checks.changeEventQueueChecksChange
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueChecksChangeMetadatarequired
queue_namestringrequired
partition_namestringrequired
running_checksintegerrequired
action.queue.checks_endEventQueueChecksEnd
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueChecksEndMetadatarequired
abortedbooleanrequired
abort_code"PR_DEQUEUED" | "PR_DEQUEUED_FROM_PARTITION" | "PR_AHEAD_DEQUEUED" | "BATCH_AHEAD_FAILED" | "PR_WITH_HIGHER_PRIORITY_QUEUED" | "SCHEDULED_FREEZE_STATUS_CHANGED" | "SPECULATIVE_CHECK_NUMBER_REDUCED" | "CHECKS_TIMEOUT" | "CHECKS_FAILED" | "DROPPED_BY_BISECTION_ELIMINATION" | "QUEUE_RULE_MISSING" | "BASE_BRANCH_MISSING" | "BASE_BRANCH_CHANGED" | "PR_UNEXPECTEDLY_FAILED_TO_MERGE" | "BATCH_MAX_FAILURE_RESOLUTION_ATTEMPTS" | "PR_CHECKS_STOPPED_BECAUSE_MERGE_QUEUE_PAUSE" | "CONFLICT_WITH_BASE_BRANCH" | "CONFLICT_WITH_PULL_AHEAD" | "BRANCH_UPDATE_FAILED" | "DRAFT_PULL_REQUEST_CHANGED" | "BATCH_PULL_REQUEST_CLOSED" | "PULL_REQUEST_UPDATED" | "MERGE_QUEUE_RESET" | "INCOMPATIBILITY_WITH_BRANCH_PROTECTIONS" | "PR_MANUALLY_MERGED" | "DRAFT_PULL_REQUEST_CREATION_FAILED" | "DRAFT_PULL_REQUEST_CREATION_BRANCH_NOT_INDEXED" | "CONFIGURATION_CHANGED" | "UNPROCESSABLE_PULL_REQUEST" | "PR_MANUALLY_DEQUEUED" | "STACK_PREDECESSOR_DEQUEUED" | "INTERMEDIATE_RESULTS_SKIPPED" | "CHECKS_RETRIED" | "SCHEDULE_BLOCKED_AHEAD_YIELDED" | "BASE_REF_ALIGNMENT_TIMEOUT" | "GITHUB_STACKED_PULL_REQUEST_MERGE_UNSUPPORTED" | nullrequired
abort_reasonstring | nullrequired
abort_status"DEFINITIVE" | "REEMBARKED"required
Enum: DEFINITIVE REEMBARKED
branchstringrequired
partition_namestringrequired
priority_rule_namestring | nullrequired
queue_namestringrequired
queued_atstring <date-time>required
retry_attemptinteger | nullrequired
max_retriesinteger | nullrequired
speculative_check_pull_requestSignals_SpeculativeCheckPullRequestrequired
numberintegerrequired
in_placebooleanrequired
checks_timed_outbooleanrequired
checks_conclusion"success" | "failure" | "neutral" | "cancelled" | "skipped" | "stale" | "action_required" | "timed_out" | "error" | "pending"required
Enum: success failure neutral cancelled skipped stale action_required timed_out error pending
checks_started_atstring <date-time> | nullrequired
checks_ended_atstring <date-time> | nullrequired
unsuccessful_checksQueueCheck_Serialized[]required
pull_request_numbersinteger[]required
batch_idstring <uuid> | nullrequired

The batch this event concerns. Correlate the queue events for a batch (checks_start / checks_end / leave / bisection) on this id. Null on events persisted before this field was added.

train_car_idstring <uuid> | nullrequired

Deprecated: use `batch_id` instead (same value).

scopesstring[] | nullrequired

The scopes of the batch checking this pull request. Batches with disjoint scopes run their checks concurrently, so the scope tells which parallel lane the batch occupies. Empty when the queue is not scoped. Null on events persisted before this field was added.

parent_batch_idsstring <uuid>[] | nullrequired

The batch ids this batch descends from. A batch inherits its parents' check results, so this links a batch back to the ones checked before it. Empty on a first check with no predecessor. Null on events persisted before this field was added.

session_idstring <uuid>required
all_scopesboolean | null

Whether the train car checking this pull request impacts every scope (a merge-queue barrier). Null on events persisted before this field existed.

action.queue.checks_not_startedEventQueueChecksNotStarted
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueChecksNotStartedMetadatarequired
branchstringrequired
partition_namestring | nullrequired
priority_rule_namestring | nullrequired
queue_namestringrequired
queued_atstring <date-time>required
reasonstringrequired
session_idstring <uuid>required
action.queue.checks_startEventQueueChecksStart
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueChecksStartMetadatarequired
branchstringrequired
partition_namestring | nullrequired
priority_rule_namestring | nullrequired
queue_namestringrequired
queued_atstring <date-time>required
start_reasonstringrequired
speculative_check_pull_requestSignals_SpeculativeCheckPullRequestrequired
numberintegerrequired
in_placebooleanrequired
checks_timed_outbooleanrequired
checks_conclusion"success" | "failure" | "neutral" | "cancelled" | "skipped" | "stale" | "action_required" | "timed_out" | "error" | "pending"required
Enum: success failure neutral cancelled skipped stale action_required timed_out error pending
checks_started_atstring <date-time> | nullrequired
checks_ended_atstring <date-time> | nullrequired
unsuccessful_checksQueueCheck_Serialized[]required
pull_request_numbersinteger[]required
batch_idstring <uuid> | nullrequired

The batch this event concerns. Correlate the queue events for a batch (checks_start / checks_end / leave / bisection) on this id. Null on events persisted before this field was added.

train_car_idstring <uuid> | nullrequired

Deprecated: use `batch_id` instead (same value).

scopesstring[] | nullrequired

The scopes of the batch checking this pull request. Batches with disjoint scopes run their checks concurrently, so the scope tells which parallel lane the batch occupies. Empty when the queue is not scoped. Null on events persisted before this field was added.

parent_batch_idsstring <uuid>[] | nullrequired

The batch ids this batch descends from. A batch inherits its parents' check results, so this links a batch back to the ones checked before it. Empty on a first check with no predecessor. Null on events persisted before this field was added.

previous_batch_idstring <uuid> | nullrequired

The ID of the batch checked just before this one for the same pull request, when this check is a restart. Null on the first check.

session_idstring <uuid>required
all_scopesboolean | null

Whether the train car checking this pull request impacts every scope (a merge-queue barrier). Null on events persisted before this field existed.

action.queue.enterEventQueueEnter
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueEnterMetadatarequired
queue_namestringrequired
branchstringrequired
queued_atstring <date-time>required
partition_namestring | nullrequired
priority_rule_namestring | nullrequired
session_idstring <uuid>required
action.queue.leaveEventQueueLeave
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueLeaveMetadatarequired
reasonstringrequired
mergedbooleanrequired
queue_namestringrequired
branchstringrequired
partition_namestringrequired
queued_atstring <date-time>required
seconds_waiting_for_scheduleintegerrequired
seconds_waiting_for_freezeintegerrequired
priority_rule_namestring | nullrequired
conditions_evaluationQueueConditionEvaluationResult_Serialized | nullrequired
matchbooleanrequired
labelstringrequired
is_label_user_inputbooleanrequired
descriptionstring | nullrequired
attribute_namestring | nullrequired
operatorstring | nullrequired
scheduleobject | nullrequired
subconditionsQueueConditionEvaluationResult_Serialized[]required
evaluationsQueueConditionEvaluationResult_Evaluation_Serialized[]required
checksQueueCheck_Serialized[]required
namestringrequired
descriptionstringrequired
urlstring | nullrequired
details_urlstring | null
state"failure" | "error" | "cancelled" | "action_required" | "timed_out" | "pending" | "neutral" | "skipped" | "stale" | "success"required
Enum: failure error cancelled action_required timed_out pending neutral skipped stale success
avatar_urlstring | nullrequired
unsuccessful_checksQueueCheck_Serialized[]required
namestringrequired
descriptionstringrequired
urlstring | nullrequired
details_urlstring | null
state"failure" | "error" | "cancelled" | "action_required" | "timed_out" | "pending" | "neutral" | "skipped" | "stale" | "success"required
Enum: failure error cancelled action_required timed_out pending neutral skipped stale success
avatar_urlstring | nullrequired
pull_request_head_shastringrequired
session_idstring <uuid> | nullrequired
dequeue_code"PR_MERGED" | "PR_MERGED_INTERMEDIATE_RESULTS_SKIPPED" | "PR_DEQUEUED" | "PR_DEQUEUED_FROM_PARTITION" | "PR_AHEAD_DEQUEUED" | "BATCH_AHEAD_FAILED" | "PR_WITH_HIGHER_PRIORITY_QUEUED" | "SCHEDULED_FREEZE_STATUS_CHANGED" | "SPECULATIVE_CHECK_NUMBER_REDUCED" | "CHECKS_TIMEOUT" | "CHECKS_FAILED" | "DROPPED_BY_BISECTION_ELIMINATION" | "QUEUE_RULE_MISSING" | "BASE_BRANCH_MISSING" | "BASE_BRANCH_CHANGED" | "PR_UNEXPECTEDLY_FAILED_TO_MERGE" | "BATCH_MAX_FAILURE_RESOLUTION_ATTEMPTS" | "PR_CHECKS_STOPPED_BECAUSE_MERGE_QUEUE_PAUSE" | "CONFLICT_WITH_BASE_BRANCH" | "CONFLICT_WITH_PULL_AHEAD" | "BRANCH_UPDATE_FAILED" | "DRAFT_PULL_REQUEST_CHANGED" | "BATCH_PULL_REQUEST_CLOSED" | "PULL_REQUEST_UPDATED" | "MERGE_QUEUE_RESET" | "INCOMPATIBILITY_WITH_BRANCH_PROTECTIONS" | "PR_MANUALLY_MERGED" | "DRAFT_PULL_REQUEST_CREATION_FAILED" | "DRAFT_PULL_REQUEST_CREATION_BRANCH_NOT_INDEXED" | "CONFIGURATION_CHANGED" | "UNPROCESSABLE_PULL_REQUEST" | "PR_MANUALLY_DEQUEUED" | "STACK_PREDECESSOR_DEQUEUED" | "INTERMEDIATE_RESULTS_SKIPPED" | "CHECKS_RETRIED" | "SCHEDULE_BLOCKED_AHEAD_YIELDED" | "BASE_REF_ALIGNMENT_TIMEOUT" | "GITHUB_STACKED_PULL_REQUEST_MERGE_UNSUPPORTED" | nullrequired
batch_idstring <uuid> | nullrequired

The batch the pull request was in when it left the queue. Use it to correlate this leave with the batch's checks_start / checks_end events. Null when the pull request left before being embarked in a batch, or on events persisted before this field was added.

scopesstring[] | nullrequired

The scopes of the batch the pull request was in when it left. Empty when the queue is not scoped. Null when the pull request left before being embarked in a batch, or on events persisted before this field was added.

all_scopesboolean | nullrequired

Whether the train car the pull request was in impacted every scope (a merge-queue barrier). Null when the pull request left before being embarked in a car, or on events persisted before this field was added.

action.queue.mergedEventQueueMerged
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueueMergedMetadatarequired
branchstringrequired
partition_namesstring[]required
queue_namestringrequired
queued_atstring <date-time>required
priority_rule_namestring | nullrequired
session_idstring <uuid>required
merge_commit_shastring | nullrequired

The commit this queue merge landed on the base branch (its new tip): a merge/squash commit, or the fast-forwarded head SHA for fast-forward merges. Null on events persisted before this field was added.

action.rebaseEventRebase
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
metadataEventNoMetadatarequired
typestringrequired
action.refreshEventRefresh
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
metadataEventNoMetadatarequired
typestringrequired
action.request_reviewsEventRequestReviews
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventRequestReviewsMetadatarequired
reviewersstring[]required
team_reviewersstring[]required
action.reviewEventReview
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventReviewMetadatarequired
review_typestringrequired
reviewerstring | nullrequired
messagestring | nullrequired
action.squashEventSquash
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
metadataEventNoMetadatarequired
typestringrequired
action.updateEventUpdate
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
metadataEventNoMetadatarequired
typestringrequired
ci_insights.auto_quarantine.disabledEventCiInsightsAutoQuarantineDisabled
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCiInsightsAutoQuarantineDisabledMetadatarequired
disabled_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
disabled_atstring <date-time>required
auto_quarantine_config_attributesAutoQuarantineConfigEventLogAttributesrequired
ignore_broken_on_default_branchbooleanrequired
disabled_by_staffbooleanrequired
ci_insights.auto_quarantine.enabledEventCiInsightsAutoQuarantineEnabled
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCiInsightsAutoQuarantineEnabledMetadatarequired
enabled_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
enabled_atstring <date-time>required
auto_quarantine_config_attributesAutoQuarantineConfigEventLogAttributesrequired
ignore_broken_on_default_branchbooleanrequired
enabled_by_staffbooleanrequired
ci_insights.auto_quarantine.modifiedEventCiInsightsAutoQuarantineModified
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCiInsightsAutoQuarantineModifiedMetadatarequired
updated_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time>required
auto_quarantine_config_attributes_beforeAutoQuarantineConfigEventLogAttributesrequired
ignore_broken_on_default_branchbooleanrequired
auto_quarantine_config_attributes_afterAutoQuarantineConfigEventLogAttributesrequired
ignore_broken_on_default_branchbooleanrequired
updated_by_staffbooleanrequired
ci_insights.job_retriedEventCiInsightsJobRetried
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCiInsightsJobRetriedMetadatarequired
rule_idstring <uuid>required
rule_namestringrequired
max_retryintegerrequired
retry_mode"job" | "pipeline"required
Enum: job pipeline
retry_attemptintegerrequired
condition_matchesSimpleConditionMatchSerialized | LogPatternAnnotationConditionMatchSerialized | LogPatternJobLogConditionMatchSerialized[]required
outcome"retried" | "skipped_quota_exceeded"required
Enum: retried skipped_quota_exceeded
workflow_run_idinteger | nullrequired
job_urlstring | nullrequired
command.dequeueEventCommandDequeue
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCommandMetadatarequired
authorGitHubAccountrequired
loginstringrequired
idintegerrequired
type"User" | "Organization" | "Bot" | "Mannequin" | "Enterprise" | nullrequired
avatar_urlstring | null
comment_idintegerrequired
session_idstring <uuid> | nullrequired
command_trigger"comment" | "checkbox" | nullrequired
trigger_comment_urlstring | nullrequired
command.queueEventCommandQueue
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventCommandMetadatarequired
authorGitHubAccountrequired
loginstringrequired
idintegerrequired
type"User" | "Organization" | "Bot" | "Mannequin" | "Enterprise" | nullrequired
avatar_urlstring | null
comment_idintegerrequired
session_idstring <uuid> | nullrequired
command_trigger"comment" | "checkbox" | nullrequired
trigger_comment_urlstring | nullrequired
queue.pause.createEventQueuePauseCreate
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueuePauseCreateMetadatarequired
reasonstringrequired
created_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
created_by_staffbooleanrequired
queue.pause.deleteEventQueuePauseDelete
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueuePauseDeleteMetadatarequired
deleted_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
deleted_by_staffbooleanrequired
queue.pause.updateEventQueuePauseUpdate
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventQueuePauseUpdateMetadatarequired
reasonstringrequired
updated_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_by_staffbooleanrequired
scheduled_freeze.createEventScheduledFreezeCreate
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventScheduledFreezeCreateMetadatarequired
scheduled_freeze_attributesScheduledFreezeEventLogAttributesrequired
reasonstringrequired
startstring <date-time>required
endstring <date-time> | nullrequired
timezonestringrequired
matching_conditionsMatchingConditionsDict-Output | string[]required
exclude_conditionsMatchingConditionsDict-Output | string[]required
created_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
created_atstring <date-time>required
created_by_staffbooleanrequired
scheduled_freeze.deleteEventScheduledFreezeDelete
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventScheduledFreezeDeleteMetadatarequired
scheduled_freeze_attributesScheduledFreezeEventLogAttributesrequired
reasonstringrequired
startstring <date-time>required
endstring <date-time> | nullrequired
timezonestringrequired
matching_conditionsMatchingConditionsDict-Output | string[]required
exclude_conditionsMatchingConditionsDict-Output | string[]required
reasonstringrequired
deleted_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
deleted_atstring <date-time>required
deleted_by_staffbooleanrequired
scheduled_freeze.updateEventScheduledFreezeUpdate
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventScheduledFreezeUpdateMetadatarequired
scheduled_freeze_attributes_beforeScheduledFreezeEventLogAttributesrequired
reasonstringrequired
startstring <date-time>required
endstring <date-time> | nullrequired
timezonestringrequired
matching_conditionsMatchingConditionsDict-Output | string[]required
exclude_conditionsMatchingConditionsDict-Output | string[]required
scheduled_freeze_attributes_afterScheduledFreezeEventLogAttributesrequired
reasonstringrequired
startstring <date-time>required
endstring <date-time> | nullrequired
timezonestringrequired
matching_conditionsMatchingConditionsDict-Output | string[]required
exclude_conditionsMatchingConditionsDict-Output | string[]required
updated_byActorrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time>required
updated_by_staffbooleanrequired
test.dequarantinedEventTestDequarantined
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventTestDequarantinedMetadatarequired
quarantine_idstring <uuid>required
test_idstring <uuid>
test_namestringrequired
source"manual" | "auto"required
Enum: manual auto
original_quarantineTestQuarantineSnapshotrequired
source"manual" | "auto"required
Enum: manual auto
reasonstringrequired
branchstring | nullrequired
created_atstring <date-time>required
health_status_at_event"healthy" | "flaky" | "broken"required
Enum: healthy flaky broken
dequarantined_atstring <date-time>required
dequarantined_byActor | nullrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
dequarantined_by_staffbooleanrequired
test.quarantinedEventTestQuarantined
idintegerrequired
received_atstring <date-time>required
triggerstringrequired
repositorystringrequired
pull_requestinteger | nullrequired
base_refstring | nullrequired
outcome"success" | "failure" | "pending" | "neutral"required
Enum: success failure pending neutral
typestringrequired
metadataEventTestQuarantinedMetadatarequired
quarantine_idstring <uuid>required
test_idstring <uuid>
test_namestringrequired
source"manual" | "auto"required
Enum: manual auto
reasonstringrequired
branchstring | nullrequired
quarantined_atstring <date-time>required
health_status_at_event"healthy" | "flaky" | "broken"required
Enum: healthy flaky broken
quarantined_byActor | nullrequired
type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
quarantined_by_staffbooleanrequired
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",
      "outcome": "success",
      "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>"

Get aggregated event counts #

GET /repos/{owner}/{repository}/logs/aggregate

Aggregations (total / histogram / event-type / outcome / trigger / pull-request / batch-pull-request facet counts) over the same filter set as `/logs`. The response stays consistent with what the row endpoint returns: `total` matches what the table will show; unchecked values produce no row in their facet list (the sidebar hides their count rather than display `0`). `by_outcome` is derived from `event.type` (most types map directly; a few refine the label from event metadata); `by_trigger`, `by_pull_request`, and `by_batch_pull_request` return the top 200 values by count in the window, self-excluding their own filters.

Application Key GitHub Token
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[]

Filter events by pull-request number. Repeatable to match several PRs at once (e.g. `?pull_request=1&pull_request=2`).

base_ref string

Get events for PRs to the given base ref

min length: 1 · max length: 255

batch_pull integer[]

Filter to batch (draft) pull requests' own lifecycle events by number (surfaced in the dashboard as "Batch Pull Request"). Repeatable to match several batches at once. The draft PR is the Mergify-opened pull request that speculatively checks a batch; this returns each batch's `action.queue.checks_start` / `action.queue.checks_end` events (which snapshot the draft PR number) plus the batch's bisection events. When `in_place` is true the number is the user's own PR rather than a Mergify draft. The number rotates on checks-retry — each event snapshots the number at that attempt. Mutually exclusive with `not_batch_pull` (exclusion).

not_batch_pull integer[]

Exclude batch (draft) pull requests' own lifecycle events by number — the same event set `batch_pull` includes, negated. Repeatable. Mirrors Datadog's facet semantics: unchecking a batch pull request in the dashboard sidebar adds it to the exclusion list. Mutually exclusive with `batch_pull` (positive include).

event_type "action.assign" | "action.backport" | "action.close" | "action.comment" | "action.copy" | "action.delete_head_branch" | "action.dequeue" | "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.review" | "action.squash" | "action.update" | "ci_insights.auto_quarantine.disabled" | "ci_insights.auto_quarantine.enabled" | "ci_insights.auto_quarantine.modified" | "ci_insights.job_retried" | "command.dequeue" | "command.queue" | "queue.pause.create" | "queue.pause.delete" | "queue.pause.update" | "scheduled_freeze.create" | "scheduled_freeze.delete" | "scheduled_freeze.update" | "test.dequarantined" | "test.quarantined"[]

The specific types of events to select

not_event_type "action.assign" | "action.backport" | "action.close" | "action.comment" | "action.copy" | "action.delete_head_branch" | "action.dequeue" | "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.review" | "action.squash" | "action.update" | "ci_insights.auto_quarantine.disabled" | "ci_insights.auto_quarantine.enabled" | "ci_insights.auto_quarantine.modified" | "ci_insights.job_retried" | "command.dequeue" | "command.queue" | "queue.pause.create" | "queue.pause.delete" | "queue.pause.update" | "scheduled_freeze.create" | "scheduled_freeze.delete" | "scheduled_freeze.update" | "test.dequarantined" | "test.quarantined"[]

Exclude events whose type matches any of the given values. Mutually exclusive with `event_type` (positive include).

outcome "success" | "failure" | "pending" | "neutral"[]

Filter events by derived outcome label (`success` / `failure` / `pending` / `neutral`). Repeatable to match several outcomes at once (e.g. `?outcome=success&outcome=failure`).

not_outcome "success" | "failure" | "pending" | "neutral"[]

Exclude events whose derived outcome label matches any of the given values (`success` / `failure` / `pending` / `neutral`). Repeatable. Mirrors Datadog's facet semantics: unchecking an outcome in the dashboard sidebar adds it to the exclusion list. Mutually exclusive with `outcome` (positive include).

trigger string[]

Include only events whose `trigger` matches one of the given values (exact match). Repeatable. Mirrors Datadog's facet behaviour after clicking `Only`: the URL switches from exclusion mode to inclusion mode with a positive list — shorter than `not_trigger=<everything else>`. Mutually exclusive with `not_trigger`.

not_trigger string[]

Exclude events whose `trigger` matches any of the given values (exact match). Repeatable. Mirrors Datadog's facet semantics: the default state is `all triggers included`, and unchecking a trigger in the dashboard sidebar adds it to the exclusion list. Mutually exclusive with `trigger` (positive include).

not_pull_request integer[]

Exclude events whose pull request matches any of the given numbers. Mutually exclusive with `pull_request` (positive include).

received_from string <date-time>

Start of the time range (ISO 8601 with timezone). Defaults to `received_to - 1 day`.

received_to string <date-time>

End of the time range (ISO 8601 with timezone). Defaults to `now`.

200 Successful Response
totalintegerrequired
interval_size_secondsintegerrequired
histogramHistogramBucket[]required
startstring <date-time>required
endstring <date-time>required
countintegerrequired
by_event_typeFacetCount[]required
valuestringrequired
countintegerrequired
by_outcomeFacetCount[]required
valuestringrequired
countintegerrequired
by_triggerFacetCount[]required
valuestringrequired
countintegerrequired
by_pull_requestFacetCount[]required
valuestringrequired
countintegerrequired
by_batch_pull_requestFacetCount[]required
valuestringrequired
countintegerrequired
Example Response
                          {
  "total": 0,
  "interval_size_seconds": 0,
  "histogram": [
    {
      "start": "2024-01-15T09:00:00Z",
      "end": "2024-01-15T09:00:00Z",
      "count": 0
    }
  ],
  "by_event_type": [
    {
      "value": "string",
      "count": 0
    }
  ],
  "by_outcome": [
    {
      "value": "string",
      "count": 0
    }
  ],
  "by_trigger": [
    {
      "value": "string",
      "count": 0
    }
  ],
  "by_pull_request": [
    {
      "value": "string",
      "count": 0
    }
  ],
  "by_batch_pull_request": [
    {
      "value": "string",
      "count": 0
    }
  ]
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/logs/aggregate" \
  -H "Authorization: Bearer <token>"

Was this page helpful?