Skip to content

Get



GET /api/v1/self_built_checker/get

Overview

Read a saved checker definition by UUID or business refKey.

Before Calling and Usage Steps

Pass at least a non-empty ruleUUID or refKey; if both are provided, ruleUUID takes precedence, and refKey does not participate in the combined matching for this get. This shared read query does not additionally restrict the self-built checker type. Use only the UUID/refKey returned by the list in this module, and verify content.type=self_built_trigger to avoid reading other rules by mistake. It does not include the list's monitorName, alertPolicyInfos, or identity summary.

The API registers/modifies checker metadata and alert policy associations. It does not execute the associated function, produce a checker result, or create a periodic trigger job for the self-built checker; actual scheduling and event generation are handled by the business integration/function side. After success, use the list/get endpoint to verify the configuration and status.

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 the required permissions from API Key Management in the target workspace.

Query Request Parameters

Parameter Type Required Description
ruleUUID string Operation target identifier. For modification, you must first call get to obtain an explicit ruleUUID, especially when changing the policy/title. When both ruleUUID and refKey are passed to get, only ruleUUID is used; when both are passed to modify, both conditions must match. This is not the function funcId or an association key.
Allowed null: False
Example: rul_self_example
How to obtain or enter: Obtain the UUID of a self-built checker in this workspace from content.data[].uuid in the self-built checker list.
refKey string Required when declaring creation; cannot be modified afterward. It is recommended to be non-empty and ≤48 characters. During creation, duplicate checks are performed against the refKey of all non-deleted Rules in this workspace, not only self-built checkers. get can use refKey alone; modify must first call get to obtain ruleUUID before submission, and refKey serves only as an optional verification condition; refKey alone cannot reliably maintain policy references/caches/mute scopes and duplicate-name validation.
Allowed null: False
Example: custom-healthcheck-production
How to obtain or enter: Generate a stable unique key for the function/business integration, for example, a check instance identifier in the same business system.

Request Example

curl --get 'https://openapi.guance.com/api/v1/self_built_checker/get' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-urlencode ruleUUID=rul_self_example

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. It may be null in snapshots before creation submission; use uuid for operations.
content.uuid string Rule UUID with the rul_ prefix.
content.workspaceUUID string Workspace to which it belongs.
content.monitorUUID string Associated monitor group UUID. It is not declared in public creation and is usually an empty string.
content.type string Fixed to self_built_trigger for self-built checkers; get does not additionally restrict the type, so use only UUIDs from the list in this module.
content.refKey string Fixed business association key.
content.secret string or null Compatibility field for shared entities; usually empty for self-built checkers. It may be null in creation snapshots and is not used as a calling credential.
content.jsonScript object Saved self-built checker definition, distinct from Rule.type.
content.jsonScript.type string Fixed to selfBuiltCheck.
content.jsonScript.title string Root business title.
content.jsonScript.name string Optional. It is not generated when title is empty during creation; a non-empty title is copied to name; when title is empty during modification, the historical name is retained.
content.jsonScript.refFuncInfo object Associated function information.
content.jsonScript.refFuncInfo.funcId string Required only during creation and not declared during modification. Server-side registration does not guarantee that the function actually exists or is callable.
content.jsonScript.refFuncInfo.description string Optional string, may be empty; during modification, an explicit empty string clears it.
content.jsonScript.refFuncInfo.definition string Optional signature display string; it is not source code executed by this API.
content.jsonScript.refFuncInfo.category string Optional metadata, not a fixed enumeration, and does not change Rule.type.
content.jsonScript.refFuncInfo.args array Optional array, stored according to the original metadata conventions of the function platform. The server does not perform parameter binding or verify the function signature; during modification, the entire array is replaced.
content.jsonScript.refFuncInfo.kwargs json Optional dynamic JSON metadata; child values are interpreted according to the function definition. It is not the top-level callKwargs parameter available in this API and does not immediately call the function. During modification, the entire kwargs is replaced.
content.jsonScript.refFuncInfo.args[] JSON Metadata for any JSON argument; the server does not provide a unified schema for child items; keep the original definition.
content.jsonScript.refFuncInfo.kwargs.parameterName any Dynamic key-value. There is no required parameter common to all functions; do not pass credentials into examples/logs.
content.jsonScript.callKwargs object Execution parameters that may be saved by historical/other entry points. They are not declared by public create/modify and cannot be returned as new additions.
content.jsonScript.callKwargs.parameterName JSON Specific execution parameters are interpreted according to the original function definition and are not guaranteed to exist.
content.crontabInfo object Periodic trigger configurations for self-built checkers are not created through this entry point and are usually {}.
content.crontabInfo.historicalField JSON Historical records may retain scheduling information; this is not a writable configuration for this API.
content.extend object Extended metadata. It is not declared in the public Body and is usually {} on creation.
content.extend.historicalField JSON Historical extended field; this entry point does not support modifying it via the response.
content.createdWay string Usually manual; it may also be legacy import/template/empty.
content.isLocked integer or boolean Lock flag.
content.openPermissionSet boolean Custom operation permission switch. It is false on creation; when a shared task is updated via modify, it is restored to false.
content.permissionSet array<string> Operation permission subjects. It is [] on creation; shared updates via modify restore it to [].
content.permissionSet[] string Legacy account/team/role identifier.
content.status integer 0 enabled, 2 disabled, 3 deleted; not equal to the latest checker result.
content.creator string Creator identity.
content.updator string Updater identity; may be empty initially.
content.createAt integer Creation Unix seconds.
content.updateAt integer Update Unix seconds; -1 if not updated.
content.deleteAt integer Deletion Unix seconds; -1 if not deleted.
content.declaration object Common declaration.
{
  "code": 200,
  "content": {
    "id": 100,
    "uuid": "rul_self_example",
    "workspaceUUID": "wksp_example",
    "monitorUUID": "",
    "type": "self_built_trigger",
    "refKey": "custom-healthcheck-production",
    "secret": "",
    "jsonScript": {
      "type": "selfBuiltCheck",
      "title": "生产服务健康检查",
      "name": "生产服务健康检查",
      "refFuncInfo": {
        "funcId": "healthcheck.main",
        "description": "生产服务健康检查函数。",
        "definition": "main(service)",
        "category": "custom",
        "args": [
          "service"
        ],
        "kwargs": {
          "service": "production"
        }
      }
    },
    "crontabInfo": {},
    "extend": {},
    "createdWay": "manual",
    "isLocked": 0,
    "openPermissionSet": false,
    "permissionSet": [],
    "status": 0,
    "creator": "wsak_example",
    "updator": "",
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "declaration": {}
  },
  "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 Using an undeclared Query parameter or a parameter that violates the rules Parameter parsing failed Check the Query parameter table and example.
406 ft.CheckerSignUnspecified Both ruleUUID and refKey are empty or not provided Monitor identifier not specified Select an explicit identifier from the list in this module.
404 ft.NotFoundRule No non-deleted rule in this workspace is found by UUID or refKey Business rule not found Refresh the list and obtain the correct identifier.
500 ft.InternalServerError Failed to read/format the rule, reference, or identity information Internal error Verify the workspace and valid identifier, then retry. If the failure persists, provide the traceId.

Feedback

Is this page helpful?