Skip to content

Get Data Access Rule Details



GET /api/v1/data_query_rule/{query_rule_uuid}/get

Overview

Read the complete saved configuration and source/role information of a specified access rule.

Before Calling and Usage Steps

Obtain the UUID from the Data Access Rule List. You can read any data domain rule in the current workspace. The response returns the saved entity, source summary, and role summary. It does not return creatorInfo/updatorInfo, memberCount, or relMemberInfos from the list. Source information may be historical or missing. grantStatus=3 indicates that authorization 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 for subsequent identities that meet the conditions. It does not modify, delete, or backfill raw data, and it does not add basic query permissions to roles. Multiple roles and rules are merged according to query-side policies; you cannot infer final permissions from a single rule alone. Owner is exempt. The administrator and the workspace's "Data Access Scope Restriction" setting change how roles with no match are handled. Acceptance should use actual queries by a representative member. Saving invalidates the rule cache, but it cannot guarantee that all in-flight queries switch immediately.

Route Parameters

Parameter Type Required Description
query_rule_uuid string Y Rule UUID in the path. You cannot use a name or role UUID. Reads and modifications apply only to non-deleted items in the current workspace.
Example: lqrl_example
How to obtain or enter: Obtain it from content.data[].uuid in the Data 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 enter: 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/data_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. The returned indexWsInfo only describes the current information of the source index and does not write index configuration. To adjust an index, use the corresponding operation in Log Index Configuration.

