Repositories
Registered repositories, their mirrors, what a change would run, and which mirrors hold a commit.
List repositories
Repositories, filtered by remote fingerprint.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | Optional | |
limit | string | Optional | |
remote | string | Optional |
Response
datahas_morenext_cursor
curl "$CIRESK_API/v1/ci/repos" \
-H "Authorization: Bearer $CIRESK_KEY"Register a repository
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | Required |
Request body
default_branchmanifest_path- default
.ciresk/ci.yaml remote_url- absent for a folder with no git remote: the fingerprint then derives from
slug slug
Response
created_atdefault_branchid- uuidv7 rendered as
repo_<32 hex> manifest_pathremote_fingerprint- sha-256 of the normalised origin url
slugurl
curl -X POST "$CIRESK_API/v1/ci/repos" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Idempotency-Key: fd71e4b7-310d-46ae-8559-9d760214a8c9" \
-H "Content-Type: application/json" \
-d '{
"default_branch": "main",
"manifest_path": ".ciresk/ci.yaml",
"remote_url": "[email protected]:acme/platform.git",
"slug": "acme/platform"
}'Get a repository
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The repo's ID. |
Response
created_atdefault_branchid- uuidv7 rendered as
repo_<32 hex> manifest_pathremote_fingerprint- sha-256 of the normalised origin url
slugurlmirrorsmirrors[].seen_atmirrors[].worker_id- uuidv7 rendered as
wrk_<32 hex>
curl "$CIRESK_API/v1/ci/repos/repo_0129354d7b6b4146ad16c315d960365b" \
-H "Authorization: Bearer $CIRESK_KEY"Delete a repository
Delete a repository and everything only it references.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The repo's ID. |
Response
already_deleted- the repository was already deleted before this call; the purge ran again and found what the counts say
counts- what
ci.repos.deleteremoved; every number is zero on a repeat counts.artifactscounts.blob_bytescounts.blobs- cas blobs nothing else in the tenant references, with their bytes
counts.cache_entriescounts.jobs- jobs purged: content gone, the row kept as the journal's anchor
counts.jobs_cancelled- jobs that were queued, leased or running and ended
cancelled counts.log_chunkscounts.taskscounts.test_resultscounts.tree_nodes- directory manifests only those roots reached
counts.trees- verified roots no other repository's job names
counts.workspaces_evicted- warm workspaces the workers were asked to evict on their next report
deleted_atid- uuidv7 rendered as
repo_<32 hex> slug
curl -X DELETE "$CIRESK_API/v1/ci/repos/repo_0129354d7b6b4146ad16c315d960365b" \
-H "Authorization: Bearer $CIRESK_KEY"Preview the affected set
What would run, without running.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The repo's ID. |
base | string | Optional | |
diff | string | Optional | |
kind | string | Optional | |
reference | string | Optional | |
root | string | Optional | |
strategy | string | Optional |
Response
base_refchanged_filesdiff_digest- sha-256 digest as
sha256:<64 hex> escalatedescalation_reasonestimated_cost_unitskindcheck,test,build,lintor a manifest task idreference_root- the root digest of a working tree: sha-256 of the root directory manifest
root- the submitted and the reference tree roots the diff was taken between
strategy- One of
cargo,pnpm,go,turbo,nx,files,none targets
curl "$CIRESK_API/v1/ci/repos/repo_0129354d7b6b4146ad16c315d960365b/affected" \
-H "Authorization: Bearer $CIRESK_KEY"Check which mirrors hold a commit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The repo's ID. |
sha | string | Required | A commit SHA. |
Response
mirrorsmirrors[].seen_atmirrors[].worker_id- uuidv7 rendered as
wrk_<32 hex> sha
curl "$CIRESK_API/v1/ci/repos/repo_0129354d7b6b4146ad16c315d960365b/commits/feef45d804737fdf7a297e27e443d914551629de" \
-H "Authorization: Bearer $CIRESK_KEY"Store dependency graph
The dependency graph a worker recorded for a tree root.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The repo's ID. |
Request body
graph- the graph snapshot a worker recorded for a tree root;
diris where the tool ran, repository-relative with""for the root, so node directories map onto changed paths.crates/ci/affectedreads it; the api stores it as a cas blob of kindgraph graph.dirgraph.format- One of
sources graph.jsongraph.fileslease- the lease whose task the graph was captured after: the cell records it only while that lease is
the calling worker's, active or released by its own report, on a job of this repository, root and
view, since the first graph of a root steers every later job's affected set; a report without
one is
409 lease_not_held root- the root digest of a working tree: sha-256 of the root directory manifest
strategy- One of
cargo,pnpm,go,turbo,nx,files,none view- a view job's
JobView::digest: the graph was recorded from that view's tree, so the cell keeps it apart from the full tree's and serves it to that view's jobs only
Response
digest- the cas digest of the stored document
recorded- false when the cell already held a graph for this root and strategy
curl -X POST "$CIRESK_API/v1/ci/repos/repo_0129354d7b6b4146ad16c315d960365b/graph" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"graph": {
"dir": "acme/platform",
"format": "cargo_metadata",
"json": "acme/platform"
},
"lease": "lease_01778d67b48ee630f44b3f03ab6254a8",
"root": "sha256:4827d3132b09e1cedc07788771ef7bca9c1140b2dff2ac370fc8433a94de43e5",
"strategy": "cargo",
"view": "sha256:62d44f48688d2f810f8be60e21ec9d5920297a2c5fd9534172d15af304819f50"
}'Sync a repository's mirrors
Ask the cell's mirrors to fetch the repository; the head and when it was fetched.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The repo's ID. |
Idempotency-Key | string | Required |
Response
fetched_athead
curl -X POST "$CIRESK_API/v1/ci/repos/repo_0129354d7b6b4146ad16c315d960365b/sync" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Idempotency-Key: 8ff057ba-353a-4043-a148-c37fb863fbec"