lua marketplace template.
Verified against lua-cli 3.33.0.
Base URL and authentication
Every route is creator-organization only: reads checkmarketplace:read and writes check automations:write, both resolved against the template’s creator organization. The host, the bearer header, and the error envelope are on the REST API overview.
Endpoints
POST /marketplace/templates/:templateId/apply
Pushes a version to an explicit list of installed agents asynchronously. Scopeautomations:write, creator organization. Equivalent: lua marketplace template apply. Unknown body fields are stripped; migrateRuns answers 403 NOT_VERSION_OWNER on this route and belongs on install from the installing organization.
number
Template version to apply.
string[]
required
Agent IDs to apply to. At most 500.
201 with { runId }.
GET /marketplace/templates/:templateId/apply-runs/:runId
Returns an apply run. Scopemarketplace:read, creator organization. lua marketplace template apply polls it unless --no-wait is given. A publish that fans out to consenting installs also creates a run; its ID is autoApplyRunId on the publish response.
Response
200 with { id, templateId, templateVersion, initiatedBy, targets: [{ agentId, status: "pending" | "applied" | "already_current" | "failed", localAgentVersion?, error? }], status, startedAt, finishedAt?, trigger?: "manual" | "auto-publish" | "auto-publish-chunk", leadRunId?, approvedBy? }.
GET /marketplace/templates/:templateId/installs
The installs ledger: one row per agent the template is installed on. Scopemarketplace:read, creator organization. Equivalent: lua marketplace template status.
number
Page number.
number
Page size.
200 with an array of install results.
GET /marketplace/templates/:templateId/installs/health
The health rollup per install and per installed workflow. Scopemarketplace:read, creator organization. Equivalent: lua marketplace template health.
number
Reporting window in days.
string
nextCursor from the previous page.number
Page size. At most 100.
200 with { templateId, windowDays, installs: [{ templateInstallId, agentId, orgId, installedVersion, workflows: [{ key, displayName, workflowId, active, capabilityInert, scheduleStatus: "active" | "paused" | "failed" | "none", runs: { inFlight, gated, suspended, terminals: { completed, failed, timedOut, cancelled, abandoned }, last?, lastFailure? }, autoDisabledAt? }] }], nextCursor? }.
POST /templates/:templateId/installs/:agentId/retry
Re-runs anapply_failed install without forging installer consent. Scope automations:write, creator organization.
Response
201 with the install result.
GET /marketplace/templates/:templateId/outcomes
Outcome counters per unit. Scopemarketplace:read, creator organization. The counters are separate populations, never summed; only verified is badge-grade.
string
Start of the window.
string
End of the window.
200 with { templateId, from?, to?, units: [{ key, title, unitLabel?, recorded, settled, verified, reversed, inertCapabilities? }] }.
PUT /marketplace/templates/:templateId/eval-set
Replaces the whole eval set and bumpsrevision. Scope automations:write, creator organization.
string
required
The eval set as JSONL.
200 with the eval set, in the shape the read route returns.
GET /marketplace/templates/:templateId/eval-set
Returns the eval set. Scopemarketplace:read, creator organization.
Response
200 with { templateId, revision, minPassRate, caseCount, monitorCount, cases, monitors, updatedAt }.
POST /marketplace/templates/:templateId/eval-runs
Starts an eval run. Scopeautomations:write, creator organization.
string
Agent to run the set against. Defaults to the source agent; must belong to the creator organization.
201 with { runId }.
GET /marketplace/templates/:templateId/eval-runs
Lists eval runs. Scopemarketplace:read, creator organization.
number
Page number.
number
Page size.
200 with eval runs, each { id, templateId, agentId, evalSetRevision, sourceAgentVersion?, status, cases, passRate?, passed?, initiatedBy, startedAt, finishedAt? }.
GET /marketplace/templates/:templateId/eval-runs/:runId
Returns one eval run, in the same shape as a list entry. Scopemarketplace:read, creator organization.
Errors
Apply and the creator retry share the install error envelope and codes on Agent templates. Specific to these routes:See also
- Agent templates — publish, install, deploy, the install and deploy results
- Marketplace skills — single skills listed on the marketplace
- Install and apply a template — rolling a version out from the CLI
- Check fleet health — reading the health rollup
lua marketplace— the CLI twin

