Skip to content

Modify Custom Level



POST /api/v1/issue-level/{issue_level_uuid}/modify

Overview

Modify the name, color, or description of a custom level in the current workspace.

Prerequisites and Usage Steps

Use the issl_ UUID saved at creation time, or obtain the target from a visible entry in the Valid Level List. Only the name, color, and description you pass are modified; omitted fields keep their current values. extend declared in the current version is not saved on modification. The returned object adds old_name so you can verify the name before the change; modifying a level does not change the UUID stored by Issues that use it. The operation uses the workspace that owns the current API Key; obtain the resource identifier from the same workspace.

Route Parameters

Parameter Type Required Description
issue_level_uuid string Y UUID of a custom level in this workspace; system default levels cannot be renamed through this API.
Example: issl_example
How to obtain or fill in: Save content.uuid from the custom level creation response, or get it from a visible custom level entry in the valid list.

Request Headers

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

Body Request Parameters

Parameter Type Required Description
extend.CustomField json This modification API does not update these additional fields.
Example: urgent
How to obtain or fill in: Name it according to business needs in the integrating system and keep the field type stable.
name string Optional new name; omit to keep the current value. We recommend no more than 128 characters and no duplicate names in this workspace.
Null allowed: False
Maximum length: 256
Example: 紧急处理
How to obtain or fill in: Choose a name not already used in this workspace according to business needs; we recommend no more than 128 characters.
description string Optional new description; omit to keep the current value.
Null allowed: False
Example: 需要当天响应
How to obtain or fill in: Briefly describe the criteria and expected response time; we recommend no more than 1024 characters. If omitted, it is an empty string.
extend json Although still present in the public parameter declaration, the current controller does not save the modified extend; you can simply omit it.
Null allowed: True
Example: {}
How to obtain or fill in: Pass a JSON object when you need to save custom additional information; if there is none, omit it or pass {}.
color string Optional new color; omit to keep the current value.
Null allowed: False
Example: #FF7931
How to obtain or fill in: Choose a color that the client can render; we recommend a #RRGGBB string.

Additional Parameter Notes

System default levels or platform globally managed levels are not records that can be modified in this workspace, and may return ObjectNotExists. Changing the color or name does not automatically notify subscribers of existing Issues.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/issue-level/issl_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"生产紧急处理","color":"#E94444"}'

Response

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

Field Type Description
content.id integer or null Record number. Responses for Issue creation/replies constructed before persistence may be null; use uuid to operate on resources.
content.uuid string Resource UUID.
content.workspaceUUID string UUID of the workspace it belongs to.
content.status integer Record status; 0 = normal, 3 = deleted. Distinct from the Issue business status statusType.
content.creator string Identity that performed the creation; may be an API Key identifier, account, or system identity.
content.updator string Identity of the most recent update; empty string if not set.
content.createAt integer Creation time, Unix seconds.
content.updateAt integer Most recent update time, Unix seconds; may be -1 if never updated.
content.deleteAt integer Deletion time, Unix seconds; -1 if not deleted.
content.name string Custom level name.
content.color string Color string.
content.description string Level description.
content.extend object or null Additional JSON object saved at creation time; the level modification API does not currently modify this field.
content.isManage boolean or number Whether it is a platform managed level; workspace-created levels are usually false.
content.old_name string Level name before this modification.
content.declaration object or null Workspace common declaration; appended only at the content level.
{
  "code": 200,
  "content": {
    "id": 201,
    "uuid": "issl_example",
    "workspaceUUID": "wksp_example",
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785430800,
    "updateAt": 1785430860,
    "deleteAt": -1,
    "name": "生产紧急处理",
    "description": "需要当天响应",
    "color": "#E94444",
    "extend": {},
    "isManage": false,
    "old_name": "紧急处理",
    "declaration": {}
  },
  "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 Handling
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 names, types, and values.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object Some json file format error Submit a JSON object.
404 ft.ObjectNotExists The specified resource does not exist in the current workspace or does not meet the query conditions Specified object does not exist Re-obtain the resource UUID from the same workspace and check whether it has been deleted.
406 ft.IssueLevelNameExists The new name is the same as another undeleted custom level in this workspace Level name already exists Use a name that is not already taken.
500 ft.InternalServerError Saving the level or configuration, auditing, or another internal process failed Internal error First read the current level or configuration to confirm the result, then decide whether to retry; if the failure persists, provide the traceId.

Feedback

Is this page helpful?