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_exampleHow 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. |
object | Source workspace details; may be an empty object. |
| content.indexWsInfo. |
string | Source workspace UUID. |
| content.indexWsInfo. |
string | Source workspace name. |
| content.indexWsInfo. |
integer | Workspace status. |
| content.indexWsInfo. |
string | Site code. |
| content.indexWsInfo. |
string or null | Localized site name. |
| content.indexWsInfo. |
object | Optional; maps each data type to its storage category. |
| content.indexWsInfo. |
string | For example, logging maps to scopedb; this is not a writable configuration. |
| content.indexWsInfo. |
object | Optional; retention duration for each data type. |
| content.indexWsInfo. |
string | Integer plus d, for example a duration string; distinguished by data domain. |
| content.indexWsInfo. |
object | Optional long-term policy mapping of the log source workspace. |
| content.indexWsInfo. |
object | Long-term policy for the corresponding data domain. |
| content.indexWsInfo. |
boolean | Whether the long-term policy is enabled. |
| content.indexWsInfo. |
string | Long-term retention duration. |
| content.indexWsInfo. |
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. |
integer or null | Database record ID of the source regular index; may be omitted for the default index. |
| content.indexWsInfo. |
string | lgim_ index configuration UUID; the default index uses default. |
| content.indexWsInfo. |
string | Workspace it belongs to. |
| content.indexWsInfo. |
string | UUID of source index A for cloned index B; empty for regular indexes. |
| content.indexWsInfo. |
string | Source index: name of the current exported index. |
| content.indexWsInfo. |
string | Source index: currently saved index description. |
| content.indexWsInfo. |
string | Source index: compatibility condition string generated from the current extend. |
| content.indexWsInfo. |
integer or string | Match order identifier; usually 0 for native direct writes or clones. |
| content.indexWsInfo. |
string | Source index: currently saved standard retention duration string, for example 7d; for TLS effective stages, see setting. |
| content.indexWsInfo. |
integer or boolean | 1/true means bound to external storage. |
| content.indexWsInfo. |
integer or boolean | Source index: whether the current index is in native direct write mode. |
| content.indexWsInfo. |
integer | Source index: current full-text index mode flag: 1 for full-line index, 0 for Message index. |
| content.indexWsInfo. |
string | Query category, for example logging/standard or the mode returned by external SLS. |
| content.indexWsInfo. |
string | External project/database identifier; usually empty for internal indexes. |
| content.indexWsInfo. |
string | External resource name; usually empty for internal ones. |
| content.indexWsInfo. |
string | Access configuration identifier; not the credential itself. |
| content.indexWsInfo. |
string | Usually empty for internal indexes; the actual type when bound to external storage. |
| content.indexWsInfo. |
string | External region code. |
| content.indexWsInfo. |
integer or boolean | Public network access flag. |
| content.indexWsInfo. |
integer | 0 enabled, 2 disabled, 3 deleted. |
| content.indexWsInfo. |
string | Identity that created it. |
| content.indexWsInfo. |
string | Identity that most recently updated it. |
| content.indexWsInfo. |
integer | Creation time in Unix seconds. |
| content.indexWsInfo. |
integer | Update time in Unix seconds; -1 if never updated. |
| content.indexWsInfo. |
integer | Deletion time in Unix seconds; -1 if not deleted. |
| content.indexWsInfo. |
object | Source index: currently saved long-term storage policy object. |
| content.indexWsInfo. |
boolean | Source index: whether the long-term storage policy is enabled. |
| content.indexWsInfo. |
string | Source index: currently configured total long-term retention, in days, for example 90d; may be empty when disabled. |
| content.indexWsInfo. |
object | Source index: currently saved storage-specific configuration; TLS includes the retention hours of each stage. |
| content.indexWsInfo. |
integer | Source index: TLS hot storage stage hours. |
| content.indexWsInfo. |
integer | Source index: TLS cold storage stage hours; omitted when not configured. |
| content.indexWsInfo. |
integer | Source index: TLS archive stage hours; omitted when not configured. |
| content.indexWsInfo. |
object | Source index: currently saved match conditions, key fields, and display configuration. |
| content.indexWsInfo. |
string | Source index: condition mode, basic or advanced. |
| content.indexWsInfo. |
array | Source index: array of condition objects in basic mode. |
| content.indexWsInfo. |
string | Source index: original field name matched by the condition. |
| content.indexWsInfo. |
string | Source index: and/or logical relation to the preceding condition; the connector of the first item has no effect. |
| content.indexWsInfo. |
string | Source index: comparison or match operator saved for this condition. |
| content.indexWsInfo. |
array | Source index: array of comparison values saved for this condition. |
| content.indexWsInfo. |
json | Source index: one basic match condition. |
| content.indexWsInfo. |
JSON | Source index: one condition value; the type depends on the actual configuration. |
| content.indexWsInfo. |
json | Source index: root group object of the condition tree in advanced mode. |
| content.indexWsInfo. |
string | Source index: root group node type, group. |
| content.indexWsInfo. |
string | Source index: and/or logical relation of the group's child conditions. |
| content.indexWsInfo. |
array | Source index: array of child groups or condition leaves under this group. |
| content.indexWsInfo. |
json | Source index: a condition leaf of type rule or a child group of type group. |
| content.indexWsInfo. |
string | Source index: rule for a condition leaf, group for a recursive child group. |
| content.indexWsInfo. |
string | Source index: original field name matched by the rule leaf. |
| content.indexWsInfo. |
string | Source index: comparison or match operator saved for the rule leaf. |
| content.indexWsInfo. |
array | Source index: array of comparison values of the rule leaf. |
| content.indexWsInfo. |
string | Source index: and/or logical relation of the group child group. |
| content.indexWsInfo. |
array | Source index: array of recursive child nodes of the group child group. |
| content.indexWsInfo. |
JSON | Source index: one condition comparison value; the type depends on the actual configuration. |
| content.indexWsInfo. |
array | Source index: currently configured array of key fields. |
| content.indexWsInfo. |
json | Source index: one key field and its display alias. |
| content.indexWsInfo. |
string | Source index: original field name of the key field. |
| content.indexWsInfo. |
string | Source index: display alias of the key field. |
| content.indexWsInfo. |
array | Source index: currently saved array of pinned field display configurations. |
| content.indexWsInfo. |
json | Source index: one pinned field display configuration. |
| content.indexWsInfo. |
string | Source index: original field name of the pinned field. |
| content.indexWsInfo. |
string | Source index: display alias of the pinned field. |
| content.indexWsInfo. |
array | Source index: currently saved array of service display information; it does not replace the index match conditions. |
| content.indexWsInfo. |
string | Source index: one service display value. |
| content.indexWsInfo. |
string | Source workspace name; may be omitted. |
| content.indexWsInfo. |
integer | Source workspace status; may be omitted. |
| content.indexWsInfo. |
string | Source site code. |
| content.indexWsInfo. |
string or null | Source site name. |
| content.indexWsInfo. |
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. |