Modify External Log Index Binding Configuration¶
POST /api/v1/external_log_index_cfg/{cfg_uuid}/modify
Overview¶
Modify the existing externally bound index and its access configuration.
Before Calling and Usage Steps¶
First, select the externally bound cfg_uuid from the Log Index list, and read the details to confirm the original storeType, external resource, and field mappings. This API validates against the target's original type and does not accept changing storeType. name/exterStoreName/accessCfg must be provided as complete objects; omitting desc clears it; providing extend replaces the entire object, while omitting it preserves the existing value. If the password/SK is omitted or empty, the system attempts to backfill the old sensitive value; other access keys are not automatically merged, so do not submit only a new URL. Omitting fields preserves the existing mappings; [] or an all-empty mapping also does not clear existing mappings.
SLS requires project/logstore/region and AK/SK; TLS requires project/topic names, region, iamProjectName/projectId/topicId, and AK/SK. ES/OpenSearch/Beaver requires at least the URL, with authentication according to target requirements. For ClickHouse, the database can be provided via the public parameter exterStoreProject, and the time field mapping must be configured; the current public accessCfg does not declare database/port/secure, so internal SDK options cannot be passed directly. It is currently handled with the default native connection capability; confirm availability on the deployment side first. For Beaver conditions, use extend.conditionStr.
Access key fields are submitted as plaintext over HTTPS and are not wrapped using frontend RSA. Binding/modification first saves to the database, then notifies downstream services to refresh and clear caches; if subsequent steps fail, the configuration may already be saved. Before deciding to retry, check the list/details and actual external queries first. Modifying the name notifies deletion of the old name and creation of the new name separately; verify the caller's index name.
Route Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| cfg_uuid | string | Y | UUID of the external binding Log Index configuration, not the index name; default is not supported. Example: lgim_exampleHow to obtain or enter: Obtain from the Log Index list: when unpaginated, use content[].uuid; when paginated, use content.data[].uuid. Select an external binding record with isBindCustomStore=1 in the current Workspace. |
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the Workspace. Example: <DF-API-KEY>How to obtain or enter: Obtain an OpenAPI Key with the required operation permissions from API Key Management in the target Workspace. |
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| extend.conditionStr | string | Beaver condition string; when provided during binding or external modification, it is saved as conditions and does not use the normal index extend.filters generation rules. Example: status=200How to obtain or enter: Only for Beaver, provide it according to the storage's actual filter syntax, and verify it in the target query tool first. |
|
| extend | json | Optional. For external modify, providing it replaces the whole object; omitting it preserves the existing value. Avoid null, as Beaver condition processing may return 500. Null allowed: True Example: {}How to obtain or enter: Additional display configuration for the external index; for Beaver filtering, conditionStr can be used. |
|
| exterStoreName | string | Y | Required external target name, not the local name alias or configuration UUID. It must be fully provided for modification. Null allowed: False Example: app_logsHow to obtain or enter: Obtain the actual resource name from the external console: SLS Logstore, TLS topic_name, ES/OpenSearch index, Beaver target, or ClickHouse table name. |
| name | string | Y | Required local index name, recommended to be within 128 characters, separate from the external storage name. External modification can change this local name. Null allowed: False Example: external_app_logsHow to obtain or enter: Use a unique alias for the binding index in this Workspace; check the Log Index list first. |
| desc | string | Optional description; if omitted during binding, it is empty, and if omitted during external modification, it is also cleared. Recommended to be within 1024 characters. Null allowed: False Empty string allowed: True Example: 外部应用日志。How to obtain or enter: Describe the external data source. |
|
| exterStoreProject | string | Conditionally required for SLS/TLS, and required as the database source for ClickHouse. For regular external modification, omitting it preserves some old values, but SLS/TLS validation still requires a complete project configuration. Null allowed: False Example: app_projectHow to obtain or enter: SLS project name, TLS project_name, or ClickHouse database name; usually omitted for other types. |
|
| region | string | Conditionally required for SLS/TLS; for ES/OpenSearch/Beaver/ClickHouse bindings, it is normalized to an empty region. Null allowed: False Example: cn-hangzhouHow to obtain or enter: Obtain the actual region code from the target cloud resource console, and ensure it matches the region covered by the AK permissions. |
|
| isPublicNetworkAccess | boolean | Optional. For SLS, the default is false; for ES/OpenSearch/Beaver/ClickHouse bindings, it is saved as true. Avoid null; this is not proof of connection reachability. Null allowed: True Example: falseHow to obtain or enter: For SLS, choose based on the target access network; for a private network, ensure the site can access the target. |
|
| accessCfg | json | Y | Required access object; provide the following fields according to storeType. OpenAPI uses plaintext and transmits over HTTPS, without console RSA wrapping. External modification replaces the complete object; only some sensitive values can be backfilled, so do not submit only the changed fields. Null allowed: False Example: {"url": "https://logs.example.com", "username": "reader", "password": "<EXTERNAL-PASSWORD>"}How to obtain or enter: Obtain an account/AK with minimum query permissions from the external resource administrator; do not use this API's DF-API-KEY as a substitute. |
| accessCfg.cloudAccountId | string | Public field only for external modification; the binding Body does not declare this subfield. For initial binding, use the AK/SK method and do not submit undeclared parameters. Null allowed: False Example: cloud-account-exampleHow to obtain or enter: In SLS scenarios, obtain the cloud account ID that can access the target from authorized cloud account management. |
|
| accessCfg.ak | string | For regular SLS binding, it must be used together with sk; required for TLS. External modification also requires a valid AK. Null allowed: False Example: <EXTERNAL-AK>How to obtain or enter: SLS/TLS resource access key ID, obtained from the corresponding cloud resource authorization. |
|
| accessCfg.sk | string | SLS/TLS secret key. If omitted or an empty string during external modification, the system attempts to retain the old SK; an empty value cannot be used to clear it. Binding must provide it in full. Null allowed: False Example: <EXTERNAL-SK>How to obtain or enter: The secret key paired with ak; do not write the real value into logs or documents. |
|
| accessCfg.url | string | Conditionally required depending on the connection type; the server performs an access test. A valid address alone does not guarantee all subsequent query permissions. Null allowed: False Example: https://logs.example.comHow to obtain or enter: Actual connection address for ES/OpenSearch/Beaver; for ClickHouse, use the connection address provided by the administrator. |
|
| accessCfg.username | string | For ES and similar targets, provide it as required by target authentication; omitting it during external modification does not guarantee retention of the old username, so provide it in full. Null allowed: False Empty string allowed: True Example: readerHow to obtain or enter: The target query account, not a member of this Workspace. |
|
| accessCfg.password | string | If omitted or an empty string during external modification, the system attempts to backfill the old password; this cannot be treated as clearing the password. For targets without a password, it may be omitted during binding according to actual requirements. Null allowed: False Empty string allowed: True Example: <EXTERNAL-PASSWORD>How to obtain or enter: Target account password, transmitted over HTTPS; the example is a placeholder. |
|
| accessCfg.iamProjectName | string | TLS IAM project name, not project_name. TLS requires iamProjectName/projectId/topicId to all be non-empty, and queries validate that topicId belongs to the project. Null allowed: False Empty string allowed: True Example: defaultHow to obtain or enter: Obtain the corresponding resource value from the Volcengine TLS console. |
|
| accessCfg.iamProjectDisplayName | string | TLS IAM project display name, which can be omitted. TLS requires iamProjectName/projectId/topicId to all be non-empty, and queries validate that topicId belongs to the project. Null allowed: False Empty string allowed: True Example: 默认项目How to obtain or enter: Obtain the corresponding resource value from the Volcengine TLS console. |
|
| accessCfg.projectId | string | TLS project ID, corresponding to the exterStoreProject name. TLS requires iamProjectName/projectId/topicId to all be non-empty, and queries validate that topicId belongs to the project. Null allowed: False Empty string allowed: True Example: project-exampleHow to obtain or enter: Obtain the corresponding resource value from the Volcengine TLS console. |
|
| accessCfg.topicId | string | TLS log topic ID, corresponding to the exterStoreName name. TLS requires iamProjectName/projectId/topicId to all be non-empty, and queries validate that topicId belongs to the project. Null allowed: False Empty string allowed: True Example: topic-exampleHow to obtain or enter: Obtain the corresponding resource value from the Volcengine TLS console. |
|
| fields | array | Optional mapping array. field and non-empty originalField must both be unique; items with an empty originalField are ignored. For TLS, when time/__docid/message are missing, they are automatically filled in with the same names; ClickHouse must explicitly map time. During external modification, only a non-empty valid mapping replaces the existing mapping; [] does not clear the old mapping. Null allowed: False Example: [{"field": "time", "originalField": "timestamp"}, {"field": "message", "originalField": "content"}]How to obtain or enter: Select mappings from the target's actual fields to platform query fields; check the existing mapping via details with isShowFields=true. |
|
| fields[*] | object | Mapping object. Example: {"field": "message", "originalField": "content"}How to obtain or enter: One local query field corresponds to one actual external field. |
|
| fields[*].field | string | Conditionally required | Declared as required, must be non-empty and unique. Null allowed: False Example: messageHow to obtain or enter: Common platform fields time/__docid/message or other keys that need mapping. |
| fields[*].originalField | string | Conditionally required | Declared as required; an empty string can be passed, but the item will be ignored and does not mean deleting the old mapping. Null allowed: False Empty string allowed: True Example: contentHow to obtain or enter: Actual field name in external storage; for example, content is mapped to message. |
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/external_log_index_cfg/lgim_example/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"external_app_logs","desc":"外部应用日志。","exterStoreName":"app_logs","accessCfg":{"url":"https://logs.example.com","username":"reader","password":"<EXTERNAL-PASSWORD>"},"fields":[{"field":"time","originalField":"timestamp"},{"field":"message","originalField":"content"}]}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | boolean | true on success; credentials or the new configuration are not returned, so read them back via the list/details. |
{
"code": 200,
"content": true,
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Request field is missing, or the field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | JSON top level is not an object, or the policy is not an object | Some JSON files have format errors | Submit an object according to the parameter table; use a JSON object for storagePolicy. |
| 429 | ft.OperationTooFrequently | Concurrent storage write/index relationship operations in the same Workspace, or lock lease expiration | Your operation is too frequent. Please try again later | Wait for in-flight operations to complete, then retry with backoff; check the current state first. |
| 500 | ft.InternalServerError | Database, cache, downstream connection/generic 5xx, or field shape exception | Internal error | First read the configuration and check the actual current storage state. If the failure persists, provide traceId; do not treat the error as unsaved or as allowing direct repeated creation. |
| 406 | ft.InvalidParameterValidation | Required AK/SK/URL values for the corresponding storage are empty | The value of {} is invalid; current value: {} |
Provide the complete corresponding access configuration according to storeType. |
| 406 | ft.DataStoreCfgAkSkOrAccountIdIsMissing | SLS lacks AK/SK and has no available cloud account ID | Storage configuration parameter error: missing ak/sk or missing cloud account ID | For initial public binding, use complete AK/SK; for external modification, a cloud account ID can be used according to the public fields. |
| 406 | ft.DataStoreCfgAkSkIsMissing | TLS lacks AK/SK | Storage configuration parameter error: missing ak/sk | Provide the corresponding secret key. |
| 406 | ft.InvalidTlsIamORProjectORTopic | TLS project/region/topic information is incomplete or topic validation does not match | TLS Iam/project/topic is invalid | Check the names, IDs, and authorization relationships. |
| 400 | ft.CustomStoreLogstoreInvalid | SLS target did not return a valid query mode | Invalid custom cloud resource | Check that the Logstore exists, its type, and authorization. |
| 400 | ft.TestExternalResourceAccessInvalid | Connectivity test for non-SLS/TLS access failed | Test failed. Check whether the configuration information is correct and ensure the network connection is normal | Check the network, address, and target access permissions. |
| 406 | ft.ObjectFieldNameRepeat | field is duplicated | Field {} in the mapping configuration is duplicated |
Configure only one mapping for each target field. |
| 406 | ft.ObjectOriginalFieldNameRepeat | originalField is duplicated | Mapped field {} in the mapping configuration is duplicated |
Use each source field only once. |
| 400 | ft.ForIndexCfgNameExists | An active index with the same name already exists in this Workspace | The specified index configuration name already exists | Choose a unique alias. |
| 400 | ft.LogIndexCfgNameHasUsed | Binding alias conflicts with an internal index name that has been used | The specified index configuration name has already been used | Change the alias and do not reuse internal historical names. |
| 400 | ft.WKSPTypeUnsupportAction | Free/Free Plan versions do not support binding | The current Workspace version does not support this | Confirm that the version supports it before connecting. |
| 404 | ft.LogIndexCfgNoExists | The specified index configuration does not exist, has been deleted, or is in another Workspace | The specified Log Index configuration does not exist | Obtain a valid external binding UUID from the list again. |
| 404 | ft.ObjectNotExists | The associated access configuration does not exist when backfilling sensitive values | The specified object does not exist | Check the binding lifecycle and access configuration; avoid blind reconstruction. |
| 404 | ft.NotFoundExternalResourceAccessCfg | The target does not exist or disappears concurrently during subsequent access configuration modification | The specified external index access information configuration was not found | Check the binding lifecycle and have an administrator handle it; do not substitute the default index. |
| 403 | ft.Forbidden | Insufficient permissions, or the current version does not allow this API | You do not have permission to perform this operation | Use an API Key with the corresponding index permissions and a supported version. |