Skip to content

List Levels



GET /api/v1/issue-level/list

Overview

Get the set of valid levels actually available for Issues in the current Workspace.

Before You Call and Usage Steps

Call this API first, then use the uuid of the returned item to create or modify an Issue's level, without relying on fixed display names such as P0/P1. If global levels are enabled on the platform, the globally managed levels are returned; otherwise, the currently enabled system default levels and custom levels in this Workspace are returned. After a system default level is disabled, it is no longer in this valid list. The API returns the content array directly without pagination; the order does not represent severity ranking. If there is no valid configuration, the array may be empty. The operation uses the Workspace to which the current API Key belongs; 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.

Additional Parameter Details

This API returns the valid levels actually in effect, not a complete maintenance list of custom levels; custom levels in this Workspace that are overridden by global levels may not appear. Default level names and descriptions may vary with the Workspace language.

Request Example

curl --get 'https://openapi.guance.com/api/v1/issue-level/list' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

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

Field Type Description
content array<object> Array of valid levels; entries provide different optional fields depending on their source.
content[].uuid string Level UUID; whether it can still be used for Issue.level should be determined by the current valid level list.
content[].name string Level name, displayed according to the Workspace language or level configuration.
content[].color string Color string, usually #RRGGBB.
content[].description string Level description.
content[].isDefault boolean Provided as true for system default level entries; may be omitted for other entries.
content[].isManage boolean Provided as true when platform global levels are used; may be omitted for Workspace custom levels.
content[].status integer Record status provided by database level entries, usually 0.
content[].declaration object or null Workspace common declaration attached to each non-empty level object.
{
  "code": 200,
  "content": [
    {
      "uuid": "system_level_1",
      "name": "P1",
      "description": "业务重要功能不可用,但影响用户有限。",
      "color": "#FF7931",
      "isDefault": true,
      "declaration": {}
    }
  ],
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

When there are no valid levels, an empty array is returned on success; there are no additional business parameters. Authentication, version, and rate limiting failures use the common error descriptions.

Feedback

Is this page helpful?