Introducing a new way to review your PRs.

Read the announcement

zipstack / unstract

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

View on GitHub

28 documents · Updated Nov 23, 2026

docs / backend-api-v2

Versioned backend APIs and domain modules

API v2 is the Django request surface for organization work in Unstract. It lets users and automation clients manage account context, profiles, connectors, adapters, pipelines, Prompt Studio projects, files, notifications, usage data, permissions, and settings, while separate internal routes support workers. See the Backend API platform page for the wider request boundary and Backend workflow management for the run lifecycle.

API v2 boundary

The versioned API groups related product actions behind one tenant-aware route set. The top-level URL assembly mounts these routes under tenant, public, deployment, and internal boundaries according to the caller.

Request surfaces

API v2 serves different callers through separate surfaces. A browser uses tenant routes with a selected organization. An external client uses a published deployment route. A worker uses the protected internal API. The public route set also provides account access, connector authorization, pipeline access, feature flags, and health checks without the tenant route prefix.

The request path follows this broad shape:

flowchart TD
    Caller[User or client] --> Gateway[Django URL boundary]
    Gateway --> Tenant[Tenant API v2]
    Gateway --> Public[Public account and discovery API]
    Gateway --> Deployment[Published deployment API]
    Worker[Worker or backend service] --> Internal[Internal service API]
    Tenant --> Domain[Organization-scoped domain modules]
    Deployment --> Execution[Workflow execution]
    Internal --> Domain

Tenant and public routes expose product actions. Published deployment routes accept external work and return execution results or status. Their client-facing execution contract is generated from the served deployment route rather than from a separately rebuilt URL prefix. The deployment listing uses a platform key and remains limited to the organization named by the route. Internal routes use a separate service trust model and are not a substitute for user-facing API access.

References: backend/…/base_urls.py• L11-28 backend/…/urls_v2.py• L24-70 backend/…/public_urls_v2.py• L24-34 backend/…/deployment_spec_urls.py• L1-43 backend/…/generate_docstudio_spec.py• L25-141 backend/…/custom_auth_middleware.py• L55-110 backend/…/internal_base_urls.py• L177-272

Capability map

The domain modules share organization context but keep each product concern separate. This map gives the first route or concept to inspect for each capability.

CapabilityMain API roleRelated resource or outcome
AccountSign in, maintain session, and choose an organizationUser and organization context
ProfilesRead and update the current user’s name, language, and photoOrganization-scoped profile data
ConnectorsSave access to source and destination systemsReusable connector instances
AdaptersConfigure model, embedding, vector, OCR, and text servicesWorkflow service instances and member defaults
PipelinesCreate runnable forms of workflows and start runsPipeline state and execution history
API deploymentsPublish workflows for external callersDeployment endpoint, API keys, and client contract
Prompt StudioManage prompts, documents, profiles, and exported toolsPrompt projects and tool registry
FilesBrowse, upload, download, and remove filesConnector-backed or Prompt Studio files
Notifications and inboxConfigure webhook delivery and view resource noticesPipeline, deployment, sharing, and personal inbox notifications
Usage and metricsRead token, cost, run, activity, and trial measuresOrganization usage reports and dashboard views
PermissionsApply owner, viewer, group, and organization accessSafe resource sharing
ConfigurationApply organization controls and system overridesTyped settings with defaults
Platform keysCreate credentials for service automationOrganization-scoped access to platform APIs

References: backend/…/urls_v2.py• L24-69 backend/…/public_urls_v2.py• L24-35 backend/…/internal_base_urls.py• L188-271 backend/…/users_urls.py• L12-47 backend/…/serializer.py• L151-209

Account and organization context

Account APIs establish the identity and organization that all tenant resources use. The selected organization is the main scope for resource lookup, sharing, usage, settings, and the profile URL returned to the client.

Account sessions

The account surface supports sign-up and sign-in flows, the authentication callback, logout, session data, organization creation, organization listing, and organization selection. An active authentication plugin supplies provider-specific behavior; when no plugin is active, the base authentication service provides the deployment’s fallback account behavior and explicitly leaves unsupported operations unavailable. A session response gives clients the current user, organization, role, authentication provider, account flags, and the signed-in user’s last product preference needed to drive later requests.

Organization membership adds the management layer around that session. Users can read roles, manage users and invitations, reset a password, read organization data, update the limited organization settings exposed to admins, and inspect or change the capabilities that an organization opens to members. Capability settings report both whether the current caller may use a capability and whether the organization may configure it; endpoint ownership and admin rules still apply.

The organization list keeps fields that the current deployment cannot resolve absent rather than treating unknown data as an empty value. If the list itself cannot be read, the session ends so the client cannot continue with an unknown organization scope. The last-used product preference remains a human-user choice and is returned in session data to guide the first screen.

Bearer platform keys provide another account entry path for automation. The key resolves to a service account and its organization, then the request continues with the same organization-aware rules as other authenticated calls. The key must be active, unexpired, belong to the organization in the route, and have a permission tier that allows the HTTP method. Key use is recorded without storing the presented secret. A rotated previous secret may continue during its grace period, but it cannot manage the key.

Logout supports the browser redirect flow and a CSRF-protected POST form for fetch or XHR clients. The POST form returns the redirect target instead of requiring a cross-origin client to follow the redirect itself.

References: backend/…/ReadMe.md• L28-61 backend/…/ReadMe.md• L63-83 backend/…/urls.py• L1-23 backend/…/views.py• L37-175 backend/…/views.py• L219-245 backend/…/authentication_controller.py• L63-277 backend/…/authentication_service.py• L36-112 backend/…/authentication_plugin_registry.py• L13-98 backend/…/custom_auth_middleware.py• L55-227 backend/…/urls.py• L11-23 backend/…/views.py• L31-139 backend/…/serializer.py• L211-290

Product preferences

The product preference surface stores the signed-in human user’s last-used product. It has no organization segment because it is needed before first organization selection and always reads or writes the row for the authenticated user.

The session response includes the preference so the client can choose the correct first screen. Platform-key service accounts cannot use this surface because they do not have a human product choice.

References: backend/…/ReadMe.md• L63-83 backend/…/views.py• L158-245 backend/…/serializer.py• L1-40

User profiles

The organization-scoped profile surface gives a human user a stable view of identity and organization context. It returns role, admin state, onboarding flags, organization details, language, and a profile photo URL. The user can update the display name or language and can upload, read, or delete a PNG or JPEG profile photo.

Profile changes belong to the human account rather than to a service account. Photo uploads are limited to 2 MB and are checked from their content, so a misleading file name does not change the result. The photo URL includes the active organization context, which keeps profile links valid when a user changes organizations. Profile reads and updates use the standard API response and error contract.

