# HTTPAccessLogService
> 访问日志相关服务

---

## findHTTPAccessLog
> 查找单个日志

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/HTTPAccessLogService/findHTTPAccessLog`
- RPC：`rpc findHTTPAccessLog (FindHTTPAccessLogRequest) returns (FindHTTPAccessLogResponse);`

**请求对象 (`FindHTTPAccessLogRequest`)**

```json
{
  "requestId": "string"
}
```

**响应对象 (`FindHTTPAccessLogResponse`)**

```json
{
  "httpAccessLog": "HTTPAccessLog"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/HTTPAccessLogService/findHTTPAccessLog" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findHTTPAccessLogPartitions
> 查找日志分区

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/HTTPAccessLogService/findHTTPAccessLogPartitions`
- RPC：`rpc findHTTPAccessLogPartitions(FindHTTPAccessLogPartitionsRequest) returns (FindHTTPAccessLogPartitionsResponse);`

**请求对象 (`FindHTTPAccessLogPartitionsRequest`)**

```json
{
  "day": "string // YYYYMMDD"
}
```

**响应对象 (`FindHTTPAccessLogPartitionsResponse`)**

```json
{
  "partitions": "[]int32",
  "reversePartitions": "[]int32"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/HTTPAccessLogService/findHTTPAccessLogPartitions" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## listHTTPAccessLogs
> 列出单页访问日志

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/HTTPAccessLogService/listHTTPAccessLogs`
- RPC：`rpc listHTTPAccessLogs (ListHTTPAccessLogsRequest) returns (ListHTTPAccessLogsResponse);`

**请求对象 (`ListHTTPAccessLogsRequest`)**

```json
{
  "requestId": "string // 上一页请求ID，可选",
  "serverId": "int64 // 服务ID",
  "size": "int64 // 单页条数",
  "day": "string // 日期，格式YYYYMMDD",
  "hourFrom": "string // 开始小时",
  "hourTo": "string // 结束小时",
  "reverse": "bool // 是否反向查找，可选",
  "hasError": "bool // 是否有错误，可选",
  "firewallPolicyId": "int64 // WAF策略ID，可选",
  "firewallRuleGroupId": "int64 // WAF分组ID，可选",
  "firewallRuleSetId": "int64 // WAF规则集ID，可选",
  "userId": "int64 // 用户ID",
  "hasFirewallPolicy": "bool // 是否有WAF策略",
  "keyword": "string // 关键词",
  "ip": "string",
  "domain": "string",
  "nodeClusterId": "int64 // 集群ID",
  "nodeId": "int64 // 节点ID",
  "partition": "int32 // 分区"
}
```

**响应对象 (`ListHTTPAccessLogsResponse`)**

```json
{
  "httpAccessLogs": "[]HTTPAccessLog",
  "requestId": "string",
  "hasMore": "bool"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/HTTPAccessLogService/listHTTPAccessLogs" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
