List Levels¶
GET /api/v1/incidents/level/list
Overview¶
Lists the default and custom Incident level configurations for the current Workspace.
Before Calling and Usage Steps¶
The Key must match either routine.defaultAccess or incidents.incidentsLevelManage, and only for the Workspace to which the current Key belongs. This module shares the underlying levels and default level configuration with the Issue level API. Changes may affect both Incident/Issue level selection; this module does not maintain an independent copy. When global levels are enabled in the backend, the actual effective level selection may be determined by the global configuration first. This Workspace's management list still includes only default and Workspace custom items, and does not include backend global levels. Ask the administrator to confirm the effective rules before making changes, and do not treat all items in the management list as available levels.
There are no request parameters and no pagination. The four default items are always listed, and isDisabled indicates the Workspace default switch. Custom items include isDefault=false and a principal summary. Reading the list does not filter out disabled default items. Before selecting an Incident level, check the switch/backend global priority rules, and do not use presence in the management list as proof of availability. Default items do not have custom entity fields such as database id/creator. Clients must be compatible with both shapes.
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 enter: Obtain an OpenAPI Key with the required operation permission from API Key Management in the target Workspace. |
Additional Parameter Notes¶
Lists only Workspace default and Workspace custom levels; does not include global levels from the management backend. Default items may be marked isDisabled=true but are still listed in the management response.
Request Example¶
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | array<object> |
The four default items come first, followed by Workspace custom items in descending createAt order; not paginated and does not include backend global levels. |
| content[].uuid | string | Default values are system_level_0/1/2/3; custom values are issl_ etc. |
| content[].name | string | Default names P0/P1/P2/Unknown are returned according to language configuration; custom names use the saved value. |
| content[].color | string | Display color. |
| content[].description | string | Level description. |
| content[].isDefault | boolean | true for default items, false for custom items. |
| content[].isDisabled | boolean or null | Returned only for default items; comes from the Workspace default level switch; disabled items are still in the management list. |
| content[].id | integer or null | Database row ID; use uuid for business identification; the snapshot before submission may be null. |
| content[].status | integer | Database status, 0 active/3 deleted; different from the Incident business status incidentsStatus. |
| content[].creator | string | Creation principal; for API Keys this is generally wsak_ resource UUID. |
| content[].updator | string | Most recent update principal; may be empty if not updated. |
| content[].createAt | integer | Unix timestamp in seconds for creation time. |
| content[].updateAt | integer | Unix timestamp in seconds for the most recent update time. |
| content[].deleteAt | integer | Unix timestamp in seconds for deletion time; -1 if not deleted. |
| content[].workspaceUUID | string | Only for custom items; the Workspace they belong to. |
| content[].extend | JSON or null | Extension saved only for custom items. |
| content[].extend.custom field | JSON | Dynamic extension key-values saved by the creator. |
| content[].isManage | boolean | Usually false for custom items in this Workspace. |
| content[].creatorInfo | object | Principal summary for custom items only; {} if not found. |
| content[].creatorInfo.uuid | string | Principal UUID; the system reply principal may be empty or a system identifier. |
| content[].creatorInfo.status | integer | Principal status. |
| content[].creatorInfo.wsAccountStatus | integer | Workspace member status; for Keys, the Key status is used, not the Incident status. |
| content[].creatorInfo.username | string | Login name/Key name/system name. |
| content[].creatorInfo.name | string | Display name; for the system AI display name, the site configuration is used. |
| content[].creatorInfo.iconUrl | string | Avatar URL; may be omitted in system summaries. |
| content[].creatorInfo.email | string | Contact email; for Key summaries, this may be the Key UUID, not a deliverable email address. |
| content[].creatorInfo.mobile | string | Contact mobile number; may be empty. |
| content[].creatorInfo.countryCode | string | Country code; may be omitted in system summaries. |
| content[].creatorInfo.acntWsNickname | string | Workspace nickname; may be omitted in system summaries. |
| content[].updatorInfo | object | Principal summary for custom items only; {} if not found. |
| content[].updatorInfo.uuid | string | Principal UUID; the system reply principal may be empty or a system identifier. |
| content[].updatorInfo.status | integer | Principal status. |
| content[].updatorInfo.wsAccountStatus | integer | Workspace member status; for Keys, the Key status is used, not the Incident status. |
| content[].updatorInfo.username | string | Login name/Key name/system name. |
| content[].updatorInfo.name | string | Display name; for the system AI display name, the site configuration is used. |
| content[].updatorInfo.iconUrl | string | Avatar URL; may be omitted in system summaries. |
| content[].updatorInfo.email | string | Contact email; for Key summaries, this may be the Key UUID, not a deliverable email address. |
| content[].updatorInfo.mobile | string | Contact mobile number; may be empty. |
| content[].updatorInfo.countryCode | string | Country code; may be omitted in system summaries. |
| content[].updatorInfo.acntWsNickname | string | Workspace nickname; may be omitted in system summaries. |
| content[].declaration | object | Public declaration in the current Workspace for each non-empty item. |
{
"code": 200,
"content": [
{
"name": "P0",
"color": "#E94444",
"description": "默认等级配置,业务重要功能不可用且大面积影响用户。",
"uuid": "system_level_0",
"isDefault": true,
"isDisabled": false,
"declaration": {}
},
{
"name": "P1",
"color": "#FF7931",
"description": "默认等级配置,业务重要功能不可用,但影响用户有限,如仅影响内部用户。",
"uuid": "system_level_1",
"isDefault": true,
"isDisabled": false,
"declaration": {}
},
{
"name": "P2",
"color": "#FFB44A",
"description": "默认等级配置,业务周边功能不可用,持续故障将大面积影响用户体验。",
"uuid": "system_level_2",
"isDefault": true,
"isDisabled": false,
"declaration": {}
},
{
"name": "未知",
"color": "#C9C9C9",
"description": "默认等级配置,业务影响未知。",
"uuid": "system_level_3",
"isDefault": true,
"isDisabled": false,
"declaration": {}
},
{
"id": 123,
"uuid": "issl_example",
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785427200,
"updateAt": -1,
"deleteAt": -1,
"workspaceUUID": "wksp_example",
"name": "P3-轻微",
"color": "#3F94DC",
"description": "局部功能受影响",
"extend": {},
"isManage": false,
"declaration": {},
"isDefault": false,
"creatorInfo": {},
"updatorInfo": {}
}
],
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 500 | ft.InternalServerError | Unhandled exceptions such as database reads, historical object/configuration format issues, or related summary construction | Internal error | Check the query parameters and retain traceId; retry with backoff. If failures persist, ask the administrator to check related historical records and service logs. |