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.
Provide this to retrieve the subsequent page.

When paginating, all other parameters must match
the call that provided the page token.

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 page_token to retrieve the next page.
If this field is omitted, there are no subsequent pages.

Example: example

runs

Type: Run[]

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": [
          {}
        ],
        "progress": {
          "percent": 0.5,
          "current_cube": {}
        }
      }
    ],
    "event_type": "push",
    "error_messages": [
      "example"
    ],
    "pull": {
      "id": "example",
      "slug": "example"
    },
    "user": {
      "id": "example",
      "slug": "example"
    }
  }
]

DatesByStage

Name

Description

created_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

finished_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

started_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

updated_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

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 prepared may 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: 2025-01-01T00:00:00Z

registered_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

updated_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

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
{
  "registered_at": "2025-01-01T00:00:00Z",
  "obtained_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z"
}

download_url

Type: string

A temporary download URL, will be valid for a short period of time after acquisition.

Example: example

id

Type: string

Example: example

local_path

Type: string

Artifacts do not have a slug as we define it.
Instead they are differentiated by context (workflow, task, cube) and local_path.
This is a local path for the artifact as defined in the CI configuration file.

Example: example

status

Type: ArtifactStatus

Enum: registered, success, failed, missing

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

Example
{
  "name": "example"
}

Relations

Name

Description

needs

Type: Dependency[]

Example
[
  {
    "name": "example"
  }
]
Example
{
  "needs": [
    {
      "name": "example"
    }
  ]
}

Cube

Name

Description

artifacts

Type: Artifact[]

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"
  }
]

dates

Type: DatesByStage

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"
}

id

Type: string

Example: example

relations

Type: Relations

Example
{
  "needs": [
    {
      "name": "example"
    }
  ]
}

slug

Type: string

Example: example

status

Type: Run.Status

  • prepared: Status prepared may only appear as a Run status.
    It's a stage between creation and startup during which the Run is populated with workflows.

Enum: created, prepared, processing, success, failed, canceled, timeout

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
{
  "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"
      }
    ]
  }
}

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
[
  {
    "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"
        }
      ]
    }
  }
]

dates

Type: DatesByStage

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"
}

description

Type: string

Example: example

id

Type: string

Example: example

progress

Type: Progress

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"
        }
      ]
    }
  }
}

relations

Type: Relations

Example
{
  "needs": [
    {
      "name": "example"
    }
  ]
}

slug

Type: string

Example: example

status

Type: Run.Status

  • prepared: Status prepared may only appear as a Run status.
    It's a stage between creation and startup during which the Run is populated with workflows.

Enum: created, prepared, processing, success, failed, canceled, timeout

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
{
  "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"
}

description

Type: string

Example: example

id

Type: string

Example: example

progress

Type: Progress

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"
        }
      ]
    }
  }
}

slug

Type: string

Example: example

status

Type: Run.Status

  • prepared: Status prepared may only appear as a Run status.
    It's a stage between creation and startup during which the Run is populated with workflows.

Enum: created, prepared, processing, success, failed, canceled, timeout

tasks

Type: Task[]

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": [
          {}
        ],
        "relations": {
          "needs": [
            null
          ]
        }
      }
    ],
    "progress": {
      "percent": 0.5,
      "current_cube": null
    },
    "relations": null
  }
]
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: example

slug

Type: string

Example: 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
{
  "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"
}

error_messages

Type: string[]

Example
[
  "example"
]

event_type

Type: EventType

Enum: push, pr_update, manual, restart

id

Type: string

Example: example

pull

Type: PullRequestEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

slug

Type: string

Example: example

status

Type: Run.Status

  • prepared: Status prepared may only appear as a Run status.
    It's a stage between creation and startup during which the Run is populated with workflows.

Enum: created, prepared, processing, success, failed, canceled, timeout

user

Type: UserEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

workflows

Type: Workflow[]

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": [
          {}
        ],
        "progress": {
          "percent": 0.5,
          "current_cube": null
        },
        "relations": {
          "needs": [
            null
          ]
        }
      }
    ],
    "progress": null
  }
]
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

[additional]

Type: string

Example: example

Example
{}

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example

Предыдущая