The profile flow connects the selected organization to account data and stored media:

sequenceDiagram
    participant User
    participant API as Tenant profile API
    participant Account as Account services
    participant Store as Profile photo store

    User->>API: Read or change profile
    API->>Account: Resolve user and organization context
    Account-->>API: Identity, role, and profile state
    User->>API: Upload, read, or delete photo
    API->>Store: Validate or access profile photo
    Store-->>API: Photo URL or image bytes
    API-->>User: Profile data or photo response

References: backend/…/users_urls.py• L12-25 backend/…/users_view.py• L140-276 backend/…/serializer.py• L142-209 backend/…/test_profile_views.py• L57-201

Organization controls

Organization controls change what members may create or manage without changing the resource model. Admins can restrict connector creation, adapter creation, member management, API key management, platform defaults, and workflow or deployment deletion. The capability endpoint lets any member read the full capability state, while only an organization admin can change it.

The capability response gives each control a key, label, current setting, and caller-specific access result. An admin can change any subset in one request, and invalid input does not apply a partial change. The older boolean organization settings remain another view of the connector and language-model adapter restrictions, so both surfaces must stay in step. Capability settings do not replace resource ownership or service-account rules: a member who gains a broad setting still cannot change an object they do not own, and service-account actions keep their own limits.

These controls are separate from internal configuration overrides. The first expresses an organization policy to users. The second supplies typed values to backend services and falls back to a safe default when no valid override exists.

References: backend/…/views.py• L77-133 backend/…/views.py• L174-261 backend/…/serializer.py• L238-290 backend/…/test_capabilities.py• L151-333 backend/…/test_capabilities.py• L565-771 backend/…/views.py• L70-89 backend/…/views.py• L230-241 backend/…/views.py• L62-119 backend/…/models.py• L16-35

Resource and workflow capabilities

The resource APIs manage the objects that users combine into document-processing work. Connectors and adapters provide system access, pipelines provide runnable workflow forms, and API deployments publish selected workflows to external callers.

Connector resources

The connector API creates and manages named connector instances for external systems. A connector stores the connection metadata needed by a source or destination, supports OAuth where the connector requires it, and can be filtered by workflow, type, name, or connector mode.

Connector access also includes sharing and ownership actions. OAuth credentials support the create or update operation and are removed from temporary storage after a successful operation. The API refuses deletion when a workflow still uses the connector, which protects a configured workflow from losing its input or output system. Organization policy can limit new connector creation to admins or an allowed member capability, while service-account automation remains able to perform the controlled operation.

References: backend/…/urls.py• L4-49 backend/…/views.py• L43-129 backend/…/views.py• L166-265 backend/…/views.py• L267-330

Adapter resources

Adapter resources represent the model, embedding, vector, OCR, and text-processing services used by workflows. The API exposes supported adapter types and schemas, tests credentials, stores organization-owned instances, and lets users select defaults for their account.

Adapter creation binds the instance to the request’s organization before the organization policy is applied. The API rejects deprecated adapter choices and mismatched adapter IDs and types before saving them. Controlled organizations can limit language-model and other adapter creation to the matching capability. An adapter cannot be removed while it is a default or while workflow tool settings still refer to it. When a share change removes a member’s effective access, the API also clears that member’s matching default adapter links.

References: backend/…/urls.py• L10-66 backend/…/serializers.py• L41-58 backend/…/serializers.py• L98-166 backend/…/views.py• L107-157 backend/…/views.py• L160-241 backend/…/views.py• L243-325 backend/…/views.py• L354-506

Pipeline resources

A pipeline is the runnable form of a workflow. Its API supports create, read, update, delete, manual execution, execution history, sharing, API key access, and a client collection for published use.

Pipeline list and detail actions apply the same workflow ownership rules without treating a list of pipelines as one detail object. A pipeline update may keep its current workflow for a co-owner, but it cannot move the pipeline to another workflow. Pipeline scheduling also validates the requested cadence before it reaches the scheduler. Activation is a shared use action, while broader updates and deletion remain owner-controlled and deletion also depends on the organization capability.

Pipeline types distinguish the product paths that can run through the same resource model. Pipeline state records whether a run is active, scheduled, paused, or complete, while scheduling and queue behavior belong to the workflow management system described in Backend workflow management. The list also exposes a matching aggregate view for counts and current failing rows.

The internal pipeline surface lets workers read either a pipeline or an API deployment and report status in the same organization scope. It does not replace the user API; it carries the state needed while a worker advances a run.

References: backend/…/urls.py• L8-89 backend/…/views.py• L52-184 backend/…/views.py• L190-237 backend/…/models.py• L34-208 backend/…/crud.py• L28-289 backend/…/internal_api_views.py• L15-172

API deployments

An API deployment turns a workflow into a named external endpoint. Users can create and manage deployments, share them, inspect effective members, manage co-owners, find deployments linked to a Prompt Studio tool, and download a client collection. A workflow must have a configured source and destination before publication, and it can have only one active API deployment. When a workflow uses image output, deployment creation also checks that its language model can support that output; a known mismatch blocks publication.

The organization deployment listing is a read-only discovery view for automation. A platform key can list only deployments in its own organization, can filter by workflow, exact API name, or display-name search, and receives run summaries without deployment key material. The list order is stable so a client can page through deployments without repeats or gaps. The tenant listing also exposes an aggregate view that uses the same visible and list-filtered rows to report status counts and current failing deployments.

Deployment execution accepts multipart files or HTTPS S3 presigned URLs. The request must contain at least one document and can contain at most 32 documents in total. It can also pass tags, custom data for prompt variables, an LLM profile, and optional manual-review settings. Manual-review queue and packet fields require the matching enterprise capability; an installation without it rejects those requests. The backend validates the deployment and key, applies the organization concurrency limit, starts the workflow, and lets the caller poll for a result. A completed or stopped response can include metadata, metrics, extracted text, and other requested run data.

Input staging checks file content before dispatch. Unsupported files receive per-file failure results and do not reach the extractor, while valid files in the same request can still run. If staging fails, the execution is marked as an error and its rate-limit slot and storage are released even when the status write also fails. If no file remains dispatchable, the execution is closed with the recorded failures instead of staying pending; its result is acknowledged and subscribers are notified only when the stored terminal state is completed. An already stopped execution is not reported again.

The deployment API and the pipeline API can both issue keys. A key belongs to one target, so callers must not treat a pipeline key as a deployment key or use a key outside its organization. An optional LLM profile must belong to the key owner, or to the deployment organization when the caller uses a global key.

