Skip to content

Get



GET /api/v1/logging_query_rule/{logging_query_rule_uuid}/get

Overview

Reads the complete saved configuration plus the source and role details of the specified access rule.

Prerequisites and Steps

Retrieve the UUID from the Log Access Rule List. This endpoint reads only rules with type=logging; a non-log UUID from the same table also returns 404. It returns the saved entity and the source and role summaries, but not the list's creatorInfo/updatorInfo, memberCount, or relMemberInfos. Source details may be legacy or missing, and grantStatus=3 indicates that the grant is unavailable; do not treat the saved configuration as proof of currently effective permissions.

Saving a rule affects the data query scope and result masking of identities that subsequently match it. It does not modify, delete, or backfill raw data, and it does not add the role's basic query permissions. Multiple roles and rules are merged by the query-side policy, so you cannot infer final permissions from a single rule; Owners are exempt, and the "Data Access Range Restriction" setting of administrators and the workspace changes how unmatched roles are handled, so validate with an actual query performed as a representative member. This call only reads the rule; it does not modify the configuration or clear the rule cache.

Path Parameters

Parameter Type Required Description
logging_query_rule_uuid string Y The rule UUID in the path. You cannot use a name or a role UUID; reads and updates apply only to non-deleted items in the current workspace.
Example: lqrl_example
How to obtain or fill in: get it from content.data[].uuid in the Log Access Rule List.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or fill in: obtain an OpenAPI Key with this operation permission from API Key management in the target workspace.

Request Example

