Write the preview of a Workflow v2 proposal

Writes the cache of a proposals-repo pull request's head (Fabric after it commits, the repo's CI on every push). The id is the UUIDv5 of repo_path; the caller needs the workflow_graph update ability on company_id. The same checks as a deploy apply to the artifacts. Answers 200 whether the row was created, updated or left as it was (applied and outcome tell which). A write for another head whose head_committed_at is not newer than the stored one is 409 with code stale_head.

Blocked proposals. A proposal whose graph needs a node type the executor does not have yet is written with status blocked and blocked_on (required with that status; checked, but not stored, with any other). The graph is stored with that type: unknown_node_type is not reported for the types in blocked_on (nor for any type when status is closed, which also excuses the graph shape findings unknown_port, cycle and unreachable_node, invalid_config and invalid_filter_id), and every other finding still applies. Refused with 422 when every type in blocked_on is already in the node catalog (code already_available; send the proposal as draft) and when a type that no node uses and the catalog lacks is named (code unused_type). When a services release whose catalog has every type in blocked_on starts, the orchestrator leader moves the proposal to draft and creates one in-app notification for requested_by (the company's workflow editors if that user no longer exists).

requested_by is the caller's user, taken from the token; the body has no such member (one that is sent is ignored). It is set when the row is created, whenever a write moves the proposal into blocked, and by any write while the stored value is empty (a row from before the column existed).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

The proposal id, the UUIDv5 of repo_path.

Body Params
string
required
string
required

The company folder of repo_path.

string
length ≤ 200
integer | null
1 to 2147483647
string

An https URL.

string
required
^[0-9a-f]{7,64}$
date-time
required

The commit's RFC 3339 date; after 2000 and at most a day ahead.

string
enum
required

merged and deploy_failed are set by the deploy only (422).

Allowed:
string
graph
object
required
dashboard
object | null
sample_data
object | null
questions
array of objects | null
questions
docs
object | null

The doc set of a Workflow v2 proposal or of a workflow version: the markdown of the files under docs/ in the proposals repo, keyed by file name. Only these four keys are accepted; any may be missing. Each value is at most 128 KiB (512 KiB for the four). Absent, null and an empty object are no doc set, read back as null.

string
length ≤ 131072

CHANGE.md of the head: what the proposal changes and why. At most 128 KiB (422 over it). Like the other cached files, a write for the stored head does not replace it.

blocked_on
object | null

What a blocked Workflow v2 proposal waits for: the versioned node types the executor does not have yet, and the node request issue. node_types are matched exactly against the node catalog ("http@3" does not satisfy "http@2"). Null when the proposal was never blocked.

audit
object | null

Fabric's intent audit of the head this write sends (EIQ-6624): findings where the README, docs and graph disagree. Optional; absent or null stores nothing. Validated strictly: every member below is required, no other member is accepted (names are matched exactly, case included), no member may be null or repeat its name, and the whole audit is at most 128 KiB. A refused audit is a 422 with code invalid_audit and errors whose artifact is audit, and nothing is written. head_sha must be the write's head_sha. Stored on the proposal itself, with that head and in the same write as the proposal, when the write is not stale (a 409 stale_head stores none); a write of the same head without an audit keeps it.

Responses

400

The request was malformed or contained invalid parameters.

401

You are not authorized

403

You are forbidden from accessing this resource

409

The proposal holds a head that is not older than this one (code stale_head).

413

The body is over the cap.

422

An invalid artifact or status. errors lists {artifact, path, code, message}; for blocked_on the codes are already_available and unused_type. A bad doc set has artifact docs and the member's name as path (an unknown file, a value that is not a string, a file over 128 KiB). An invalid audit is a 422 with code invalid_audit, every error with artifact audit.

500

An unexpected error was encountered.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json