Get Artifacts from a CI Run

Request

GET

https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}/cicd/artifacts/{run_slug}/{workflow_slug}/{task_slug}/{cube_slug}

Path parameters

Name

Description

cube_slug

Type: string

Cube name as defined in the config.

Example: ``

org_slug

Type: string

Example: ``

repo_slug

Type: string

Example: ``

run_slug

Type: string

Example: ``

task_slug

Type: string

Task name as defined in the config.

Example: ``

workflow_slug

Type: string

Workflow name as defined in the config.

Example: ``

Responses

200 OK

A successful response.

Body

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

Name

Description

artifacts

Type: Artifact[]

List of artifacts filtered by specified workflow/task/cube.
Each item contains info about the artifact and a temporary download URL.

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

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

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