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}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| codex | path | string | 是 | 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. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | The deletion confirmation; the entries that were inside the library are gone with it. |
| 400 | application/json | INVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call. |
| 401 | application/json | The API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header. |
| 404 | application/json | CODEX_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. |
| 409 | application/json | CODEX_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. |
| 500 | application/json | INTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed. |