References: backend/…/urls.py• L7-113 backend/…/api_deployment_views.py• L286-396 backend/…/api_deployment_views.py• L405-518 backend/…/serializers.py• L52-219 backend/…/serializers.py• L578-662 backend/…/deployment-aggregate-response.schema.json• L1-111 backend/…/test_deployment_aggregate.py• L1-217 backend/…/test_deployment_aborted.py• L23-111 backend/…/test_deployment_helper.py• L127-337 backend/…/views.py• L33-174

List status and failure summaries

Pipeline and API deployment lists share one status and aggregate contract. The aggregate endpoint counts the same rows as its matching list after access checks and all list filters, so a client can show totals beside a filtered table without using a different scope.

The status rules use the latest finished run. A pending or executing run does not replace the last finished result, and an inactive row is always inactive. A completed run is partial success when some files succeeded and some failed. Five latest finished runs that all ended in ERROR make an active row failing; stopped runs break that streak. Aggregate responses include status counts, a failing-row count, and up to 100 newest failing rows. Pipeline rows also include whether active rows have no schedule and show their type and next run time.

The list and aggregate routes accept the shared filters for status, owner, last-run time, and failing state. Pipeline lists add pipeline type and name filters. Deployment lists add deployment name and workflow filters. Invalid filter values fail as a bad request, and detail routes do not apply list filters.

The shared flow keeps access scope, list filters, counts, and failure details aligned:

flowchart LR
    Request[List or aggregate request] --> Scope[Visible rows for caller]
    Scope --> Filters[Shared list filters]
    Filters --> List[Pipeline or deployment list]
    Filters --> Summary[Status counts and failing rows]
    Runs[Finished execution history] --> Summary

References: backend/…/list_aggregate_serializers.py• L1-100 backend/…/list_aggregates.py• L1-206 backend/…/failing_streaks.py• L1-124 backend/…/execution.py• L645-696 backend/…/aggregate.py• L1-22 backend/…/crud.py• L28-371 backend/…/serializers.py• L578-662 backend/…/deployment-aggregate-response.schema.json• L1-111 backend/…/pipeline-aggregate-response.schema.json• L1-134 backend/…/test_list_aggregates.py• L41-242 backend/…/test_deployment_aggregate.py• L42-217 backend/…/test_pipeline_aggregate.py• L146-294

Deployment execution

Published execution has a short request path and a later status path. With the default asynchronous timeout, the first call stages accepted documents, queues work, and returns an execution identity. A later call asks for that state and can request selected result details.

The status read has one-shot result semantics. A pending execution returns 422 with its current status, a completed execution returns 200 with its result, and a stopped execution returns 422 with its processed result. The first read that observes a terminal result acknowledges and discards it. A later read returns 406, so clients must keep the first terminal response.

The flow connects an external caller to the workflow system without exposing the tenant CRUD API:

sequenceDiagram
    participant Client
    participant API as Published API
    participant Run as Workflow execution
    participant Worker

    Client->>API: Submit files and deployment key
    API->>API: Validate deployment, files, and concurrency
    API->>Run: Create and dispatch execution
    Run->>Worker: Process workflow
    Worker-->>Run: Store state and result
    Client->>API: Poll execution ID
    API-->>Client: Status and selected result data

References: backend/…/execution_urls.py• L9-25 backend/…/api_deployment_views.py• L67-291 backend/…/serializers.py• L282-568 backend/…/deployment_helper.py• L186-455 backend/…/test_deployment_aborted.py• L65-111 backend/…/test_deployment_helper.py• L55-337 backend/…/workflow_helper.py• L490-739 backend/…/openapi_schema.py• L226-306

Published deployment contract

The published deployment contract is a committed OpenAPI document for external clients. It covers deployment execution, status, organization deployment listing, identity lookup, bearer-key security rules, request and response shapes, and error statuses that callers must handle. It describes 422 as either a normal in-progress reply or a terminal error or stopped result, so clients must inspect the returned status. The generator reads routes from the served deployment mounts and rejects unresolved schema diagnostics, paths outside the public mounts, or invalid OpenAPI before writing the document.

The contract checks the details that generated clients depend on. These include binary multipart uploads, nullable pending results, operation-specific credentials and errors, served route paths, and the one-shot status description. A route, serializer, or schema annotation change is incomplete until specs/docstudio-oss.json is regenerated and the drift and route checks pass. The listing contract is deliberately narrower than the tenant deployment view: it publishes only the read operation and does not publish key material.

Execute-request failures also keep the standard error body and add a message block with an ERROR execution status. This lets published clients read validation, authentication, rate-limit, and document-fetch failures through the same result-shaped key without changing the existing error fields. Status reads do not use this addition because their message field carries the execution result.

References: backend/…/deployment_spec_urls.py• L1-43 backend/…/generate_docstudio_spec.py• L1-181 backend/…/openapi_schema.py• L119-403 backend/…/api_deployment_views.py• L83-104 backend/…/error_message.py• L8-36 backend/…/test_deployment_aborted.py• L54-111 backend/…/test_deployment_auth.py• L62-114 backend/…/test_deployment_error_message.py• L61-138 backend/…/test_docstudio_spec.py• L112-207 backend/…/test_docstudio_spec.py• L236-359 backend/…/test_docstudio_spec.py• L405-633 specs/docstudio-oss.json• L239-721

Prompt Studio and file capabilities

Prompt Studio APIs manage reusable prompt work that can be placed in workflows or exported as a tool. File APIs provide the data entry and inspection paths that support connectors and Prompt Studio.

Prompt Studio resources

The Prompt Studio project surface manages projects, prompts, profiles, documents, indexing, prompt runs, and exported tools. A project can run one prompt, many prompts, or a single-pass extraction and can report the later task state. The registry lists exported tools and allows an owner to unpublish a tool when no workflow still uses it.

Prompt Studio access follows the parent tool. A user can work with a prompt when they own, can view, or reach the parent tool through group or organization access; project settings are collaborative, while destructive project and registry actions remain owner-controlled. A project used by a workflow cannot be deleted until its exported tool usage is removed.

Prompt execution is asynchronous. The API returns an accepted task identity, and later status reads report processing, completion, or failure from the worker task result. Document indexing and prompt runs use callbacks to persist output and indexing state. These callbacks validate identifiers and organization scope so a missing or hidden project does not become a successful partial write.

The project can also upload and remove documents, inspect original or derived file contents, and enforce content and page limits before storage. A profile change keeps one default profile for the project, and a bulk prompt run avoids separate concurrent extraction requests for the same document.

