List¶
GET /api/v1/logging_query_rule/list
Overview¶
Read log access rules and their source and enable/disable configurations in a paginated manner.
Before Calling and Usage Steps¶
Query non-deleted rules in the current workspace, including disabled items, sorted by createAt in descending order. This public endpoint supports only pageIndex/pageSize, not the internal search or effectiveRulesForCurAcnt; it does not return the member count/member and role expansion that are enabled only in the frontend.
Saving a rule affects the data query scope/result masking for subsequently matching identities. It does not modify, delete, or backfill raw data, nor does it add basic query permissions for roles. Multiple roles and rules are merged according to query-side policies, so final permissions cannot be inferred from a single rule alone; Owner is exempt, and the "Data Access Scope Restriction" setting for administrators and workspaces changes how unmatched roles are handled, so acceptance should use actual queries by representative members. This operation only reads rules; it does not modify configurations or clear the rule cache.
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 permission from API Key management in the target workspace. |
Query Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| pageSize | integer | Optional, default 50, no declared maximum; a small page size reduces the returned volume, but the current implementation reads all matching rules before pagination, so paging through results is recommended. Allows null: False Example: 50How to obtain or enter: Choose an appropriate positive integer based on client capacity, such as 50. |
|
| pageIndex | integer | Optional, default 1, no minimum declared; callers must choose a positive integer. Allows null: False Example: 1How to obtain or enter: Start from 1 and continue according to the top-level pageInfo. |
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/logging_query_rule/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode pageIndex=1 \
--data-urlencode pageSize=50
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.data | array<object> |
Rules on this page; [] for an empty result. |
| content.data[].id | integer | Database ID of an existing log data access rule; use uuid in calls. |
| content.data[].uuid | string | lqrl_ rule UUID; both modules share the entity and identifier. |
| content.data[].workspaceUUID | string | Workspace to which this rule belongs, distinct from the source workspace. |
| content.data[].status | integer | 0 enabled, 2 disabled, 3 deleted; this module reads only non-deleted rules. |
| content.data[].creator | string | Creator identity. |
| content.data[].updator | string | Identity of the most recent update; may be empty initially. |
| content.data[].createAt | integer | Creation Unix seconds. |
| content.data[].updateAt | integer | Update Unix seconds; -1 if never updated. |
| content.data[].deleteAt | integer | Deletion Unix seconds; -1 if not deleted. |
| content.data[].name | string | Saved value: may be omitted; when omitted/empty, an attempt is made to generate it from the caller identity display name and current Unix seconds; modifications also regenerate it and do not retain the old name. Maximum 64 counting units (ASCII/half-width katakana = 1, other characters = 2); both enabled and disabled rules of the same type participate in duplicate name checks. |
| content.data[].desc | string | Saved value: optional, maximum 256 of the same counting units as above; omitted/empty string clears it to empty; modifying does not retain the original value. |
| content.data[].indexes | array | Currently saved array of log index identifiers; ["*"] means all available log indexes; still subject to actual source authorization. |
| content.data[].indexes[] | string | Saved value: array members are recommended to be non-empty strings; the original declaration did not enforce each item, and an incorrect type may cause a 500. |
| content.data[].roleUUIDs | array | Currently saved array of applicable role UUIDs; ["*"] means all roles, [] matches no roles; basic permissions must still be granted separately. |
| content.data[].roleUUIDs[] | string | Saved value: should use valid roles; do not use account UUIDs. |
| content.data[].conditions | string | Currently saved log filter expression; this read does not re-run Event E query validation. |
| content.data[].extend | json | Saved value: optional arbitrary JSON echoed back; defaults to {}; there are no unified required subkeys or units, and the server does not automatically generate conditions from it; modifications replace it entirely; do not store credentials. |
| content.data[].extend.自定义键 | any | Saved value: any serializable JSON value; not an additional effective condition. |
| content.data[].logic | string | Saved value: compatibility echo field, usually and/or; required on creation, may be omitted on modification. If omitted, an empty string is saved; actual effective filtering uses conditions directly, changing logic does not rewrite conditions, and merging of multiple roles/rules is not controlled by this field. |
| content.data[].maskFields | string | Saved value: optional; if omitted, the default empty string means no field masking is configured for this rule; omitting it on modification clears it. When a field is selected and reExprs=[], a non-null value masks the entire field as ***; when a non-empty regex list is provided, only enabled regexes are applied, and disabling all does not equal full-field masking. It is recommended to keep it ≤256 characters to fit the storage column. |
| content.data[].reExprs | array | Saved value: optional, defaults to [], modifications replace it entirely. On save, every regular expression is validated, including items with enable=false; an invalid regex returns ft.ErrorRegularExpression. Do not use a lone * to represent any string; use .*. When the selected field has no regex, the entire field is masked as ***; regexes process only matching fragments in string content and replace the matched content with ***. Save validation and the execution engine differ, so after a successful save, verification with representative queries is still required. |
| content.data[].reExprs[] | json | Saved value: it is recommended to use only name/enable/reExpr; the original declaration did not enforce the structure of array elements, and a non-object may cause a 500. |
| content.data[].reExprs[].name | string | Saved value: optional display name, not used as a matching expression; omitting it does not affect regex matching. |
| content.data[].reExprs[].enable | boolean | Saved value: an explicit boolean is recommended; if omitted, it is treated as not enabled; disabled regexes must still be syntactically valid. |
| content.data[].reExprs[].reExpr | string | Saved value: a non-empty regex is recommended. At present, omission is checked as an empty string, so do not rely on the server to fill in a valid expression. |
| content.data[].sources | array | Compatibility entity field; for log-specific creation it is saved as an empty array, and modifications do not assign a value but retain existing content; this endpoint does not accept sources input. |
| content.data[].sources[] | string | Saved value: a single source interpreted by the parent type; a non-empty string is recommended. |
| content.data[].type | string | Fixed to logging; this log-specific endpoint does not accept type input. |
| content.data[].regionCode | string | Currently saved log source region code; a historical empty string is treated as the current region; it does not mean source authorization was newly created. |
| content.data[].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 data cannot be obtained, the sub-object may be {}. |
| content.data[].indexWsInfo.索引标识 | object | Workspace and index data for one configured index. |
| content.data[].indexWsInfo.索引标识.wsInfo | object | Source workspace data; may be an empty object. |
| content.data[].indexWsInfo.索引标识.wsInfo.uuid | string | Source workspace UUID. |
| content.data[].indexWsInfo.索引标识.wsInfo.name | string | Source workspace name. |
| content.data[].indexWsInfo.索引标识.wsInfo.status | integer | Workspace status. |
| content.data[].indexWsInfo.索引标识.wsInfo.regionCode | string | Region code. |
| content.data[].indexWsInfo.索引标识.wsInfo.regionName | string or null | Localized region name. |
| content.data[].indexWsInfo.索引标识.wsInfo.datastore | object | Optional; mapping of each data type to its storage class. |
| content.data[].indexWsInfo.索引标识.wsInfo.datastore.数据类型 | string | For example, logging corresponds to scopedb; this is not a writable configuration. |
| content.data[].indexWsInfo.索引标识.wsInfo.durationSet | object | Optional; retention duration for each data type. |
| content.data[].indexWsInfo.索引标识.wsInfo.durationSet.数据类型 | string | A duration string such as an integer + d; distinguished by data domain. |
| content.data[].indexWsInfo.索引标识.wsInfo.storagePolicy | object | Optional long-term policy mapping for the log source workspace. |
| content.data[].indexWsInfo.索引标识.wsInfo.storagePolicy.数据类型 | object | Long-term policy for the corresponding data domain. |
| content.data[].indexWsInfo.索引标识.wsInfo.storagePolicy.数据类型.isEnable | boolean | Whether the long-term policy is enabled. |
| content.data[].indexWsInfo.索引标识.wsInfo.storagePolicy.数据类型.duration | string | Long-term retention duration. |
| content.data[].indexWsInfo.索引标识.indexInfo | object | Complete entity for a regular index or a synthesized subset for default; historical/remote data may lack fields and should not be written back in full. |
| content.data[].indexWsInfo.索引标识.indexInfo.id | integer or null | Database record ID of the source regular index; may be omitted for the default index. |
| content.data[].indexWsInfo.索引标识.indexInfo.uuid | string | lgim_ index configuration UUID; the default index uses default. |
| content.data[].indexWsInfo.索引标识.indexInfo.workspaceUUID | string | Owning workspace. |
| content.data[].indexWsInfo.索引标识.indexInfo.sourceIndexUUID | string | UUID of source A from which clone index B was created; empty for regular indexes. |
| content.data[].indexWsInfo.索引标识.indexInfo.name | string | Source index: name of the currently exported index. |
| content.data[].indexWsInfo.索引标识.indexInfo.desc | string | Source index: currently saved index description. |
| content.data[].indexWsInfo.索引标识.indexInfo.conditions | string | Source index: compatibility condition string generated from the current extend. |
| content.data[].indexWsInfo.索引标识.indexInfo.sortNo | integer or string | Matching order identifier; native direct write or clone is usually 0. |
| content.data[].indexWsInfo.索引标识.indexInfo.duration | string | Source index: currently saved standard retention duration string, for example 7d; for valid TLS stages, see setting. |
| content.data[].indexWsInfo.索引标识.indexInfo.isBindCustomStore | integer or boolean | 1/true binds an external store. |
| content.data[].indexWsInfo.索引标识.indexInfo.directIndex | integer or boolean | Source index: whether the current index is in native direct write mode. |
| content.data[].indexWsInfo.索引标识.indexInfo.isFullLineIndex | integer | Source index: current full-text index mode flag: 1 is full-line index, 0 is Message index. |
| content.data[].indexWsInfo.索引标识.indexInfo.queryType | string | Query category, for example logging/standard or the mode returned by external SLS. |
| content.data[].indexWsInfo.索引标识.indexInfo.exterStoreProject | string | External project/database identifier; usually empty for internal indexes. |
| content.data[].indexWsInfo.索引标识.indexInfo.exterStoreName | string | External resource name; usually empty for internal indexes. |
| content.data[].indexWsInfo.索引标识.indexInfo.externalResourceAccessCfgUUID | string | Access configuration identifier, not the original credential. |
| content.data[].indexWsInfo.索引标识.indexInfo.storeType | string | Usually empty for internal indexes; for bound external stores, the actual type. |
| content.data[].indexWsInfo.索引标识.indexInfo.region | string | External region code. |
| content.data[].indexWsInfo.索引标识.indexInfo.isPublicNetworkAccess | integer or boolean | Public network access flag. |
| content.data[].indexWsInfo.索引标识.indexInfo.status | integer | 0 enabled, 2 disabled, 3 deleted. |
| content.data[].indexWsInfo.索引标识.indexInfo.creator | string | Creator identity. |
| content.data[].indexWsInfo.索引标识.indexInfo.updator | string | Identity of the most recent update. |
| content.data[].indexWsInfo.索引标识.indexInfo.createAt | integer | Creation Unix seconds. |
| content.data[].indexWsInfo.索引标识.indexInfo.updateAt | integer | Update Unix seconds; -1 if never updated. |
| content.data[].indexWsInfo.索引标识.indexInfo.deleteAt | integer | Deletion Unix seconds; -1 if not deleted. |
| content.data[].indexWsInfo.索引标识.indexInfo.storagePolicy | object | Source index: currently saved long-term storage policy object. |
| content.data[].indexWsInfo.索引标识.indexInfo.storagePolicy.longStorageEnabled | boolean | Source index: whether the long-term storage policy is enabled. |
| content.data[].indexWsInfo.索引标识.indexInfo.storagePolicy.longStorageDuration | string | Source index: currently configured total long-term retention duration in days, such as 90d; may be empty when disabled. |
| content.data[].indexWsInfo.索引标识.indexInfo.setting | object | Source index: currently saved storage-specific configuration; TLS includes retention hours for each stage. |
| content.data[].indexWsInfo.索引标识.indexInfo.setting.hot_retention | integer | Source index: TLS hot storage stage hours. |
| content.data[].indexWsInfo.索引标识.indexInfo.setting.cold_retention | integer | Source index: TLS cold storage stage hours; omitted when not configured. |
| content.data[].indexWsInfo.索引标识.indexInfo.setting.archive_retention | integer | Source index: TLS archive stage hours; omitted when not configured. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend | object | Source index: currently saved matching conditions, key fields, and display configuration. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.matchMode | string | Source index: condition mode, basic or advanced. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters | array | Source index: array of condition objects in basic mode. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters[].name | string | Source index: original field name matched by the condition. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters[].condition | string | Source index: and/or logical relationship with the previous condition; the first item's connector is invalid. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters[].operation | string | Source index: comparison or matching operator saved for this condition. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters[].value | array | Source index: array of comparison values saved for this condition. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters[] | json | Source index: one basic matching condition. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.filters[].value[] | JSON | Source index: one condition value; the type depends on the actual configuration. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter | json | Source index: root group object of the condition tree in advanced mode. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.type | string | Source index: root group node type group. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.condition | string | Source index: and/or logical relationship of the group's child conditions. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters | array | Source index: array of child groups or condition leaves under this group. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[] | json | Source index: a condition leaf of type rule or a child group of type group. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].type | string | Source index: rule is a condition leaf, group is a recursive child group. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].name | string | Source index: original field name matched by the rule leaf. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].operation | string | Source index: comparison or matching operator saved for the rule leaf. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].value | array | Source index: array of comparison values for the rule leaf. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].condition | string | Source index: and/or logical relationship of the group child group. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].filters | array | Source index: array of recursive child nodes of the group child group. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.advancedFilter.filters[].value[] | JSON | Source index: one condition comparison value; the type depends on the actual configuration. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.extendFields | array | Source index: currently configured array of key fields. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.extendFields[] | json | Source index: one key field and its display alias. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.extendFields[].tag | string | Source index: original field name of the key field. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.extendFields[].alias | string | Source index: display alias of the key field. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.topFields | array | Source index: currently saved array of pinned field display configurations. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.topFields[] | json | Source index: one pinned field display configuration. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.topFields[].tag | string | Source index: original field name of the pinned field. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.topFields[].alias | string | Source index: display alias of the pinned field. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.services | array | Source index: currently saved array of service display information; it does not replace index matching conditions. |
| content.data[].indexWsInfo.索引标识.indexInfo.extend.services[] | string | Source index: one service display value. |
| content.data[].indexWsInfo.索引标识.indexInfo.workspaceName | string | Source workspace name; may be omitted. |
| content.data[].indexWsInfo.索引标识.indexInfo.workspaceStatus | integer | Source workspace status; may be omitted. |
| content.data[].indexWsInfo.索引标识.indexInfo.regionCode | string | Source region code. |
| content.data[].indexWsInfo.索引标识.indexInfo.regionName | string or null | Source region name. |
| content.data[].indexWsInfo.索引标识.indexInfo.grantStatus | integer | Optional; 3 indicates that authorization is currently unavailable; absence does not guarantee that other access conditions are met. |
| content.data[].creatorInfo | object | Identity summary; {} when no resolvable data is available. |
| content.data[].creatorInfo.uuid | string | Identity UUID; may be omitted. |
| content.data[].creatorInfo.status | integer | Account status; may be omitted. |
| content.data[].creatorInfo.wsAccountStatus | integer | Membership status; may be omitted. |
| content.data[].creatorInfo.name | string | Display name. |
| content.data[].creatorInfo.username | string | Login name. |
| content.data[].creatorInfo.email | string | Email or system identity identifier. |
| content.data[].creatorInfo.mobile | string | Mobile number; may be empty. |
| content.data[].creatorInfo.countryCode | string | Country/region code; may be omitted. |
| content.data[].creatorInfo.iconUrl | string | Avatar URL; may be omitted. |
| content.data[].creatorInfo.acntWsNickname | string | Nickname in this workspace; may be omitted. |
| content.data[].updatorInfo | object | Identity summary; {} when no resolvable data is available. |
| content.data[].updatorInfo.uuid | string | Identity UUID; may be omitted. |
| content.data[].updatorInfo.status | integer | Account status; may be omitted. |
| content.data[].updatorInfo.wsAccountStatus | integer | Membership status; may be omitted. |
| content.data[].updatorInfo.name | string | Display name. |
| content.data[].updatorInfo.username | string | Login name. |
| content.data[].updatorInfo.email | string | Email or system identity identifier. |
| content.data[].updatorInfo.mobile | string | Mobile number; may be empty. |
| content.data[].updatorInfo.countryCode | string | Country/region code; may be omitted. |
| content.data[].updatorInfo.iconUrl | string | Avatar URL; may be omitted. |
| content.data[].updatorInfo.acntWsNickname | string | Nickname in this workspace; may be omitted. |
| content.declaration | object or null | Workspace public declaration attached to non-empty business objects; may be null or an empty object when not configured; an empty object is not added. |
| pageInfo.pageIndex | integer | Current page number. |
| pageInfo.pageSize | integer | Page size. |
| pageInfo.count | integer | Number of items on this page. |
| pageInfo.totalCount | integer | For a non-empty page, the total number of matching rules; when the current empty page returns early, this value is 0, and a 0 on an out-of-range page cannot prove that no rules exist globally. |
{
"code": 200,
"content": {
"data": [
{
"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": {}
}
},
"creatorInfo": {},
"updatorInfo": {}
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE",
"pageInfo": {
"pageIndex": 1,
"pageSize": 50,
"count": 1,
"totalCount": 1
}
}
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 | Uses an undeclared Query parameter or a parameter violates rules | Parameter parsing failed | Check the Query parameter table and examples. |
| 404 | ft.NoInitOtherNodeCfg | No available source region address is found when reading or validating remote index/source log index metadata | Other node configurations are not initialized | An administrator should check the source region configuration, accessible addresses, and valid cross-workspace authorization, then retry after fixing. |
| 500 | ft.InternalServerError | Reading and formatting rules, roles, source workspaces, or index/application metadata fails | Internal error | Refresh the authorized source and region information and retry later; if it persists, provide the traceId. |