Skip to content

Delete Incident Notification Schedule



POST /api/v1/incidents/schedule/delete

Overview

Soft-delete incident On-Call schedules and their historical configurations in batches.

Prerequisites and Usage Steps

The current key requires incidents.incidentsSchedule. Only undeleted matching schedules in the current workspace are considered; unknown, cross-workspace, and deleted items are ignored; [] with no targets still returns true, with no per-item results. Any matched default schedule with isDefault=true causes a 400 rejection; check default items first, and do not treat the batch request as automatically skipping default items.

Soft-deletes matched schedules and their historical update records, and does not delete existing incidents, notification targets, teams, or members; this method does not also clean up temporary substitute On-Call entities, and a success response must not be used to claim that all substitute On-Call data has been physically deleted. After submission, removals from the incident matching queue are delivered one by one; if delivery fails, a 500 may be returned even though the soft deletion has already occurred. Verify against the list first, then retry. After deletion, there is no public recovery API; back up configurations in advance. Re-creation will generate a new UUID; notifications already sent will not be withdrawn.

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 permission for this operation from API Key management in the target workspace.

Body Request Parameters

Parameter Type Required Description
scheduleUUIDs[*] string A schedule UUID string, not a policy/incident/substitute On-Call UUID; individual entries are not checked for validity one by one.
Example: incsch_example
How to obtain or fill in: Obtain the incsch_ UUID from content.data[].uuid in normal management mode in the On-Call List.
scheduleUUIDs array Y Required UUID array; [] matches nothing; only undeleted matching items in the current workspace are considered, and default schedules cannot be deleted.
Allows null: False
Example: ["incsch_example"]
How to obtain or fill in: Obtain the incsch_ UUID from content.data[].uuid in normal management mode in the On-Call List.

Additional Parameter Notes

The request is subject to the public parameters on this page. start/end within a day use HH:MM, and validity periods and substitute On-Call times are in Unix seconds; see below for complete fields, value sources, response branches, and failure handling.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/incidents/schedule/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"scheduleUUIDs":["incsch_example"]}'

Response

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

Field Type Description
content boolean true on success, including when nothing matches; there is no match count or declared object.
{
  "code": 200,
  "content": true,
  "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
406 ft.ParameterValidationFailed Request fields are missing, or field values violate the declared validation conditions Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The top level of the request JSON is not an object Some JSON file format error Submit a scheduleUUIDs array object.
400 ft.DefaultIncidentScheduleCannotDelete Matched items include a default schedule with isDefault=true Default incident On-Call cannot be deleted Exclude default schedules and check the list first; do not force deletion of default configurations.
500 ft.InternalServerError Unhandled exceptions such as database/tag lock cache, notification substructure, invalid time zone, or post-submission queue delivery Internal error First read back the actual status of the schedule/tag; the main record may already have been committed, and even if the queue has not converged, do not create it again. Keep the traceId for handling, and back up the complete configuration before making changes.

Feedback

Is this page helpful?