Modify¶
POST /api/v1/notify_object/modify
Overview¶
Modify the notification objects and notification configurations in a Workspace.
Prerequisites and Usage Steps¶
Select type and optSet according to the notification method. mailGroup/sms/vms use member or team UUIDs; for bots, obtain the webhook from the platform; HTTP callbacks use url. A successful save only means that the notification configuration has been stored; it does not mean that the bot or HTTP receiver has received a notification. Example addresses must be replaced with actual usable addresses. Top-level fields omitted except notifyObjectUUID are retained; for standard types, optSet is replaced as a whole, so read the old configuration first and merge the required fields. For Jira/ServiceNow, you must provide the webhook, authentication method, and non-secret identity fields again. Secret values that are omitted or empty may be retained only when the address, authentication method, basic username, or API Key header name is the same; if the identity changes, new credentials must be provided. If headers are omitted with the same identity, they are retained; {} clears them. Do not treat masked empty values returned on read as new credentials. type cannot be modified.
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 provide: Obtain an OpenAPI Key with the required operation permissions from API Key Management in the target Workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| permissionSet[*] | string | A single role, member, or team identifier string; * means object-level operation restrictions are lifted, but API authentication is still required. Example: wsAdminHow to obtain or provide: For members, use the account UUID from the Workspace Member List; for teams, use the group_ UUID from the Member Group List; for roles, use the role UUID or an existing role identifier from the Role List (for example, wsAdmin). Do not enter display names. |
|
| optSet.webhook | string | Callback URL used by bots, Slack, Teams, Google Chat, Jira, and ServiceNow. For Jira/ServiceNow, it must be a valid HTTPS URL and cannot contain URL user credentials, fragments, or whitespace. The address is subject to the site's DNS resolution and intranet policies. Example: https://hooks.example.com/notifyHow to obtain or provide: Obtain the callback URL from the bot, Workflow, Jira, or ServiceNow integration configuration on the target platform. |
|
| optSet.secret | string | Optional signing secret for dingTalkRobot/feishuRobot; required for Jira when auth_type=secret. Jira updates with the same identity may omit it to retain the existing secret; other bots that replace optSet must provide it again. Example: <robot-or-jira-secret>How to obtain or provide: Obtain it from the DingTalk/Lark bot's signing configuration, or configure it according to the Jira receiver's convention. |
|
| optSet.url | string | Required non-empty callback URL for HTTPRequest/simpleHTTPRequest; subject to DNS resolution and intranet policies. Example: https://receiver.example.com/alertsHow to obtain or provide: Prepare the actual service address that can receive alert HTTP requests. |
|
| optSet.to | array<string> |
Array of receiving member/team UUIDs for mailGroup, sms, and vms. The corresponding email address or mobile number must be configured in the member profile; this is not an array of arbitrary email address/mobile number strings. Example: ["acnt_example"]How to obtain or provide: Obtain UUIDs from the member list or member group list. |
|
| optSet.to[*] | string | A single member or team UUID. Example: acnt_exampleHow to obtain or provide: Copy the member/team UUID from the Workspace Member List or Member Group List. |
|
| optSet.refMembers | array<string> |
Both HTTPRequest/simpleHTTPRequest accept and validate a string array, but currently only HTTPRequest actually expands it to refMembersInfo for content parsing; simpleHTTPRequest does not perform this expansion. Example: ["acnt_example"]How to obtain or provide: Select the member/team UUIDs to associate from the Workspace Member List or Member Group List. |
|
| optSet.refMembers[*] | string | Associated member or team UUID string. Example: acnt_exampleHow to obtain or provide: Copy the account/team UUID from the Workspace Member List or Member Group List. |
|
| optSet.headersConfig | object | Custom request header configuration. Different from Jira/ServiceNow headers. The read API restores its sensitive values; handle the returned data carefully before saving. Example: {"isOpen": true, "items": [{"key": "X-Notify-Source", "value": "guance", "isSensitive": false}]}How to obtain or provide: Fill it in according to the HTTP receiving service's convention; applicable only to HTTPRequest/simpleHTTPRequest. |
|
| optSet.headersConfig.isOpen | boolean | When the configuration is present, a boolean value is required; custom headers are sent only when true. Example: trueHow to obtain or provide: Use true to enable custom request headers and false to disable them. |
|
| optSet.headersConfig.items | array<object> |
When the configuration is present, an array is required, with a maximum of 50 items; items are validated even when isOpen=false. Example: [{"key": "X-Notify-Source", "value": "guance", "isSensitive": false}]How to obtain or provide: Fill in the request header list as required by the receiver; pass [] when not needed. |
|
| optSet.headersConfig.items[*] | object | A single custom request header object. Example: {"key": "X-Notify-Source", "value": "guance", "isSensitive": false}How to obtain or provide: Use the three fields key/value/isSensitive for each header. |
|
| optSet.headersConfig.items[*].key | string | Non-empty string; after trimming leading and trailing spaces, up to 256 characters; duplicates are removed case-insensitively. Example: X-Notify-SourceHow to obtain or provide: Use the HTTP header name specified by the receiver. |
|
| optSet.headersConfig.items[*].value | string | Non-empty string, up to 4096 characters. Example: guanceHow to obtain or provide: Enter the value required by the receiver; obtain credentials only from controlled configuration. |
|
| optSet.headersConfig.items[*].isSensitive | boolean | Required boolean; values with true are encrypted when saved, and details and lists restore the original values. Example: falseHow to obtain or provide: Use true for credentials or other sensitive values. |
|
| optSet.bodyTemplate | string | Only HTTPRequest supports a custom request body template; the string can be up to 5120 characters; an empty string or null means not configured, and whitespace-only values do not enable it. Saving validates only the type and length, not template syntax or variables; actual sending depends on the site's template capability and must be verified with an actual alert. simpleHTTPRequest does not support a non-empty template. Example: {"title":"告警通知"}How to obtain or provide: Provide a text template according to the HTTP receiver's convention, and verify placeholders and content format with an actual alert first. |
|
| optSet.token | string | Required and non-empty for telegramBot; authentication credential for Jira/ServiceNow auth_type=bearer. Example: <telegram-or-bearer-token>How to obtain or provide: telegramBot uses the Token created in Bot Management; Jira/ServiceNow bearer uses the Token assigned by the receiver. |
|
| optSet.chat_id | string | Required target chat ID string for telegramBot. Example: -1000000000000How to obtain or provide: Confirm the chat_id from the target Telegram chat and submit it as a string. |
|
| optSet.message_thread_id | string | Optional topic ID for telegramBot; a string when present. Example: 123How to obtain or provide: Obtain it from the target topic when a Telegram forum topic is required. |
|
| optSet.auth_type | string or null | Jira/ServiceNow only: null does not generate a separate authentication header; basic, bearer, and api_key are all supported; secret is supported only by Jira. If omitted, Jira defaults to secret and ServiceNow defaults to basic. Example: bearerHow to obtain or provide: Select the authentication method supported by the Jira or ServiceNow receiver. |
|
| optSet.username | string | Jira/ServiceNow basic authentication username; non-empty and cannot contain colons or line breaks. Example: notify-integrationHow to obtain or provide: Obtain it from the receiver's integration account. |
|
| optSet.password | string | Jira/ServiceNow basic authentication password; non-empty and must not contain line breaks; omit on update with the same identity to retain it. Example: <integration-password>How to obtain or provide: Obtain it from the receiver's integration account. |
|
| optSet.api_key_header | string | Jira/ServiceNow api_key authentication header name; cannot be Content-Type. Example: X-API-KeyHow to obtain or provide: Select a valid HTTP header name according to the receiver's convention. |
|
| optSet.api_key | string | Jira/ServiceNow api_key authentication credential; non-empty and must not contain line breaks. Example: <integration-api-key>How to obtain or provide: Generate or obtain an API Key from the receiver. |
|
| optSet.headers | object | Jira/ServiceNow only. Header names must be valid and unique case-insensitively, and values must not contain line breaks; Content-Type can only be application/json. On update with the same identity, omit to retain existing headers; {} clears them; values are masked as empty strings on read. Example: {"X-Source": "guance"}How to obtain or provide: Provide custom headers as required by the Jira/ServiceNow receiver, with header names as keys and string values. |
|
| optSet.headers.Dynamic key | string | String value of the custom header. On update, an empty value with the same name can retain the old value for the same identity; new headers cannot have empty values. Example: guanceHow to obtain or provide: Use the actual header name required by the target platform, such as X-Source. |
|
| notifyObjectUUID | string | Y | UUID of the target notification object. Allowed null: False Example: notify_exampleHow to obtain or provide: Copy the notification object UUID for the current Workspace from content.data[].uuid returned by the Notification Object List. |
| name | string | Notification object name. Jira/ServiceNow require it to be non-empty after trimming whitespace and no longer than 200 characters; other types are recommended to use a non-empty recognizable name. Allowed null: False Example: 生产回调How to obtain or provide: Search the Notification Object List to exclude duplicate names before filling it in. |
|
| optSet | json | Provide a complete JSON object according to the notification type. It should be provided explicitly on creation; for standard types, modification replaces it as a whole; Jira/ServiceNow retains credentials according to the same-identity rule. Allowed null: False Example: {"url": "https://receiver.example.com/alerts"}How to obtain or provide: Select the corresponding configuration in the table below according to type, and obtain actual values from the receiving platform or member list. |
|
| openPermissionSet | boolean | Whether to enable custom operation permissions. Defaults to false on creation; if omitted on modification, the existing value is retained. The creator and Owner, as well as subjects matching advanced configurations, may be allowed separately. Allowed null: False Example: falseHow to obtain or provide: Inherit API permissions by default; to apply object-level restrictions, set to true and configure permissionSet. |
|
| permissionSet | array | Complete array of custom operable subjects; replaced as a whole on modification; [] clears it. The special value * allows all identities that pass API authentication to pass this object-level check; it does not mean anonymous access is open. Allowed null: False Example: ["wsAdmin"]How to obtain or provide: For members, use the account UUID from the Workspace Member List; for teams, use the group_ UUID from the Member Group List; for roles, use the role UUID or an existing role identifier from the Role List (for example, wsAdmin). Do not enter display names. |
Additional Parameter Notes¶
For Jira/ServiceNow, the original password, API Key, Token, and custom header values are not returned; use has* and credentialsRequired to determine whether they are configured. Other traditional bot and HTTP configurations may return their original sensitive values. Do not forward the complete response content to third parties.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/notify_object/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"notifyObjectUUID":"notify_example","name":"生产回调-更新"}'
Response¶
HTTP 200, application/json. The example below shows the primary fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | object | Saved notification object record; does not include the account summary and permission determination from the list/detail views. |
| content.id | integer | Database ID; use uuid for subsequent operations. |
| content.uuid | string | Notification object UUID. |
| content.workspaceUUID | string | UUID of the Workspace to which it belongs. |
| content.name | string | Notification object name. |
| content.type | string | Notification type. Legacy Jira/ServiceNow storage aliases are normalized to jiraWebhook/serviceNowWebhook. |
| content.optSet | object | Notification configuration corresponding to type. See below for specific fields; unconfigured fields may be omitted. |
| content.openPermissionSet | boolean | Whether custom operation permissions are enabled for this object. |
| content.permissionSet | array<string> |
Array of role, member, or team identifiers allowed to operate the object. |
| content.permissionSet[] | string | Single permission subject identifier. |
| content.autoDisableAt | integer | Auto-disable time in Unix seconds; -1 if not auto-disabled. |
| content.status | integer | Record status: 0 enabled, 2 disabled; 3 deleted is not returned by this query. |
| content.creator | string | Creator identity. |
| content.updator | string | Identity of the most recent update; empty if never updated. |
| content.createAt | integer | Creation time in Unix seconds. |
| content.updateAt | integer | Update time in Unix seconds; -1 if never updated. |
| content.deleteAt | integer | Deletion time in Unix seconds; -1 if not deleted. |
| content.optSet.webhook | string | Callback URL used by bots, Slack, Teams, Google Chat, Jira, and ServiceNow. For Jira/ServiceNow, it must be a valid HTTPS URL and cannot contain URL user credentials, fragments, or whitespace. The address is subject to the site's DNS resolution and intranet policies. |
| content.optSet.secret | string | DingTalk/Lark and other bots may return the original signing secret; Jira does not return the original secret and uses the hasSecret flag instead. |
| content.optSet.url | string | Required non-empty callback URL for HTTPRequest/simpleHTTPRequest; subject to DNS resolution and intranet policies. |
| content.optSet.to | array<string> |
Array of receiving member/team UUIDs for mailGroup, sms, and vms. The corresponding email address or mobile number must be configured in the member profile; this is not an array of arbitrary email address/mobile number strings. |
| content.optSet.to[] | string | A single member or team UUID. |
| content.optSet.refMembers | array<string> |
Both HTTPRequest/simpleHTTPRequest accept and validate a string array, but currently only HTTPRequest actually expands it to refMembersInfo for content parsing; simpleHTTPRequest does not perform this expansion. |
| content.optSet.refMembers[] | string | Associated member or team UUID string. |
| content.optSet.headersConfig | object | Custom request header configuration. Different from Jira/ServiceNow headers. The read API restores its sensitive values; handle the returned data carefully before saving. |
| content.optSet.headersConfig.isOpen | boolean | When the configuration is present, a boolean value is required; custom headers are sent only when true. |
| content.optSet.headersConfig.items | array<object> |
When the configuration is present, an array is required, with a maximum of 50 items; items are validated even when isOpen=false. |
| content.optSet.headersConfig.items[] | object | A single custom request header object. |
| content.optSet.headersConfig.items[].key | string | Non-empty string; after trimming leading and trailing spaces, up to 256 characters; duplicates are removed case-insensitively. |
| content.optSet.headersConfig.items[].value | string | Non-empty string, up to 4096 characters. |
| content.optSet.headersConfig.items[].isSensitive | boolean | Required boolean; values with true are encrypted when saved, and details and lists restore the original values. |
| content.optSet.bodyTemplate | string | Only HTTPRequest supports a custom request body template; the string can be up to 5120 characters; an empty string or null means not configured, and whitespace-only values do not enable it. Saving validates only the type and length, not template syntax or variables; actual sending depends on the site's template capability and must be verified with an actual alert. simpleHTTPRequest does not support a non-empty template. |
| content.optSet.token | string | telegramBot returns the configured Bot Token; Jira/ServiceNow do not return bearer credentials and use the hasToken flag. |
| content.optSet.chat_id | string | Required target chat ID string for telegramBot. |
| content.optSet.message_thread_id | string | Optional topic ID for telegramBot; a string when present. |
| content.optSet.auth_type | string or null | Jira/ServiceNow only: null does not generate a separate authentication header; basic, bearer, and api_key are all supported; secret is supported only by Jira. If omitted, Jira defaults to secret and ServiceNow defaults to basic. |
| content.optSet.username | string | Jira/ServiceNow basic authentication username; non-empty and cannot contain colons or line breaks. |
| content.optSet.api_key_header | string | Jira/ServiceNow api_key authentication header name; cannot be Content-Type. |
| content.optSet.headers | object | Jira/ServiceNow only. Header names must be valid and unique case-insensitively, and values must not contain line breaks; Content-Type can only be application/json. On update with the same identity, omit to retain original headers; {} clears them; values are masked as empty strings on read. |
| content.optSet.headers.Dynamic key | string | String value of the custom header. On update, an empty value with the same name can retain the old value for the same identity; new headers cannot have empty values. |
| content.optSet.hasSecret | boolean | Jira secret mode only; whether a signing secret has been configured. |
| content.optSet.hasPassword | boolean | Jira/ServiceNow basic mode only; whether a password has been configured. |
| content.optSet.hasToken | boolean | Jira/ServiceNow bearer mode only; whether a Token has been configured. |
| content.optSet.hasApiKey | boolean | Jira/ServiceNow api_key mode only; whether a Key has been configured. |
| content.optSet.hasHeaderValues | object | Jira/ServiceNow only; marks whether a non-empty value has been saved for each returned header. |
| content.optSet.hasHeaderValues.Dynamic key | boolean | Configuration status corresponding to the header name. |
| content.optSet.deliveryStatus | string | Jira/ServiceNow configuration display identifier, currently configured; does not indicate actual delivery success. |
| content.optSet.credentialsRequired | boolean | Whether Jira/ServiceNow still lacks credentials or header values required by the current authentication method. |
| content.declaration | object or null | Workspace public declaration. |
{
"code": 200,
"content": {
"id": 42,
"uuid": "notify_example",
"workspaceUUID": "wksp_example",
"name": "生产回调",
"type": "HTTPRequest",
"optSet": {
"url": "https://receiver.example.com/alerts"
},
"openPermissionSet": false,
"permissionSet": [],
"autoDisableAt": -1,
"status": 0,
"creator": "wsak_example",
"updator": "wsak_example",
"createAt": 1785427200,
"updateAt": 1785427260,
"deleteAt": -1,
"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 | Request field is missing, or the field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Request JSON syntax is invalid | Request JSON format error | Correct the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | JSON top level is not an object | Partial JSON file format error | Submit a single JSON object. |
| 400 | ft.NofityObjectNameRepeat | An active or disabled notification object with the same name already exists in the same Workspace | A notification object with the same name already exists | Search existing names first and use an unused name. |
| 406 | ft.InvalidParameter | Jira/ServiceNow name, address, authentication mode, credentials, or request headers do not comply with the rules | Parameter {} is invalid |
Correct the fields indicated by the error according to the parameter table; do not return read-only has* flags in place of secret values. |
| 406 | ft.InvalidType | Notification type is unsupported or null | Invalid type | Use a non-empty type from the creation parameter enumeration; do not create with trigger or legacy aliases. |
| 406 | ft.InvalidAddress | Callback domain cannot be resolved | Domain {} cannot be resolved |
Use a resolvable target callback domain and confirm the site DNS. |
| 406 | ft.IntranetError | Callback address matches the site's intranet restriction | Intranet addresses are not allowed | Use a callback target allowed by the site, or have the administrator confirm the address policy. |
| 500 | ft.InternalServerError | Configuration fields are missing or have invalid types, or database or cache processing fails | Internal error | Check the configuration for the corresponding notification type on this page and record the traceId. After a write operation fails, query whether the target has been saved before retrying. |
| 404 | ft.NotFound | Modification target does not exist, has been deleted, or is not in the current Workspace | Business route not found | Obtain a valid UUID from the Notification Object List. |
| 403 | ft.ForbiddenNotifyObjOperation | The target has custom permissions enabled, and the current identity is not in the operable scope | You do not have permission to operate notification object [{}] | An identity with management permissions should check the object's permissionSet and the Workspace's advanced permission configuration. |