Skip to content

Create Pipeline Rule



POST /api/v1/pipeline/add

Overview

Create a Pipeline

When the category type is profiling, the space configuration field CentralPLServiceSwitch (returned by the /workspace/get interface) must be true for this rule to take effect.

Body Request Parameters

Parameter Name Type Required Description
name string Y Pipeline file name
Allow null: False
Maximum length: 256
$notSearchRegExp: [^a-zA-Z0-9_\u4e00-\u9fa5-]+
type string Y Pipeline file type
Allow null: False
Optional values: ['local', 'central']
source array Selected source list
Allow null: False
content string Y Pipeline file content (base64 encoded)
Allow null: False
testData string Test data (base64 encoded)
Allow null: False
Allow empty string: True
isForce boolean When default exists for specific types, whether to replace it
Allow null: False
category string Y Category
Allow null: False
Allow empty string: False
Optional values: ['logging', 'object', 'custom_object', 'network', 'tracing', 'rum', 'security', 'keyevent', 'metric', 'profiling', 'dialtesting', 'billing']
asDefault int Whether to set this as the default pipeline for its type, 1 for default, 0 for non-default
Allow null: False
extend json Category
Allow null: False
extend.appID array App ID
Allow null: True
extend.measurement array Source origin
Allow null: True
extend.loggingIndex string Log index
Allow null: True

Additional Parameter Notes

Request Example

curl 'https://openapi.guance.com/api/v1/notes/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"openapi_test","category":"logging","asDefault":0,"content":"YWRkX2tleShjaXR5LCAic2hhbmdoYWkiKQ==","testData":"W10=","source":["nsqlookupd"]}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "asDefault": 0,
        "category": "logging",
        "content": "YWRkX2tleShjaXR5LCAic2hhbmdoYWkiKQ==\n",
        "createAt": 1678026470,
        "creator": "xxxx",
        "deleteAt": -1,
        "extend": {},
        "id": null,
        "isSysTemplate": null,
        "name": "openapi_test",
        "status": 0,
        "testData": "W10=\n",
        "updateAt": 1678026470,
        "updator": "xxxx",
        "uuid": "pl_xxxx32",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-74509B6F-DE3D-4905-AC9F-4FD96ED78EC3"
} 

Feedback

Is this page helpful? ×