Create¶
POST /api/v1/issue/add
Overview¶
Create an Issue, set its level, assignee, source, channels, and optional attachments, and submit follow-up notifications.
Prerequisites and Usage Steps¶
First query the valid level list to select an available level. The minimum request includes name, level, description, and extend={}. The initial statusType is fixed at 10 Open; the create endpoint does not accept statusType. All Issues are delivered to the default channel; channelUUIDs and extend.channels can add channels in the same workspace. If no assignee is specified, the existing configuration may enter the no-assignee escalation notification flow. When the source is a regular manual issue or viewer, an initialization system reply task may also be submitted. The current task generates a change operation record for Obsy; this endpoint does not guarantee AI analysis results, which can be confirmed in the subsequent reply list. A successful API call does not mean notifications were delivered. Notifications are executed asynchronously, and recipients depend on channel subscriptions, notification targets, notification policies, the assignee, and the @ members in this request; verify the notification configuration and actual delivery in the console. Writing, follow-up notifications, and attachment processing are executed in separate steps. If a failure or timeout occurs, first query whether the resource has been created or updated, then decide whether to retry to avoid duplicate records and notifications.
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 permissions from API Key Management in the target workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| attachmentUuids[*] | json | UUID of a single uploaded attachment. Example: att_exampleHow to obtain or fill in: Take content.attachmentUuid from Upload Attachment. |
|
| extend.text | json | Optional plain text used for server-side length checking, up to 3000 characters. Example: 定位生产接口延迟。How to obtain or fill in: Extract from the plain text of the description and keep it within 3000 characters; if omitted, an empty text is checked. |
|
| extend.channels | array | Array of channel references; appends and merges with already bound channels. [] does not clear existing bindings. Example: [{"type": "#", "uuid": "chan_example", "name": "生产异常"}]How to obtain or fill in: Obtain the actual channel UUID from the Channel List and reference the # channel in the description. Omit to not append. |
|
| extend.channels[*] | json | Channel reference object. Example: {"type": "#", "uuid": "chan_example", "name": "生产异常"}How to obtain or fill in: Select an actual channel in the same workspace for each item. |
|
| extend.channels[*].uuid | json | Channel UUID. Example: chan_exampleHow to obtain or fill in: Obtain from content[].uuid in the Channel List. |
|
| extend.channels[*].name | json | Display name on the client. Example: 生产异常How to obtain or fill in: Take the corresponding name from the Channel List for display; can be omitted. |
|
| extend.channels[*].type | json | Channel reference marker. Example: #How to obtain or fill in: Channel references always use #; the server adds this marker to the read result. |
|
| extend.channels[*].exists | json | Optional display marker; does not replace server-side resource validation. Example: trueHow to obtain or fill in: Do not pass as a validity credential; query responses recalculate based on current resource existence. |
|
| extend.members | array | References to members @-mentioned in this request, used to collect one-time notification email addresses; this is not the assignee array. Example: [{"type": "@", "uuid": "acnt_example", "name": "值班工程师"}]How to obtain or fill in: Obtain the account UUID from Member Management in the target workspace; omit to not add @ members for this request. |
|
| extend.members[*] | json | Member reference object. Example: {"type": "@", "uuid": "acnt_example", "name": "值班工程师"}How to obtain or fill in: Fill in an object for each account that needs to be @-mentioned. |
|
| extend.members[*].uuid | json | Member account UUID. Example: acnt_exampleHow to obtain or fill in: Obtain the acnt_ account UUID from Member Management in the target workspace. |
|
| extend.members[*].name | json | Display name on the client. Example: 值班工程师How to obtain or fill in: Use the member display name; can be omitted. |
|
| extend.members[*].type | json | Member reference marker. Example: @How to obtain or fill in: Member references use @. |
|
| extend.members[*].exists | json | Optional display marker. Example: trueHow to obtain or fill in: Do not pass as a validity credential; recalculated on query. |
|
| extend.extra | json | External display information; does not replace the actual API authentication/author identity. Example: {}How to obtain or fill in: Fill in when a third-party integration needs to display an external operator; omit or use {} when not needed. |
|
| extend.extra.creator | json | Creator display object. Example: {"name": "外部工单创建人", "email": "xxx@guance.com"}How to obtain or fill in: Creator from the integrated system; when modifying, the original creator is usually retained by the server. |
|
| extend.extra.creator.name | json | Display name; can be omitted. Example: 外部工单创建人How to obtain or fill in: Take the display name from the external system. |
|
| extend.extra.creator.email | json | Display email; can be omitted. Example: xxx@guance.comHow to obtain or fill in: Take the email from the external system; the example is a fictitious address. |
|
| extend.extra.updator | json | Updater display object. Example: {"name": "外部工单更新人", "email": "xxx@guance.com"}How to obtain or fill in: When modifying, take the operator information for this operation from the integrated system. |
|
| extend.extra.updator.name | json | Display name; can be omitted. Example: 外部工单更新人How to obtain or fill in: Take the display name from the external system. |
|
| extend.extra.updator.email | json | Display email; can be omitted. Example: xxx@guance.comHow to obtain or fill in: Take the email from the external system. |
|
| extend.manager | array | Array of assignee identifiers; pass [] or omit when there is no assignee. When modifying, pass the complete target array; invalid accounts/teams/notification targets may be filtered out; dutyPerson is resolved to a specific target based on the on-call calendar for the current day in the workspace time zone, not by the HH:MM time slot on that day; after this save, it does not automatically change with subsequent shifts. Example: ["acnt_example"]How to obtain or fill in: Obtain acnt_ account UUIDs from Member Management and group_ UUIDs from Team Management in the target workspace; notification target UUIDs are obtained from the Notification Target List. You can also enter an actual email address or dutyPerson. |
|
| extend.manager[*] | json | Account UUID, team UUID, notification target UUID, email address, or dutyPerson. Example: acnt_exampleHow to obtain or fill in: Obtain acnt_ account UUIDs from Member Management and group_ UUIDs from Team Management in the target workspace; notification target UUIDs are obtained from the Notification Target List. You can also enter an actual email address or dutyPerson. |
|
| extend.linkList | array | Array of reference links, saved as needed by the client. Example: [{"name": "处理手册", "link": "https://example.com/runbook"}]How to obtain or fill in: Provide accessible reference links from the business side; omit to not add. |
|
| extend.linkList[*] | json | Link object. Example: {"name": "处理手册", "link": "https://example.com/runbook"}How to obtain or fill in: Each item describes one reference link. |
|
| extend.linkList[*].name | json | Link name. Example: 处理手册How to obtain or fill in: Enter the display name of the link. |
|
| extend.linkList[*].link | json | Link address. Example: https://example.com/runbookHow to obtain or fill in: Enter the complete accessible URL; replace the example domain. |
|
| extend.sourceLink | json | Optional source link; when viewer analyzes a single data record, doc_time can be used to determine the query window covering the record. Example: https://example.com/source?doc_time=1785430800000How to obtain or fill in: Obtain the complete link from the source page in the console; for viewer sources, doc_time uses Unix milliseconds. |
|
| extend.extra.managerInfos | json | Display information map for email assignees; can be omitted. Example: {"xxx@guance.com": {"name": "外部值班人"}}How to obtain or fill in: Use the email addresses in extend.manager as keys and fill in display information for external assignees. |
|
| extend.extra.managerInfos.email.name | json | Display name of a single email assignee. Example: 外部值班人How to obtain or fill in: The email key must match the email address in the assignee array; the name comes from the external business system. |
|
| channelUUIDs[*] | json | UUID of a single channel. Example: chan_exampleHow to obtain or fill in: Take content[].uuid from the Channel List. |
|
| name | string | Y | Issue title, up to 256 characters. Allows null: False Maximum length: 256 Example: checkout-api 延迟异常How to obtain or fill in: Enter a clear title based on the issue symptoms. |
| level | string | Y | UUID of the currently valid level; required for creation, and an empty string can be passed. Do not guess the UUID from the level display name. Allows null: False Allows empty string: True Example: system_level_1How to obtain or fill in: First call the Valid Level List and take the actual returned uuid; pass an empty string when no level is specified. |
| description | string | Y | Issue description; required for creation. This is distinct from the plain text length check for extend.text. Allows null: False Example: 定位生产接口延迟,记录处理过程。How to obtain or fill in: Enter the symptoms, scope, and handling objectives; detailed diagnostic materials can be uploaded as attachments. |
| attachmentUuids | array | Array of attachment UUIDs; binds attachments at creation and cannot delete existing attachments with []. Allows null: True Example: []How to obtain or fill in: First call Upload Attachment and save content.attachmentUuid; only attachments actually uploaded and available in this workspace can be used. Omit or use [] to not add attachments. |
|
| extend | json | Y | Required extension object. Pass {} when there is no content; do not pass null. Allows null: True Example: {}How to obtain or fill in: Pass {} when there is no extension content; before modifying, read the original value first and adjust the fields to change in the complete object. |
| resourceType | string | Source type. Allowed values: event, dashboard, viewer. After creation, the modification endpoints in this module do not provide source changes. Allows null: False Allowed values: ['event', 'dashboard', 'viewer'] Example: viewerHow to obtain or fill in: Select event/dashboard/viewer only when the Issue actually comes from an event, dashboard, or viewer; omit for regular manual Issues. |
|
| resourceUUID | string | Corresponding source identifier; omitted as an empty string. Do not treat all viewer values as dashboard UUIDs. Allows null: False Allows empty string: True Example: DOC-EXAMPLEHow to obtain or fill in: For event sources, enter the event __docid; for dashboards, enter the dashboard UUID; for a single viewer data record, enter __docid; for an entire viewer, an empty string can be passed. |
|
| resource | string | Source module/display name; omitted as an empty string. Allows null: False Allows empty string: True Example: TRACINGHow to obtain or fill in: Obtain the module value or source name from the actual source page; viewer commonly uses LOG, TRACING, EVENTS, and RUM. Omit for regular manual Issues. |
|
| channelUUIDs | array | Array of channels to deliver to at creation; always includes the default channel, and invalid channels are ignored. Allows null: True Example: ["chan_example"]How to obtain or fill in: Obtain valid channel UUIDs in the same workspace from the Channel List; omit or use [] to keep only the default channel and channels referenced by extend. |
Additional Parameter Notes¶
For attachments, first call Upload Attachment, then fill attachmentUuid into attachmentUuids. Attachments that do not exist or are unavailable may cause internal errors; verify them before binding. exists in extend.channels/members is a display field, not an authorization basis.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/issue/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"checkout-api 延迟异常","level":"system_level_1","description":"定位生产接口延迟,记录处理过程。","extend":{}}'
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 ID. When a response for creating an Issue/reply is constructed before persistence, this may be null; use uuid for resource operations. |
| content.uuid | string | Resource UUID. |
| content.workspaceUUID | string | UUID of the workspace to which the resource belongs. |
| content.status | integer | Record status; 0 normal, 3 deleted. This is distinct from the Issue business status statusType. |
| content.creator | string | Identity of the create call; may be an API Key identifier, account, or system identity. |
| content.updator | string | Most recent update identity; empty string if not set. |
| content.createAt | integer | Creation time in Unix seconds. |
| content.updateAt | integer | Last update time in Unix seconds; may be -1 if not updated. |
| content.deleteAt | integer | Deletion time in Unix seconds; -1 if not deleted. |
| content.name | string | Issue title. |
| content.level | string | Level UUID; an empty string is allowed to indicate unspecified. This is not the level name. |
| content.statusType | integer | Status: 10 Open, 15 Working, 20 Resolved, 25 Closed, 30 Pending. |
| content.statusTypeUpdateRecord | array<string> |
Status change history; each item is in the form Unix seconds&&status name. |
| content.statusTypeUpdateRecord[] | string | A single status change record. |
| content.description | string | Issue description. |
| content.resourceType | string | Source type, such as event, dashboard, or viewer. For automatically created Issues, it may also be checker, keyeventAutoDiscovery, etc. |
| content.resourceUUID | string | Associated source identifier; the specific meaning varies by source type. |
| content.resource | string | Source module or name, such as LOG, TRACING, EVENTS, or RUM. |
| content.repeatType | string | Repeat type for automatically discovered issues; can be new, repeat, or regression; may be empty for manual creation. |
| content.subIdentify | string | Associated sub-identifier defined by the source; usually empty for manual creation. |
| content.resolveAt | integer | Time when the Issue was last set to Resolved or Closed, in Unix seconds; -1 if never resolved. Reopening does not automatically clear this historical time. |
| content.eventCount | integer | Number of associated events for the record. |
| content.eventCountUpdateAt | integer | Last update time of the associated event count in Unix seconds; -1 if not yet recorded. |
| content.triggerRecord | object | Legacy compatibility field; no longer used as a notification trigger control parameter. |
| content.extend | object | Extension content. The request should pass the object {}; do not pass null. For structures such as members, channels, and assignees, see the parameter table. |
| content.extend.text | string | Plain text used for length checking, up to 3000 characters. |
| content.extend.channels | array<object> |
Channels referenced in the description, including uuid, name, type, and exists; on return, exists is refreshed based on current resource existence. |
| content.extend.channels[].uuid | string | Channel UUID. |
| content.extend.channels[].name | string or null | Display name. |
| content.extend.channels[].type | string | Channel reference marker #. |
| content.extend.channels[].exists | boolean | Whether the channel exists at return time. |
| content.extend.members | array<object> |
Member references @-mentioned in the description, including uuid, name, type, and exists. |
| content.extend.members[].uuid | string | Member account UUID. |
| content.extend.members[].name | string or null | Display name. |
| content.extend.members[].type | string | Member reference marker @. |
| content.extend.members[].exists | boolean | Whether the account exists at return time. |
| content.extend.manager | array<string> |
Array of assignee identifiers, used only by Issues; members/teams/notification targets/emails are normalized based on validity. |
| content.extend.manager[] | string | A single assignee identifier. |
| content.extend.linkList | array<object> |
Business reference links. |
| content.extend.linkList[].name | string | Link display name. |
| content.extend.linkList[].link | string | Business URL. |
| content.extend.sourceLink | string | Source page link; filled in by the client when present. |
| content.extend.extra | object | Display information for third-party integration; does not change the actual API authentication identity. |
| content.extend.extra.creator | object | Display information for the third-party creator; may include name and email. |
| content.extend.extra.creator.name | string | Creator display name. |
| content.extend.extra.creator.email | string | Creator display email. |
| content.extend.extra.updator | object | Display information for the third-party updater; may include name and email. |
| content.extend.extra.updator.name | string | Updater display name. |
| content.extend.extra.updator.email | string | Updater display email. |
| content.extend.extra.managerInfos | object | Display information map keyed by assignee email, used only by Issues. |
| content.extend.extra.managerInfos.email.name | string | Display name of the assignee with the corresponding email address. |
| content.extend.Other fields | JSON | Other extension information saved by the client; not all of it triggers business behavior. |
| content.declaration | object or null | Workspace public declaration; attached only at the content level. |
{
"code": 200,
"content": {
"id": null,
"uuid": "issue_example",
"workspaceUUID": "wksp_example",
"status": 0,
"creator": "wsak_example",
"updator": "wsak_example",
"createAt": 1785430800,
"updateAt": 1785430800,
"deleteAt": -1,
"name": "checkout-api 延迟异常",
"level": "system_level_1",
"statusType": 10,
"statusTypeUpdateRecord": [],
"description": "定位生产接口延迟,记录处理过程。",
"resourceType": "",
"resourceUUID": "",
"resource": "",
"repeatType": "",
"subIdentify": "",
"extend": {},
"resolveAt": -1,
"eventCount": 0,
"eventCountUpdateAt": -1,
"triggerRecord": {},
"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 | 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 | The request JSON syntax is invalid | Request JSON format error | Correct the JSON based on content.reason, line, and column. |
| 400 | ft.JsonFormatError | The top-level JSON value is not an object | Some JSON file format error | Submit a JSON object. |
| 406 | ft.IssueLevelNotExists | level is not in the set of valid levels for the current workspace | Level configuration does not exist | First query the Valid Level List and take the returned uuid; if no level is set, pass an empty string as described in the parameter notes. |
| 406 | ft.ExceedMaxLengthLimit | The length of extend.text exceeds 3000 characters | Exceeds the maximum text length limit | Shorten the plain text field; upload large diagnostic materials as attachments. |
| 400 | ft.UnsupportFreeIssueManager | A restricted workspace plan uses an external email address that is not a member of this workspace as the assignee | Free Plan workspaces do not support external email addresses as Incident assignees | Select a member of this workspace, or check whether the plan supports external email assignees. |
| 404 | ft.NotFoundChannel | The current workspace lacks an available default channel | Specified channel not found | Confirm the channel configuration in the console, restore the default channel, and retry. |
| 500 | ft.InternalServerError | Saving the level or configuration, auditing, or other internal processing failed | Internal error | First read the current level or configuration to confirm the result, then decide whether to retry; if it persists, provide traceId. |
| 503 | ft.QueryServiceUnavailable | When querying a single viewer source record, the upstream query service returns 503 | The query service is temporarily unavailable. Please try again later. | When content.retryable is true, retry with backoff; first query whether the Issue has already been created to avoid duplicates. |
| 406 | ft.KodoRequestDeadlineExceeded | Data query for a viewer source timed out | Data query timed out. This may be caused by the following: excessive data volume, network latency, or high server load. You can resolve this issue in the following ways: 1. Add filter conditions or narrow the time range, and then query again. 2. Wait a while and try the query again. |
Check the source record and the doc_time in sourceLink, then retry; if it persists, provide traceId. |
| 406 | ft.KodoTooManyRows | Data query for a viewer source exceeds the limit | The queried data volume exceeds the maximum limit. Add filter conditions or reduce the time range and query again. | Check the resourceUUID and doc_time of the single source record to reduce irrelevant data matches. |
| 429 | ft.KodoServerOverloaded | The data query service for viewer sources is busy | The current request rate is too high. Please try again later. | Retry after backoff, and first confirm whether the Issue has been created. |