跳转到内容
EN

Delete a reference library

Code Mode: praxis.studio.codexes.delete

HTTP: DELETE /studio/v1/codexes/{codex}

Delete a library and every entry inside it. A library attached to any work is refused with CODEX_IN_USE, because deleting it would silently strip the reference material those units draw on; detach it from the work first. This cannot be undone, so confirm which library the identifier names.

签名

praxis.studio.codexes.delete(args:{path:{/** e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ codex:string}}):Promise<{/** Always true, which is what tells a caller the deletion landed rather than that the resource was already missing. */ deleted:boolean}>;

参数

名称位置类型必填说明
codexpathstring是Reference library being addressed, given by its cdx_ identifier; a library has no name-based address, so read the library list first when only the name is known.

响应

状态码内容类型说明
200application/jsonThe deletion confirmation; the entries that were inside the library are gone with it.
400application/jsonINVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call.
401application/jsonThe API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header.
404application/jsonCODEX_NOT_FOUND means no reference library in this organization has that identifier; read the library list and pass one of its identifiers, since a library owned by another organization answers the same way.
409application/jsonCODEX_IN_USE means the reference library is attached to a work, so deleting it would strip material those units draw on; detach it from every work first, then delete it.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.