run.complete
CI run completed - emitted when a CI run completes (terminal status)
can-trigger-ci: false
REQUEST BODY SCHEMA: application/json
required
|
Field |
Description |
|
object (Common header included in all public events) |
|
|
object (Repository) |
|
|
object (Run) When Run is in It is possible that 'Run Workflows' endpoint will return a Run that's no longer |
header
|
Field |
Description |
|
|
string (Unique identifier for this event instance) |
|
|
string (Event type) |
|
|
string <date-time> (When the event occurred) |
|
|
string (ID of the primary entity this event is about) |
|
|
string (Type of the primary entity (derived from event_type)) |
|
object (Public metadata) |
|
|
|
string (Organization context) |
|
|
string (Repository context) |
|
object (UserEmbedded) |
|
|
|
string |
|
|
string |
header.metadata
|
Field |
Description |
|
|
string |
header.triggered_by
|
Field |
Description |
|
|
string (Id will contain "<external-user>" if user is external) |
|
|
string (Slug will contain "<external-user>" if user is external) |
repository
|
Field |
Description |
|
|
string |
|
|
string |
|
|
string |
|
object (OrganizationEmbedded) |
|
|
|
string |
|
|
string (RepoTemplate) Enum: |
|
|
boolean |
|
|
string |
|
|
string (Repository.Visibility) Enum: |
|
object (Image) |
|
|
object (CloneURL) |
|
|
|
string |
|
Array of objects (Link) |
|
|
object (RepositoryCounters) |
|
|
|
string <date-time> |
|
object (Language) |
|
|
object (RepositoryEmbedded) |
|
|
object (MigrationSource) |
|
|
object (ProjectEmbedded) |
|
|
object (RepositoryRating) |
|
|
object (RepositorySettings) |
repository.organization
|
Field |
Description |
|
|
string |
|
|
string |
repository.logo
|
Field |
Description |
|
|
string |
repository.clone_url
|
Field |
Description |
|
|
string |
|
|
string |
repository.links
|
Field |
Description |
|
|
string |
|
|
string (Link.LinkType) Enum: |
repository.counters
|
Field |
Description |
|
|
string <uint64> |
|
|
string <uint64> |
|
|
string <uint64> |
|
|
string <uint64> |
|
|
string <uint64> |
repository.language
|
Field |
Description |
|
|
string |
|
|
string |
repository.parent
|
Field |
Description |
|
|
string |
|
|
string |
|
object (OrganizationEmbedded) |
repository.parent.organization
|
Field |
Description |
|
|
string |
|
|
string |
repository.migration_source
|
Field |
Description |
|
|
string |
|
|
string |
repository.project
|
Field |
Description |
|
|
string |
|
|
string |
repository.rating
|
Field |
Description |
|
|
number <double> |
|
|
number <double> |
|
Array of objects (RepositoryRatingReactionCount) |
repository.rating.reaction_counts
|
Field |
Description |
|
|
string (RepositoryRatingReaction.Type)
Enum: |
|
|
string <uint64> |
repository.settings
|
Field |
Description |
|
|
boolean |
run
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string (Run counter serves as a slug) |
|
object (DatesByStage) |
|
|
|
string (Run.Status)
Enum: |
|
Array of objects (Workflow) |
|
|
|
string (EventType)
Enum: |
|
|
Array of strings |
|
object (PullRequestEmbedded) |
|
|
object (UserEmbedded) |
run.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string (A name of the workflow as defined in the config) |
|
|
string |
|
object (DatesByStage) |
|
|
|
string (Run.Status)
Enum: |
|
Array of objects (Task) |
|
|
object (Progress) |
|
|
|
string |
run.workflows.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.tasks
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string (A name of the task as defined in the config) |
|
|
string |
|
object (DatesByStage) |
|
|
|
string (Run.Status)
Enum: |
|
Array of objects (Cube) |
|
|
object (Progress) |
|
|
object (Relations) |
run.workflows.tasks.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.tasks.cubes
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string (A name of the cube as defined in the config) |
|
object (DatesByStage) |
|
|
|
string (Run.Status)
Enum: |
|
Array of objects (Artifact) |
|
|
object (Relations) |
run.workflows.tasks.cubes.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.tasks.cubes.artifacts
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string |
|
object (ArtifactDates) |
|
|
|
string (ArtifactStatus) Enum: |
|
|
string |
run.workflows.tasks.cubes.artifacts.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.tasks.cubes.relations
|
Field |
Description |
|
Array of objects (Dependency) |
run.workflows.tasks.cubes.relations.needs
|
Field |
Description |
|
|
string |
run.workflows.tasks.progress
|
Field |
Description |
|
|
number <float> |
|
object (Cube) |
run.workflows.tasks.progress.current_cube
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string (A name of the cube as defined in the config) |
|
object (DatesByStage) |
|
|
|
string (Run.Status)
Enum: |
|
Array of objects (Artifact) |
|
|
object (Relations) |
run.workflows.tasks.progress.current_cube.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.tasks.progress.current_cube.artifacts
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string |
|
object (ArtifactDates) |
|
|
|
string (ArtifactStatus) Enum: |
|
|
string |
run.workflows.tasks.progress.current_cube.artifacts.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.tasks.progress.current_cube.relations
|
Field |
Description |
|
Array of objects (Dependency) |
run.workflows.tasks.progress.current_cube.relations.needs
|
Field |
Description |
|
|
string |
run.workflows.tasks.relations
|
Field |
Description |
|
Array of objects (Dependency) |
run.workflows.tasks.relations.needs
|
Field |
Description |
|
|
string |
run.workflows.progress
|
Field |
Description |
|
|
number <float> |
|
object (Cube) |
run.workflows.progress.current_cube
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string (A name of the cube as defined in the config) |
|
object (DatesByStage) |
|
|
|
string (Run.Status)
Enum: |
|
Array of objects (Artifact) |
|
|
object (Relations) |
run.workflows.progress.current_cube.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.progress.current_cube.artifacts
|
Field |
Description |
|
|
string (CI/CD entities don't have public IDs at this stage; they will be added later) |
|
|
string |
|
object (ArtifactDates) |
|
|
|
string (ArtifactStatus) Enum: |
|
|
string |
run.workflows.progress.current_cube.artifacts.dates
|
Field |
Description |
|
|
string <date-time> |
|
|
string <date-time> |
|
|
string <date-time> |
run.workflows.progress.current_cube.relations
|
Field |
Description |
|
Array of objects (Dependency) |
run.workflows.progress.current_cube.relations.needs
|
Field |
Description |
|
|
string |
run.pull
|
Field |
Description |
|
|
string |
|
|
string |
run.user
|
Field |
Description |
|
|
string (Id will contain "<external-user>" if user is external) |
|
|
string (Slug will contain "<external-user>" if user is external) |
Request samples
{
"$ref": "#/components/schemas/CIRunComplete",
"components": {
"schemas": {
"CIRunComplete": {
"type": "object",
"properties": {
"header": {
"$ref": "#/components/schemas/EventHeader"
},
"repository": {
"$ref": "#/components/schemas/Repository"
},
"run": {
"$ref": "#/components/schemas/Run"
}
},
"title": "CI run completed - emitted when a CI run completes (terminal status)"
},
"EventHeader": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "Unique identifier for this event instance"
},
"type": {
"type": "string",
"title": "Event type"
},
"occurred_at": {
"type": "string",
"format": "date-time",
"title": "When the event occurred"
},
"aggregate_id": {
"type": "string",
"title": "ID of the primary entity this event is about"
},
"aggregate_type": {
"type": "string",
"title": "Type of the primary entity (derived from event_type)"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Public metadata"
},
"organization_id": {
"type": "string",
"title": "Organization context"
},
"repository_id": {
"type": "string",
"title": "Repository context"
},
"triggered_by": {
"$ref": "#/components/schemas/UserEmbedded"
},
"correlation_id": {
"type": "string",
"description": "Correlation ID for tracking event chains back to the original request.\nUses request_id from the originating gRPC/HTTP request when available,\nfalls back to trace_id or the root event's ID."
},
"causation_id": {
"type": "string",
"description": "Causation ID is the ID of the event that directly caused this event.\nEmpty for root events (events triggered directly by user actions).\nUsed to reconstruct the event tree within a correlation chain."
}
},
"title": "Common header included in all public events"
},
"UserEmbedded": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "Id will contain \"<external-user>\" if user is external"
},
"slug": {
"type": "string",
"title": "Slug will contain \"<external-user>\" if user is external"
}
}
},
"Repository": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string",
"description": "Deprecated: obsolete, prefer using slug. Will be removed in future API iterations."
},
"default_branch": {
"type": "string"
},
"organization": {
"$ref": "#/components/schemas/OrganizationEmbedded"
},
"slug": {
"type": "string"
},
"template_type": {
"$ref": "#/components/schemas/RepoTemplate"
},
"is_empty": {
"type": "boolean"
},
"description": {
"type": "string"
},
"visibility": {
"$ref": "#/components/schemas/Repository.Visibility"
},
"logo": {
"$ref": "#/components/schemas/Image"
},
"clone_url": {
"$ref": "#/components/schemas/CloneURL"
},
"web_url": {
"type": "string"
},
"links": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Link"
}
},
"counters": {
"$ref": "#/components/schemas/RepositoryCounters"
},
"last_updated": {
"type": "string",
"format": "date-time"
},
"language": {
"$ref": "#/components/schemas/Language"
},
"parent": {
"$ref": "#/components/schemas/RepositoryEmbedded"
},
"migration_source": {
"$ref": "#/components/schemas/MigrationSource"
},
"project": {
"$ref": "#/components/schemas/ProjectEmbedded"
},
"rating": {
"$ref": "#/components/schemas/RepositoryRating"
},
"settings": {
"$ref": "#/components/schemas/RepositorySettings"
}
}
},
"OrganizationEmbedded": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
}
}
},
"RepoTemplate": {
"type": "string",
"enum": [
"not_a_template",
"organizational",
"system"
]
},
"Repository.Visibility": {
"type": "string",
"enum": [
"public",
"internal",
"private"
]
},
"Image": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
}
},
"CloneURL": {
"type": "object",
"properties": {
"https": {
"type": "string"
},
"ssh": {
"type": "string"
}
}
},
"Link": {
"type": "object",
"properties": {
"link": {
"type": "string"
},
"type": {
"$ref": "#/components/schemas/Link.LinkType"
}
}
},
"Link.LinkType": {
"type": "string",
"enum": [
"default",
"social_network",
"homepage",
"email",
"telegram"
]
},
"RepositoryCounters": {
"type": "object",
"properties": {
"forks": {
"type": "string",
"format": "uint64"
},
"pull_requests": {
"type": "string",
"format": "uint64"
},
"issues": {
"type": "string",
"format": "uint64"
},
"tags": {
"type": "string",
"format": "uint64"
},
"branches": {
"type": "string",
"format": "uint64"
}
}
},
"Language": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"color": {
"type": "string"
}
}
},
"RepositoryEmbedded": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"organization": {
"$ref": "#/components/schemas/OrganizationEmbedded"
}
}
},
"MigrationSource": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"domain": {
"type": "string"
}
}
},
"ProjectEmbedded": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
}
}
},
"RepositoryRating": {
"type": "object",
"properties": {
"value": {
"type": "number",
"format": "double",
"description": "Current repository rating value."
},
"percentile": {
"type": "number",
"format": "double",
"description": "Repository percentile among rated repositories. Omitted while percentile data is unavailable."
},
"reaction_counts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RepositoryRatingReactionCount"
},
"description": "Reaction counters grouped by reaction type."
}
},
"description": "Aggregated rating information for a repository."
},
"RepositoryRatingReactionCount": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/RepositoryRatingReaction.Type"
},
"count": {
"type": "string",
"format": "uint64"
}
},
"description": "Number of rating reactions of a particular type."
},
"RepositoryRatingReaction.Type": {
"type": "string",
"enum": [
"none",
"positive_low",
"positive_medium",
"positive_high"
],
"description": " - none: Remove the current user's rating reaction.\n - positive_low: A low positive rating reaction. Corresponds to Like in the SourceCraft interface.\n - positive_medium: A medium positive rating reaction. Corresponds to Heart in the SourceCraft interface.\n - positive_high: A high positive rating reaction. Corresponds to Diamond in the SourceCraft interface."
},
"RepositorySettings": {
"type": "object",
"properties": {
"allow_external_contributions": {
"type": "boolean",
"description": "Whether authenticated users without organization or repository access can contribute to a public repository.\nHas no effect on non-public repositories."
}
}
},
"Run": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "CI/CD entities don't have public IDs at this stage; they will be added later"
},
"slug": {
"type": "string",
"title": "Run counter serves as a slug"
},
"dates": {
"$ref": "#/components/schemas/DatesByStage"
},
"status": {
"$ref": "#/components/schemas/Run.Status"
},
"workflows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Workflow"
}
},
"event_type": {
"$ref": "#/components/schemas/EventType"
},
"error_messages": {
"type": "array",
"items": {
"type": "string"
}
},
"pull": {
"$ref": "#/components/schemas/PullRequestEmbedded"
},
"user": {
"$ref": "#/components/schemas/UserEmbedded"
}
},
"description": "Run represents an instance of CI/CD run which may contain several workflow launches.\n\nWhen Run is in `created` status, it is still in preparation for startup and can contain no workflows.\nAfter the status is no longer `created` (is `prepared` or `processing`), its workflows list\nis filled and finalized.\n\nIt is possible that 'Run Workflows' endpoint will return a Run that's no longer `created` or\n`prepared` if those stages were processed fast enough."
},
"DatesByStage": {
"type": "object",
"properties": {
"created_at": {
"type": "string",
"format": "date-time"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"finished_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
},
"Run.Status": {
"type": "string",
"enum": [
"created",
"prepared",
"processing",
"success",
"failed",
"canceled",
"timeout",
"skipped",
"awaiting_approval",
"rejected"
],
"description": " - prepared: Status `prepared` may only appear as a Run status.\nIt's a stage between creation and startup during which the Run is populated with workflows."
},
"Workflow": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "CI/CD entities don't have public IDs at this stage; they will be added later"
},
"slug": {
"type": "string",
"title": "A name of the workflow as defined in the config"
},
"description": {
"type": "string"
},
"dates": {
"$ref": "#/components/schemas/DatesByStage"
},
"status": {
"$ref": "#/components/schemas/Run.Status"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Task"
}
},
"progress": {
"$ref": "#/components/schemas/Progress"
},
"environment_id": {
"type": "string"
}
}
},
"Task": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "CI/CD entities don't have public IDs at this stage; they will be added later"
},
"slug": {
"type": "string",
"title": "A name of the task as defined in the config"
},
"description": {
"type": "string"
},
"dates": {
"$ref": "#/components/schemas/DatesByStage"
},
"status": {
"$ref": "#/components/schemas/Run.Status"
},
"cubes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Cube"
}
},
"progress": {
"$ref": "#/components/schemas/Progress"
},
"relations": {
"$ref": "#/components/schemas/Relations"
}
}
},
"Cube": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "CI/CD entities don't have public IDs at this stage; they will be added later"
},
"slug": {
"type": "string",
"title": "A name of the cube as defined in the config"
},
"dates": {
"$ref": "#/components/schemas/DatesByStage"
},
"status": {
"$ref": "#/components/schemas/Run.Status"
},
"artifacts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Artifact"
}
},
"relations": {
"$ref": "#/components/schemas/Relations"
}
}
},
"Artifact": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "CI/CD entities don't have public IDs at this stage; they will be added later"
},
"local_path": {
"type": "string",
"description": "Artifacts do not have a slug as we define it.\nInstead they are differentiated by context (workflow, task, cube) and `local_path`.\nThis is a local path for the artifact as defined in the CI configuration file."
},
"dates": {
"$ref": "#/components/schemas/ArtifactDates"
},
"status": {
"$ref": "#/components/schemas/ArtifactStatus"
},
"download_url": {
"type": "string",
"description": "A temporary download URL, will be valid for a short period of time after acquisition."
}
}
},
"ArtifactDates": {
"type": "object",
"properties": {
"registered_at": {
"type": "string",
"format": "date-time"
},
"obtained_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
},
"ArtifactStatus": {
"type": "string",
"enum": [
"registered",
"success",
"failed",
"missing"
]
},
"Relations": {
"type": "object",
"properties": {
"needs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Dependency"
}
}
}
},
"Dependency": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"Progress": {
"type": "object",
"properties": {
"percent": {
"type": "number",
"format": "float"
},
"current_cube": {
"$ref": "#/components/schemas/Cube"
}
}
},
"EventType": {
"type": "string",
"enum": [
"push",
"pr_update",
"manual",
"restart",
"schedule",
"repository_event"
],
"description": "Describes how a CI/CD run was initiated. Values are trigger categories and do not\nidentify a concrete EventBus event.\n\n - push: Triggered by a repository ref update.\n - pr_update: Triggered by a pull request event.\n - manual: Started explicitly by a user or API client.\n - restart: Restarts a workflow from an existing run.\n - schedule: Started by a configured schedule.\n - repository_event: Started after a supported repository EventBus event matched the CI configuration.\nThe concrete EventBus type, for example, `issue_comment.create`, is not represented\nby this enum."
},
"PullRequestEmbedded": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
}
}
}
}
}
}