Skip to content

Get Code2WF Status

Method

This planned API follows the REST methodology. It returns one backend-owned Code2WF status row.

HTTP Method

GET: Retrieve Code2WF status

Naming Convention

Response JSON uses camelCase.

Request and Response

Headers

Request Headers

  • Authorization
  • Accept
  • Accept-language

Response Headers

  • Content-Type

Retrieve Code2WF Status

URI

GET /api/v1/organizations/{organization_id}/projects/{project_id}/code2wf/{code2wf_id}

Path Parameters

Name Type Required Description
organization_id integer Required Organization ID
project_id integer Required Project ID
code2wf_id string Required Code2WF UUID

Request Body

None.

Response

{
  "code2wfId": "019ffa75-01c0-75a2-8123-456789abcdf0",
  "pageImportId": "0195f16e-6f11-7ea8-b45c-f6712ed9d8a3",
  "figmaFileKey": "aBc1DeFg2HiJ3kLmNoPqRs",
  "screenId": "AUTORACE_DATABASE",
  "placementTarget": "128:9001",
  "status": "1",
  "attempt": 1,
  "error": null,
  "resultUrl": "1/7/code2wf/019ffa75-01c0-75a2-8123-456789abcdf0/1/result/result.json",
  "flagCount": 0,
  "materializedAt": null,
  "createdAt": "2026-08-13T09:30:00Z",
  "updatedAt": "2026-08-13T09:31:12Z"
}

Response Fields

Name Type Description
code2wfId string Job UUID and poll key.
pageImportId string Imported page row ID.
figmaFileKey string Target Figma file.
screenId string Caller-confirmed screen ID.
placementTarget string | null Optional WF2Des-compatible placement node; current-page absolute x/y is used without changing the target.
status string "0" processing, "1" completed, or "2" failed.
attempt integer Always 1 in the MVP.
error string | null Safe failure detail.
resultUrl string | null Client-facing immutable result.json or failed-artifact S3 key, following WF2Des.
flagCount integer | null Completion-time count of existing spec outcomes with flagged=true.
materializedAt string | null Figma placement completion timestamp.
createdAt / updatedAt string Audit timestamps (ISO 8601).

A completed row with materializedAt: null is valid. It means server generation finished while the plugin has not finished placement. There is no materialization status, retry counter, or server-side recovery state.

Status Codes

Value Meaning
"0" processing
"1" completed
"2" failed

Data Source

All response fields come from the scoped, non-deleted PostgreSQL code2wf row. This polling endpoint does not read Page Import artifacts, S3 result bytes, DocumentDB, or Figma.

Authentication

Authentication uses an Amazon Cognito JWT. The caller must have Read access to the project.

Error Handling

Description Status Code Status Name
Invalid path parameter 400 Bad Request
Missing authentication credentials 401 Unauthorized
Scoped, authorized, non-deleted Code2WF row not found 404 Not Found
Internal database error 500 Internal Server Error

Processing Flow

  1. Authenticate and verify Read access.
  2. Fetch the non-deleted row by organization, project, and ID.
  3. Return its control-plane fields without reading Page Import or S3.

Use Get Code2WF Result only after status is "1".

Detailed Flowchart

flowchart TD
    Start([GET Code2WF Status]) --> Auth[Authenticate and Check Read Access]
    Auth --> Row[Fetch Scoped Non-Deleted Row]
    Row --> Exists{Found?}
    Exists -->|No| Missing[404 Not Found]
    Exists -->|Yes| Success[200 Control-Plane Row]