Skip to content

Create a single data forwarding rule



POST /api/v1/log_backup_cfg/add

Overview

Create a single data forwarding rule

Body Request Parameters

Parameter Name Type Required Description
name string Y Rule name
Example: xxx
Can be empty: False
extend json Frontend custom data
Can be empty: True
syncExtensionField boolean Synchronize backup extension fields, true for synchronization, false for no synchronization, default is no synchronization
Can be empty: False
openPermissionSet boolean Enable custom permission configuration, (default false:not enabled), after enabling the read permission for forwarded data is based on readPermissionSet (added in iteration on 2025-03-26)
Can be empty: False
readPermissionSet array Permission configuration to read data from the data forwarding rule, can configure roles (except the owner) (added in iteration on 2025-03-26)
Example: ['wsAdmin', 'general']
Can be empty: False
storeType string Y Storage type
Can be empty: False
Options: ['guanceObject', 's3', 'obs', 'oss', 'kafka']
dataType string Data type
Can be empty: False
Options: ['logging', 'tracing', 'rum', 'keyevent']
duration string Data retention duration,
Example: 180d
Options: ['180d', '360d', '720d']
accessCfg json External resource access configuration information
Can be empty: False
accessCfg.provider string Provider
Can be empty: False
Options: ['aliyun', 'aws', 'huawei']
accessCfg.grantType string Authorization type
Can be empty: False
Options: ['role', 'ram']
accessCfg.cloudAccountId string Cloud account ID
Can be empty: False
accessCfg.bucket string Bucket
Can be empty: False
accessCfg.externalId string External unique ID (external unique ID in AWS role authorization method)
Can be empty: False
accessCfg.role string Role name
Can be empty: False
accessCfg.ak string Secret key Id
Can be empty: False
accessCfg.sk string Secret key
Can be empty: False
accessCfg.topic string Topic
Can be empty: False
Can be an empty string: True
accessCfg.url string URL address (used for kafka)
Can be empty: False
accessCfg.securityProtocol string Security protocol (used for kafka)
Can be empty: False
Options: ['plaintext', 'sasl_plaintext', 'sasl_ssl']
accessCfg.ca string Client ssl certificate content
Can be empty: False
Can be an empty string: True
accessCfg.mechanism string Authentication method
Can be empty: False
Can be an empty string: True
Options: ['plain', 'scram-sha-256', 'scram-sha-512']
accessCfg.username string Username
Can be empty: False
Can be an empty string: True
accessCfg.password string Password
Can be empty: False
Can be an empty string: True
accessCfg.region string Region (optional values, if not entered then defaults to the corresponding vendor region matching the current site)
Can be empty: False
accessCfg.bucketPath string Bucket path
Can be empty: False

Supplementary Parameter Explanation

Request Example

curl 'https://openapi.guance.com/api/v1/log_backup_cfg/add' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"extend":{"filters":[],"filterLogic":"and"},"syncExtensionField":true,"storeType":"obs","name":"temp_test","dataType":"tracing","accessCfg":{"cloudAccountId":"f000ee4d7327428da2f53a081e7109bd","bucket":"test-obs01-418d","region":"cn-south-1","provider":"huawei"}}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "conditions": "",
        "createAt": 1697613651,
        "creator": "xxx",
        "dataType": "tracing",
        "deleteAt": -1,
        "extend": {
            "filterLogic": "and",
            "filters": []
        },
        "externalResourceAccessCfgUUID": "erac_xxxx32",
        "id": null,
        "name": "temp_test",
        "status": 0,
        "storeType": "obs",
        "syncExtensionField": true,
        "taskErrorCode": "",
        "taskStatusCode": -1,
        "updateAt": 1697613651,
        "updator": "xxx",
        "uuid": "lgbp_xxxx32",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-31D4417B-2665-4CFA-9BC9-60BD6A540744"
} 

Feedback

Is this page helpful? ×