Flow

Retrieve a deploy

GET
/deploys/{deploy}

Returns a deploy started by POST /flows:deploy, a bundle PATCH /flows/{flow}, or a build's prompt. Only its caller (for a build's, the user who started the build) or an admin can read it. A deploy that ended is kept for 7 days, and for as long as it is its flow's latestDeploy.

BearerAuth
headerAuthorizationBearer <JWT>

Admin token, API token issued via /api-tokens, or an OIDC JWT access token issued by the configured OIDC provider.

deploy*string

Deploy identifier (UUID).

Formatuuid

The deploy.

application/json
  1. response

A deploy of a flow: of a bundle, which is indexed before it goes live, or of a new flow without one.

name*string

Unique resource name.

flow*string

The flow deployed to. For a new flow's deploy, the flow it creates once it succeeds; until then the flow doesn't exist.

state*string

PENDING while the bundle is indexed; SUCCEEDED once the flow runs it; FAILED with error, leaving the flow as it was (a new flow is not created); SUPERSEDED when a newer deploy of the same flow, or its deletion, came first.

Value in"PENDING""SUCCEEDED""FAILED""SUPERSEDED"
error?

Why a deploy failed.

createTime*string

Time at which the deploy was started.

Formatdate-time
updateTime*string

Time at which the deploy last changed state.

Formatdate-time
Example Request
curl -X GET 'https://example.com/api/hub/deploys/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "name": "deploys/0190f5a2-7c3e-7b1a-9d4e-2f6a8b0c1d3e",  "flow": "flows/550e8400-e29b-41d4-a716-446655440000",  "state": "PENDING",  "error": {    "reason": "INVALID_BUNDLE",    "message": "Syntax error in src/index.ts: Variable declaration expected.",    "fluxCode": "parse",    "file": "src/index.ts",    "range": {}  },  "createTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z"}