OneOS Docs
Genesis 0.3.1 Console

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:admin ci:read ci:write
API keys
—
SDK
genesis.call('ci_cache_list', …) · helpers under genesis.ci
CLI
genesis ci
MCP
21 tools

Operations

Cache

List cache entries

GET/v1/ci/cache

ci:readci_cache_list

Scope ci:read.

Parameters

  • repoquery · string

Responses

  • 200Cache entries
    Response fields
    • dataobject[]required
    • data[].[].idstring

      pattern ^cc_[a-z2-7]{26}$

    • data[].[].repostring
    • data[].[].scopestring
    • data[].[].keystring
    • data[].[].size_bytesinteger
    • data[].[].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"

Delete a cache entry

DELETE/v1/ci/cache/{cache}

ci:adminci_cache_delete

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"

Events

Read run, job and artifact events after a cursor

GET/v1/ci/events

ci:readci_events_list

Scope ci:read. Oldest first, at most 500 a page (default 100); pass cursor as after for the next page.

Parameters

  • afterquery · string
  • limitquery · integer

Responses

  • 200Events
    Response fields
    • dataobject[]required
    • data[].[].event_idstringrequired
    • data[].[].type"run.queued" | "run.started" | "run.completed" | "job.queued" | "job.started" | "job.completed" | "job.annotation" | "artifact.created"required
    • data[].[].org_idstringrequired
    • data[].[].environment"sandbox" | "live"required
    • data[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • data[].[].job_idstring | null
    • data[].[].job_namestring | null
    • data[].[].pipelinestring | null
    • data[].[].idempotency_keystring

      The run's idempotency key

    • data[].[].namestring | null

      The check name <pipeline>/<job>, for a job event

    • data[].[].sourceobject
    • data[].[].trigger"push" | "change" | "manual" | "rerun" | "launch"
    • data[].[].statusstring
    • data[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • data[].[].started_atstring | null (date-time)
    • data[].[].completed_atstring | null (date-time)
    • data[].[].summary_mdstring | null
    • cursorstringrequired
  • 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"

Pipelines

List a repo's pipelines as CI last read them

GET/v1/ci/pipelines

ci:readci_pipelines_list

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"

Runners

List the machines jobs can run on and your org's limits

GET/v1/ci/runners

ci:readci_runners_list

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"

Runs

List runs, newest first

GET/v1/ci/runs

ci:readci_runs_list

Scope ci:read. At most 100 a page (default 30); pass next_before as before for the next page.

Parameters

  • repoquery · string
  • refquery · string
  • changequery · string
  • statusquery · "queued" | "in_progress" | "completed"
  • triggerquery · "push" | "change" | "manual" | "rerun" | "launch"
  • beforequery · string
  • limitquery · integer

Responses

  • 200Runs
    Response fields
    • dataobject[]required
    • data[].[].idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • data[].[].run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • data[].[].default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • data[].[].numberintegerrequired
    • data[].[].sourceobjectrequired

      Never carries the clone credential

    • data[].[].source.forge"loom"
    • data[].[].source.repostring
    • data[].[].source.refstring
    • data[].[].source.shastring
    • data[].[].source.base_shastring | null
    • data[].[].source.changeobject | null
    • data[].[].trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • data[].[].pipelinestring | null
    • data[].[].status"queued" | "in_progress" | "completed"required
    • data[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • data[].[].config_errorstring | null
    • data[].[].pipelinesobject[]
    • data[].[].pipelines[].[].namestring
    • data[].[].pipelines[].[].jobsstring[]
    • data[].[].created_byobject
    • data[].[].attemptintegerrequired
    • data[].[].created_atstring (date-time)required
    • data[].[].started_atstring | null (date-time)
    • data[].[].completed_atstring | null (date-time)
    • data[].[].jobsobject[]required
    • data[].[].jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • data[].[].jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • data[].[].jobs[].[].pipelinestringrequired
    • data[].[].jobs[].[].namestringrequired
    • data[].[].jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • data[].[].jobs[].[].status"queued" | "in_progress" | "completed"required
    • data[].[].jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • data[].[].jobs[].[].needsstring[]
    • data[].[].jobs[].[].machinestring
    • data[].[].jobs[].[].imagestring
    • data[].[].jobs[].[].stepsobject[]
    • data[].[].jobs[].[].steps[].[].indexinteger
    • data[].[].jobs[].[].steps[].[].namestring
    • data[].[].jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • data[].[].jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • data[].[].jobs[].[].steps[].[].started_atstring | null (date-time)
    • data[].[].jobs[].[].steps[].[].completed_atstring | null (date-time)
    • data[].[].jobs[].[].attemptsinteger
    • data[].[].jobs[].[].summary_mdstring | null
    • data[].[].jobs[].[].created_atstring (date-time)
    • data[].[].jobs[].[].started_atstring | null (date-time)
    • data[].[].jobs[].[].completed_atstring | null (date-time)
    • data[].[].jobs[].[].log_bytesinteger
    • data[].[].jobs[].[].logs_urlstring
    • next_beforestring | nullrequired

      The run id to pass as before for 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"

Start a run for one commit

POST/v1/ci/runs

ci:writeIdempotency-Key optionalci_runs_create

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 · string

    Used when the body has no idempotency_key

Request body application/json

  • sourceobjectrequired
  • source.forge"loom"required
  • source.repostringrequired

    The Loom repo id (lr_…) max length 200

  • source.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_tokenstring

    The 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.refstringrequired

    e.g. refs/heads/main max length 256

  • source.shastringrequired

    A full commit id (40 or 64 hex) pattern ^(?:[0-9a-f]{40}|[0-9a-f]{64})$

  • source.base_shastring

    A full commit id (40 or 64 hex) pattern ^(?:[0-9a-f]{40}|[0-9a-f]{64})$

  • source.changeobject
  • source.change.idstringrequired

    pattern ^[A-Za-z0-9_-]{1,64}$

  • source.change.numberinteger

    min 1

  • source.change.head_repo_is_forkbooleanrequired
  • source.change.base_refstring

    max length 256

  • trigger"push" | "change" | "manual" | "rerun" | "launch"required
  • pipelinestring

    Run only this pipeline max length 128

  • idempotency_keystring

    Or the Idempotency-Key header; one is required pattern ^[A-Za-z0-9._:/-]{8,200}$

Responses

  • 200The run this idempotency_key already started
    Response fields
    • idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • numberintegerrequired
    • sourceobjectrequired

      Never carries the clone credential

    • source.forge"loom"
    • source.repostring
    • source.refstring
    • source.shastring
    • source.base_shastring | null
    • source.changeobject | null
    • trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • pipelinestring | null
    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • config_errorstring | null
    • pipelinesobject[]
    • pipelines[].[].namestring
    • pipelines[].[].jobsstring[]
    • created_byobject
    • attemptintegerrequired
    • created_atstring (date-time)required
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • jobsobject[]required
    • jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • jobs[].[].pipelinestringrequired
    • jobs[].[].namestringrequired
    • jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • jobs[].[].status"queued" | "in_progress" | "completed"required
    • jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • jobs[].[].needsstring[]
    • jobs[].[].machinestring
    • jobs[].[].imagestring
    • jobs[].[].stepsobject[]
    • jobs[].[].steps[].[].indexinteger
    • jobs[].[].steps[].[].namestring
    • jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • jobs[].[].steps[].[].started_atstring | null (date-time)
    • jobs[].[].steps[].[].completed_atstring | null (date-time)
    • jobs[].[].attemptsinteger
    • jobs[].[].summary_mdstring | null
    • jobs[].[].created_atstring (date-time)
    • jobs[].[].started_atstring | null (date-time)
    • jobs[].[].completed_atstring | null (date-time)
    • jobs[].[].log_bytesinteger
    • jobs[].[].logs_urlstring
  • 201Run created
    Response fields
    • idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • numberintegerrequired
    • sourceobjectrequired

      Never carries the clone credential

    • source.forge"loom"
    • source.repostring
    • source.refstring
    • source.shastring
    • source.base_shastring | null
    • source.changeobject | null
    • trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • pipelinestring | null
    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • config_errorstring | null
    • pipelinesobject[]
    • pipelines[].[].namestring
    • pipelines[].[].jobsstring[]
    • created_byobject
    • attemptintegerrequired
    • created_atstring (date-time)required
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • jobsobject[]required
    • jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • jobs[].[].pipelinestringrequired
    • jobs[].[].namestringrequired
    • jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • jobs[].[].status"queued" | "in_progress" | "completed"required
    • jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • jobs[].[].needsstring[]
    • jobs[].[].machinestring
    • jobs[].[].imagestring
    • jobs[].[].stepsobject[]
    • jobs[].[].steps[].[].indexinteger
    • jobs[].[].steps[].[].namestring
    • jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • jobs[].[].steps[].[].started_atstring | null (date-time)
    • jobs[].[].steps[].[].completed_atstring | null (date-time)
    • jobs[].[].attemptsinteger
    • jobs[].[].summary_mdstring | null
    • jobs[].[].created_atstring (date-time)
    • jobs[].[].started_atstring | null (date-time)
    • jobs[].[].completed_atstring | null (date-time)
    • jobs[].[].log_bytesinteger
    • jobs[].[].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"
  }'

Get a run and its jobs

GET/v1/ci/runs/{run}

ci:readci_runs_get

Scope ci:read.

Parameters

  • runpath · stringrequired

Responses

  • 200The run
    Response fields
    • idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • numberintegerrequired
    • sourceobjectrequired

      Never carries the clone credential

    • source.forge"loom"
    • source.repostring
    • source.refstring
    • source.shastring
    • source.base_shastring | null
    • source.changeobject | null
    • trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • pipelinestring | null
    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • config_errorstring | null
    • pipelinesobject[]
    • pipelines[].[].namestring
    • pipelines[].[].jobsstring[]
    • created_byobject
    • attemptintegerrequired
    • created_atstring (date-time)required
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • jobsobject[]required
    • jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • jobs[].[].pipelinestringrequired
    • jobs[].[].namestringrequired
    • jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • jobs[].[].status"queued" | "in_progress" | "completed"required
    • jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • jobs[].[].needsstring[]
    • jobs[].[].machinestring
    • jobs[].[].imagestring
    • jobs[].[].stepsobject[]
    • jobs[].[].steps[].[].indexinteger
    • jobs[].[].steps[].[].namestring
    • jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • jobs[].[].steps[].[].started_atstring | null (date-time)
    • jobs[].[].steps[].[].completed_atstring | null (date-time)
    • jobs[].[].attemptsinteger
    • jobs[].[].summary_mdstring | null
    • jobs[].[].created_atstring (date-time)
    • jobs[].[].started_atstring | null (date-time)
    • jobs[].[].completed_atstring | null (date-time)
    • jobs[].[].log_bytesinteger
    • jobs[].[].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"

Artifacts

List a run's artifacts

GET/v1/ci/runs/{run}/artifacts

ci:readci_artifacts_list

Scope ci:read. Artifacts are kept 14 days.

Parameters

  • runpath · stringrequired

Responses

  • 200Artifacts
    Response fields
    • dataobject[]required
    • data[].[].idstring
    • data[].[].job_idstring
    • data[].[].namestring
    • data[].[].size_bytesinteger | null
    • data[].[].sha256string | null
    • data[].[].statusstring

      pending, 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"

Get a short-lived download URL for an artifact, or its bytes

GET/v1/ci/runs/{run}/artifacts/{name}

ci:readci_artifacts_get

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 · stringrequired
  • namepath · stringrequired
  • formatquery · "raw"

    raw: answer the tar.gz bytes instead of the URL

Responses

  • 200The download URL, or with format=raw the artifact bytes
    Response fields
    • namestringrequired
    • size_bytesintegerrequired
    • urlstring (uri)required
    • expires_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"

Cancel

Cancel a run

POST/v1/ci/runs/{run}/cancel

ci:writeci_runs_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
    • idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • numberintegerrequired
    • sourceobjectrequired

      Never carries the clone credential

    • source.forge"loom"
    • source.repostring
    • source.refstring
    • source.shastring
    • source.base_shastring | null
    • source.changeobject | null
    • trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • pipelinestring | null
    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • config_errorstring | null
    • pipelinesobject[]
    • pipelines[].[].namestring
    • pipelines[].[].jobsstring[]
    • created_byobject
    • attemptintegerrequired
    • created_atstring (date-time)required
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • jobsobject[]required
    • jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • jobs[].[].pipelinestringrequired
    • jobs[].[].namestringrequired
    • jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • jobs[].[].status"queued" | "in_progress" | "completed"required
    • jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • jobs[].[].needsstring[]
    • jobs[].[].machinestring
    • jobs[].[].imagestring
    • jobs[].[].stepsobject[]
    • jobs[].[].steps[].[].indexinteger
    • jobs[].[].steps[].[].namestring
    • jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • jobs[].[].steps[].[].started_atstring | null (date-time)
    • jobs[].[].steps[].[].completed_atstring | null (date-time)
    • jobs[].[].attemptsinteger
    • jobs[].[].summary_mdstring | null
    • jobs[].[].created_atstring (date-time)
    • jobs[].[].started_atstring | null (date-time)
    • jobs[].[].completed_atstring | null (date-time)
    • jobs[].[].log_bytesinteger
    • jobs[].[].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"

Jobs

Get a job, its steps and annotations

GET/v1/ci/runs/{run}/jobs/{job}

ci:readci_jobs_get

Scope ci:read.

Parameters

  • runpath · stringrequired
  • jobpath · stringrequired

Responses

  • 200The job
    Response fields
    • idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • pipelinestringrequired
    • namestringrequired
    • check_namestringrequired

      <pipeline>/<job>

    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • needsstring[]
    • machinestring
    • imagestring
    • stepsobject[]
    • steps[].[].indexinteger
    • steps[].[].namestring
    • steps[].[].status"queued" | "in_progress" | "completed"
    • steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • steps[].[].started_atstring | null (date-time)
    • steps[].[].completed_atstring | null (date-time)
    • attemptsinteger
    • summary_mdstring | null
    • created_atstring (date-time)
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • log_bytesinteger
    • logs_urlstring
    • annotationsobject[]
    • annotations[].[].levelstring
    • annotations[].[].pathstring | null
    • annotations[].[].lineinteger | null
    • annotations[].[].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"

Read a job's log, or follow it while the job runs

GET/v1/ci/runs/{run}/jobs/{job}/logs

ci:readci_logs_get

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 · stringrequired
  • jobpath · stringrequired
  • followquery · "1" | "true"

    Stream the log as Server-Sent Events until the job ends

  • afterquery · string

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

Rerun

Run the same commit again

POST/v1/ci/runs/{run}/rerun

ci:writeIdempotency-Key optionalci_runs_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 · stringrequired
  • Idempotency-Keyheader · string

    Used when the body has no idempotency_key

Request body application/json

  • clone_tokenstringrequired

    The 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_keystring

    Or the Idempotency-Key header; one is required pattern ^[A-Za-z0-9._:/-]{8,200}$

  • pipelinestring

    max length 128

Responses

  • 200The attempt this idempotency_key already started
    Response fields
    • idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • numberintegerrequired
    • sourceobjectrequired

      Never carries the clone credential

    • source.forge"loom"
    • source.repostring
    • source.refstring
    • source.shastring
    • source.base_shastring | null
    • source.changeobject | null
    • trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • pipelinestring | null
    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • config_errorstring | null
    • pipelinesobject[]
    • pipelines[].[].namestring
    • pipelines[].[].jobsstring[]
    • created_byobject
    • attemptintegerrequired
    • created_atstring (date-time)required
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • jobsobject[]required
    • jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • jobs[].[].pipelinestringrequired
    • jobs[].[].namestringrequired
    • jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • jobs[].[].status"queued" | "in_progress" | "completed"required
    • jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • jobs[].[].needsstring[]
    • jobs[].[].machinestring
    • jobs[].[].imagestring
    • jobs[].[].stepsobject[]
    • jobs[].[].steps[].[].indexinteger
    • jobs[].[].steps[].[].namestring
    • jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • jobs[].[].steps[].[].started_atstring | null (date-time)
    • jobs[].[].steps[].[].completed_atstring | null (date-time)
    • jobs[].[].attemptsinteger
    • jobs[].[].summary_mdstring | null
    • jobs[].[].created_atstring (date-time)
    • jobs[].[].started_atstring | null (date-time)
    • jobs[].[].completed_atstring | null (date-time)
    • jobs[].[].log_bytesinteger
    • jobs[].[].logs_urlstring
  • 201Attempt created
    Response fields
    • idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • run_idstringrequired

      The same as id pattern ^cr_[a-z2-7]{26}$

    • default_pipelineboolean

      True when CI ran its built-in pipeline (a launch run with no pipeline of its own)

    • numberintegerrequired
    • sourceobjectrequired

      Never carries the clone credential

    • source.forge"loom"
    • source.repostring
    • source.refstring
    • source.shastring
    • source.base_shastring | null
    • source.changeobject | null
    • trigger"push" | "change" | "manual" | "rerun" | "launch"required
    • pipelinestring | null
    • status"queued" | "in_progress" | "completed"required
    • conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • config_errorstring | null
    • pipelinesobject[]
    • pipelines[].[].namestring
    • pipelines[].[].jobsstring[]
    • created_byobject
    • attemptintegerrequired
    • created_atstring (date-time)required
    • started_atstring | null (date-time)
    • completed_atstring | null (date-time)
    • jobsobject[]required
    • jobs[].[].idstringrequired

      pattern ^cj_[a-z2-7]{26}$

    • jobs[].[].run_idstringrequired

      pattern ^cr_[a-z2-7]{26}$

    • jobs[].[].pipelinestringrequired
    • jobs[].[].namestringrequired
    • jobs[].[].check_namestringrequired

      <pipeline>/<job>

    • jobs[].[].status"queued" | "in_progress" | "completed"required
    • jobs[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | nullrequired
    • jobs[].[].needsstring[]
    • jobs[].[].machinestring
    • jobs[].[].imagestring
    • jobs[].[].stepsobject[]
    • jobs[].[].steps[].[].indexinteger
    • jobs[].[].steps[].[].namestring
    • jobs[].[].steps[].[].status"queued" | "in_progress" | "completed"
    • jobs[].[].steps[].[].conclusion"success" | "failure" | "cancelled" | "timed_out" | "skipped" | "neutral" | "action_required" | null
    • jobs[].[].steps[].[].started_atstring | null (date-time)
    • jobs[].[].steps[].[].completed_atstring | null (date-time)
    • jobs[].[].attemptsinteger
    • jobs[].[].summary_mdstring | null
    • jobs[].[].created_atstring (date-time)
    • jobs[].[].started_atstring | null (date-time)
    • jobs[].[].completed_atstring | null (date-time)
    • jobs[].[].log_bytesinteger
    • jobs[].[].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"
  }'

Secrets

List secret names and policies (never values)

GET/v1/ci/secrets

ci:readci_secrets_list

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[]required
    • data[].[].namestringrequired
    • data[].[].repostring | null
    • data[].[].branchesarray | null
    • data[].[].allow_changesboolean
    • data[].[].allow_forksboolean
    • data[].[].updated_bystring
    • data[].[].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"

Set a secret for jobs (the value is never returned)

PUT/v1/ci/secrets/{name}

ci:adminci_secrets_set

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

  • valuestringrequired

    1 byte to 48 KB. Sealed on arrival; never returned or logged. min length 1 · max length 49152

  • repostring

    A repo id. Required unless all_repos is true max length 200

  • all_reposboolean

    True for every repo of the org. Required unless repo is given

  • branchesstring[]

    Branch patterns; omit for all branches

  • allow_changesboolean

    Give it to change (pull request) runs default false

  • allow_forksboolean

    Give it to changes from forks default false

Responses

  • 200The secret's name and policy
    Response fields
    • namestringrequired
    • repostring | null
    • branchesarray | null
    • allow_changesboolean
    • allow_forksboolean
    • updated_bystring
    • updated_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"
  }'

Delete a secret

DELETE/v1/ci/secrets/{name}

ci:adminci_secrets_delete

Scope ci:admin. Without repo, the org-wide secret of that name.

Parameters

  • namepath · stringrequired
  • repoquery · 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"

Subscriptions

List subscriptions and their delivery state

GET/v1/ci/subscriptions

ci:readci_subscriptions_list

Scope ci:read.

Responses

  • 200Subscriptions
    Response fields
    • dataobject[]required
    • data[].[].idstringrequired

      pattern ^cs_[a-z2-7]{26}$

    • data[].[].urlstringrequired
    • data[].[].eventsstring[]required
    • data[].[].cursorstring
    • data[].[].failuresinteger
    • data[].[].last_errorstring | null
    • data[].[].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"

Send run, job and artifact events to an HTTPS endpoint

POST/v1/ci/subscriptions

ci:writeci_subscriptions_create

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)required

    An https URL on an admitted host max length 1024

  • eventsstring[]

    Event types, or run., job., artifact., (default run., job., artifact.created)

  • secretstringrequired

    The HMAC key you verify deliveries with. Never returned or logged. min length 32 · max length 256

Responses

  • 201Subscription created
    Response fields
    • idstringrequired

      pattern ^cs_[a-z2-7]{26}$

    • urlstringrequired
    • eventsstring[]required
    • cursorstring
    • failuresinteger
    • last_errorstring | null
    • next_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"
  }'

Delete a subscription

DELETE/v1/ci/subscriptions/{sub}

ci:writeci_subscriptions_delete

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"

Whoami

Show the identity and environment CI sees for your credential

GET/v1/ci/whoami

ci:readci_whoami

Scope ci:read.

Responses

  • 200Org, principal, kind, scopes and environment
    Response fields
    • orgstringrequired
    • principalstringrequired
    • kindstringrequired
    • scopesstring[]required
    • tenant_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"

L1fe AI Inc. · Built from Genesis 0.3.1 and the live gateway on 2026-10-25. Support