Using the API

Everything the dashboard does goes through the REST API, so you can call it directly too.

Authentication

Create a token from your profile menu → API tokens. It looks like pmk_<id>_<secret> and is shown only once.

  • It acts as you: your organization's visibility and your repository roles apply.
  • It expires after 90 days by default, 1 year at most. You can revoke it any time.
curl -H "Authorization: Bearer pmk_..." \
  https://your-instance/api/meshes

Only reading? Choose a read-only token for integrations that just observe, like dashboards and reporting. A read-only token is rejected on any call that changes something.

Reference

The endpoints integrations use most:

  • GET /api/meshes: every mesh you can see, active and inactive, each with its id (ms_…; a mesh from before 2026-11-23 keeps its rp_…), its repoId, repoPath, branch, whether it is enabled and active (its pipemesh.yaml landed), and its visibility. Narrow it with ?org=github.com/acme (an organization, by its path or id: what you can read there, its public meshes if you are not a member, nothing for an organization not known), ?prefix=github.com/acme, ?q=<text> (in the repository path, its branch, or a pipeline's or workflow's name; case does not matter), ?starred=true (your starred meshes), ?uses=github.com/acme/infra (or …@branch: the ones declaring that repository), ?yours=true (your organizations' meshes), ?active=true|false and ?public=true (what anyone may read). It comes in pages of up to 100 meshes: {"items": [...], "next": "<path>", "totals": {...}, "hasYours": …}; ask ?after=<next> for the next page (next is null on the last), and ?limit= for smaller pages. totals counts the whole list, with its filters and only what you can read: its active meshes (repos), their pipelines and workflows, and its inactive meshes; it comes on the first page only, and never with q.
  • GET /api/meshlets: the same list as pipelines and workflows, filtered and paged alike, each with its id, its kind (pipeline or workflow), its name (pipeline, or pipeline/build for one a job starts, with its parentId), its repo (its mesh: id, repoPath, branch, enabled, visibility), your viewerRole, its flow (IDLE, ACTIVE while something runs, BLOCKED on a failure) and its attention (failed, gated when a job's incoming promotions are off, or null). GET /api/meshlets/stream sends what changes (server-sent events): {"ready": true} first, after which you read the list; then {"items": [...], "removed": [...]}, the ones that changed as you read them and the ids of those you no longer read (?public=true: the public ones only)
  • GET /api/meshes/{id}: one mesh with its meshlets (its pipelines and workflows), each with its status, its latest commit and run (latestExecutionSeq, commitShortSha, commitMessage, commitAuthor) and gatedJobs; GET /api/meshes/at?path=github.com/acme/app: one mesh by its repository's path; GET /api/meshes/{id}/meshlets: its pipelines and workflows alone (?includeRetired=true adds the retired ones); PUT /api/meshes/{id}: {enabled} switches it on or off, {branch} moves its branch, {visibility} (public or private) says who may read it. {id} is the mesh's id, or its repository's
  • GET /api/meshes/{id}/identity: what its jobs' tokens carry, to trust in a cloud account; DELETE /api/meshes/{id}/history deletes its pipelines' and workflows' history (the mesh stays): 202 at once, then in the background it pauses the mesh, waits for running jobs to finish, deletes, and switches it back; 409 while a delete of it runs
  • GET /api/meshes/{id}/watched: the branches Pipemesh watches in its repository (its own, and those other meshes' pipelines declare), each with its head, last poll and the pipelines and workflows using it; POST …/watched/{branch}/poll polls one now. GET /api/meshes/{id}/branches?q=: the provider's branches starting with q
  • GET /api/meshlets/{id}/view: a pipeline's or a workflow's live view, with its jobs, each with its id and its name (its key in pipemesh.yaml), and jobIds, every job's id by name, removed ones included. A pipeline's deployments, deployed?ref= and metrics; a workflow's runs. POST /api/meshlets/{id}/runs starts a workflow's run: with no body, at its repository branch's head, as the Run button does; with a body, for a commit you name (needs a read + write token). POST …/runs/{n}/retry retries a run's failed jobs with its own commits; POST …/runs/{n}/new starts a pull request's run again, the other repositories at their current heads (201 {runNumber, replaces}; 409 says why not); POST …/runs/{n}/cancel cancels it
  • A pipeline's or workflow's id (pl_…, wf_…) is not a mesh's: a route of the other kind, or an alias, is not found
  • /api/jobs/{jobId}/…: a job, by the id its view lists. It keeps that id when it is renamed, so its history is at the same URL before and after. GET …/history; POST …/cancel; GET …/runs/{seq}/{attempt}/tasks and …/runs/{seq}/reports; GET …/revisions/{seq}/outputs and /fingerprint. {seq} is a pipeline's revision, or a workflow's run number. A pipeline's job also has POST …/rerun, PUT and DELETE …/gate, and GET and POST …/rollback?revision=; a workflow run's job has POST …/runs/{seq}/retry. A route of the other kind is not found
  • A row that names a job's run says {jobId, seq, attempt}
  • GET /api/meshes/discovery?prefix= (or ?org=): each organization's latest discovery, by its orgId and path: running with the count found so far, done (truncated when it stopped at the page cap), or failed with the error
  • /api/orgs/{org}: an organization, by its id or its path. GET gives its connection (the provider account it is, with its credential and webhook) and its capabilities (what Pipemesh does there: read, discover, webhooks, statuses, …). Its admins also have PATCH (discoveryEnabled, newMeshesEnabled), …/secrets and …/variables (GET, and PUT/DELETE …/{name}), PUT …/commit-status, …/merge-notes and …/poll-every, PUT/DELETE …/webhook/signing-token, and POST …/discover
  • GET /api/deployments: what went to production, newest first, across the pipelines of your organizations (pipemesh deployments --all), each with its pipeline, job, revision, status and commit; ?since= and ?until= (a date or a time; the last 7 days by default), ?limit= (200 by default, 1,000 at most). ?org= (an organization, by its id or path) reads that organization's instead: what you can read there, its public pipelines if you are not a member. Without signing in, and with ?public=true (its public pipelines only), org= is required. At most 30 listings a minute from one address