Skip to content

Delete Custom Level



POST /api/v1/issue-level/delete

Overview

Deletes custom levels in the current workspace in batches.

Prerequisites and Usage Steps

Only pass UUIDs of custom levels in this workspace. System default levels with the system_level_ prefix cannot be deleted. Before submitting, first adjust Issues or associated rules that still require these levels; this API does not automatically migrate the level of historical Issues. Custom level identifiers that are not found may produce no changes, and a successful true response does not mean that every UUID exists. Do not submit an empty array; the current empty-array path may return an internal error during audit processing. The operation uses the workspace associated with the current API Key; obtain resource identifiers from the same workspace.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with permission for this operation from API Key Management in the target workspace.

Body Parameters

Parameter Name Type Required Description
uuids[*] string A single level UUID.
Example: issl_example
How to obtain or enter: Use a custom level UUID starting with issl_ in this workspace.
uuids array Y Array of custom level UUIDs to delete. Required; must not contain system default levels.
Null allowed: False
Example: ["issl_example"]
How to obtain or enter: Obtain from content.uuid saved in the custom level creation response or from visible entries in the valid level list. Before deletion, confirm they are no longer needed; submit at least one real UUID.

Additional Parameter Notes

Deletion makes the corresponding levels unavailable as valid levels in this workspace; historical Issues may still retain the old UUID and human-readable display information. This operation deletes level configurations, not Issues.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/issue-level/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"uuids":["issl_example"]}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content boolean true when deletion processing is complete; per-item results are not provided.
{
  "code": 200,
  "content": true,
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The top-level JSON value is not an object Some JSON files have format errors Submit a JSON object.
406 ft.NotAllowDeleteDefaultIssueLevel uuids contains a default level with the system_level_ prefix Deleting the workspace's default level configuration is not allowed Remove the default level; to disable a default level, use the default level switch.
500 ft.InternalServerError Saving levels or configurations, auditing, or other internal processing failed Internal error First read the current levels or configurations to confirm the result, then decide whether to retry; if the failure persists, provide traceId.

Feedback

Is this page helpful?