Apply Resource
Apply a resource with declarative lifecycle semantics.
Set lifecycle_state in the resource:
- lifecycle_state=“draft”: Store without processing (default)
- lifecycle_state=“pending”: Validate dependencies and queue for processing
Cannot set PROCESSING, READY, FAILED (system-only states). Cannot modify resources in PENDING or PROCESSING state.
Sensitive fields are masked by default in the response. Pass reveal=true
to return actual values.
Returns: Applied resource with timestamps and server-populated fields.
Raises: ProjectMismatchError: If the resource body’s project_id conflicts with the URL path project_id.
Documentation Index
Fetch the complete documentation index at: https://docs.pragmatiks.io/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Query Parameters
Reveal sensitive field values
Body
Domain model for resources with provider/resource identity and 5-state lifecycle.
Identity fields (frozen - immutable after creation): provider: Provider that manages this resource type. resource: Resource type name. name: Unique resource instance name.
Configuration fields (mutable): config: Original user-submitted resource configuration. Contains raw field references and dependency markers as submitted by the user. resolved_config: Resolved configuration with field references and dependency markers expanded. Contains field_ref markers with resolved_value and dependency markers with ref data. Set when transitioning to PENDING state. None when resource is in DRAFT state or not yet resolved. dependencies: References to resources this resource depends on. owner_references: References to resources that own this resource for lifecycle coordination and cascading deletes.
Output fields (provider-managed): outputs: Resource outputs from provider processing. error: Error message when resource is in FAILED state.
Lifecycle fields (system-managed): lifecycle_state: Current state (DRAFT/PENDING/PROCESSING/READY/FAILED). pending_event_id: Event ID currently being processed (set on PROCESSING, cleared on READY/FAILED). Used for response idempotency validation. provisioned: Whether the resource was successfully created at least once. Used to distinguish failed creates (retry CREATE) from failed updates (retry UPDATE).
Versioning fields (system-managed): provider_version: Semver of the provider version that last processed this resource. Set automatically when the resource transitions to PENDING. None for platform resources or pre-versioning backfill.
Ownership fields (system-managed):
managed_by: Ownership discriminator. user for resources the
caller owns and controls, platform for platform-managed
resources (platform agents, tier resources, platform-default
LLM provider) that reject user writes. None is the legacy
unmanaged default for backfilled records.
Categorization fields (mutable): tags: Optional list of tags for categorization and filtering.
Inherited from PragmaModel: created_at: Creation timestamp (frozen). updated_at: Last update timestamp (mutable).
Lifecycle states for resources.
draft, waiting, pending, processing, ready, failed, deleting healthy, degraded user, platform Response
Successful Response
Domain model for resources with provider/resource identity and 5-state lifecycle.
Identity fields (frozen - immutable after creation): provider: Provider that manages this resource type. resource: Resource type name. name: Unique resource instance name.
Configuration fields (mutable): config: Original user-submitted resource configuration. Contains raw field references and dependency markers as submitted by the user. resolved_config: Resolved configuration with field references and dependency markers expanded. Contains field_ref markers with resolved_value and dependency markers with ref data. Set when transitioning to PENDING state. None when resource is in DRAFT state or not yet resolved. dependencies: References to resources this resource depends on. owner_references: References to resources that own this resource for lifecycle coordination and cascading deletes.
Output fields (provider-managed): outputs: Resource outputs from provider processing. error: Error message when resource is in FAILED state.
Lifecycle fields (system-managed): lifecycle_state: Current state (DRAFT/PENDING/PROCESSING/READY/FAILED). pending_event_id: Event ID currently being processed (set on PROCESSING, cleared on READY/FAILED). Used for response idempotency validation. provisioned: Whether the resource was successfully created at least once. Used to distinguish failed creates (retry CREATE) from failed updates (retry UPDATE).
Versioning fields (system-managed): provider_version: Semver of the provider version that last processed this resource. Set automatically when the resource transitions to PENDING. None for platform resources or pre-versioning backfill.
Ownership fields (system-managed):
managed_by: Ownership discriminator. user for resources the
caller owns and controls, platform for platform-managed
resources (platform agents, tier resources, platform-default
LLM provider) that reject user writes. None is the legacy
unmanaged default for backfilled records.
Categorization fields (mutable): tags: Optional list of tags for categorization and filtering.
Inherited from PragmaModel: created_at: Creation timestamp (frozen). updated_at: Last update timestamp (mutable).
External resource ID for API responses: provider/resource/name.
Lifecycle states for resources.
draft, waiting, pending, processing, ready, failed, deleting healthy, degraded user, platform