Get CI Run in Repository

Deprecated

Endpoint is deprecated, please use GET /repos/{org_slug}/{repo_slug}/cicd/runs/{run_slug} instead

Request

GET

https://api.sourcecraft.tech/{org_slug}/{repo_slug}/cicd/runs/{run_slug}

Path parameters

Name

Description

org_slug

Type: string

Example: ``

repo_slug

Type: string

Example: ``

run_slug

Type: string

Example: ``

Responses

200 OK

A successful response.

Body

application/json
{
  "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"
  }
}

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

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

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

No longer supported, please use an alternative and newer version.