References: backend/…/views.py• L130-235 backend/…/views.py• L271-286 backend/…/views.py• L328-465 backend/…/views.py• L467-735 backend/…/views.py• L737-880 backend/…/views.py• L892-948 backend/…/views.py• L950-1195 backend/…/internal_views.py• L119-654 backend/…/urls.py• L1-37 backend/…/urls.py• L1-17 backend/…/views.py• L33-91 backend/…/permission.py• L14-56

File resources

The file API uses a connector instance to list, download, and upload files at a path. This makes the connector the boundary for access to an external file system rather than making the backend a general file browser.

Prompt Studio file cleanup also removes the related document record and stored file. Its upload path checks content type from file bytes, stores accepted originals, and creates document records. It reports a rejected file as failed work without discarding valid files in the same request. The project also checks page limits before storage when the selected profile uses image output.

References: backend/…/urls.py• L4-49 backend/…/views.py• L32-134 backend/…/views.py• L950-1195 backend/…/enums.py• L9-50 backend/…/test_api_storage_mime_validation.py• L106-169 backend/…/api_doc.md• L3-39

Notifications and usage

Notifications and usage APIs report what happens after a pipeline or deployment runs. Notifications deliver selected run events to external destinations, usage records measure the resources consumed by those runs, and dashboard metrics turn those measures into time-based views.

Notification resources

Notification records attach webhook or platform delivery settings to a pipeline or API deployment. The API supports notification CRUD and filtering by either parent resource, so a client can inspect the delivery rules for one execution surface.

Organization admins can set the notification club interval. A club interval is the time window used to group compatible events before delivery; changes affect notifications added after the change and do not rewrite already queued items. An organization capability can allow members to change this setting when the organization enables it.

Webhook targets must be valid public destinations. The notification API rejects unsafe or ambiguous addresses when a caller supplies a URL, and the internal test endpoint applies the same network guard before sending a test. A test reports only delivery status and does not return the upstream body, headers, or request credentials.

Resource sharing has a second notification path. Group membership changes and resource access changes enqueue organization-scoped notices. Delivery rechecks the group, resource, actor, and live recipients, so a queued grant is dropped if access was revoked before delivery and a revoke is sent only to users who actually lost access. A missing plugin or no recipient is a clean skip; a real delivery failure is returned as a retryable gateway failure.

Resource notification types are shared by direct and group sharing. Pipelines are notifiable only for supported pipeline types, while unknown adapter types use a safe notification category rather than silently disabling the notice.

References: backend/…/urls.py• L4-33 backend/…/views.py• L32-119 backend/…/serializers.py• L19-70 backend/…/internal_views.py• L137-229 backend/…/test_webhook_ssrf.py• L51-228 backend/…/models.py• L20-90 backend/…/share_notifications.py• L60-172 backend/…/internal_views.py• L32-103 backend/…/group_notification_service.py• L84-122 backend/…/group_notification_service.py• L210-262 backend/…/notification_resource_types.py• L9-34 backend/…/test_internal_views.py• L57-93

Inbox resources

The inbox API gives each user a personal stream of notices in the current organization. It turns important events such as shared resources and failed executions into readable items with a type, title, body, creation time, read state, and an optional route that opens the related product view.

The list is paginated from newest to oldest and includes the current unread count. A user can mark one item read or mark all items read. A single-item read can include the creation time the client saw; if the item changed after that view, the API keeps the refreshed item unread and returns a conflict so the user does not mark unseen information as read.

The inbox is separate from webhook delivery. It gives a user an in-product view while event producers remain responsible for creating the notice and the live unread count can be pushed to that user. Items stay within the user and organization scope, and an item may have no route when there is no safe screen to open.

References: backend/…/urls.py• L1-9 backend/…/views.py• L22-102 backend/…/serializers.py• L15-65 backend/…/models.py• L16-67

Usage records

Usage records connect model or embedding work to a workflow, execution, run, project, and prompt when those links exist. They preserve token counts, cost, timing, operation status, and error data for later reporting.

The API offers organization-scoped records, date-filtered aggregates, token totals for a run, and trial statistics. Aggregates summarize tokens, cost, API calls, document-processing operations, and unique runs rather than exposing each lower-level usage event as the main reporting view. Published deployment results can include usage totals and per-model detail when the caller requests metadata or metrics.

References: backend/…/urls.py• L4-37 backend/…/views.py• L26-126 backend/…/models.py• L38-113 backend/…/helper.py• L55-103 backend/…/deployment_helper.py• L441-489 backend/…/deployment_helper.py• L596-629

Dashboard metrics

Dashboard metrics provide organization-scoped views of processing activity. The read-only API returns summaries, time series, recent activity, deployment token use, attention items, failure attribution, and health state for the dashboard.

Queries use a bounded date range and can filter by metric, project, tag, status, activity surface, and deployment type. The service selects hourly, daily, or monthly data for the range, supports hour, day, or week grouping, and can return partial errors when one live metric source is unavailable. Recent activity keeps a simple limit form and adds a paged form when date, status, surface, or page parameters are supplied.

References: backend/…/serializers.py• L13-209 backend/…/views.py• L160-232 backend/…/views.py• L355-469 backend/…/views.py• L471-687 backend/…/views.py• L689-896 backend/…/views.py• L978-1073 backend/…/views.py• L1075-1157

Permissions and configuration

Permissions and configuration provide the shared rules around every domain module. Permissions decide whether a caller may see or change a resource. Configuration decides which organization policy or system default applies when a domain action needs a setting.

Resource access

The access model distinguishes ownership from visibility. Owners and organization admins can manage resources. Direct viewers, group members, and resources shared with the organization can usually read or use them, but shared access does not grant mutation rights.

Sharing uses one replace-style action with three independent axes: direct users, groups, and organization-wide access. The API validates each axis against the resource organization, records the committed change, reports effective members with priority de-duplication, and notifies only users who gain or truly lose access. Group changes use a separate queued path because the recipient set can be large.

Co-owner actions promote or remove human organization members. The resource must always retain another live owner, and service accounts cannot be added or removed as owners. Removing an owner can trigger resource-specific cleanup when the user loses all other access.

Group sharing uses organization-owned groups as an access path. Admins and service accounts manage groups and memberships. Resource owners and admins can change direct users, groups, and organization-wide sharing; a regular shared user can add only groups that include that user and cannot remove access or enable organization-wide sharing. The effective member view gives direct access priority over group access, and group access priority over organization-wide access.

The set of group-shareable resource kinds is shared by resource visibility, group administration, cleanup, and notification delivery. This keeps a group resource list and a resource’s access query aligned, while cloud-only resource types can be absent in an OSS deployment without breaking the other types.

