Skip to content

List Rule Revisions

Method

This API follows the REST methodology.

HTTP Method

GET: List the project's design-rule revision history, newest first.

Every rule upload lands a new immutable revision and none are ever deleted, so this is the full audit trail โ€” and the list a designer picks from when reverting.

Naming Convention

The response is proxied verbatim from the internal wf2des-api data plane, so its fields are snake_case.

Request and Response

Headers

Request Headers

  • Authorization
  • Accept
  • Accept-language

Response Headers

  • Content-Type

List Revisions

URI

GET /api/v1/organizations/{organization_id}/projects/{project_id}/wf2des/rules/revisions

Path Parameters

Name Type Required Description
organization_id integer Required Organization ID
project_id integer Required Project ID

Query Parameters

Name Type Required Description
limit integer Optional Maximum revisions to return. Positive integer, maximum 100. A value above the maximum is rejected as 400.

Response

The response is JSON (HTTP status: 200 OK).

{
  "revisions": [
    {
      "design_rule_id": "0190f3a1-2c4e-7b8d-9e0f-1a2b3c4d5e6f",
      "version": 4,
      "content_hash": "8f14e45fceea167a5a36dedd4bea2543",
      "draft_source": "llm_extracted",
      "extracted_at": "2026-08-01T09:15:00Z",
      "processed_at": "2026-08-01T09:15:04Z"
    },
    {
      "design_rule_id": "0190f3a1-2c4e-7b8d-9e0f-1a2b3c4d5e6f",
      "version": 3,
      "content_hash": "b1946ac92492d2347c6235b4d2611184",
      "draft_source": "llm_extracted",
      "extracted_at": "2026-07-28T11:02:00Z",
      "processed_at": "2026-07-28T11:02:06Z"
    }
  ],
  "returned_count": 2
}

Response Fields

Name Type Description
revisions object[] Revision rows, ordered by version descending then processed_at descending.
returned_count integer How many rows this response contains โ€” not the total available.

Revision Row Fields

Name Type Description
design_rule_id string | null The rule lineage the revision belongs to.
version integer | null Revision number within the lineage.
content_hash string | null Hash over the merged ruleset. Identical hashes across versions mean identical rules โ€” a re-upload that changed nothing.
draft_source string | null How the revision was produced.
extracted_at string | null When extraction ran.
processed_at string | null When the revision was landed.

Rows are bounded on purpose. The merged ruleset, the source boards and the consolidation decisions are all projected out โ€” a history list needs identity and dates, not payloads. Note that no row is marked "current"; use GET โ€ฆ/wf2des/rules/latest to learn which one generation pins, because a revert can make an older version current.

Authentication

Authentication is performed using JSON Web Tokens (JWT) issued by Amazon Cognito. The caller must additionally hold access to the project.

Error Handling

Description Status Code Status Name
Invalid limit (non-positive, non-integer, or > 100) 400 Bad Request
Missing authentication credentials 401 Unauthorized
Insufficient permissions 403 Forbidden
Project or organization not found 404 Not Found
Upstream read failure (wf2des-api) 500 Internal Server Error

A project with no revisions returns 200 with an empty revisions array, not 404.

Processing Flow

  1. Extract organization ID and project ID from path parameters; extract the optional limit query parameter.
  2. Verify the user has access to the project.
  3. Proxy the read to the internal wf2des-api data plane (X-AI-Service-Token), scoped to the organization and project.
  4. The data plane queries design_rule with the ruleset, boards and consolidation fields projected out, sorts by version descending then lineage.processed_at descending, and applies the limit.
  5. Return the rows and their count verbatim.