Skip to content

API Reference parrot_formdesigner.api.handlers

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.api.handlers

View source

JSON REST API handlers for parrot-formdesigner.

Serves the form builder REST API: create, list, get schema, validate, load from DB. HTML rendering moved to the render dispatcher in api/render.py.

All endpoints are protected by navigator-auth session authentication via api/routes.py (hard import — see FEAT-152).

Alias A2UI_LIST_MAX

Re-exported from parrot_formdesigner.api.dialect.A2UI_LIST_MAX.

Alias AuthContext

Re-exported from parrot_formdesigner.services.auth_context.AuthContext.

Class FormAPIHandler

Serves JSON REST API endpoints for form management.

All API routes are protected by navigator-auth session authentication. The decorators are applied at route-registration time in api/routes.py.

User identity context (org_id, programs) is extracted from the authenticated session via the :meth:_get_org_id and :meth:_get_programs helper methods.

Parameter Type Default Description
registry FormRegistry FormRegistry instance for storing and retrieving forms.
client 'AbstractClient | None' None Optional LLM client for natural language form creation.
submission_storage 'FormSubmissionStorage | None' None Optional storage backend for form submissions.
forwarder 'SubmissionForwarder | None' None Optional submission forwarder for endpoint-bound submits.
partial_store 'PartialSaveStore | None' None Optional Redis-backed store for ephemeral partial form answers. When None, partial save endpoints return 503.
org_graph_service 'OrgGraphService | None' None Optional OrgGraphService for GET /org/graph. When None, the endpoint returns 501 Not Implemented.
project_service 'ProjectService | None' None Optional ProjectService for org project endpoints.
rbac_service 'RBACService | None' None Optional RBACService for policy management endpoints.
workday_adapter 'WorkdayIdentitySyncAdapter | None' None Optional WorkdayIdentitySyncAdapter for POST /org/sync/workday.
venue_service 'VenueService | None' None
rbac_enforcing bool False When False (default), RBAC gate-keeping on existing form endpoints runs in shadow mode — it logs permission checks but never blocks requests. Set to True only when nav-auth policies are fully configured. Consistent with Policy.enforcing=False.
sink_factory 'SinkFactory | None' None Optional SinkFactory (FEAT-457). When set, a form declaring persistence writes exclusively to its own sink in :meth:submit_data instead of submission_storage. None (default) preserves today's behaviour exactly for every form.
tenant_scoped_submissions bool False
on_submitted 'SubmittedCallback | None' None

Method FormAPIHandler.optimize_voice

POST /api/v1/{tenant}/forms/{form_uid}/voice/optimize — voice hint proposals (never writes, FEAT-649).