Service accounts represent automation callers. Their API key tier limits the HTTP methods available before resource checks run, then the service account can act across its organization. Bearer platform keys are rejected when they are malformed, inactive, expired, linked to another organization, missing a service account, or assigned an unknown permission tier. Bearer requests record key use, skip CSRF processing, and carry the resolved organization context into downstream domain checks. A rotated previous secret remains usable only within its grace period and is marked so key-management actions can refuse it. Parent-owned objects such as API keys and Prompt Studio profiles inherit access from their deployment, pipeline, or tool.

The effective access path is:

flowchart LR
    Request[Request identity] --> Identity[Session or bearer key]
    Identity --> Organization[Organization context]
    Organization --> Scope[Resource visibility]
    Scope --> Role[Owner, viewer, group, or org share]
    Role --> Action[Read, use, or mutate]

References: backend/…/permission.py• L16-34 backend/…/permission.py• L71-101 backend/…/permission.py• L104-150 backend/…/permission.py• L171-250 backend/…/membership_serializers.py• L9-120 backend/…/membership_views.py• L22-160 backend/…/resource_share_views.py• L26-47 backend/…/resource_share_views.py• L64-80 backend/…/resource_share_views.py• L142-315 backend/…/group_views.py• L37-133 backend/…/group_views.py• L144-222 backend/…/shareable_resources.py• L15-76 backend/…/sharing_helpers.py• L54-159 backend/…/sharing_helpers.py• L304-377 backend/…/sharing_helpers.py• L445-712 backend/…/custom_auth_middleware.py• L112-227 backend/…/api_key_views.py• L18-30

Configuration values

The configuration system stores organization-level overrides for internal settings. A central registry defines each key’s type, default, and optional bounds; lookup converts a stored value and returns the default when the organization has no valid enabled override.

This model is not a general user preference store. User-facing policy controls stay in their owning domain, such as organization settings or notification settings. Internal configuration is exposed through protected service routes so workers can use the same organization-aware values.

Platform settings provide separate credential capabilities. Organization admins can create, list, refresh, enable, disable, and remove platform keys used by automation services. Platform API keys expose a newer organization-scoped credential surface with permission levels and rotation; global deployment keys separately limit a credential to selected deployments or to all deployments for an administrator.

References: backend/…/enums.py• L9-54 backend/…/config_registry.py• L70-126 backend/…/models.py• L16-35 backend/…/models.py• L65-135 backend/…/internal_urls.py• L1-15 backend/…/views.py• L75-157 backend/…/urls.py• L4-25 backend/…/views.py• L26-194 backend/…/views.py• L26-141 backend/…/serializers.py• L19-206 backend/…/views.py• L33-212

Internal service interface

The internal API gives workers a narrow backend interface for organization context, pipeline and deployment data, Prompt Studio callbacks, tool instances, usage totals, notifications, configuration, platform keys, and execution support. It keeps worker processes from needing direct access to the full tenant data model.

Worker data exchange

Internal calls use /internal/v1/ and a service bearer key. Organization-scoped calls can carry an organization identifier, which lets the backend apply tenant rules while serving a worker that is processing a run. Internal query paths fail closed when that context is missing.

The account module exposes organization context through both its compatibility path and an explicit /context/ path. It resolves the organization and returns the shared context shape to internal callers; failures use the internal error shape rather than silently returning an empty organization.

The internal surface mirrors the domain boundaries but does not mirror the full user API. Workers can fetch deployment data, update pipeline state, read tool instances, validate tool settings, write usage in batches, read token and page totals, enqueue notification work, test webhook delivery, persist Prompt Studio callback results, and read configuration values needed during execution. Tool lookup may return a safe fallback record when a registry tool is unavailable so the workflow can report or continue with a known shape.

The worker exchange follows this broad pattern:

sequenceDiagram
    participant Worker
    participant Internal as Internal API
    participant Domain as Organization domain

    Worker->>Internal: Send service key and organization context
    Internal->>Internal: Check trust and scope
    Internal->>Domain: Read or update run data
    Domain-->>Internal: Return scoped result
    Internal-->>Worker: Return worker data or status

