Run the app's pipeline (asynchronous; poll the run for the outcome)
/v1/apps/{app}/runsExecutes the app's pipeline and answers immediately with the run identifier to poll. target is REQUIRED and it selects the authorization: published needs the pipeline:run scope, draft needs pipeline:run_draft. This door never falls back between the two - an app holding no configuration of the requested target is refused with 409 no_runnable_version rather than quietly running the other one. Only one run per app may be active, so a second trigger is refused with 409 app_locked. That refusal carries the active run's identifier in detail.activeRunId whenever the blocking run is one this credential may read, which is what lets a client whose request timed out adopt that run instead of starting another; when the blocker is a draft preview and the credential does not hold pipeline:run_draft, the identifier is omitted and the answer is to back off. A workspace also executes only a few runs at once across all of its apps; a trigger beyond that is refused with 422 quota_exceeded and detail.resource: "active_pipeline_runs", which clears when one of them finishes - back off and trigger again. A run is bounded in time (five minutes per SQL node, ten for the whole run); one that reaches a limit finishes error and the node that reached it names the limit. A run that waited so long to start (the platform saturated) that it could no longer finish in time finishes error without running, its nodes saying it waited too long to start; trigger it again. Next: poll getRun.
Authorization
bearerAuth Obtain a token from https://id.factophant.com/oauth/token using the client_credentials grant.
In: header
Path Parameters
The app's stable technicalId, as reported by listApps. It is a snake_case identifier, never a numeric id, and it survives a rename of the app.
1 <= length <= 64Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Value in
- "published"
- "draft"
curl -X POST "https://example.com/v1/apps/string/runs" \ -H "Content-Type: application/json" \ -d '{ "target": "published" }'{ "runId": 4821, "status": "running", "target": "published"}Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json