curl --get 'https://openapi.guance.com/api/v1/logging_query_rule/lqrl_example/get' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer Database ID of the existing log data access rule; calls use the uuid.
content.uuid string lqrl_ rule UUID; the two modules share the same entity and identifier.
content.workspaceUUID string Workspace that owns this rule, as distinct from the source workspace.
content.status integer 0 enabled, 2 disabled, 3 deleted; this module reads only non-deleted items.
content.creator string Identity that created it.
content.updator string Identity that most recently updated it; may be empty initially.
content.createAt integer Creation time in Unix seconds.
content.updateAt integer Update time in Unix seconds; -1 if never updated.
content.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.name string Saved value: may be omitted; when omitted or an empty string, the service attempts to generate a name from the calling identity's display name and the current Unix seconds, and updates regenerate it the same way without keeping the old name. Maximum 64 counting units (ASCII/half-width katakana = 1, other characters = 2); duplicate-name checks include both enabled and disabled rules of the same type.
content.desc string Saved value: optional, maximum 256 of the same counting units. When omitted or an empty string, it is cleared; an update does not preserve the original value.
content.indexes array Array of currently saved log index identifiers; ["*"] means all available log indexes; it is still constrained by the actual source grants.
content.indexes[] string Saved value: array members should be non-empty strings; the original declaration did not enforce this per item, and a wrong type can cause a 500.
content.roleUUIDs array Array of currently saved applicable role UUIDs; ["*"] means all roles, and [] matches no role; basic permissions must still be held separately.
content.roleUUIDs[] string Saved value: use a valid role; do not use an account UUID.
content.conditions string Currently saved log filter expression; this read does not re-run the event E query validation.
content.extend json Saved value: optional arbitrary JSON echoed back, defaults to {}; there are no uniform required subkeys or units, the server does not generate conditions from it automatically, and an update replaces the whole value; do not store credentials.
content.extend. any Saved value: any serializable JSON value; it is not an additional effective condition.
content.logic string Saved value: compatibility echo field, usually and/or; required when creating, optional on update. If omitted, an empty string is saved; the actually effective filter uses conditions directly, changing logic does not rewrite the conditions, and merging across roles/rules is not controlled by this field.
content.maskFields string Saved value: optional; when omitted, an empty string means no field masking is configured for this rule, and omitting it on update clears it. When a field is selected and reExprs=[], non-null values mask the entire field as ***; when a non-empty regex list is given, only enabled regexes are applied, and disabling all of them is not the same as masking the entire field. Keep it ≤256 characters to fit the storage column.
content.reExprs array Saved value: optional, defaults to [], and an update replaces the whole array. At save time every regex is validated, including items with enable=false; an invalid regex returns ft.ErrorRegularExpression. Do not use a lone * to mean any string; use .*. When a selected field has no regex, the entire field becomes ***; regexes only handle matching fragments of string content, replacing the matched content with ***; save-time validation differs from the execution engine, so after a successful save still verify with a representative query.
content.reExprs[] json Saved value: use only name/enable/reExpr where possible; the original declaration did not enforce the element structure, and a non-object can cause a 500.
content.reExprs[].name string Saved value: optional display name; it is not used as the matching expression and omitting it does not affect regex matching.
content.reExprs[].enable boolean Saved value: an explicit boolean is recommended; when omitted it is treated as not enabled; a disabled regex must still be syntactically valid.
content.reExprs[].reExpr string Saved value: a non-empty regex is recommended. A missing value is currently checked as an empty string, so do not rely on the server to complete a valid expression.
content.sources array Compatibility entity field; for log-specific creation the saved value is an empty array, updates do not assign it and keep the existing content, and this endpoint does not accept sources input.
content.sources[] string Saved value: a single source interpreted according to the parent type; a non-empty string is recommended.
content.type string Fixed to logging; this log-specific endpoint does not accept type input.
content.regionCode string Currently saved site code of the log source; a legacy empty string is treated as the current site; it does not mean a source grant was created.
content.indexWsInfo string or object Log rules only: * means all; otherwise the original indexes members are used as dynamic keys; when the resource does not exist or details cannot be retrieved, the sub-object may be {}.
content.indexWsInfo. object Workspace and index details of one configured index.
content.indexWsInfo..wsInfo object Source workspace details; may be an empty object.
content.indexWsInfo..wsInfo.uuid string Source workspace UUID.
content.indexWsInfo..wsInfo.name string Source workspace name.
content.indexWsInfo..wsInfo.status integer Workspace status.
content.indexWsInfo..wsInfo.regionCode string Site code.
content.indexWsInfo..wsInfo.regionName string or null Localized site name.
content.indexWsInfo..wsInfo.datastore object Optional; maps each data type to its storage category.
content.indexWsInfo..wsInfo.datastore. string For example, logging maps to scopedb; this is not a writable configuration.
content.indexWsInfo..wsInfo.durationSet object Optional; retention duration for each data type.
content.indexWsInfo..wsInfo.durationSet. string Integer plus d, for example a duration string; distinguished by data domain.
content.indexWsInfo..wsInfo.storagePolicy object Optional long-term policy mapping of the log source workspace.
content.indexWsInfo..wsInfo.storagePolicy. object Long-term policy for the corresponding data domain.
content.indexWsInfo..wsInfo.storagePolicy..isEnable boolean Whether the long-term policy is enabled.
content.indexWsInfo..wsInfo.storagePolicy..duration string Long-term retention duration.
content.indexWsInfo..indexInfo object The complete entity of a regular index or a default synthetic subset; legacy/remote details may lack fields and should not be written back wholesale.
content.indexWsInfo..indexInfo.id integer or null Database record ID of the source regular index; may be omitted for the default index.
content.indexWsInfo..indexInfo.uuid string lgim_ index configuration UUID; the default index uses default.
content.indexWsInfo..indexInfo.workspaceUUID string Workspace it belongs to.
content.indexWsInfo..indexInfo.sourceIndexUUID string UUID of source index A for cloned index B; empty for regular indexes.
content.indexWsInfo..indexInfo.name string Source index: name of the current exported index.
content.indexWsInfo..indexInfo.desc string Source index: currently saved index description.
content.indexWsInfo..indexInfo.conditions string Source index: compatibility condition string generated from the current extend.
content.indexWsInfo..indexInfo.sortNo integer or string Match order identifier; usually 0 for native direct writes or clones.
content.indexWsInfo..indexInfo.duration string Source index: currently saved standard retention duration string, for example 7d; for TLS effective stages, see setting.
content.indexWsInfo..indexInfo.isBindCustomStore integer or boolean 1/true means bound to external storage.
content.indexWsInfo..indexInfo.directIndex integer or boolean Source index: whether the current index is in native direct write mode.
content.indexWsInfo..indexInfo.isFullLineIndex integer Source index: current full-text index mode flag: 1 for full-line index, 0 for Message index.
content.indexWsInfo..indexInfo.queryType string Query category, for example logging/standard or the mode returned by external SLS.
content.indexWsInfo..indexInfo.exterStoreProject string External project/database identifier; usually empty for internal indexes.
content.indexWsInfo..indexInfo.exterStoreName string External resource name; usually empty for internal ones.
content.indexWsInfo..indexInfo.externalResourceAccessCfgUUID string Access configuration identifier; not the credential itself.
content.indexWsInfo..indexInfo.storeType string Usually empty for internal indexes; the actual type when bound to external storage.
content.indexWsInfo..indexInfo.region string External region code.
content.indexWsInfo..indexInfo.isPublicNetworkAccess integer or boolean Public network access flag.
content.indexWsInfo..indexInfo.status integer 0 enabled, 2 disabled, 3 deleted.
content.indexWsInfo..indexInfo.creator string Identity that created it.
content.indexWsInfo..indexInfo.updator string Identity that most recently updated it.
content.indexWsInfo..indexInfo.createAt integer Creation time in Unix seconds.
content.indexWsInfo..indexInfo.updateAt integer Update time in Unix seconds; -1 if never updated.
content.indexWsInfo..indexInfo.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.indexWsInfo..indexInfo.storagePolicy object Source index: currently saved long-term storage policy object.
content.indexWsInfo..indexInfo.storagePolicy.longStorageEnabled boolean Source index: whether the long-term storage policy is enabled.
content.indexWsInfo..indexInfo.storagePolicy.longStorageDuration string Source index: currently configured total long-term retention, in days, for example 90d; may be empty when disabled.
content.indexWsInfo..indexInfo.setting object Source index: currently saved storage-specific configuration; TLS includes the retention hours of each stage.
content.indexWsInfo..indexInfo.setting.hot_retention integer Source index: TLS hot storage stage hours.
content.indexWsInfo..indexInfo.setting.cold_retention integer Source index: TLS cold storage stage hours; omitted when not configured.
content.indexWsInfo..indexInfo.setting.archive_retention integer Source index: TLS archive stage hours; omitted when not configured.
content.indexWsInfo..indexInfo.extend object Source index: currently saved match conditions, key fields, and display configuration.
content.indexWsInfo..indexInfo.extend.matchMode string Source index: condition mode, basic or advanced.
content.indexWsInfo..indexInfo.extend.filters array Source index: array of condition objects in basic mode.
content.indexWsInfo..indexInfo.extend.filters[].name string Source index: original field name matched by the condition.
content.indexWsInfo..indexInfo.extend.filters[].condition string Source index: and/or logical relation to the preceding condition; the connector of the first item has no effect.
content.indexWsInfo..indexInfo.extend.filters[].operation string Source index: comparison or match operator saved for this condition.
content.indexWsInfo..indexInfo.extend.filters[].value array Source index: array of comparison values saved for this condition.
content.indexWsInfo..indexInfo.extend.filters[] json Source index: one basic match condition.
content.indexWsInfo..indexInfo.extend.filters[].value[] JSON Source index: one condition value; the type depends on the actual configuration.
content.indexWsInfo..indexInfo.extend.advancedFilter json Source index: root group object of the condition tree in advanced mode.
content.indexWsInfo..indexInfo.extend.advancedFilter.type string Source index: root group node type, group.
content.indexWsInfo..indexInfo.extend.advancedFilter.condition string Source index: and/or logical relation of the group's child conditions.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters array Source index: array of child groups or condition leaves under this group.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[] json Source index: a condition leaf of type rule or a child group of type group.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].type string Source index: rule for a condition leaf, group for a recursive child group.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].name string Source index: original field name matched by the rule leaf.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].operation string Source index: comparison or match operator saved for the rule leaf.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].value array Source index: array of comparison values of the rule leaf.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].condition string Source index: and/or logical relation of the group child group.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].filters array Source index: array of recursive child nodes of the group child group.
content.indexWsInfo..indexInfo.extend.advancedFilter.filters[].value[] JSON Source index: one condition comparison value; the type depends on the actual configuration.
content.indexWsInfo..indexInfo.extend.extendFields array Source index: currently configured array of key fields.
content.indexWsInfo..indexInfo.extend.extendFields[] json Source index: one key field and its display alias.
content.indexWsInfo..indexInfo.extend.extendFields[].tag string Source index: original field name of the key field.
content.indexWsInfo..indexInfo.extend.extendFields[].alias string Source index: display alias of the key field.
content.indexWsInfo..indexInfo.extend.topFields array Source index: currently saved array of pinned field display configurations.
content.indexWsInfo..indexInfo.extend.topFields[] json Source index: one pinned field display configuration.
content.indexWsInfo..indexInfo.extend.topFields[].tag string Source index: original field name of the pinned field.
content.indexWsInfo..indexInfo.extend.topFields[].alias string Source index: display alias of the pinned field.
content.indexWsInfo..indexInfo.extend.services array Source index: currently saved array of service display information; it does not replace the index match conditions.
content.indexWsInfo..indexInfo.extend.services[] string Source index: one service display value.
content.indexWsInfo..indexInfo.workspaceName string Source workspace name; may be omitted.
content.indexWsInfo..indexInfo.workspaceStatus integer Source workspace status; may be omitted.
content.indexWsInfo..indexInfo.regionCode string Source site code.
content.indexWsInfo..indexInfo.regionName string or null Source site name.
content.indexWsInfo..indexInfo.grantStatus integer Optional; 3 means the grant is currently unavailable; absence does not guarantee that other access conditions are met.
content.relRoleInfos array<object> Role summaries matched at read time; * expands to effective non-Owner roles, and a specified role may return a legacy status or {}.
content.relRoleInfos[] object A single role summary; {} if not found.
content.relRoleInfos[].uuid string Role UUID; may be omitted.
content.relRoleInfos[].name string Role name; may be omitted.
content.relRoleInfos[].status integer Role status; may be omitted.
content.regionName string or null Localized name of the source site; may be null if not found.
content.declaration object or null Workspace common declaration attached to non-empty business objects; may be null or an empty object when not configured; an empty object is not added.
{
  "code": 200,
  "content": {
    "id": 100,
    "uuid": "lqrl_example",
    "workspaceUUID": "wksp_example",
    "name": "production_only",
    "desc": "Only production environment data may be viewed.",
    "type": "logging",
    "indexes": [
      "default"
    ],
    "sources": [],
    "roleUUIDs": [
      "role_example"
    ],
    "conditions": "`env` = 'production'",
    "extend": {},
    "logic": "and",
    "maskFields": "message",
    "reExprs": [
      {
        "name": "token",
        "enable": true,
        "reExpr": "tkn_[0-9A-Za-z]+"
      }
    ],
    "regionCode": "",
    "status": 0,
    "creator": "wsak_example",
    "updator": "",
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "indexWsInfo": {
      "default": {
        "wsInfo": {},
        "indexInfo": {}
      }
    },
    "regionName": "Example Site",
    "relRoleInfos": [
      {
        "uuid": "role_example",
        "name": "Production Query",
        "status": 0
      }
    ],
    "declaration": {}
  },
  "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 Handling
404 ft.NotFoundDataQueryRuleCfg The specified non-deleted rule was not found in this workspace, or the target of the log endpoint is not logging The specified logging query rule configuration was not found Retrieve the UUID again from the corresponding list.
404 ft.NoInitOtherNodeCfg No available source site address was found when reading or validating remote index/source log index metadata Other node configuration is not initialized Have an administrator verify the source site configuration, reachable addresses, and valid cross-workspace grants, then retry after fixing them.
500 ft.InternalServerError Failed to read or format the rule, role, source workspace, or index/application metadata Internal error Refresh the granted source and site information and retry later; if it keeps failing, provide the traceId.

Feedback

Is this page helpful?