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 itsid(ms_…; a mesh from before 2026-11-23 keeps itsrp_…), itsrepoId,repoPath,branch, whether it isenabledandactive(itspipemesh.yamllanded), and itsvisibility. 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|falseand?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 (nextis null on the last), and?limit=for smaller pages.totalscounts the whole list, with its filters and only what you can read: its active meshes (repos), theirpipelinesandworkflows, and itsinactivemeshes; it comes on the first page only, and never withq.GET /api/meshlets: the same list as pipelines and workflows, filtered and paged alike, each with itsid, itskind(pipelineorworkflow), itsname(pipeline, orpipeline/buildfor one a job starts, with itsparentId), itsrepo(its mesh:id,repoPath,branch,enabled,visibility), yourviewerRole, itsflow(IDLE,ACTIVEwhile something runs,BLOCKEDon a failure) and itsattention(failed,gatedwhen a job's incoming promotions are off, ornull).GET /api/meshlets/streamsends 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 itsmeshlets(its pipelines and workflows), each with itsstatus, its latest commit and run (latestExecutionSeq,commitShortSha,commitMessage,commitAuthor) andgatedJobs;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=trueadds the retired ones);PUT /api/meshes/{id}:{enabled}switches it on or off,{branch}moves its branch,{visibility}(publicorprivate) says who may read it.{id}is the mesh's id, or its repository'sGET /api/meshes/{id}/identity: what its jobs' tokens carry, to trust in a cloud account;DELETE /api/meshes/{id}/historydeletes its pipelines' and workflows' history (the mesh stays):202at once, then in the background it pauses the mesh, waits for running jobs to finish, deletes, and switches it back;409while a delete of it runsGET /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}/pollpolls one now.GET /api/meshes/{id}/branches?q=: the provider's branches starting withqGET /api/meshlets/{id}/view: a pipeline's or a workflow's live view, with its jobs, each with itsidand itsname(its key inpipemesh.yaml), andjobIds, every job's id by name, removed ones included. A pipeline'sdeployments,deployed?ref=andmetrics; a workflow'sruns.POST /api/meshlets/{id}/runsstarts 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}/retryretries a run's failed jobs with its own commits;POST …/runs/{n}/newstarts a pull request's run again, the other repositories at their current heads (201 {runNumber, replaces};409says why not);POST …/runs/{n}/cancelcancels 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 theidits 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}/tasksand…/runs/{seq}/reports;GET …/revisions/{seq}/outputsand/fingerprint.{seq}is a pipeline's revision, or a workflow's run number. A pipeline's job also hasPOST …/rerun,PUTandDELETE …/gate, andGETandPOST …/rollback?revision=; a workflow run's job hasPOST …/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 itsorgIdandpath:runningwith the count found so far,done(truncatedwhen it stopped at the page cap), orfailedwith the error/api/orgs/{org}: an organization, by its id or its path.GETgives itsconnection(the provider account it is, with its credential and webhook) and itscapabilities(what Pipemesh does there:read,discover,webhooks,statuses, …). Its admins also havePATCH(discoveryEnabled,newMeshesEnabled),…/secretsand…/variables(GET, andPUT/DELETE …/{name}),PUT …/commit-status,…/merge-notesand…/poll-every,PUT/DELETE …/webhook/signing-token, andPOST …/discoverGET /api/deployments: what went to production, newest first, across the pipelines of your organizations (pipemesh deployments --all), each with itspipeline,job,revision,statusandcommit;?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