Skip to content

Bind Index



POST /api/v1/log_index_cfg/bind

Overview

Bind an external index.

Body Request Parameters

Parameter Name Type Required Description
extend json Frontend custom data
Allow empty: True
name string Y Index name
Example: xxx
Allow empty: False
desc string Index description
Example: xxx
Allow empty: False
Allow empty string: True
storeType string Y Storage type
Example: xxx
Allow empty: False
exterStoreName string Y The name of the external storage that maps to name (corresponds to StoreName for SLS type, and topic_name for Volcengine TLS)
Allow empty: False
exterStoreProject string The project corresponding to the external storage index (corresponds to StoreProject for SLS type, and project_name for Volcengine TLS)
Allow empty: False
region string Specifies the region of the external resource.
Allow empty: False
isPublicNetworkAccess boolean Whether public network access is allowed. Takes effect when storeType is sls. Default is False (added in the 2024-07-10 iteration).
Allow empty: True
accessCfg json Y External resource access configuration information.
Allow empty: False
accessCfg.ak string Secret Key Id
Allow empty: False
accessCfg.sk string Secret Key
Allow empty: False
accessCfg.url string URL address
Allow empty: False
accessCfg.username string Username
Allow empty: False
accessCfg.password string Password
Allow empty: False
accessCfg.iamProjectName string Volcengine TLS iam_project_name
Allow empty: False
Allow empty string: True
accessCfg.iamProjectDisplayName string Display name for Volcengine TLS iam_project_name
Allow empty: False
Allow empty string: True
accessCfg.projectId string Volcengine TLS project_id
Allow empty: False
Allow empty string: True
accessCfg.topicId string Volcengine TLS topic_id
Allow empty: False
Allow empty string: True
fields array List of field mapping configurations to be updated.
Allow empty: False
fields[*] None
fields[*].field string Y Field name
Example: message
Allow empty: False
fields[*].originalField string Y Original field name
Example: content
Allow empty: False
Allow empty string: True

Parameter Supplementary Notes

Request Example

curl 'https://openapi.truewatch.com/api/v1/log_index_cfg/bind' \
  -H 'Content-Type: application/json' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-raw '{"accessCfg":{"url":"aa.com","password":"test","username":"test"},"exterStoreName":"aa_uuid","fields":[{"field":"time","originalField":"time"},{"field":"__docid","originalField":"__docid"},{"field":"message","originalField":"message"}],"storeType":"es","name":"openapi_test"}' \
  --compressed

Response

{
    "code": 200,
    "content": true,
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-31E0802B-E53A-4D9B-8FD7-57A0CA4C2D66"
}