References: backend/…/internal_base_urls.py• L22-53 backend/…/internal_base_urls.py• L188-271 backend/…/internal_urls.py• L1-20 backend/…/internal_views.py• L17-40 backend/…/internal_urls.py• L1-20 backend/…/internal_urls.py• L1-25 backend/…/internal_urls.py• L23-76 backend/…/internal_views.py• L34-108 backend/…/internal_urls.py• L9-20 backend/…/internal_views.py• L58-103 backend/…/internal_views.py• L119-654 backend/…/internal_api_views.py• L15-172 backend/…/internal_views.py• L22-407

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep tenant, public, published deployment, and internal route mounts aligned with the authentication boundary that each caller requires.
  • Keep platform key organization checks, expiry and rotation state, method permission tiers, service-account links, key-use recording, global deployment-key scopes, and user-facing OpenAPI error shapes aligned.
  • Keep the generated deployment spec aligned with the served deployment route. Regenerate specs/docstudio-oss.json when a deployment route, serializer, or schema annotation changes.
  • Keep deployment listing filters, stable ordering, run summaries, organization scope, and the rule that no key material is returned aligned with platform-key access.
  • Keep deployment request validation, OpenAPI request shapes, response models, and generated client behavior aligned. This includes binary multipart files, S3 URL input, nullable results, one-shot status reads, manual-review capability checks, byte-based MIME checks, and all client-visible error statuses.
  • Keep pre-dispatch failure and no-dispatch handling aligned with execution state, rate-limit release, storage cleanup, result acknowledgement, and subscriber notification. A status write failure must not prevent cleanup, and an already stopped run must not be announced again.
  • Keep deployment readiness checks aligned with run-time image-output support so a workflow with a known language-model mismatch cannot be published.
  • Keep pipeline list serializers distinct from detail serializers when applying workflow ownership scope. A collection instance must not be treated as one pipeline.
  • Keep pipeline and deployment list filters and aggregate responses driven by the same visible queryset. Status counts, failing counts, and total rows must remain consistent for every caller and filter.
  • Keep latest-finished-run status rules aligned with file counts, inactive state, partial success, and the five-ERROR failing streak rule. Do not count pending or executing work as a finished result.
  • Keep aggregate response schemas aligned with the shared status names, the 100-row failing-list cap, pipeline schedule fields, and deployment or pipeline route mounts.
  • Keep the same organization context in resource query scope, serializer ownership fields, share actions, group lookup, notification payloads, and internal worker lookups.
  • Keep pipeline and deployment key target rules aligned across path parameters, request bodies, parent ownership checks, and client collection generation.
  • Keep Prompt Studio parent-tool permissions aligned across project actions, prompt and document access, profile selection, indexing callbacks, task status, registry listing, and registry unpublishing.
  • Keep Prompt Studio callback validation aligned with worker retry behavior. Missing or hidden UUID resources must not become successful partial writes or retryable server failures.
  • Keep Prompt Studio task dispatch IDs aligned with the result store used by status polling, and keep document indexing locks clear when dispatch fails.
  • Keep notification parent filters, URL safety checks, test-result redaction, and the notification model’s pipeline/API relationship aligned so events cannot appear under the wrong execution surface or expose secrets.
  • Keep inbox list, read, read-all, unread-count, item refresh, organization scope, and optional route contracts aligned with the events that create personal notices.
  • Keep group-share resource descriptors, direct-share type mappings, effective-member precedence, organization checks, revoke retention rules, and group notification payloads aligned.
  • Keep co-owner last-owner protection and service-account exclusion aligned across add, remove, organization exit, and resource-specific cleanup paths.
  • Keep group notification delivery status aligned with retry behavior: clean skips return success, while a real send failure returns a retryable failure.
  • Keep notification settings bounds aligned with the configuration registry and the effective value used for new notification batching.
  • Keep configuration key registration, value casting, default fallback, and any user-facing setting that writes an override in agreement.
  • Keep usage field names and aggregate meanings aligned across worker batch writes, run lookups, trial statistics, dashboard metric views, and deployment result shaping.
  • Keep dashboard date bounds, source selection thresholds, metric grouping, recent-activity form selection, and partial-error behavior aligned with dashboard clients.
  • Keep global deployment-key scope validation aligned across allow-all mode, selected deployments, member-owned limits, rotation, and deployment authentication.
  • Keep internal account-context, pipeline, notification, Prompt Studio, and tool-instance requests fail-closed when the organization context is absent.
  • Keep the execution dispatch marker and queue handle separate from legacy task identifiers so post-dispatch bookkeeping cannot hide a running job or skip a bounded wait.
  • Keep profile response fields, organization-scoped photo URLs, multipart photo schemas, content-based image checks, and service-account refusal behavior aligned across profile routes and clients.
  • Keep capability keys, labels, settings, organization fields, legacy organization settings, audit events, and endpoint guardrails aligned when a capability changes.
  • Keep member capability access separate from ownership, admin, and service-account rules. In particular, member-managed deployment keys must remain limited to deployments they own.
  • Keep session organization switching, last-product preference lookup, and the optional login-switch marker aligned with first-login client behavior.
  • Keep the logout method contract aligned: browser redirects must remain compatible with GET, while fetch or XHR clients need the POST redirect target and cookies.
  • Keep authentication plugin selection exclusive. A deployment must not load multiple active plugins or silently treat an unsupported plugin operation as a successful account action.
  • Keep internal organization-context aliases and their serializer and error shapes aligned so old workers and new workers receive the same scope data.

Important failure modes

