Delete workflow template

Delete a workflow template. Deleting a custom template only affects the current workspace; deleting a built-in template requires administrator privileges. This operation is irreversible.

DELETE https://moi.matrixorigin.cn/newmoi/workflow-templates/{id}

Preparation before calling

First query workflow template details to confirm the template to be deleted. Prepare a personal access token and target workspace ID that has access to the target workspace. Deleting built-in templates also requires administrator rights.

Request parameters

Request example

curl -X DELETE "https://moi.matrixorigin.cn/newmoi/workflow-templates/$TEMPLATE_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Successful response

The template was removed when code was OK and data.message was deleted in the response. Deletion is irreversible.

The response fields are as follows.

codestring
OK when successful.
msgstring
OK when successful.
data.messagestring
Fixed to deleted, indicating that the template has been deleted.

Successful response example

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "message": "deleted"
  }
}

Error response

codestring
Error code.
msgstring
Readable error message.
datanull
`null` in an error response.

Error response example

{
  "code": "ErrSeedTemplateManaged",
  "msg": "系统管理的模板不允许修改",
  "data": null
}

Follow-up operations

Query workflow template list confirms that the template has been removed.

Last updated on