Skip to content

Enable/Disable



POST /api/v1/checker/set_disable

Overview

Batch enable or disable Monitors and their existing schedules.

Before You Begin and Usage Steps

Verify the current status, operation permissions, and post-schedule enable/disable state of each rule. The server synchronously updates the rules and the existing primary/secondary/cross-workspace schedule switches; it does not recreate or backfill tasks. An empty array or all unmatched items may still return true, with no per-item results. Self-built inspections do not have periodic schedules created by this API; their actual execution is controlled by the business integration side. The current shared enable path does not re-check the latest authorization for each historical cross-workspace schedule. A successful enable does not guarantee that source data is queryable; actual acceptance testing is required. Asynchronous reference jobs do not update SLO calculations during enable/disable.

Each target is individually checked for custom operation permissions, and API Key interface permissions are still required. The scheduling service, database commits, reference cleanup, and asynchronous dispatch are not cross-service atomic transactions. On exceptions, some state/schedule updates may already have occurred. Read back the configuration and current schedule state before retrying, and do not base acceptance solely on HTTP 200.

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 this operation permission from API Key Management in the target Workspace.

Body Request Parameters

Parameter Type Required Description
ruleUUIDs[*] string Not group, history, SLO, or generated metrics UUIDs.
Example: rul_checker_example
How to obtain or enter: A single Monitor UUID operable in the current Workspace.
isDisable boolean Y Required Boolean; sets status=2/0 respectively; does not restore deleted rules; enabling does not recreate lost schedules.
Null allowed: False
Example: true
How to obtain or enter: true to disable, false to enable.
ruleUUIDs array Y Required array; non-empty is recommended. These shared methods do not additionally restrict the Monitor category; do not mix in other Rule resource UUIDs just because they have the rul_ prefix.
Null allowed: False
Example: ["rul_checker_example"]
How to obtain or enter: Obtain the UUID for the current Workspace from the Monitor list item by item according to the target type.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/checker/set_disable' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"ruleUUIDs":["rul_checker_example"],"isDisable":true}'

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; it is not the per-item hit count or a downstream execution acceptance result.
{
  "code": 200,
  "content": true,
  "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 Handling
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 Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The top level of the JSON Body is not an object, such as an array/string Partial JSON file format error Submit a JSON object as shown in the example; do not directly submit checkers or event arrays.
403 ft.ForbiddenCheckerOperation No operation permission for the target regular Monitor You do not have operation permission for Monitor [{}] Use the owner or an operation principal allowed by the rule, and check the API Key permissions.
403 ft.ForbiddenSmartCheckerOperation No operation permission for the target Smart Monitoring/AI Monitor You do not have operation permission for Smart Monitoring [{}] Check the rule's permissionSet and operation identity.
400 ft.OuterFuncFailed Batch schedule enable/disable/delete returns an explicit business failure External function call failed Check the schedule and rule status, then retry and provide the traceId.
500 ft.InternalServerError Uncaught exceptions such as scheduling connection/timeout/invalid JSON, storage, reference, or post-commit asynchronous dispatch failures Internal error First read the current state of each object and schedule, confirm the completed steps, then retry as appropriate and provide the traceId.

Feedback

Is this page helpful?