List CI Runs in Repository (By Repo ID)
Request
GET
https://api.sourcecraft.tech/repos/id:{repo_id}/cicd/runs
Path parameters
|
Name |
Description |
|
repo_id |
Type: string Example: `` |
Query parameters
|
Name |
Description |
|
page_size |
Type: string<uint64> The maximum number of runs to return. The service may return fewer than this value Example: `` |
|
page_token |
Type: string A page token, received from a previous call. When paginating, all other parameters must match Example: `` |
Responses
200 OK
A successful response.
Body
application/json
{
"runs": [
{
"id": "example",
"slug": "example",
"dates": {
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "created",
"workflows": [
{
"id": "example",
"slug": "example",
"description": "example",
"dates": null,
"status": null,
"tasks": [
null
],
"progress": {}
}
],
"event_type": "push",
"error_messages": [
"example"
],
"pull": {
"id": "example",
"slug": "example"
},
"user": {
"id": "example",
"slug": "example"
}
}
],
"next_page_token": "example"
}
|
Name |
Description |
|
next_page_token |
Type: string A token, which can be sent as Example: |
|
runs |
Type: Run[] Example
|
DatesByStage
|
Name |
Description |
|
created_at |
Type: string<date-time> Example: |
|
finished_at |
Type: string<date-time> Example: |
|
started_at |
Type: string<date-time> Example: |
|
updated_at |
Type: string<date-time> Example: |
Example
{
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
Run.Status
- prepared: Status
preparedmay only appear as a Run status.
It's a stage between creation and startup during which the Run is populated with workflows.
Type: string
Enum: created, prepared, processing, success, failed, canceled, timeout
ArtifactDates
|
Name |
Description |
|
obtained_at |
Type: string<date-time> Example: |
|
registered_at |
Type: string<date-time> Example: |
|
updated_at |
Type: string<date-time> Example: |
Example
{
"registered_at": "2025-01-01T00:00:00Z",
"obtained_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
ArtifactStatus
Type: string
Enum: registered, success, failed, missing
Artifact
|
Name |
Description |
|
dates |
Type: ArtifactDates Example
|
|
download_url |
Type: string A temporary download URL, will be valid for a short period of time after acquisition. Example: |
|
id |
Type: string Example: |
|
local_path |
Type: string Artifacts do not have a slug as we define it. Example: |
|
status |
Type: ArtifactStatus Enum: |
Example
{
"id": "example",
"local_path": "example",
"dates": {
"registered_at": "2025-01-01T00:00:00Z",
"obtained_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "registered",
"download_url": "example"
}
Dependency
|
Name |
Description |
|
name |
Type: string Example: |
Example
{
"name": "example"
}
Relations
|
Name |
Description |
|
needs |
Type: Dependency[] Example
|
Example
{
"needs": [
{
"name": "example"
}
]
}
Cube
|
Name |
Description |
|
artifacts |
Type: Artifact[] Example
|
|
dates |
Type: DatesByStage Example
|
|
id |
Type: string Example: |
|
relations |
Type: Relations Example
|
|
slug |
Type: string Example: |
|
status |
Type: Run.Status
Enum: |
Example
{
"id": "example",
"slug": "example",
"dates": {
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "created",
"artifacts": [
{
"id": "example",
"local_path": "example",
"dates": {
"registered_at": "2025-01-01T00:00:00Z",
"obtained_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "registered",
"download_url": "example"
}
],
"relations": {
"needs": [
{
"name": "example"
}
]
}
}
Progress
|
Name |
Description |
|
current_cube |
Type: Cube Example
|
|
percent |
Type: number |
Example
{
"percent": 0.5,
"current_cube": {
"id": "example",
"slug": "example",
"dates": {
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "created",
"artifacts": [
{
"id": "example",
"local_path": "example",
"dates": {
"registered_at": "2025-01-01T00:00:00Z",
"obtained_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "registered",
"download_url": "example"
}
],
"relations": {
"needs": [
{
"name": "example"
}
]
}
}
}
Task
|
Name |
Description |
|
cubes |
Type: Cube[] Example
|
|
dates |
Type: DatesByStage Example
|
|
description |
Type: string Example: |
|
id |
Type: string Example: |
|
progress |
Type: Progress Example
|
|
relations |
Type: Relations Example
|
|
slug |
Type: string Example: |
|
status |
Type: Run.Status
Enum: |
Example
{
"id": "example",
"slug": "example",
"description": "example",
"dates": {
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "created",
"cubes": [
{
"id": "example",
"slug": "example",
"dates": null,
"status": null,
"artifacts": [
{
"id": "example",
"local_path": "example",
"dates": {},
"status": "registered",
"download_url": "example"
}
],
"relations": {
"needs": [
{}
]
}
}
],
"progress": {
"percent": 0.5,
"current_cube": null
},
"relations": null
}
Workflow
|
Name |
Description |
|
dates |
Type: DatesByStage Example
|
|
description |
Type: string Example: |
|
id |
Type: string Example: |
|
progress |
Type: Progress Example
|
|
slug |
Type: string Example: |
|
status |
Type: Run.Status
Enum: |
|
tasks |
Type: Task[] Example
|
Example
{
"id": "example",
"slug": "example",
"description": "example",
"dates": {
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "created",
"tasks": [
{
"id": "example",
"slug": "example",
"description": "example",
"dates": null,
"status": null,
"cubes": [
{
"id": "example",
"slug": "example",
"dates": null,
"status": null,
"artifacts": [
null
],
"relations": {}
}
],
"progress": {
"percent": 0.5,
"current_cube": null
},
"relations": null
}
],
"progress": null
}
EventType
Type: string
Enum: push, pr_update, manual, restart
PullRequestEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example"
}
Run
Run represents an instance of CI/CD run which may contain several workflow launches.
When Run is in created status, it is still in preparation for startup and can contain no workflows.
After the status is no longer created (is prepared or processing), its workflows list
is filled and finalized.
It is possible that 'Run Workflows' endpoint will return a Run that's no longer created or
prepared if those stages were processed fast enough.
|
Name |
Description |
|
dates |
Type: DatesByStage Example
|
|
error_messages |
Type: string[] Example
|
|
event_type |
Type: EventType Enum: |
|
id |
Type: string Example: |
|
pull |
Type: PullRequestEmbedded Example
|
|
slug |
Type: string Example: |
|
status |
Type: Run.Status
Enum: |
|
user |
Type: UserEmbedded Example
|
|
workflows |
Type: Workflow[] Example
|
Example
{
"id": "example",
"slug": "example",
"dates": {
"created_at": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"finished_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
},
"status": "created",
"workflows": [
{
"id": "example",
"slug": "example",
"description": "example",
"dates": null,
"status": null,
"tasks": [
{
"id": "example",
"slug": "example",
"description": "example",
"dates": null,
"status": null,
"cubes": [
null
],
"progress": {},
"relations": {}
}
],
"progress": null
}
],
"event_type": "push",
"error_messages": [
"example"
],
"pull": {
"id": "example",
"slug": "example"
},
"user": {
"id": "example",
"slug": "example"
}
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": {}
}
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
||
|
request_id |
Type: string Example: |