TriggerConsequenceGuard
A tenant route is mounted outside the tenant prefix or loses organization contextA caller can see the wrong scope or a valid resource becomes unreachableKeep v2 mounts in the tenant URL set and resolve the current organization before domain access
A bearer platform key is malformed, unknown, inactive, expired, or used for another organizationAutomation receives a refusal instead of reaching a resource in the wrong scopeValidate the UUID, active and expiry state, organization binding, and permission tier before the request runs
A bearer platform key or service account reaches a human profile or product-preference actionAutomation can create or change data that has no human account meaningRefuse human-only account actions for service accounts
A rejected bearer secret is written to logsA credential can be recovered from rejection logsLog only a short hash fingerprint and peer address rather than the presented token
A rotated previous secret performs key management during its grace periodThe old secret can rotate or replace the credential that should supersede itMark previous-secret requests and refuse management actions while allowing only the grace-period calls
A profile photo is accepted from its file name or exceeds the size limitInvalid media can be stored or a large upload can consume resources before validationCheck the byte content and reject files over 2 MB before type sniffing
A member capability is treated as a replacement for ownership or admin checksA shared user or service account can mutate a protected resourceApply capability checks together with the endpoint’s ownership, admin, and service-account rules
A capability is changed through one settings surface but not the otherClients read one policy while endpoints enforce anotherSave both views through the same organization fields and record one capability change
A member creates or widens a deployment key outside deployments they ownThe credential can reach deployments outside the member’s allowed scopeLimit member-created key targets and recheck ownership on create, edit, view, and authentication
A member with member-management access grants an admin role or changes an adminA non-admin can take over organization managementKeep role elevation, admin changes, and member removal admin-only
A shared viewer calls a mutation actionA user with read access could change a resourceUse owner or admin permission checks for mutation and owner-management actions
A group or user from another organization is added to a resource shareCross-organization access or notification recipients can be createdValidate every added user and group against the resource organization before the atomic share commit
A revoke is treated as a loss for a user who keeps access through ownership, another group, or organization sharingA user receives a false access-removal noticeCompute retained access before selecting revoke recipients
A queued group grant is delivered after the share was revokedA recipient learns about a resource they can no longer accessRe-read the live group share before sending grant mail
A group notification plugin skip is treated as a send failureThe queue retries an event that cannot succeed and can duplicate partial sendsDistinguish clean skip, full failure, and partial group failure in the delivery result
A co-owner is removed when no other live owner remainsThe resource becomes ownerless and cannot be managed normallyLock owner rows and require another live organization member before removal
A service account is added or removed as a co-ownerAutomation identity enters a human sharing path or becomes irrecoverableReject service-account co-owner changes
A deployment or pipeline key names a different target in the body and URLA credential can be created for the wrong resourceTreat the path target as authoritative and reject contradictions
A pipeline list request binds the collection as one pipelineEvery pipeline or ETL list request can fail before serializationApply detail-only workflow access only to a single Pipeline instance
A connector used by a workflow is deletedThe workflow loses its source or destinationRefuse deletion while protected workflow references remain
An adapter used by a workflow tool or selected as a default is deletedA workflow or user default points to a missing serviceBlock deletion while protected references or default links remain
A deprecated adapter or an adapter ID/type mismatch is savedA removed service or wrong creation policy enters a workflowReject deprecated IDs and validate the registry type against the declared type
A connector or adapter is saved with a client-supplied organizationA controlled creation rule can be checked for one organization while the row belongs to anotherBind resource creation to the request organization before saving
OAuth credentials are left in temporary storage after a connector operationShort-lived connection secrets remain available beyond the operationClear the OAuth cache only after a successful create or update
A deployment is published for a workflow without usable source or destination endpointsThe deployment cannot accept valid document workValidate workflow endpoint and connector readiness before creation
A deployment uses image output with a language model that is known not to support itPublication succeeds but runs cannot produce the required image-based answerApply the workflow vision-model check during deployment validation and reject a definitive mismatch
A published execution has no active key or exceeds the organization limitExternal work is rejected before a valid run can startValidate key state and acquire the organization concurrency slot before dispatch
A request sends no documents, too many documents, an unsupported MIME type, or a non-HTTPS S3 URLThe execution is rejected before workflow work startsRequire one to 32 combined inputs, sniff uploaded bytes, and validate each remote URL
A request uses manual-review fields on an installation without that capabilityThe execution is rejected rather than entering an unsupported review flowValidate enterprise availability and the queue or packet value before dispatch
A staging failure leaves the run pending or its status write prevents cleanupThe caller polls a run that never reaches a useful terminal state, and the organization can keep a rate-limit slot or staging filesMark setup failures as errors and isolate status marking from slot release and storage cleanup
A request has only rejected files and still enters async dispatchThe run remains pending because no worker has files to processTerminalize the run with failed-file counts and return the recorded per-file failures
A no-dispatch run skips result acknowledgement, repeats a stopped-run notification, or lets a webhook failure replace the handled responseA client can receive the result again, subscribers can receive duplicate events, or a valid rejection becomes a server errorAcknowledge and notify as separate guarded steps, notify only for a stored completed state, and keep delivery failure from changing the execution response
A list and its aggregate use different access scope or filtersDashboard totals disagree with the rows shown to the callerBuild both responses from the same caller-visible and filtered queryset
A pending or executing run replaces the latest finished statusA row appears successful or failed before its current run has a resultIgnore unfinished runs when deriving list status
A completed run with mixed file results is counted as success or errorPartial work is hidden from the list summaryUse successful and failed file counts to classify partial success
A stopped run is counted as part of the five-ERROR failure streakA deliberately stopped row appears as continuously brokenRequire five latest finished statuses of exactly ERROR
A client treats every non-2xx status from the status read as fatalThe client stops polling while execution is still runningTreat 422 as a normal pending or execution-error response and stop on 200
A client reads a completed result more than onceThe later read returns 406 and the stored result is no longer availablePersist the first completed response before making another status request
Execute errors omit the result-shaped message block or status errors add oneA published client reads a different key for the same failure path or mistakes an error for a resultAdd the block only on execute responses and keep the standard error fields unchanged
The committed deployment spec is not regenerated after a route or serializer changeGenerated clients use paths or data shapes that the server no longer servesCompare the committed artifact with generated output and reject unresolved or off-mount routes
A notification URL points to an internal or ambiguous addressThe backend or worker could send data to a private network targetValidate caller-supplied URLs and apply the same public-destination guard before webhook tests and delivery
A webhook test follows a redirect or returns upstream dataA target can report false success or expose response and credential dataDo not follow redirects and return status-only test results
A notification interval is stored outside its allowed rangeBatching can become too frequent or too delayedValidate the typed configuration value and return the effective default when an override is invalid
A client marks an inbox item read without the version it sawA later failure refresh can be hidden as already readSend the listed creation time and treat a read conflict as a refresh that stays unread
An inbox item is read or listed outside the caller's organization or user scopeA user can see or change another user's noticeScope every inbox query and read action to the authenticated user and current organization
A dashboard query exceeds its allowed range or uses an invalid page or status filterA costly or ambiguous query reaches the metrics storeApply serializer bounds, source limits, and the fixed status and surface choices
An internal service call omits or fails its bearer key or organization contextWorker data exchange is rejected or returns no scoped rowsRequire the internal service key and fail closed when the organization header is absent
An internal account-context alias resolves a missing organization or exposes raw lookup errorsA worker receives an invalid scope or an unstable error contractResolve through the shared organization utility and serialize the defined context or internal error shape
More than one authentication plugin is activeAccount behavior becomes ambiguous and can use the wrong identity providerLoad at most one active plugin and fail startup when multiple plugins are enabled
The session preference read fails and is treated as “not chosen”A returning user is sent through the wrong first-login product choiceKeep preference reads guarded and do not convert read failure into a false empty state
A logout POST follows a cross-origin redirect as if it were a normal browser navigationA fetch or XHR client cannot complete sign-out or learn the destinationReturn the redirect URL and response cookies for POST while retaining the browser redirect for GET
A Prompt Studio callback cannot resolve all requested prompts or profile resourcesA worker may report success while losing output or indexing stateValidate UUIDs and organization visibility before invoking the callback operation
A PG queue handle is written as a legacy task identifier or dispatch bookkeeping marks a live job as failedA running job can be hidden and a synchronous caller can skip its waitKeep queue handles in their own field, mark dispatch as a positive fact, and never overwrite a post-dispatch status with bookkeeping errors
An LLM usage row has no usage reasonPer-model reporting cannot place the cost in a meaningful bucketDrop unlabeled LLM rows from the per-model breakdown and log the producer error

Key files

