Skip to content

Enable or Disable Log Index Configuration



POST /api/v1/log_index_cfg/{cfg_uuid}/set_disable

Overview

Enable or disable a single non-default Log Index configuration.

Before You Call and Usage Steps

Select an index UUID from the list. true sets status=2, and false sets 0. The API declaration allows null, but the current implementation treats it as a falsy value and therefore as enable. Callers should submit only explicit boolean values. The default default index is not supported; if it does not exist or has been deleted, 404 is returned.

Clone B can be enabled or disabled independently. Even if B itself is enabled, when source A is disabled, B should not be treated as currently effective traffic routing; check it together with the source status. After the status is saved, the cache is cleared. Existing logs are not deleted, and immediate switching of all downstream reads and writes is not guaranteed. If the source/clone relationship is changed concurrently, refresh and retry.

Path Parameters

Parameter Name Type Required Description
cfg_uuid string Y UUID of a non-default Log Index configuration, not the index name. The default index cannot be enabled or disabled.
Example: lgim_example
How to obtain or enter: Obtain it from the Log Index List: use content[].uuid when pagination is not used, and content.data[].uuid when pagination is used. Select a non-default record in the current workspace; the target must also meet the status operation conditions on this page.

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: In API Key management for the target workspace, obtain an OpenAPI Key with permission for this operation.

Body Parameters

Parameter Name Type Required Description
isDisable boolean Y Required. A JSON boolean is recommended. Although the declaration allows null, the current implementation treats null as enable.
Allows null: True
Example: true
How to obtain or enter: true disables, false enables.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/log_index_cfg/lgim_example/set_disable' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"isDisable":true}'

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; no entity or downstream status is returned.
{
  "code": 200,
  "content": true,
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object, or the policy is not an object Some JSON file 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 back off and retry; query the current state first.
500 ft.InternalServerError Database, cache, or downstream connection/general 5xx error, or abnormal field shape Internal error First read the configuration and verify the actual current storage state. If the failure persists, provide the traceId; do not treat the error as unsaved or directly repeat the create operation.
400 ft.DefaultIndexUnsupportAction The target is default The default index does not support this operation. The default index does not use this enable/disable entry point.
404 ft.LogIndexCfgNoExists The specified non-deleted index in this workspace does not exist The specified Log Index configuration does not exist. Retrieve a valid UUID from the list again.
400 ft.LogIndexCloneRelationInvalid The source/clone relationship has changed The Log Index clone relationship is invalid. Refresh the associated configuration and retry.
400 ft.LogIndexCloneSourceUnsupported The clone source no longer meets the internal conditions for a regular index The specified Log Index cannot be used as a clone source. Check the status and type of A/B.
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 permission and a supported version.

Feedback

Is this page helpful?