コンテンツにスキップ

Code2WFステータス取得

Method

この計画APIはREST methodologyに従い、backend所有のCode2WF status row 1件を返します。

HTTP Method

GET: Code2WF statusを取得

Naming Convention

Response JSONは camelCase を使用します。

Request and Response

Headers

Request Headers

  • Authorization
  • Accept
  • Accept-language

Response Headers

  • Content-Type

Code2WFステータス取得

URI

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

Path Parameters

Name 型 必須 説明
organization_id integer 必須 Organization ID
project_id integer 必須 Project ID
code2wf_id string 必須 Code2WF UUID

Request Body

なし。

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 型 説明
code2wfId string Job UUIDとpoll key。
pageImportId string Import済みpage row ID。
figmaFileKey string 対象Figma file。
screenId string Caller確認済みscreen ID。
placementTarget string | null 任意のWF2Des-compatible placement node。Targetを変更せずcurrent-page absolute x/yを使う。
status string "0" processing、"1" completed、"2" failed。
attempt integer MVPでは常に 1。
error string | null 安全なfailure detail。
resultUrl string | null WF2Des規約に従うclient向けの不変な result.json またはfailed-artifact S3 key。
flagCount integer | null Completion時の既存spec内 flagged=true outcome数。
materializedAt string | null Figma placement completion timestamp。
createdAt / updatedAt string Audit timestamp(ISO 8601)。

materializedAt: null のcompleted rowは有効です。Server生成が完了し、plugin placementが未完了であることを示します。Materialization status、retry counter、server側recovery stateはありません。

Status Codes

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

Data Source

全response fieldはscopedかつ未削除のPostgreSQL code2wf rowから取得します。このpolling endpointはPage Import artifact、S3 result byte、DocumentDB、Figmaを読みません。

Authentication

Amazon Cognito JWTで認証します。Callerにはprojectへの Read accessが必要です。

Error Handling

説明 Status Code Status Name
Path parameterが無効 400 Bad Request
Authentication credentialなし 401 Unauthorized
Scoped、認可済み、かつ未削除のCode2WF rowがない 404 Not Found
Internal database error 500 Internal Server Error

Processing Flow

  1. AuthenticateしRead accessを確認する。
  2. Organization、project、IDで未削除rowを取得する。
  3. Page ImportやS3を読まずcontrol-plane fieldを返す。

status が "1" の場合のみCode2WF result取得を使用します。

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]