Skip to content
中文

Revoke a file content link

Code Mode: praxis.file.files.contentLinks.revoke

HTTP: POST /file/v1/files/{file_id}/content_links:revoke

Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 15 minutes; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {“token”:“<token from /c/>”}.

Signature

praxis.file.files.contentLinks.revoke(args:{path:{/** pattern: ^file-[0-9A-Za-z]{24}$ e.g. "file-0123456789ABCDEFGHIJKLMN" */ file_id:string};body:{/** Signed token taken from the /c/ path component of a previously issued file content URL, without the host or /c/ prefix. */ token:string}}):Promise<{/** True when IAM has recorded revocation of this content link. */ revoked:true}>;

Parameters

NameInTypeRequiredDescription
file_idpathstringyesTenant-owned file identifier returned by file creation or listing; the token must name this same file.

Request body

RequiredContent typesDescription
yesapplication/json

Responses

StatusContent typesDescription
200application/jsonThe content link is revoked; deny-list propagation stops further reads.
400INVALID_PARAMS: correct the filename, byte count, MIME type, purpose or lifetime named by the error before retrying.
401UNAUTHENTICATED: supply a valid organization API key or signed-in session.
403PERMISSION_DENIED or BINDING_READ_ONLY: use a credential with the required create or file-write authority.
404FILE_NOT_FOUND: the file or token is missing, expired, invalid, already revoked or belongs to another organization; obtain a live matching token and verify file access.