optimize_voice(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.save_partial

POST /api/v1/forms/{form_id}/partial — Save partial answers.

Merges the submitted answers into the cached partial for this form+session. Each submitted field is validated individually via FormValidator.validate_field() and per-field errors are returned in the response.

Request body::

{"answers": {"field_id": <value>, ...}}

save_partial(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — 200 — full PartialFormData state as JSON, including field_errors. 400 — invalid JSON body or missing session_id. 404 — form not found in registry. 503 — partial save service not configured or Redis unavailable.

Method FormAPIHandler.get_partial

GET /api/v1/forms/{form_id}/partial — Retrieve cached partial answers.

get_partial(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — 200 — PartialFormData as JSON. 400 — missing session_id. 404 — no cached partial for this form+session. 503 — partial save service not configured.

Method FormAPIHandler.delete_partial

DELETE /api/v1/forms/{form_id}/partial — Clear cached partial answers.

delete_partial(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — 204 — partial cleared (or did not exist). 400 — missing session_id. 503 — partial save service not configured.

Method FormAPIHandler.list_forms

GET /api/v1/forms — List all registered forms with rich metadata.

Merges in-memory FormRegistry entries with persisted FormStorage rows (when a storage backend is configured). Each entry includes form_uid, form_id, title, description, version, source ("memory" | "db"), and an ISO-8601 created_at (or None).

Supports ?slug=<form_id> (FEAT-389) to filter results down to forms whose slug matches — resolved via FormRegistry.get_by_slug() rather than scanning the full list. ?dialect=a2ui adds a surface URL manifest, while ?dialect=a2ui&include=surface also renders inline surfaces. The optional locale query parameter selects the rendering locale.

list_forms(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — JSON response {"forms": [<descriptor>, ...]} sorted by form_id (slug — stable, human-meaningful ordering; form_uid is random and would not produce a stable order).

Method FormAPIHandler.get_availability

GET /{tenant}/forms/{form_uid}/availability — can this form take a response now? (FEAT-730)

get_availability(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.get_form

GET /api/v1/forms/{form_uid} — Get full FormSchema as JSON.

get_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.get_schema

GET /api/v1/forms/{form_uid}/schema — Get the negotiated schema dialect.

get_schema(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.export_forms

Stream one export row per form for the route tenant as NDJSON.

export_forms(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Request containing export dialect and filter options.

Returns: web.Response — A streaming NDJSON response or a validation error response.

Method FormAPIHandler.translate_form

Translate a JSON Schema into a stateless A2UI surface.

translate_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Request containing schema and optional form metadata.

Returns: web.Response — The translated createSurface envelope, or a validation error response.

Method FormAPIHandler.get_style

GET /api/v1/forms/{form_uid}/style — Get style schema.

get_style(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.remote_event

POST /api/v1/forms/{form_uid}/events/{event_name} — Remote event bridge.

Called by the HTML5 renderer when a binding declares remote: true. Validates a per-session per-form CSRF token, dispatches the lifecycle event, and returns the EventResolution as JSON.

remote_event(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming POST request with form_uid and event_name in the URL, X-CSRF-Token header, and a JSON body optionally containing payload and schema_dump.

Returns: web.Response — 200 — EventResolution JSON. 400 — Unknown event name or invalid JSON body. 403 — Missing or invalid CSRF token. 404 — Form not found. status from FormEventAbort.status_code — when a handler aborts.

Method FormAPIHandler.validate

POST /api/v1/forms/{form_uid}/validate — Validate form submission (dry-run).

FEAT-458: a reject form's undeclared payload keys are surfaced here too, under the reserved errors["__unknown__"] key, so a client pre-flighting a submission is not told 200 for a payload /submit would then 422. drop and keep responses are unchanged — this route never stores anything, so keep needs no cap check here.

FEAT-544: dual-wire — an A2UI v1.0 action envelope (form.validate or form.submit; unwrap_action accepts both) is unwrapped into plain field_id answers exactly like submit_data's A2UI branch; the reply is then {"messages": []} (200, valid) or per-field VALIDATION_FAILED envelopes (422, invalid) instead of plain JSON. A legacy JSON caller is completely unaffected.

validate(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.create_blank_form

POST /api/v1/forms/blank — Create an empty form without an LLM (FEAT-389).

Requires title in the JSON body. form_id (slug) is optional — if omitted, one is derived from title via the same slugify helper used by CreateFormTool. form_uid is always freshly auto-generated by FormSchema's default factory.

Request body::

{"title": "My Form", "form_id": "my-form"}   # form_id optional

create_blank_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response — 201 — {"form_uid": str, "form_id": str, "title": str, "url": str}. 400 — invalid JSON body or missing title. 409 — form_id (slug) already exists in this tenant.

Method FormAPIHandler.create_form

POST /api/v1/forms — Create a form from a natural language prompt.

create_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.edit_form

POST /api/v1/forms/{form_uid}/edit — Edit a form using natural language.

Loads the existing form from the registry, passes its JSON schema to the LLM along with the user's edit prompt, and returns the updated form. The LLM is instructed to strictly preserve the FormSchema JSON structure.

edit_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.clone_form

POST /api/v1/{tenant}/forms/{form_uid}/clone — Clone a form under a new slug.

Creates a deep copy of the source form identified by form_uid, assigns new_form_id (slug) from the request body and a freshly generated form_uid, optionally applies an RFC 7396 merge-patch, validates the result, and persists it.

FEAT-421: the tenant is the URL-declared, decorator-validated value (:meth:_get_tenant) — both the source lookup and the clone registration happen within that tenant scope. A body tenant is only ever an optional cross-check (spec §2); it is never trusted as an override, closing what would otherwise be a cross-tenant read+ write via an unvalidated body field.

Request body (JSON): new_form_id (str): Required. Slug for the cloned form. patch (dict | None): Optional RFC 7396 merge-patch. tenant (str | None): Optional cross-check — must match the URL tenant if present.

clone_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response — 201 Created with the full cloned FormSchema JSON body. 400 if new_form_id is missing or empty, or the body tenant conflicts with the URL tenant. 404 if the source form is not found. 409 if new_form_id already exists. 422 if the patch produces an invalid schema.

Method FormAPIHandler.update_form

PUT /api/v1/forms/{form_uid} — Fully replace a registered form.

Accepts a complete FormSchema JSON body. The form_uid in the URL must match the form_uid in the body — the immutable identity cannot change via PUT. The form_id (slug) MAY differ from the existing form's slug — this is how a form is renamed (FEAT-389); the registry's slug index is updated accordingly on re-registration. Runs structural validation via FormValidator.check_schema() before persisting. Automatically bumps the form version.

update_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.patch_form

PATCH /api/v1/forms/{form_uid} — Partially update a registered form.

Applies RFC 7396 JSON merge-patch semantics to the existing form. Arrays (sections, fields) are replaced entirely — not merged element-by-element. Neither form_uid nor form_id (slug) can be changed via PATCH (unchanged policy from before FEAT-389 — use PUT for renames). Runs structural validation after merging. Automatically bumps version.

patch_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.delete_form

DELETE /api/v1/forms/{form_uid} — Remove a registered form.

Unregisters the form from the in-memory registry and, when a FormStorage backend is configured, deletes the persisted row as well (scoped by the form's tenant so per-tenant Postgres schemas resolve correctly). Returns 204 No Content on success, 404 when no form with the given id exists.

delete_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.submit_data

POST /api/v1/forms/{form_uid}/data — Receive and process a form submission.

Flow:

  1. Load the form from registry (404 if not found).
  2. Parse JSON body (400 if invalid). 1a. A2UI wire (FEAT-544): if the body is an A2UI v1.0 action envelope (api.a2ui_wire.is_a2ui_request), unwrap it into a plain field_id-keyed answers dict BEFORE step 3 and remember its surfaceId. Every response below is then translated into A2UI envelopes (via the local _reply helper) instead of plain JSON; a legacy JSON caller is completely unaffected.
  3. If ?merge_partials=true, load cached partial and merge into data (submitted values override cached; skipped silently if no store or no cached partial).
  4. Validate submission data (422 if invalid). 4a. Apply the form.unknown_fields policy (FEAT-458) to result.extra_data — the undeclared top-level payload keys the validator reported but did not judge: reject fails the submission with 422 (onError dispatched best-effort first, nothing persisted); keep enforces the extras cap (422 on ExtrasCapExceeded) and attaches the extras to the FormSubmission (None, never {}); drop discards them with a debug log recording the count — no longer silent. The forwarded body and the onAfterSubmit payload are widened to {**sanitized_data, **extras} under keep (declared answers win any collision); drop is untouched.
  5. Persist the submission — EXCLUSIVELY (FEAT-457): when form.persistence is set, resolve the form's own sink via sink_factory, ensure_target() it, map the submission (nested for document-family sinks, flattened otherwise), and write() — submission_storage is never called for such a form. A sink failure returns 503/422 immediately, with nothing persisted anywhere. Otherwise (persistence unset), store locally if submission_storage is configured — today's behaviour, unchanged.
  6. Forward to endpoint if form has an endpoint submit action and forwarder is configured.
  7. If merge was performed, delete the cached partial on success.
  8. Return composite result — always 200, even when forwarding fails.

submit_data(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.load_from_db

POST /api/v1/forms/from-db — Load a form from database definition.

The orgid in the request body is optional. When omitted, the org_id is extracted from the authenticated user's session via :meth:_get_org_id. If neither the body nor the session provides an org_id, the request is rejected with a 400 error.

load_from_db(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response

Method FormAPIHandler.publish_form

POST /api/v1/forms/{form_uid}/publish — Publish current form as immutable snapshot.

FEAT-433 §8 Q5: promotes the CURRENT live version in place — it no longer bumps to a new tag. Returns 409 when the live version is ALREADY published (immutability guard). Returns 404 when the form is not found.

publish_form(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path param: form_uid).

Returns: web.Response — {"form_uid": str, "version": str} on success (200), {"error": str} on 404 (not found) or 409 (frozen conflict).

Method FormAPIHandler.list_fields

GET /api/v1/fields — List all reusable fields for the current tenant.

list_fields(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — {"fields": [<ReusableField>, ...]} (200).

Method FormAPIHandler.create_field

POST /api/v1/fields — Add a field definition to the question bank.

create_field(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request with FormField JSON body.

Returns: web.Response — ReusableField JSON (201 Created), 400 on bad JSON, 422 on validation errors.

Method FormAPIHandler.list_versions

GET /api/v1/forms/{form_uid}/versions — List a form's version history.

Each entry includes version, published_at (ISO-8601), published_by (null when not tracked), is_current (True for the form's active published version — unchanged formula, form.published_version or form.version), and is_published (FEAT-433 D1/D3) — every stored version is listed, draft or published; is_published labels which is which. is_current and is_published are independent — they need not move together. In practice, because the editor's save handler carries published_version forward unchanged (it never clears it), is_current stays pinned to whichever tag the LAST publish() call promoted until the NEXT publish() call moves it — not to the newest draft. A newer, not-yet-published draft reports is_current: false until it is itself published.

list_versions(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path param: form_uid).

Returns: web.Response — {"form_uid": str, "versions": [...]} (200), 404 if not found.

Method FormAPIHandler.get_version

GET /api/v1/forms/{form_uid}/versions/{version} — Retrieve a stored snapshot.

FEAT-433 Module 5: returns the stored FormSchema snapshot for the requested version — draft OR published, no longer only frozen (published) rows. The returned schema still carries its own published_version, so a caller can tell the two apart. Returns 404 when the form or version is not found.

get_version(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path params: form_uid, version).

Returns: web.Response — Full FormSchema JSON (200) or {"error": str} (404).

Method FormAPIHandler.get_import_report

GET /api/v1/forms/{form_uid}/import-report — Latest ImportDiffReport.

Returns the per-field mapping report generated when this form was last imported from an external source (e.g. Networkninja). Returns 404 when no import history exists for this form.

get_import_report(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path param: form_uid).

Returns: web.Response — ImportDiffReport JSON (200) or {"error": str} (404).

Method FormAPIHandler.get_submission_audit

Return the audit projection for one submission.

get_submission_audit(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming authenticated aiohttp request.

Returns: web.Response — The six-field audit projection, or a JSON error response when storage is unavailable or the submission cannot be read here.

Raises:

  • web.HTTPForbidden — If the caller lacks read_form_audit at CLIENT scope or wider.

Method FormAPIHandler.get_org_graph

GET /api/v1/org/graph — Return the org graph for the session's org.

Calls OrgGraphService.get_graph() with the caller's org, resolved from request.user.organizations by :meth:_resolve_org_id.

get_org_graph(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request with navigator-auth session. Optional query org_id picks one of several memberships.

Returns: web.Response — Serialized OrgGraph as JSON. A non-integer org_id, or several organizations and no selection. The user belongs to no organization, or not to org_id. OrgGraphService not configured.

Method FormAPIHandler.create_project

POST /api/v1/org/projects — Create a fieldsync project.

Request body::

{
    "accounting_code": "ACC-001",
    "name": "Q1 Campaign",
    "client_id": 42,
    "org_id": 7
}

create_project(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — Created Project as JSON. Invalid/missing fields. Duplicate accounting_code for client. ProjectService not configured.

Method FormAPIHandler.map_project_workday

POST /api/v1/org/cost-centers/{project_id}/workday-map

Maps a fieldsync project to a Workday cost center code.

Request body::

{"workday_code": "WD-99001"}

map_project_workday(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path param: project_id).

Returns: web.Response — WorkdayCostCenterMapping as JSON. Missing workday_code. Project not found. ProjectService not configured.

Method FormAPIHandler.assign_user_role

POST /api/v1/org/users/{user_id}/assign — Assign a role to a user.

Compiles the given scope + codename to an ABAC policy and persists it in fieldsync.auth_policies. NEVER writes to auth.user_permissions.

Request body::

{
    "codename": "edit_form",
    "scope": "own",
    "program_id": 7
}

assign_user_role(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path param: user_id).

Returns: web.Response — PermissionRecord as JSON. Missing/invalid fields. RBACService not configured.

Method FormAPIHandler.sync_workday_identities

POST /api/v1/org/sync/workday — Trigger Workday identity sync (stub).

Calls WorkdayIdentitySyncAdapter.sync_user() which is a stub in FEAT-302 (FEAT-026/027 not available). Always returns 202 Accepted.

Request body::

{"user_id": "user-abc", "action": "provision", "org_id": 7}

sync_workday_identities(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request.

Returns: web.Response — Stub acceptance dict as JSON. Missing/invalid fields. WorkdayIdentitySyncAdapter not configured.

Method FormAPIHandler.list_sites

GET /api/v1/org/stores/{store_id}/sites — List sites under a store.

list_sites(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request Incoming HTTP request (path param: store_id).

Returns: web.Response — List of Site as JSON. Missing org_id in session. VenueService not configured.

Method FormAPIHandler.create_site

POST /api/v1/org/stores/{store_id}/sites — Create a site.

Request body::

{"client_id": 42, "name": "Vending Zone"}

org_id is taken from the authenticated session, never the body.

create_site(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response — Created Site as JSON. Invalid/missing fields. Duplicate site name in the store. VenueService not configured.

Method FormAPIHandler.list_locations

GET /api/v1/org/sites/{site_id}/locations — List locations in a site.

list_locations(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response — List of Location as JSON. Invalid site_id or missing org_id. VenueService not configured.

Method FormAPIHandler.create_location

POST /api/v1/org/sites/{site_id}/locations — Create a location.

Request body::

{
    "client_id": 42,
    "name": "Kiosk A-12",
    "location_type": "kiosk",
    "latitude": 34.0522,
    "longitude": -118.2437,
    "geofence_radius_m": 50
}

org_id is taken from the session, never the body.

create_location(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response — Created Location as JSON. Invalid/missing fields. Duplicate location name in the site. VenueService not configured.

Method FormAPIHandler.get_location

GET /api/v1/org/locations/{location_id} — Fetch one location.

get_location(request: web.Request) -> web.Response

Parameter Type Default Description
request web.Request

Returns: web.Response — Location as JSON (includes geofence params). Invalid location_id or missing org_id. Location not found in the session's org. VenueService not configured.

Alias FormAlreadyExistsError

Re-exported from parrot_formdesigner.services.registry.FormAlreadyExistsError.

Alias FormDialect

Re-exported from parrot_formdesigner.core.FormDialect.

Alias FormEventAbort

Re-exported from parrot_formdesigner.core.events.FormEventAbort.

Alias FormEventName

Re-exported from parrot_formdesigner.core.events.FormEventName.

Alias FormField

Re-exported from parrot_formdesigner.core.schema.FormField.

Alias FormRegistry

Re-exported from parrot_formdesigner.services.registry.FormRegistry.

Alias FormSchema

Re-exported from parrot_formdesigner.core.schema.FormSchema.

Alias FormSubmissionStorage

Re-exported from parrot_formdesigner.services.submissions.FormSubmissionStorage.

Alias FormValidator

Re-exported from parrot_formdesigner.services.validators.FormValidator.

Alias FormVersionService

Re-exported from parrot_formdesigner.services.form_version.FormVersionService.

Alias ImportDiffReport

Re-exported from parrot_formdesigner.tools.services.networkninja.ImportDiffReport.

Alias JsonSchemaRenderer

Re-exported from parrot_formdesigner.renderers.jsonschema.JsonSchemaRenderer.

Alias LLMQuota

Re-exported from parrot_formdesigner.services.llm_quota.LLMQuota.

Alias OrgGraphService

Re-exported from parrot_formdesigner.services.org_graph.OrgGraphService.

Alias PartialFormData

Re-exported from parrot_formdesigner.core.partial.PartialFormData.

Alias PartialSaveStore

Re-exported from parrot_formdesigner.services.partial_saves.PartialSaveStore.

Alias ProjectService

Re-exported from parrot_formdesigner.services.project_service.ProjectService.

Alias QuestionBankService

Re-exported from parrot_formdesigner.services.question_bank.QuestionBankService.

Alias RBACScope

Re-exported from parrot_formdesigner.services.rbac.RBACScope.

Alias RBACService

Re-exported from parrot_formdesigner.services.rbac.RBACService.

Attribute READ_FORM_AUDIT

Alias RenderedForm

Re-exported from parrot_formdesigner.core.schema.RenderedForm.

Alias SinkFactory

Re-exported from parrot_formdesigner.services.sinks.factory.SinkFactory.

Alias SubmissionForwarder

Re-exported from parrot_formdesigner.services.forwarder.SubmissionForwarder.

Alias SubmissionPipeline

Re-exported from parrot_formdesigner.services.submission_pipeline.SubmissionPipeline.

Alias SubmittedCallback

Re-exported from parrot_formdesigner.api.submission_events.SubmittedCallback.

Alias TenantForbiddenError

Re-exported from parrot_formdesigner.api.tenant.TenantForbiddenError.

Alias VenueService

Re-exported from parrot_formdesigner.services.venue_service.VenueService.

Alias WorkdayIdentitySyncAdapter

Re-exported from parrot_formdesigner.services.workday_sync.WorkdayIdentitySyncAdapter.

Alias a2ui_wire

Re-exported from parrot_formdesigner.api.a2ui_wire.

Alias apply_schema_overrides

Re-exported from parrot_formdesigner.services.event_dispatcher.apply_schema_overrides.

Alias assert_body_tenant_matches

Re-exported from parrot_formdesigner.api.tenant.assert_body_tenant_matches.

Alias declared_tenant

Re-exported from parrot_formdesigner.api.tenant.declared_tenant.

Alias dispatch

Re-exported from parrot_formdesigner.services.event_dispatcher.dispatch.

Alias enforce_membership_unless_public

Re-exported from parrot_formdesigner.api.tenant.enforce_membership_unless_public.

Function extract_form_uid

Extract and validate form_uid from the request path (FEAT-389).

extract_form_uid(request: web.Request) -> _uuid.UUID

Parameter Type Default Description
request web.Request Incoming aiohttp request with form_uid in request.match_info (populated by the {form_uid} route pattern registered in api/routes.py).

Returns: _uuid.UUID — The validated form_uid as a uuid.UUID.

Raises:

  • web.HTTPBadRequest — If the path segment is not a well-formed UUID. The response is JSON: {"error": "..."}.

Function extract_uid

Extract and validate a named UUID path param (FEAT-393).

Generalizes :func:extract_form_uid to any {param} path segment (e.g. field_uid on the upload route).

extract_uid(request: web.Request, param: str) -> _uuid.UUID

Parameter Type Default Description
request web.Request Incoming aiohttp request with param in request.match_info.
param str Name of the path param to extract (e.g. "field_uid").

Returns: _uuid.UUID — The validated UUID.

Raises:

  • web.HTTPBadRequest — If the path segment is missing or not a well-formed UUID. The response is JSON: {"error": "..."}.

Alias find_field_by_uid

Re-exported from parrot_formdesigner.core.resolution.find_field_by_uid.

Alias get_renderer

Re-exported from parrot_formdesigner.api.render.get_renderer.

Alias issue_form_csrf_token

Re-exported from parrot_formdesigner.services.csrf.issue_form_csrf_token.

Alias render_a2ui_schema

Re-exported from parrot_formdesigner.api.dialect.render_a2ui_schema.

Alias supported_formats

Re-exported from parrot_formdesigner.api.render.supported_formats.

Alias validate_form_csrf_token

Re-exported from parrot_formdesigner.services.csrf.validate_form_csrf_token.

Alias wire_report

Re-exported from parrot_formdesigner.core.llm_validation.wire_report.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally