Skip to content

Create a Channel



POST /api/v1/channel/add

Overview

Body Request Parameters

Parameter Name Type Required Description
name string Y Channel name
Example: Channel 1
Allow null: False
Maximum length: 256
description string N Channel description
Example: CUSTOM
Allow null: False
Allow empty string: True
Maximum length: 256
notifyTarget array N List of notification target UUIDs
Example: []
Allow null: False
notifyUpgradeCfg json N Rule configuration
Allow null: False
notifyUpgradeCfg.triggerTime integer Y After how many seconds to trigger an upgrade notification, unit is seconds
Example: simpleCheck
Allow null: False
notifyUpgradeCfg.notifyTarget array Y List of upgrade notification target UUIDs
Example: []
Allow null: False

Additional Parameter Notes

Request Example

curl 'https://openapi.guance.com/api/v1/channel/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"aaada"}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "createAt": 1686396907,
        "creator": "acnt_xxxx32",
        "deleteAt": -1,
        "description": "",
        "id": null,
        "name": "aaaa",
        "notifyTarget": [],
        "status": 0,
        "updateAt": 1686396907,
        "updator": "acnt_xxxx32",
        "uuid": "chan_xxxx32",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "8625720404757178607"
} 

Feedback

Is this page helpful? ×