Create Auto Discovery Configuration¶
POST /api/v1/issue_auto_discovery/add
Overview¶
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
name | string | Y | Title Name Example: name Allow Null: False Maximum Length: 256 |
description | string | Description Example: description Allow Null: False Allow Empty String: True |
|
dqlNamespace | string | Y | Data Scope Example: rum Allow Null: False Optional Values: ['keyevent'] |
every | integer | Y | Check Frequency (time length in seconds) Example: 300 Allow Null: False $minValue: 300 $maxValue: 3600 Optional Values: [300, 600, 900, 1800, 3600] |
conditions | string | Content within curly braces in DQL query filter conditions Example: source IN ['kube-controller'] Allow Null: False Allow Empty String: True |
|
dimensions | array | List of Dimension Fields Example: ['chan_xxx1', 'chan_xxx2'] Allow Null: False $minLength: 1 |
|
config | json | Y | Issue Definition Configuration Example: {} Allow Null: False |
config.name | string | Y | Title Name Example: name Allow Null: False Maximum Length: 256 |
config.level | string | Level Example: level Allow Null: False Allow Empty String: True |
|
config.channelUUIDs | array | List of Channel UUIDs Example: ['chan_xxx1', 'chan_xxx2'] Allow Null: False |
|
config.description | string | Description Example: description Allow Null: False |
|
config.extend | json | Additional Extended Information. Refer to the extend field in issue creation; generally not recommended to set via OpenAPI. Example: {} Allow Null: True |
Additional Parameter Notes¶
Request Example¶
curl 'https://openapi.guance.com/api/v1/issue_auto_discovery/add' \
-H 'Content-Type: application/json' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"name":"test-core-worker","description":"This is an example for creating a new issue auto discovery rule","every":300,"dqlNamespace":"keyevent","conditions":"`source` = \"lwctest\"","dimensions":["name"],"config":{"name":"Title in issue definition","description":"Description information in issue definition","level":"system_level_0","extend":{"manager":["acnt_e52a5a7b6418464cb2acbeaa199e7fd1"]},"channelUUIDs":["chan_61367ab1e38744738eb0a219dbf8bac1"]}}' \
--insecure
Response¶
{"code":200,"content":{"conditions":"`source` = \\"lwctest\\"","config":{"channelUUIDs":["chan_xxx"],"description":"Description information in issue definition","extend":{"manager":["acnt_xxx"]},"level":"system_level_0","name":"Title in issue definition"},"createAt":1735893173,"creator":"wsak_xxxx","declaration":{"asd":"aa,bb,cc,1,True","asdasd":"dawdawd","business":"aaa","dd":"dd","fawf":"afawf","organization":"64fe7b4062f74d0007b46676"},"deleteAt":-1,"description":"This is an example for creating a new issue auto discovery rule","dimensions":["name"],"dqlNamespace":"keyevent","every":300,"id":null,"name":"test-core-worker","status":0,"updateAt":null,"updator":null,"uuid":"iatdc_xxxx","workspaceUUID":"wksp_xxxx"},"errorCode":"","message":"","success":true,"traceId":"4483644685680847012"}