Skip to content

Modify



POST /api/v1/notice/date/{notice_date_uuid}/modify

Overview

Modify a custom notification date configuration and replace the date collection as a whole.

Before Calling and Usage Steps

The modification must submit name, and noticeDates replaces the complete target collection as a whole; omitting noticeDates clears the original collection. To retain the original dates, you must first query the details and then submit them in full. The modification clears the Alert Policy execution cache in the current Workspace, and windows that use this date collection are subsequently updated with the new values. Each configuration can contain up to 366 entries; duplicate dates are stored as-is and count toward the limit. The server only validates the YYYY/MM/DD text format; non-existent dates such as 2026/02/30 may also be saved, so the client must verify against the actual calendar. This resource only stores a date collection and does not include the start time of the day, duration, or time zone. When using it, reference this resource UUID in the Alert Policy alertOpt.alertTarget[].customDateUUIDs, and set customStartTime/customDuration together; for specific rules, see the Alert Policy parameters page. There are known limitations in reading the current alert execution time zone; verify the actual time zone according to the Alert Policy page.

Path Parameters

Parameter Name Type Required Description
notice_date_uuid string Y UUID of the custom notification date configuration in this Workspace, starting with ndate_; it is not a date string or Alert Policy UUID.
Empty string allowed: False
Example: ndate_example
How to obtain or fill in: Obtain it from content.data[].uuid in the Custom Notification Dates list or from content.uuid in the create response.

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 fill in: Obtain an OpenAPI Key with permission for this operation from API Key management in the target Workspace.

Body Request Parameters

Parameter Name Type Required Description
noticeDates[*] string A single date string, YYYY/MM/DD. The server only checks the format regex and does not fully validate leap years, number of days in a month, etc.; a successful save cannot be used to confirm that the date is actually valid.
Example: 2026/11/20
How to obtain or fill in: Generate a four-digit year/two-digit month/two-digit day from the business calendar, for example 2026/11/20. The client must confirm real calendar validity.
name string Y Required name; the declaration specifies a maximum of 256 characters. The current storage field capacity is shorter, so it is recommended not to exceed 64 characters to reduce save failures.
Null allowed: False
Maximum length: 256
Example: 生产维护日
How to obtain or fill in: After checking existing names in this Workspace from the Custom Notification Dates list, name it yourself.
noticeDates array Optional complete date string array, up to 366 entries (duplicates also count). Omitting it on create saves []; omitting it or passing [] on modify clears the original date collection.
Null allowed: False
Example: ["2026/11/20", "2026/11/27"]
How to obtain or fill in: Select real dates according to the business maintenance/notification calendar and fill them in as YYYY/MM/DD strings; no timestamp conversion is required.

Additional Parameter Notes

The date configuration does not specify a time zone, start time, or duration in seconds; these are controlled by the Alert Policy action that references it. A successful save does not immediately send a notification. After a request fails, first check whether it has been saved, and then decide whether to retry.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/notice/date/ndate_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"生产维护日","noticeDates":["2026/11/20","2026/11/27"]}'

Response

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

Field Type Description
content.id integer ID of the saved date configuration record; operations use uuid.
content.uuid string Date configuration UUID, referenced by Alert Policy customDateUUIDs.
content.workspaceUUID string UUID of the Workspace it belongs to.
content.name string Configuration name.
content.dates array<string> Saved date array; the request field name is noticeDates, and the response field name is dates.
content.dates[] string A single YYYY/MM/DD date string.
content.status integer Record status: 0 normal, 3 deleted.
content.creator string Creator identity.
content.updator string Identity of the last updater; empty string if not yet updated.
content.createAt integer Creation time, Unix seconds.
content.updateAt integer Update time, Unix seconds; -1 if not yet updated.
content.deleteAt integer Deletion time, Unix seconds; -1 if not deleted.
content.declaration object or null Workspace common declaration.
{
  "code": 200,
  "content": {
    "id": 42,
    "uuid": "ndate_example",
    "workspaceUUID": "wksp_example",
    "name": "生产维护日",
    "dates": [
      "2026/11/20",
      "2026/11/27"
    ],
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785430800,
    "updateAt": 1785430860,
    "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 Handling
404 ft.ObjectNotExists The date configuration does not exist, has been deleted, or does not belong to the current Workspace The specified object does not exist Obtain a valid uuid again from the Custom Notification Dates list.
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 Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object Partial JSON file format error Submit a single JSON object.
400 ft.NoticeDateNameRepeat A date configuration with the same name that has not been deleted exists in the current Workspace Custom date configuration name duplicate Choose another name; after a timeout, first check whether it has already been created.
400 ft.InvalidNoticeDate The date string format in noticeDates does not conform to YYYY/MM/DD Invalid date format Use a four-digit year, two-digit month/day, and forward slashes, and confirm calendar validity yourself.
406 ft.CountExceedLimit The noticeDates array exceeds 366 entries The number of {} exceeds the maximum limit of {} Keep each configuration within 366 entries, and remove unnecessary duplicate dates first.
500 ft.InternalServerError A date array element is not a string, or an internal failure such as saving/cache processing occurs Internal error Correct the type and name length according to the parameter table; first check the currently saved configuration, then decide whether to retry. If it continues to fail, provide the traceId.

Feedback

Is this page helpful?