API reference
CI
Continuous integration: runs for a commit, their jobs, logs and artifacts, pipelines, runners, caches and job secrets.
- Operations
- 21
- Base path
https://os.one.ml/api/v1/ci- Scopes
ci:adminci:readci:write- API keys
- —
- SDK
genesis.call('ci_cache_list', …)· helpers undergenesis.ci- CLI
genesis ci- MCP
- 21 tools
Operations
Cache
List cache entries
GET/v1/ci/cache
Scope ci:read.
Parameters
repoquery · string
Responses
- 200Cache entries
Response fields
dataobject[]requireddata[].[].idstringpattern
^cc_[a-z2-7]{26}$data[].[].repostringdata[].[].scopestringdata[].[].keystringdata[].[].size_bytesintegerdata[].[].created_atstring (date-time)data[].[].last_used_atstring | null (date-time)
- 403The credential lacks the scope, or a delegated agent tried to write
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/cache" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_cache_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_cache_list",
"arguments": {}
}
}Delete a cache entry
DELETE/v1/ci/cache/{cache}
Scope ci:admin.
Parameters
cachepath · stringrequired
Responses
- 200The deleted entry
Response fields
deletedtruerequired
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/ci/cache/$CACHE" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_cache_delete', {
cache: '<cache>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_cache_delete",
"arguments": {
"cache": "<cache>"
}
}
}Events
Read run, job and artifact events after a cursor
GET/v1/ci/events
Scope ci:read. Oldest first, at most 500 a page (default 100); pass cursor as after for the next page.
Parameters
afterquery · stringlimitquery · integer
Responses
- 200Events
Response fields
dataobject[]requireddata[].[].event_idstringrequireddata[].[].type"run.queued" | "run.started" | "run.completed" | "job.queued" | "job.started" | "job.completed" | "job.annotation" | "artifact.created"requireddata[].[].org_idstringrequireddata[].[].environment"sandbox" | "live"requireddata[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$data[].[].job_idstring | nulldata[].[].job_namestring | nulldata[].[].pipelinestring | nulldata[].[].idempotency_keystringThe run's idempotency key
data[].[].namestring | nullThe check name
<pipeline>/<job>, for a job eventdata[].[].sourceobjectdata[].[].trigger"push" | "change" | "manual" | "rerun" | "launch"data[].[].statusstringdata[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulldata[].[].started_atstring | null (date-time)data[].[].completed_atstring | null (date-time)data[].[].summary_mdstring | nullcursorstringrequired
- 403The credential lacks the scope, or a delegated agent tried to write
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/events" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_events_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_events_list",
"arguments": {}
}
}Pipelines
List a repo's pipelines as CI last read them
GET/v1/ci/pipelines
Scope ci:read.
Parameters
repoquery · stringrequired
Responses
- 200Pipelines
Response fields
A JSON object.
- 403The credential lacks the scope, or a delegated agent tried to write
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/pipelines?repo=$REPO" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_pipelines_list', {
repo: '<repo>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_pipelines_list",
"arguments": {
"repo": "<repo>"
}
}
}Runners
List the machines jobs can run on and your org's limits
GET/v1/ci/runners
Scope ci:read.
Responses
- 200Machines and limits
Response fields
A JSON object.
- 403The credential lacks the scope, or a delegated agent tried to write
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runners" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_runners_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_runners_list",
"arguments": {}
}
}Runs
List runs, newest first
GET/v1/ci/runs
Scope ci:read. At most 100 a page (default 30); pass next_before as before for the next page.
Parameters
repoquery · stringrefquery · stringchangequery · stringstatusquery · "queued" | "in_progress" | "completed"triggerquery · "push" | "change" | "manual" | "rerun" | "launch"beforequery · stringlimitquery · integer
Responses
- 200Runs
Response fields
dataobject[]requireddata[].[].idstringrequiredpattern
^cr_[a-z2-7]{26}$data[].[].run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$data[].[].default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
data[].[].numberintegerrequireddata[].[].sourceobjectrequiredNever carries the clone credential
data[].[].source.forge"loom"data[].[].source.repostringdata[].[].source.refstringdata[].[].source.shastringdata[].[].source.base_shastring | nulldata[].[].source.changeobject | nulldata[].[].trigger"push" | "change" | "manual" | "rerun" | "launch"requireddata[].[].pipelinestring | nulldata[].[].status"queued" | "in_progress" | "completed"requireddata[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequireddata[].[].config_errorstring | nulldata[].[].pipelinesobject[]data[].[].pipelines[].[].namestringdata[].[].pipelines[].[].jobsstring[]data[].[].created_byobjectdata[].[].attemptintegerrequireddata[].[].created_atstring (date-time)requireddata[].[].started_atstring | null (date-time)data[].[].completed_atstring | null (date-time)data[].[].jobsobject[]requireddata[].[].jobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$data[].[].jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$data[].[].jobs[].[].pipelinestringrequireddata[].[].jobs[].[].namestringrequireddata[].[].jobs[].[].check_namestringrequired<pipeline>/<job>data[].[].jobs[].[].status"queued" | "in_progress" | "completed"requireddata[].[].jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequireddata[].[].jobs[].[].needsstring[]data[].[].jobs[].[].machinestringdata[].[].jobs[].[].imagestringdata[].[].jobs[].[].stepsobject[]data[].[].jobs[].[].steps[].[].indexintegerdata[].[].jobs[].[].steps[].[].namestringdata[].[].jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"data[].[].jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulldata[].[].jobs[].[].steps[].[].started_atstring | null (date-time)data[].[].jobs[].[].steps[].[].completed_atstring | null (date-time)data[].[].jobs[].[].attemptsintegerdata[].[].jobs[].[].summary_mdstring | nulldata[].[].jobs[].[].created_atstring (date-time)data[].[].jobs[].[].started_atstring | null (date-time)data[].[].jobs[].[].completed_atstring | null (date-time)data[].[].jobs[].[].log_bytesintegerdata[].[].jobs[].[].logs_urlstringnext_beforestring | nullrequiredThe run id to pass as
beforefor the next page
- 403The credential lacks the scope, or a delegated agent tried to write
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_runs_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_runs_list",
"arguments": {}
}
}Start a run for one commit
POST/v1/ci/runs
Scope ci:write. CI clones the Loom repo source.repo at source.sha from Loom's token-git URL, which it derives from the repo id; source.clone_url is optional and, if given, must equal that URL. source.clone_token (the Loom clone token) is the credential: Loom's token-git takes it as a Bearer token. It is kept sealed until the run ends and never returned. A launch run never receives CI secrets; when its commit has no pipeline for launch, CI runs its built-in pipeline site (job build, check site/build). The idempotency key is idempotency_key in the body or the Idempotency-Key header (the body wins); one of them is required. The same key for the same commit returns the same run (200); for another commit it is a 409 idempotency_mismatch. A clone that fails is a 409 clone_failed; a commit the clone does not have is a 409 sha_not_found.
Parameters
Idempotency-Keyheader · stringUsed when the body has no idempotency_key
Request body application/json
sourceobjectrequiredsource.forge"loom"requiredsource.repostringrequiredThe Loom repo id (
lr_…) max length 200source.clone_urlstring (uri)Loom's token-git URL for the repo, as CI derives it (optional; if given it must equal it). https, with no userinfo, query or fragment. max length 2048 · pattern
^https://[^/@?#]+(?:/[^?#]*)?$source.clone_tokenstringThe Loom clone token; Loom's token-git takes it as a Bearer token (Authorization: Bearer <token>). Kept sealed until the run ends; never returned or logged. min length 8 · max length 4096
source.refstringrequirede.g. refs/heads/main max length 256
source.shastringrequiredA full commit id (40 or 64 hex) pattern
^(?:[0-9a-f]{40}|[0-9a-f]{64})$source.base_shastringA full commit id (40 or 64 hex) pattern
^(?:[0-9a-f]{40}|[0-9a-f]{64})$source.changeobjectsource.change.idstringrequiredpattern
^[A-Za-z0-9_-]{1,64}$source.change.numberintegermin 1
source.change.head_repo_is_forkbooleanrequiredsource.change.base_refstringmax length 256
trigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestringRun only this pipeline max length 128
idempotency_keystringOr the Idempotency-Key header; one is required pattern
^[A-Za-z0-9._:/-]{8,200}$
Responses
- 200The run this idempotency_key already started
Response fields
idstringrequiredpattern
^cr_[a-z2-7]{26}$run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
numberintegerrequiredsourceobjectrequiredNever carries the clone credential
source.forge"loom"source.repostringsource.refstringsource.shastringsource.base_shastring | nullsource.changeobject | nulltrigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestring | nullstatus"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredconfig_errorstring | nullpipelinesobject[]pipelines[].[].namestringpipelines[].[].jobsstring[]created_byobjectattemptintegerrequiredcreated_atstring (date-time)requiredstarted_atstring | null (date-time)completed_atstring | null (date-time)jobsobject[]requiredjobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$jobs[].[].pipelinestringrequiredjobs[].[].namestringrequiredjobs[].[].check_namestringrequired<pipeline>/<job>jobs[].[].status"queued" | "in_progress" | "completed"requiredjobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredjobs[].[].needsstring[]jobs[].[].machinestringjobs[].[].imagestringjobs[].[].stepsobject[]jobs[].[].steps[].[].indexintegerjobs[].[].steps[].[].namestringjobs[].[].steps[].[].status"queued" | "in_progress" | "completed"jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulljobs[].[].steps[].[].started_atstring | null (date-time)jobs[].[].steps[].[].completed_atstring | null (date-time)jobs[].[].attemptsintegerjobs[].[].summary_mdstring | nulljobs[].[].created_atstring (date-time)jobs[].[].started_atstring | null (date-time)jobs[].[].completed_atstring | null (date-time)jobs[].[].log_bytesintegerjobs[].[].logs_urlstring
- 201Run created
Response fields
idstringrequiredpattern
^cr_[a-z2-7]{26}$run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
numberintegerrequiredsourceobjectrequiredNever carries the clone credential
source.forge"loom"source.repostringsource.refstringsource.shastringsource.base_shastring | nullsource.changeobject | nulltrigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestring | nullstatus"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredconfig_errorstring | nullpipelinesobject[]pipelines[].[].namestringpipelines[].[].jobsstring[]created_byobjectattemptintegerrequiredcreated_atstring (date-time)requiredstarted_atstring | null (date-time)completed_atstring | null (date-time)jobsobject[]requiredjobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$jobs[].[].pipelinestringrequiredjobs[].[].namestringrequiredjobs[].[].check_namestringrequired<pipeline>/<job>jobs[].[].status"queued" | "in_progress" | "completed"requiredjobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredjobs[].[].needsstring[]jobs[].[].machinestringjobs[].[].imagestringjobs[].[].stepsobject[]jobs[].[].steps[].[].indexintegerjobs[].[].steps[].[].namestringjobs[].[].steps[].[].status"queued" | "in_progress" | "completed"jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulljobs[].[].steps[].[].started_atstring | null (date-time)jobs[].[].steps[].[].completed_atstring | null (date-time)jobs[].[].attemptsintegerjobs[].[].summary_mdstring | nulljobs[].[].created_atstring (date-time)jobs[].[].started_atstring | null (date-time)jobs[].[].completed_atstring | null (date-time)jobs[].[].log_bytesintegerjobs[].[].logs_urlstring
- 403The credential lacks the scope, or a delegated agent tried to write
- 409idempotency_mismatch, clone_failed, sha_not_found, config_error or too_many_subscriptions
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/ci/runs" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": {
"forge": "loom",
"repo": "string",
"ref": "string",
"sha": "string"
},
"trigger": "push"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('ci_runs_create', {
body: {
source: {
forge: 'loom',
repo: 'string',
ref: 'string',
sha: 'string',
},
trigger: 'push',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_runs_create",
"arguments": {
"body": {
"source": {
"forge": "loom",
"repo": "string",
"ref": "string",
"sha": "string"
},
"trigger": "push"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a run and its jobs
GET/v1/ci/runs/{run}
Scope ci:read.
Parameters
runpath · stringrequired
Responses
- 200The run
Response fields
idstringrequiredpattern
^cr_[a-z2-7]{26}$run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
numberintegerrequiredsourceobjectrequiredNever carries the clone credential
source.forge"loom"source.repostringsource.refstringsource.shastringsource.base_shastring | nullsource.changeobject | nulltrigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestring | nullstatus"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredconfig_errorstring | nullpipelinesobject[]pipelines[].[].namestringpipelines[].[].jobsstring[]created_byobjectattemptintegerrequiredcreated_atstring (date-time)requiredstarted_atstring | null (date-time)completed_atstring | null (date-time)jobsobject[]requiredjobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$jobs[].[].pipelinestringrequiredjobs[].[].namestringrequiredjobs[].[].check_namestringrequired<pipeline>/<job>jobs[].[].status"queued" | "in_progress" | "completed"requiredjobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredjobs[].[].needsstring[]jobs[].[].machinestringjobs[].[].imagestringjobs[].[].stepsobject[]jobs[].[].steps[].[].indexintegerjobs[].[].steps[].[].namestringjobs[].[].steps[].[].status"queued" | "in_progress" | "completed"jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulljobs[].[].steps[].[].started_atstring | null (date-time)jobs[].[].steps[].[].completed_atstring | null (date-time)jobs[].[].attemptsintegerjobs[].[].summary_mdstring | nulljobs[].[].created_atstring (date-time)jobs[].[].started_atstring | null (date-time)jobs[].[].completed_atstring | null (date-time)jobs[].[].log_bytesintegerjobs[].[].logs_urlstring
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runs/$RUN" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_runs_get', {
run: '<run>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_runs_get",
"arguments": {
"run": "<run>"
}
}
}Artifacts
List a run's artifacts
GET/v1/ci/runs/{run}/artifacts
Scope ci:read. Artifacts are kept 14 days.
Parameters
runpath · stringrequired
Responses
- 200Artifacts
Response fields
dataobject[]requireddata[].[].idstringdata[].[].job_idstringdata[].[].namestringdata[].[].size_bytesinteger | nulldata[].[].sha256string | nulldata[].[].statusstringpending, ready or expired
data[].[].created_atstring (date-time)data[].[].expires_atstring (date-time)
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runs/$RUN/artifacts" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_artifacts_list', {
run: '<run>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_artifacts_list",
"arguments": {
"run": "<run>"
}
}
}Get a short-lived download URL for an artifact, or its bytes
GET/v1/ci/runs/{run}/artifacts/{name}
Scope ci:read. By default JSON with a signed URL for the .tar.gz that works for expires_in_s seconds (15 minutes). With format=raw, the artifact's bytes, application/gzip (Content-Disposition names it).
Parameters
runpath · stringrequirednamepath · stringrequiredformatquery · "raw"raw: answer the tar.gz bytes instead of the URL
Responses
- 200The download URL, or with format=raw the artifact bytes
Response fields
namestringrequiredsize_bytesintegerrequiredurlstring (uri)requiredexpires_in_sintegerrequired
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runs/$RUN/artifacts/$NAME" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_artifacts_get', {
run: '<run>',
name: '<name>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_artifacts_get",
"arguments": {
"run": "<run>",
"name": "<name>"
}
}
}Cancel
Cancel a run
POST/v1/ci/runs/{run}/cancel
Scope ci:write. Queued jobs are cancelled and running jobs are stopped; a completed run is unchanged.
Parameters
runpath · stringrequired
Responses
- 200The run
Response fields
idstringrequiredpattern
^cr_[a-z2-7]{26}$run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
numberintegerrequiredsourceobjectrequiredNever carries the clone credential
source.forge"loom"source.repostringsource.refstringsource.shastringsource.base_shastring | nullsource.changeobject | nulltrigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestring | nullstatus"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredconfig_errorstring | nullpipelinesobject[]pipelines[].[].namestringpipelines[].[].jobsstring[]created_byobjectattemptintegerrequiredcreated_atstring (date-time)requiredstarted_atstring | null (date-time)completed_atstring | null (date-time)jobsobject[]requiredjobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$jobs[].[].pipelinestringrequiredjobs[].[].namestringrequiredjobs[].[].check_namestringrequired<pipeline>/<job>jobs[].[].status"queued" | "in_progress" | "completed"requiredjobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredjobs[].[].needsstring[]jobs[].[].machinestringjobs[].[].imagestringjobs[].[].stepsobject[]jobs[].[].steps[].[].indexintegerjobs[].[].steps[].[].namestringjobs[].[].steps[].[].status"queued" | "in_progress" | "completed"jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulljobs[].[].steps[].[].started_atstring | null (date-time)jobs[].[].steps[].[].completed_atstring | null (date-time)jobs[].[].attemptsintegerjobs[].[].summary_mdstring | nulljobs[].[].created_atstring (date-time)jobs[].[].started_atstring | null (date-time)jobs[].[].completed_atstring | null (date-time)jobs[].[].log_bytesintegerjobs[].[].logs_urlstring
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/ci/runs/$RUN/cancel" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_runs_cancel', {
run: '<run>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_runs_cancel",
"arguments": {
"run": "<run>"
}
}
}Jobs
Get a job, its steps and annotations
GET/v1/ci/runs/{run}/jobs/{job}
Scope ci:read.
Parameters
runpath · stringrequiredjobpath · stringrequired
Responses
- 200The job
Response fields
idstringrequiredpattern
^cj_[a-z2-7]{26}$run_idstringrequiredpattern
^cr_[a-z2-7]{26}$pipelinestringrequirednamestringrequiredcheck_namestringrequired<pipeline>/<job>status"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredneedsstring[]machinestringimagestringstepsobject[]steps[].[].indexintegersteps[].[].namestringsteps[].[].status"queued" | "in_progress" | "completed"steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullsteps[].[].started_atstring | null (date-time)steps[].[].completed_atstring | null (date-time)attemptsintegersummary_mdstring | nullcreated_atstring (date-time)started_atstring | null (date-time)completed_atstring | null (date-time)log_bytesintegerlogs_urlstringannotationsobject[]annotations[].[].levelstringannotations[].[].pathstring | nullannotations[].[].lineinteger | nullannotations[].[].messagestring
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runs/$RUN/jobs/$JOB" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_jobs_get', {
run: '<run>',
job: '<job>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_jobs_get",
"arguments": {
"run": "<run>",
"job": "<job>"
}
}
}Read a job's log, or follow it while the job runs
GET/v1/ci/runs/{run}/jobs/{job}/logs
Scope ci:read. Without follow, the log so far as text/plain (X-OneOS-CI-Log-Complete: true once the job is done). With follow=1, a text/event-stream: event: log with the cursor as id, : ping every 15 s, and event: end with {"status","conclusion"}. Resume a cut stream with after (or Last-Event-ID).
Parameters
runpath · stringrequiredjobpath · stringrequiredfollowquery · "1" | "true"Stream the log as Server-Sent Events until the job ends
afterquery · stringWith follow: the last event id you received
Responses
- 200The log
Response fields
Type:
string - 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/runs/$RUN/jobs/$JOB/logs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_logs_get', {
run: '<run>',
job: '<job>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_logs_get",
"arguments": {
"run": "<run>",
"job": "<job>"
}
}
}Rerun
Run the same commit again
POST/v1/ci/runs/{run}/rerun
Scope ci:write. A new attempt of the run's commit, cloned again with a fresh Loom clone token (clone_token, required; the run's old token is dropped when it ends). The idempotency key is idempotency_key in the body or the Idempotency-Key header; one is required, and the same key returns the same attempt (200). A rerun of a launch run stays a launch run (no secrets).
Parameters
runpath · stringrequiredIdempotency-Keyheader · stringUsed when the body has no idempotency_key
Request body application/json
clone_tokenstringrequiredThe Loom clone token; Loom's token-git takes it as a Bearer token (Authorization: Bearer <token>). Kept sealed until the run ends; never returned or logged. min length 8 · max length 4096
idempotency_keystringOr the Idempotency-Key header; one is required pattern
^[A-Za-z0-9._:/-]{8,200}$pipelinestringmax length 128
Responses
- 200The attempt this idempotency_key already started
Response fields
idstringrequiredpattern
^cr_[a-z2-7]{26}$run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
numberintegerrequiredsourceobjectrequiredNever carries the clone credential
source.forge"loom"source.repostringsource.refstringsource.shastringsource.base_shastring | nullsource.changeobject | nulltrigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestring | nullstatus"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredconfig_errorstring | nullpipelinesobject[]pipelines[].[].namestringpipelines[].[].jobsstring[]created_byobjectattemptintegerrequiredcreated_atstring (date-time)requiredstarted_atstring | null (date-time)completed_atstring | null (date-time)jobsobject[]requiredjobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$jobs[].[].pipelinestringrequiredjobs[].[].namestringrequiredjobs[].[].check_namestringrequired<pipeline>/<job>jobs[].[].status"queued" | "in_progress" | "completed"requiredjobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredjobs[].[].needsstring[]jobs[].[].machinestringjobs[].[].imagestringjobs[].[].stepsobject[]jobs[].[].steps[].[].indexintegerjobs[].[].steps[].[].namestringjobs[].[].steps[].[].status"queued" | "in_progress" | "completed"jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulljobs[].[].steps[].[].started_atstring | null (date-time)jobs[].[].steps[].[].completed_atstring | null (date-time)jobs[].[].attemptsintegerjobs[].[].summary_mdstring | nulljobs[].[].created_atstring (date-time)jobs[].[].started_atstring | null (date-time)jobs[].[].completed_atstring | null (date-time)jobs[].[].log_bytesintegerjobs[].[].logs_urlstring
- 201Attempt created
Response fields
idstringrequiredpattern
^cr_[a-z2-7]{26}$run_idstringrequiredThe same as id pattern
^cr_[a-z2-7]{26}$default_pipelinebooleanTrue when CI ran its built-in pipeline (a launch run with no pipeline of its own)
numberintegerrequiredsourceobjectrequiredNever carries the clone credential
source.forge"loom"source.repostringsource.refstringsource.shastringsource.base_shastring | nullsource.changeobject | nulltrigger"push" | "change" | "manual" | "rerun" | "launch"requiredpipelinestring | nullstatus"queued" | "in_progress" | "completed"requiredconclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredconfig_errorstring | nullpipelinesobject[]pipelines[].[].namestringpipelines[].[].jobsstring[]created_byobjectattemptintegerrequiredcreated_atstring (date-time)requiredstarted_atstring | null (date-time)completed_atstring | null (date-time)jobsobject[]requiredjobs[].[].idstringrequiredpattern
^cj_[a-z2-7]{26}$jobs[].[].run_idstringrequiredpattern
^cr_[a-z2-7]{26}$jobs[].[].pipelinestringrequiredjobs[].[].namestringrequiredjobs[].[].check_namestringrequired<pipeline>/<job>jobs[].[].status"queued" | "in_progress" | "completed"requiredjobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequiredjobs[].[].needsstring[]jobs[].[].machinestringjobs[].[].imagestringjobs[].[].stepsobject[]jobs[].[].steps[].[].indexintegerjobs[].[].steps[].[].namestringjobs[].[].steps[].[].status"queued" | "in_progress" | "completed"jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nulljobs[].[].steps[].[].started_atstring | null (date-time)jobs[].[].steps[].[].completed_atstring | null (date-time)jobs[].[].attemptsintegerjobs[].[].summary_mdstring | nulljobs[].[].created_atstring (date-time)jobs[].[].started_atstring | null (date-time)jobs[].[].completed_atstring | null (date-time)jobs[].[].log_bytesintegerjobs[].[].logs_urlstring
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 409idempotency_mismatch, clone_failed, sha_not_found, config_error or too_many_subscriptions
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/ci/runs/$RUN/rerun" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"clone_token": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('ci_runs_rerun', {
run: '<run>',
body: {
clone_token: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_runs_rerun",
"arguments": {
"run": "<run>",
"body": {
"clone_token": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Secrets
List secret names and policies (never values)
GET/v1/ci/secrets
Scope ci:read. With repo, the repo's secrets and the org-wide ones.
Parameters
repoquery · string
Responses
- 200Secret names and policies
Response fields
dataobject[]requireddata[].[].namestringrequireddata[].[].repostring | nulldata[].[].branchesarray | nulldata[].[].allow_changesbooleandata[].[].allow_forksbooleandata[].[].updated_bystringdata[].[].updated_atstring (date-time)
- 403The credential lacks the scope, or a delegated agent tried to write
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/secrets" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_secrets_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_secrets_list",
"arguments": {}
}
}Set a secret for jobs (the value is never returned)
PUT/v1/ci/secrets/{name}
Scope ci:admin. The value is sealed on arrival and given only to the jobs its policy allows: runs on matching branches (all when omitted), change runs only with allow_changes, and changes from forks only with allow_forks; launch runs never get secrets. Name one repo, or send all_repos: true for every repo (one of the two is required). The answer is the name and policy; the value is never returned or logged.
Parameters
namepath · stringrequired
Request body application/json
valuestringrequired1 byte to 48 KB. Sealed on arrival; never returned or logged. min length 1 · max length 49152
repostringA repo id. Required unless all_repos is true max length 200
all_reposbooleanTrue for every repo of the org. Required unless repo is given
branchesstring[]Branch patterns; omit for all branches
allow_changesbooleanGive it to change (pull request) runs default
falseallow_forksbooleanGive it to changes from forks default
false
Responses
- 200The secret's name and policy
Response fields
namestringrequiredrepostring | nullbranchesarray | nullallow_changesbooleanallow_forksbooleanupdated_bystringupdated_atstring (date-time)
- 403The credential lacks the scope, or a delegated agent tried to write
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl -X PUT "https://os.one.ml/api/v1/ci/secrets/$NAME" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"value": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_secrets_set', {
name: '<name>',
body: {
value: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_secrets_set",
"arguments": {
"name": "<name>",
"body": {
"value": "string"
}
}
}
}Delete a secret
DELETE/v1/ci/secrets/{name}
Scope ci:admin. Without repo, the org-wide secret of that name.
Parameters
namepath · stringrequiredrepoquery · string
Responses
- 200Deleted
Response fields
deletedtruerequired
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/ci/secrets/$NAME" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_secrets_delete', {
name: '<name>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_secrets_delete",
"arguments": {
"name": "<name>"
}
}
}Subscriptions
List subscriptions and their delivery state
GET/v1/ci/subscriptions
Scope ci:read.
Responses
- 200Subscriptions
Response fields
dataobject[]requireddata[].[].idstringrequiredpattern
^cs_[a-z2-7]{26}$data[].[].urlstringrequireddata[].[].eventsstring[]requireddata[].[].cursorstringdata[].[].failuresintegerdata[].[].last_errorstring | nulldata[].[].next_attempt_atstring | null (date-time)data[].[].created_atstring (date-time)
- 403The credential lacks the scope, or a delegated agent tried to write
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/subscriptions" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_subscriptions_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_subscriptions_list",
"arguments": {}
}
}Send run, job and artifact events to an HTTPS endpoint
POST/v1/ci/subscriptions
Scope ci:write. Each event is POSTed as JSON (a CiEvent) with X-OneOS-CI-Event, X-OneOS-CI-Event-Id and X-OneOS-CI-Signature (HMAC-SHA256 under secret, which is never returned). Targets must be https on an origin CI admits exactly (configured per deployment; today Graphs' event intake); only those origins (and Loom) ever get CI's Google ID token, sent as X-Serverless-Authorization. Any other url is 422. A new subscription starts at the head of the event log; read history with GET /v1/ci/events. At most 10 per org (409 too_many_subscriptions).
Request body application/json
urlstring (uri)requiredAn https URL on an admitted host max length 1024
eventsstring[]Event types, or run., job., artifact., (default run., job., artifact.created)
secretstringrequiredThe HMAC key you verify deliveries with. Never returned or logged. min length 32 · max length 256
Responses
- 201Subscription created
Response fields
idstringrequiredpattern
^cs_[a-z2-7]{26}$urlstringrequiredeventsstring[]requiredcursorstringfailuresintegerlast_errorstring | nullnext_attempt_atstring | null (date-time)created_atstring (date-time)
- 403The credential lacks the scope, or a delegated agent tried to write
- 409idempotency_mismatch, clone_failed, sha_not_found, config_error or too_many_subscriptions
- 422The request is invalid or too large
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/ci/subscriptions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"secret": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_subscriptions_create', {
body: {
url: 'https://example.com',
secret: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_subscriptions_create",
"arguments": {
"body": {
"url": "https://example.com",
"secret": "string"
}
}
}
}Delete a subscription
DELETE/v1/ci/subscriptions/{sub}
Scope ci:write.
Parameters
subpath · stringrequired
Responses
- 200Deleted
Response fields
deletedtruerequired
- 403The credential lacks the scope, or a delegated agent tried to write
- 404No such object in this org and environment
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/ci/subscriptions/$SUB" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_subscriptions_delete', {
sub: '<sub>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_subscriptions_delete",
"arguments": {
"sub": "<sub>"
}
}
}Whoami
Show the identity and environment CI sees for your credential
GET/v1/ci/whoami
Scope ci:read.
Responses
- 200Org, principal, kind, scopes and environment
Response fields
orgstringrequiredprincipalstringrequiredkindstringrequiredscopesstring[]requiredtenant_environment"sandbox" | "live"required
- 403The credential lacks the scope, or a delegated agent tried to write
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/ci/whoami" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('ci_whoami'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ci_whoami",
"arguments": {}
}
}L1fe AI Inc. · Built from Genesis 0.3.1 and the live gateway on 2026-10-25. Support