Copy a subgraph of resources.
Selects all resources reachable from the given root IDs via dependency edges, then creates a copy of each. Copies are created in DRAFT state with a COPY event dispatched to the provider for actual duplication.
Dependency rewiring (enabled by default) ensures that dependencies between copied resources point to their copies instead of originals. Dependencies on resources outside the copied subgraph remain unchanged.
Returns: CopyResponse with per-resource results and summary counts.
Request body for the subgraph copy operation.
Attributes: resource_ids: SurrealDB resource IDs to copy (roots of the subgraph). tags: Tags to apply to all copied resources. rewire_dependencies: If True, rewrite dependencies between copied resources to point to their copies instead of the originals. depth: Maximum traversal depth from roots. None means unlimited. strategy: Default copy strategy for resources that do not specify one.
1x >= 0Strategy for how a resource should be copied.
Attributes: STATELESS: Config-only copy. The resource is duplicated by creating a new instance with the same (or modified) configuration. No data migration. STATEFUL: Data-bearing copy. The resource needs to clone underlying data (e.g., database contents, vector indices) and may produce patches for ongoing synchronization.
stateless, stateful Successful Response
Response body for the subgraph copy operation.
Attributes: copied: List of per-resource copy results. total: Total resources in the selected subgraph. succeeded: Number of resources successfully copied. failed: Number of resources that failed to copy.