delete_file
Soft-delete a file and run the cross-representation cascade as a job.
The file is soft-deleted (deleted_at stamped) so lineage questions stay answerable after the cascade. The cascade job then retires index documents and output rows, drops the sibling folder from storage, cancels in-flight ingestion jobs that name the file, and independently re-checks every representation. DeleteFileResult.counts exist so this is auditable rather than assumed, and verified: false is a failed cascade that must alert.
Args: context: Resolved workspace plus the caller's access predicate. session: Database session. file_id: The file to delete. wait_seconds: Bounded inline wait. idempotency_key: Replaying with the same key returns the original job. response: Injected by FastAPI for status-code management. temporal: Temporal client, which runs the cascade workflow.
Returns: A Job whose result, once succeeded, is a DeleteFileResult with per-representation counts and a verified flag.
Raises: PlatformError: file_not_found when the file does not exist. PlatformError: access_denied when the caller does not hold the required access label.
Request
- Base URLhttps://ndi-api.nace.ai (the document declares no server; this is the origin it was published from)
- AuthAPI key in header X-API-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Workspace identifier.
Query parameters
Bounded inline wait. 0 (the default) returns 202 immediately. Above 0 the route returns 200 with a terminal job if the work finished in time, and 202 with the still-running job if it did not. Either way, read status.
Headers
Replaying a request with the same key returns the original job with 200, never a second job. The key is kept with the job for replay and never cleared, so it must not contain personal data.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.