FileWhy to read it
backend/…/base_urls.pyShows how tenant, public, published deployment, and internal traffic enter the service.
backend/…/urls_v2.pyShows the main API v2 domain mounts.
backend/…/public_urls_v2.pyShows the account, connector authorization, pipeline, flag, and health routes served without the tenant prefix.
backend/…/ReadMe.mdStates the account organization-list and last-product preference contracts.
backend/…/custom_auth_middleware.pyShows how session and bearer platform-key requests become organization-scoped identities, including expiry, rotation, method checks, and key-use recording.
backend/…/authentication_plugin_registry.pyShows how one active authentication provider is selected for account behavior.
backend/…/authentication_service.pyShows the base account service and its fallback organization and role behavior when a provider does not implement an operation.
backend/…/authentication_controller.pyShows how authentication providers, organization selection, membership, profile overrides, and role changes are coordinated.
backend/…/views.pyShows account session, organization selection, logout, organization creation, and user product-preference capabilities.
backend/…/internal_urls.pyShows the compatibility and explicit organization-context paths for internal callers.
backend/…/internal_views.pyShows how internal workers receive serialized organization context.
backend/…/views.pyShows organization roles, capability settings, and admin-only organization controls.
backend/…/users_urls.pyShows the organization-scoped profile, membership, invitation, and role routes.
backend/…/users_view.pyShows profile data, profile photo actions, membership actions, and audit hooks.
backend/…/serializer.pyShows profile and organization capability response and request contracts.
backend/…/test_profile_views.pyShows the profile, photo, authentication, and schema guarantees.
backend/…/test_capabilities.pyShows capability defaults, endpoint guardrails, audit behavior, and deployment-key scope rules.
backend/…/group_views.pyShows organization group management and the group resource view.
backend/…/shareable_resources.pyDefines the shared resource registry used by access and notification flows.
backend/…/sharing_helpers.pyDefines group visibility, effective access, and share authorization.
backend/…/share_notifications.pyShows how committed share changes become asynchronous group notification events.
backend/…/group_notification_service.pyShows delivery-time recipient checks and retry outcomes for group notices.
backend/…/membership_serializers.pyShows co-owner validation and the last-live-owner invariant.
backend/…/membership_views.pyShows co-owner actions and access-loss cleanup hooks.
backend/…/resource_share_views.pyShows the replace-style sharing action and effective-member response.
backend/…/urls.pyShows connector CRUD, sharing, ownership, testing, and usage routes.
backend/…/views.pyShows connector access, filtering, OAuth handling, sharing, and deletion protection.
backend/…/urls.pyShows adapter discovery, defaults, instance, sharing, testing, and usage routes.
backend/…/views.pyShows adapter testing, defaults, controlled creation, sharing, and deletion protection.
backend/…/serializers.pyShows adapter availability, deprecation, type, and metadata rules.
backend/…/urls.pyShows pipeline CRUD, execution, aggregate, sharing, ownership, and client routes.
backend/…/views.pyShows pipeline CRUD, list filters, aggregate summaries, manual execution, sharing, and API client support.
backend/…/models.pyShows pipeline types, run state, organization visibility, and next scheduled run behavior.
backend/…/aggregate.pyShows the pipeline aggregate response, failing rows, and schedule summary.
backend/…/crud.pyShows workflow ownership scope for pipeline requests and the boundary between list, detail, and scheduled pipeline data.
backend/…/internal_api_views.pyShows the worker-facing pipeline and deployment lookup and status boundary.
backend/…/urls.pyShows deployment CRUD, aggregate, sharing, key, and published execution routes.
backend/…/api_deployment_views.pyShows deployment management, organization-scoped listing, aggregate summaries, and external execution behavior.
backend/…/deployment_helper.pyShows deployment authentication, input staging, dispatch, result shaping, and cleanup.
backend/…/error_message.pyShows the execute-error compatibility shape used by published clients.
backend/…/serializers.pyShows deployment ownership and readiness checks, list summaries, key target rules, and published execution request validation.
backend/…/openapi_schema.pyShows the client-facing deployment, listing, request, response, security, and error contract.
backend/…/deployment_spec_urls.pyShows which served routes enter the published contract.
backend/…/generate_docstudio_spec.pyShows how the served deployment routes become the committed OpenAPI artifact.
backend/…/deployment-aggregate-response.schema.jsonDefines the deployment aggregate response shape and its failure-list limit.
backend/…/test_deployment_aggregate.pyShows that deployment list filters, access scope, status counts, and failure summaries stay aligned.
backend/…/test_deployment_auth.pyShows that rejected deployment credentials fail before execution work starts.
backend/…/test_deployment_error_message.pyShows the compatibility rule for execute errors and status-read errors.
backend/…/test_deployment_helper.pyShows terminal handling and cleanup when staging fails or rejects every file.
backend/…/test_deployment_aborted.pyShows the 422 contract and result shaping for stopped deployment runs.
backend/…/test_docstudio_spec.pyShows the checks that prevent route, schema, credential, upload, response, and error drift from reaching generated clients.
specs/docstudio-oss.jsonShows the committed contract consumed by published clients and SDK generation.
backend/…/enums.pyDefines the file types accepted by workflow input processing.
backend/…/source.pyShows source discovery, file history, content validation, and per-file staging outcomes.
backend/…/test_api_storage_mime_validation.pyShows the content-based file acceptance and per-file failure contract.
backend/…/list_aggregate_serializers.pyDefines the shared list filters, status counts, and aggregate response fields.
backend/…/list_aggregates.pyDefines how pipeline and deployment lists derive status counts, filters, schedules, and failing rows.
backend/…/failing_streaks.pyDefines the five-finished-error rule and failure-streak details.
backend/…/execution.pyShows execution visibility, file-result status, dispatch markers, and recent run summaries.
backend/…/list_rows.pyProvides the shared list and aggregate contract checks.
backend/…/test_list_aggregates.pyShows the common status, filter, access, failure-streak, and query-count guarantees.
backend/…/pipeline-aggregate-response.schema.jsonDefines the pipeline aggregate response shape and schedule fields.
backend/…/test_pipeline_aggregate.pyShows that pipeline list filters, access scope, status counts, schedules, and failure summaries stay aligned.
backend/…/views.pyShows Prompt Studio project, profile, prompt-run, document, indexing, and task-status capabilities.
backend/…/internal_views.pyShows worker callbacks for prompt output, indexing, extraction status, and profile data.
backend/…/views.pyShows prompt listing, editing, and ordering.
backend/…/views.pyShows exported tool visibility and safe unpublishing.
backend/…/views.pyShows connector-backed file browsing and Prompt Studio cleanup.
backend/…/views.pyShows notification lookup and organization batching settings.
backend/…/serializers.pyShows notification parent rules, authorization checks, and webhook URL validation.
backend/…/internal_views.pyShows worker-facing notification scope, webhook testing, redacted results, and metrics.
backend/…/urls.pyShows the personal inbox list and read action route surface.
backend/…/views.pyShows user-scoped inbox listing, unread counts, single-item conflict handling, and read-all behavior.
backend/…/serializers.pyShows the inbox item, pagination, route, and read-conflict response contracts.
backend/…/models.pyShows the organization and user scope and the event de-duplication boundary for inbox items.
backend/…/views.pyShows organization usage reports and run-level aggregates.
backend/…/serializers.pyShows dashboard query limits, filters, and the recent-activity response modes.
backend/…/views.pyShows dashboard summaries, series, activity, attention, attribution, and health views.
backend/…/permission.pyDefines shared ownership, sharing, organization, and service-account rules.
backend/…/models.pyShows typed organization overrides and default fallback behavior.
backend/…/views.pyShows organization-scoped platform API key lifecycle and rotation.
backend/…/views.pyShows global deployment-key scope, member limits, and rotation.
backend/…/views.pyShows the platform key lifecycle and single-active-key behavior.
backend/…/execution.pyShows execution identity, lifecycle state, and terminal handling.
backend/…/workflow_helper.pyShows queue dispatch, execution polling, result acknowledgement, and transport markers.
backend/…/test_record_dispatch_handle.pyShows why queue handles and legacy task identifiers remain separate.
backend/…/internal_views.pyShows worker access to tool execution, tool metadata, and tool-instance validation.
backend/…/internal_base_urls.pyShows the worker-facing internal API modules and their trust boundary.