Field Type Description
content.id integer or null Record ID. For the snapshot returned before creation submission, this may be null; use uuid for subsequent operations.
content.uuid string lqrl_ rule UUID. Both modules share the same entity and identifier.
content.workspaceUUID string Workspace to which this rule belongs, distinct from the source workspace.
content.status integer 0 enabled, 2 disabled, 3 deleted. Reads in this module cover only non-deleted items.
content.creator string Creator identity.
content.updator string Most recent updater identity; may be empty initially.
content.createAt integer Creation time in Unix seconds.
content.updateAt integer Update time in Unix seconds; -1 if not updated.
content.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.name string Saved value: declared as required; a non-empty unique name is recommended. An empty string may still enter the automatic naming branch; do not rely on this compatibility behavior. Maximum 64 counting units (ASCII/half-width katakana count as 1; other characters count as 2). Both enabled and disabled rules of the same type participate in duplicate-name checks.
content.desc string Saved value: optional; maximum 256 of the same counting units as above. When omitted or set to an empty string, it is cleared to empty; an update does not retain the original value.
content.indexes array Saved value: log rules should provide this explicitly. It is declared optional, but log queries require a valid index scope; omitting it as [] does not automatically change it to all. ["*"] means all available log indexes; using * alone is recommended; [] does not mean all. keyevent forces the saved value to []; other non-log types usually use []. You cannot replace a UUID with an ordinary index name, and authorization is not created automatically. A successful save does not prove that all remote resources are still valid.
content.indexes[] string Saved value: array members should be non-empty strings. The original declaration does not enforce each item, and an incorrect type can cause a 500.
content.roleUUIDs array Saved value: required array. ["*"] means each role; Owner is still not subject to data access restrictions. [] matches no role and does not mean all. For keyevent events, it must be a non-empty string array, and * can only appear alone. For other types, the system verifies that roles exist within the scope; it does not guarantee that role status=0. Basic query permissions must still be held separately.
content.roleUUIDs[] string Saved value: use a valid role; do not use an account UUID.
content.conditions string Saved value: enter only the filter expression, not the entire query or outer braces. Optional; default is an empty string; an empty string adds no extra filtering. It is recommended to keep it within 4048 characters. For keyevent, it is specifically limited to ≤4048 Python characters and parsed using E query syntax. For other types, condition semantics are not fully validated at save time, and a successful save does not guarantee that future queries will succeed. This rule defines the data scope that is allowed to be accessed.
content.extend json Saved value: optional arbitrary JSON echoed back; default is {}. There are no uniformly required subkeys or units, and the server does not automatically generate conditions from it; an update replaces it as a whole. Do not store credentials.
content.extend.custom key 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; optional. If omitted, an empty string is saved. The actual effective filtering uses conditions directly; changing logic does not rewrite conditions. Merging multiple roles/rules is not controlled by this field.
content.maskFields string Saved value: optional. The default empty string means no field masking is configured for this rule; omitting it on update clears it. When a field is selected and reExprs=[], non-null values are masked across the entire field as ***. When a non-empty regular expression list is provided, only enabled regular expressions are applied; all disabled does not equal whole-field masking. It is recommended to keep it ≤256 characters to fit the storage column.
content.reExprs array Saved value: optional; default []; an update replaces the entire value. At save time, every regular expression is validated, including items with enable=false. An invalid regular expression returns ft.ErrorRegularExpression. Do not use a lone * to mean any string; use .*. When a selected field has no regular expression, the entire field becomes ***. Regular expressions only process matching fragments in string content and replace the matched content with ***. Save-time validation differs from the execution engine, so after a successful save you still need to verify with a representative query.
content.reExprs[] json Saved value: only name/enable/reExpr are recommended. The original declaration does not enforce the array element structure; non-objects can cause a 500.
content.reExprs[].name string Saved value: optional echoed name; not used as a matching expression; omitting it does not affect regular expression matching.
content.reExprs[].enable boolean Saved value: an explicit boolean is recommended; if omitted, it is treated as disabled. Disabled regular expressions must still be syntactically valid.
content.reExprs[].reExpr string Saved value: a non-empty regular expression is recommended. Currently, omission is checked as an empty string; do not rely on the server to fill in a valid expression.
content.sources array Saved value: non-log scope array. ["*"] means all available sources; omitting it as [] does not mean all. logging forces the saved value to []. rum/lineage can be scoped by authorized workspace UUID:source identifier; tracing/metric/keyevent use raw source strings. keyevent must be a non-empty string array, does not accept wksp_:source, and * cannot be mixed with other values. rum checks that the application exists only when the current regionCode is explicitly specified; a successful save for other sources does not prove that data actually exists.
content.sources[] string Saved value: a single source interpreted according to the parent type; a non-empty string is recommended.
content.type string Saved value: required on create: logging/rum/tracing/metric/lineage/keyevent. The declaration allows null, but an invalid type cannot form a normal query rule; always submit one of the above strings. Updates do not accept type and use the stored type.
content.regionCode string Saved value: source site code, required by the v2 declaration. Log indexes in the same rule must belong to the same site and match this value. Legacy endpoints do not accept this field. Data access rules do not replace cross-site/cross-workspace authorization; cross-site events require a valid authorization that includes keyevent or *. Note the actual reachability description for the duplicate route below.
content.indexWsInfo string or object Log rules only: * means all; otherwise the original indexes members are used as dynamic keys. If the resource does not exist or information cannot be retrieved, the sub-object can be {}.
content.indexWsInfo.index identifier object Workspace and index information for one configured index.
content.indexWsInfo.index identifier.wsInfo object Source workspace information; may be an empty object.
content.indexWsInfo.index identifier.wsInfo.uuid string Source workspace UUID.
content.indexWsInfo.index identifier.wsInfo.name string Source workspace name.
content.indexWsInfo.index identifier.wsInfo.status integer Workspace status.
content.indexWsInfo.index identifier.wsInfo.regionCode string Site code.
content.indexWsInfo.index identifier.wsInfo.regionName string or null Localized site name.
content.indexWsInfo.index identifier.wsInfo.datastore object Optional mapping from each data type to its storage class.
content.indexWsInfo.index identifier.wsInfo.datastore.data type string For example, logging maps to scopedb; this is not writable configuration.
content.indexWsInfo.index identifier.wsInfo.durationSet object Optional retention duration for each data type.
content.indexWsInfo.index identifier.wsInfo.durationSet.data type string Duration string such as an integer followed by d; differentiated by data domain.
content.indexWsInfo.index identifier.wsInfo.storagePolicy object Optional long-term policy mapping for the log source workspace.
content.indexWsInfo.index identifier.wsInfo.storagePolicy.data type object Long-term policy for the corresponding data domain.
content.indexWsInfo.index identifier.wsInfo.storagePolicy.data type.isEnable boolean Whether the long-term policy is enabled.
content.indexWsInfo.index identifier.wsInfo.storagePolicy.data type.duration string Long-term retention duration.
content.indexWsInfo.index identifier.indexInfo object Complete entity of a regular index or a synthesized subset for default; historical/remote information may lack fields and should not be passed back as a whole for writing.
content.indexWsInfo.index identifier.indexInfo.id integer or null Database record ID of the source regular index; it may be omitted for synthesized default index information.
content.indexWsInfo.index identifier.indexInfo.uuid string lgim_ index configuration UUID; the default index uses default.
content.indexWsInfo.index identifier.indexInfo.workspaceUUID string Workspace it belongs to.
content.indexWsInfo.index identifier.indexInfo.sourceIndexUUID string UUID of source A for cloned index B; empty for regular indexes.
content.indexWsInfo.index identifier.indexInfo.name string Source index: name of the currently exported index.
content.indexWsInfo.index identifier.indexInfo.desc string Source index: currently saved index description.
content.indexWsInfo.index identifier.indexInfo.conditions string Source index: compatibility condition string generated from the current extend.
content.indexWsInfo.index identifier.indexInfo.sortNo integer or string Match order identifier; usually 0 for native direct-write or cloning.
content.indexWsInfo.index identifier.indexInfo.duration string Source index: currently saved standard retention duration string, for example 7d; for valid TLS phases, see setting.
content.indexWsInfo.index identifier.indexInfo.isBindCustomStore integer or boolean 1/true binds external storage.
content.indexWsInfo.index identifier.indexInfo.directIndex integer or boolean Source index: whether the current index is in native direct-write mode.
content.indexWsInfo.index identifier.indexInfo.isFullLineIndex integer Source index: current full-text index mode flag: 1 for full-line index, 0 for Message index.
content.indexWsInfo.index identifier.indexInfo.queryType string Query type, for example logging/standard or the mode returned by external SLS.
content.indexWsInfo.index identifier.indexInfo.exterStoreProject string External project/database identifier; usually empty for internal indexes.
content.indexWsInfo.index identifier.indexInfo.exterStoreName string External resource name; usually empty for internal.
content.indexWsInfo.index identifier.indexInfo.externalResourceAccessCfgUUID string Access configuration identifier, not the raw credential.
content.indexWsInfo.index identifier.indexInfo.storeType string Usually empty for internal indexes; the actual type when bound to external storage.
content.indexWsInfo.index identifier.indexInfo.region string External region code.
content.indexWsInfo.index identifier.indexInfo.isPublicNetworkAccess integer or boolean Public network access flag.
content.indexWsInfo.index identifier.indexInfo.status integer 0 enabled, 2 disabled, 3 deleted.
content.indexWsInfo.index identifier.indexInfo.creator string Creator identity.
content.indexWsInfo.index identifier.indexInfo.updator string Most recent updater identity.
content.indexWsInfo.index identifier.indexInfo.createAt integer Creation time in Unix seconds.
content.indexWsInfo.index identifier.indexInfo.updateAt integer Update time in Unix seconds; -1 if not updated.
content.indexWsInfo.index identifier.indexInfo.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.indexWsInfo.index identifier.indexInfo.storagePolicy object Source index: currently saved long-term storage policy object.
content.indexWsInfo.index identifier.indexInfo.storagePolicy.longStorageEnabled boolean Source index: whether the long-term storage policy is enabled.
content.indexWsInfo.index identifier.indexInfo.storagePolicy.longStorageDuration string Source index: currently configured total long-term retention duration, in days, in the form 90d; may be empty when disabled.
content.indexWsInfo.index identifier.indexInfo.setting object Source index: currently saved storage-specific configuration; TLS includes retention hours for each phase.
content.indexWsInfo.index identifier.indexInfo.setting.hot_retention integer Source index: TLS hot storage phase hours.
content.indexWsInfo.index identifier.indexInfo.setting.cold_retention integer Source index: TLS cold storage phase hours; omitted when not configured.
content.indexWsInfo.index identifier.indexInfo.setting.archive_retention integer Source index: TLS archive phase hours; omitted when not configured.
content.indexWsInfo.index identifier.indexInfo.extend object Source index: currently saved match conditions, key fields, and display configuration.
content.indexWsInfo.index identifier.indexInfo.extend.matchMode string Source index: condition mode, basic or advanced.
content.indexWsInfo.index identifier.indexInfo.extend.filters array Source index: array of condition objects in basic mode.
content.indexWsInfo.index identifier.indexInfo.extend.filters[].name string Source index: original field name matched by the condition.
content.indexWsInfo.index identifier.indexInfo.extend.filters[].condition string Source index: and/or logical relationship with the previous condition; the connector for the first item is invalid.
content.indexWsInfo.index identifier.indexInfo.extend.filters[].operation string Source index: comparison or match operator saved for this condition.
content.indexWsInfo.index identifier.indexInfo.extend.filters[].value array Source index: array of comparison values saved for this condition.
content.indexWsInfo.index identifier.indexInfo.extend.filters[] json Source index: one basic match condition.
content.indexWsInfo.index identifier.indexInfo.extend.filters[].value[] JSON Source index: one condition value; the type depends on the actual configuration.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter json Source index: root group object of the condition tree in advanced mode.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.type string Source index: root group node type group.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.condition string Source index: and/or logical relationship of the group's child conditions.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters array Source index: array of child groups or condition leaves under this group.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[] json Source index: a condition leaf of type rule or a child group of type group.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].type string Source index: rule is a condition leaf, group is a recursive child group.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].name string Source index: original field name matched by the rule leaf.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].operation string Source index: comparison or match operator saved by the rule leaf.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].value array Source index: array of comparison values for the rule leaf.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].condition string Source index: and/or logical relationship of the group child.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].filters array Source index: recursive child node array of the group child.
content.indexWsInfo.index identifier.indexInfo.extend.advancedFilter.filters[].value[] JSON Source index: one condition comparison value; the type depends on the actual configuration.
content.indexWsInfo.index identifier.indexInfo.extend.extendFields array Source index: currently configured key field array.
content.indexWsInfo.index identifier.indexInfo.extend.extendFields[] json Source index: one key field and its display alias.
content.indexWsInfo.index identifier.indexInfo.extend.extendFields[].tag string Source index: original field name of the key field.
content.indexWsInfo.index identifier.indexInfo.extend.extendFields[].alias string Source index: display alias of the key field.
content.indexWsInfo.index identifier.indexInfo.extend.topFields array Source index: currently saved array of pinned field display configurations.
content.indexWsInfo.index identifier.indexInfo.extend.topFields[] json Source index: one pinned field display configuration.
content.indexWsInfo.index identifier.indexInfo.extend.topFields[].tag string Source index: original field name of the pinned field.
content.indexWsInfo.index identifier.indexInfo.extend.topFields[].alias string Source index: display alias of the pinned field.
content.indexWsInfo.index identifier.indexInfo.extend.services array Source index: currently saved array of service display information; does not replace index match conditions.
content.indexWsInfo.index identifier.indexInfo.extend.services[] string Source index: one service display value.
content.indexWsInfo.index identifier.indexInfo.workspaceName string Source workspace name; may be omitted.
content.indexWsInfo.index identifier.indexInfo.workspaceStatus integer Source workspace status; may be omitted.
content.indexWsInfo.index identifier.indexInfo.regionCode string Source site code.
content.indexWsInfo.index identifier.indexInfo.regionName string or null Source site name.
content.indexWsInfo.index identifier.indexInfo.grantStatus integer Optional; 3 indicates that authorization is currently unavailable. If absent, it does not guarantee that other access conditions are met.
content.sourcesWsInfo string or object Non-log rules only: * means all; otherwise the original sources members are used as keys. For other types, only the source name is displayed, and resource existence is not guaranteed.
content.sourcesWsInfo.source identifier object A source summary.
content.sourcesWsInfo.source identifier.wsInfo object RUM may have source workspace information; other types usually have {}.
content.sourcesWsInfo.source identifier.wsInfo.uuid string Source workspace UUID.
content.sourcesWsInfo.source identifier.wsInfo.name string Source workspace name.
content.sourcesWsInfo.source identifier.wsInfo.status integer Workspace status.
content.sourcesWsInfo.source identifier.wsInfo.regionCode string Site code.
content.sourcesWsInfo.source identifier.wsInfo.regionName string or null Localized site name.
content.sourcesWsInfo.source identifier.wsInfo.datastore object Optional mapping from each data type to its storage class.
content.sourcesWsInfo.source identifier.wsInfo.datastore.data type string For example, logging maps to scopedb; this is not writable configuration.
content.sourcesWsInfo.source identifier.wsInfo.durationSet object Optional retention duration for each data type.
content.sourcesWsInfo.source identifier.wsInfo.durationSet.data type string Duration string such as an integer followed by d; differentiated by data domain.
content.sourcesWsInfo.source identifier.sourcesInfo object RUM application entity, or {name,status} for other types; may be {} if no information is available.
content.sourcesWsInfo.source identifier.sourcesInfo.name string Original name of a non-RUM source.
content.sourcesWsInfo.source identifier.sourcesInfo.id integer Application record ID.
content.sourcesWsInfo.source identifier.sourcesInfo.uuid string Same as appId.
content.sourcesWsInfo.source identifier.sourcesInfo.appId string RUM source identifier.
content.sourcesWsInfo.source identifier.sourcesInfo.workspaceUUID string Workspace to which the application belongs.
content.sourcesWsInfo.source identifier.sourcesInfo.clientToken string Application collection identifier; may be omitted. It is not the API Key for this API, and no real value is output in the example.
content.sourcesWsInfo.source identifier.sourcesInfo.jsonContent object Application configuration; the structure varies by type. Use the RUM application details documentation to interpret this type.
content.sourcesWsInfo.source identifier.sourcesInfo.jsonContent.configuration key JSON Stored configuration for this application type, such as name/type; shown here for display only and not a data access rule parameter.
content.sourcesWsInfo.source identifier.sourcesInfo.status integer Application status; may be historically invalid.
content.sourcesWsInfo.source identifier.sourcesInfo.creator string Creator identity.
content.sourcesWsInfo.source identifier.sourcesInfo.updator string Updater identity.
content.sourcesWsInfo.source identifier.sourcesInfo.createAt integer Creation time in Unix seconds.
content.sourcesWsInfo.source identifier.sourcesInfo.updateAt integer Update time in Unix seconds.
content.sourcesWsInfo.source identifier.sourcesInfo.deleteAt integer Deletion time in Unix seconds.
content.sourcesWsInfo.source identifier.sourcesInfo.workspaceName string Workspace name.
content.sourcesWsInfo.source identifier.sourcesInfo.workspaceStatus integer Workspace status.
content.sourcesWsInfo.source identifier.sourcesInfo.regionCode string Source site code.
content.sourcesWsInfo.source identifier.sourcesInfo.regionName string or null Source site name.
content.sourcesWsInfo.source identifier.sourcesInfo.grantStatus integer Optional; 3 indicates that authorization is currently invalid.
content.relRoleInfos array<object> Role summaries matched at read time; * expands to valid non-Owner roles. A specified role may return a historical status or {}.
content.relRoleInfos[] object A single role summary; may be {} 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 a non-empty business object; may be null or an empty object when not configured; empty objects are not added. The exact position of pagination is subject to the structure on this page.
{
  "code": 200,
  "content": {
    "id": 100,
    "uuid": "lqrl_example",
    "workspaceUUID": "wksp_example",
    "name": "production_only",
    "desc": "Only production environment data can 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 target rule does not exist, has been deleted, or does not belong to the current workspace; this generic endpoint does not additionally restrict to logging rules. The specified log query rule configuration was not found. Obtain the UUID again from the corresponding list.
404 ft.NoInitOtherNodeCfg No available source site address was found when reading or validating remote index/RUM application metadata. Other node configuration is not initialized. Ask the administrator to check the source site configuration, accessible address, and valid cross-workspace authorization, then retry after fixing.
500 ft.InternalServerError Failed to read or format rule, role, source workspace, or index/application metadata. Internal error. Refresh the authorized sources and site information and retry later; if it persists, provide the traceId.

Feedback

Is this page helpful?