跳转到内容
EN

Delete a saved template

Code Mode: praxis.studio.templates.delete

HTTP: DELETE /studio/v1/templates/{template}

Delete a template this organization saved. A built-in template belongs to the catalog and cannot be deleted, so this answers TEMPLATE_NOT_FOUND for one. Drafts that already started from the template are unaffected, because the template was detached when they were created. This cannot be undone.

签名

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

参数

名称位置类型必填说明
templatepathstring是Template being addressed: a saved one by its tmpl_ identifier, or a built-in one by its key, optionally prefixed with its genre as in novel_long:three_act when several genres share the key.

响应

状态码内容类型说明
200application/jsonThe deletion confirmation; the template no longer appears in the template list.
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/jsonTEMPLATE_NOT_FOUND means no saved template has that identifier and no built-in template has that key; read the template list for the genre and use a value it returns.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.