# 查询席位 AFP 额度用量列表

> 全部文档的索引见 [llms.txt](https://ark.volcengine.com/llms.txt)；在任一文档页面地址后追加 `.md` 可获取该页的 Markdown 版本。

`POST https://ark.cn-beijing.volcengineapi.com/?Action=ListSeatAFPUsage&Version=2024-01-01`

分页查询企业版 `AgentPlanTeam` 模式下席位的 AFP 额度用量。支持按席位 ID、绑定用户、套餐档位过滤，按指定窗口用量或创建时间排序。

> **说明：注意**
>
> 仅适用于企业版 Agent Plan 套餐；个人版套餐用量请改用 GetAFPUsage。Filter 内 SeatIDs / UserNames / PlanType 单次最多各传入 1000 项，多个筛选条件之间为 AND 关系。返回的 Quota / Used 单位为 AFP，时间戳为 epoch 毫秒。

## 鉴权

本接口支持鉴权方式如下，详情请参见 [Base URL 及鉴权](/docs/base-url-and-authentication)。

* Access Key 鉴权，请在 [Access Key 管理](https://console.volcengine.com/iam/keymanage) 页面，获取 Access Key。本接口仅支持 Access Key 鉴权。

---

<span id="request-parameters"></span>
## 请求参数

### Body 参数

**ProjectName** `string` `必选` | 项目名称

待查询的项目空间名称。

**Filter** `object` | 过滤条件

席位过滤条件。多个筛选条件之间为 AND 关系。

**PlanType** `string[]` | 套餐档位

`Filter.PlanType`

按套餐档位过滤，可同时指定多个。取值：`Small`、`Medium`、`Large`、`Max`。

**SeatIDs** `string[]` | 席位 ID 列表

`Filter.SeatIDs`

按席位 ID 过滤，单次请求最多传入 1000 个。

**UserNames** `string[]` | 绑定用户名

`Filter.UserNames`

按席位绑定的用户名过滤，单次请求最多传入 1000 个。

**PageNumber** `integer` `默认值 1` | 起始页码

分页查询的起始页码，从 1 开始。

**最小值**：`1`

**PageSize** `integer` `默认值 10` | 每页大小

分页查询时每页返回的席位数量。

**取值范围**：`[10, 100]`

**SortBy** `string` `默认值 CreateTime` | 排序字段

排序字段。可选值：`AFPFiveHour`（按 5 小时 AFP 用量）、`AFPWeekly`（按周 AFP 用量）、`AFPMonthly`（按月 AFP 用量）、`CreateTime`（按创建时间）。

**SortOrder** `string` `默认值 Desc` | 排序方向

排序方向。可选值：`Asc`（升序）、`Desc`（降序）。

## 响应参数

**Items** `object[]` | 用量列表

当前页的席位 AFP 用量列表。

**AFPDaily** `object` | 近一天用量

`Items.AFPDaily`

近 1 天滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`Items.AFPDaily.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`Items.AFPDaily.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`Items.AFPDaily.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`Items.AFPDaily.Used`

该窗口内已消耗的 AFP 配额。

**AFPFiveHour** `object` | 5 小时用量

`Items.AFPFiveHour`

近 5 小时滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`Items.AFPFiveHour.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`Items.AFPFiveHour.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`Items.AFPFiveHour.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`Items.AFPFiveHour.Used`

该窗口内已消耗的 AFP 配额。

**AFPMonthly** `object` | 近一月用量

`Items.AFPMonthly`

近 1 个月滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`Items.AFPMonthly.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`Items.AFPMonthly.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`Items.AFPMonthly.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`Items.AFPMonthly.Used`

该窗口内已消耗的 AFP 配额。

**AFPWeekly** `object` | 近一周用量

`Items.AFPWeekly`

近 1 周滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`Items.AFPWeekly.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`Items.AFPWeekly.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`Items.AFPWeekly.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`Items.AFPWeekly.Used`

该窗口内已消耗的 AFP 配额。

**PlanType** `string` | 套餐档位

`Items.PlanType`

该席位所属的套餐档位。取值：`Small`、`Medium`、`Large`、`Max`。

**SeatID** `string` | 席位 ID

`Items.SeatID`

该条用量记录对应的席位 ID。

**PageNumber** `integer` | 当前页码

当前返回结果对应的页码。

**PageSize** `integer` | 每页大小

当前返回结果对应的每页大小。

**ProjectName** `string` | 项目名称

当前查询的项目空间名称。

**TotalCount** `integer` | 总记录数

符合筛选条件的席位总记录数。


## 代码示例

## 默认

### cURL

#### Request

```bash
curl 'https://ark.cn-beijing.volcengineapi.com/?Action=ListSeatAFPUsage&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{
  "ProjectName": "default",
  "Filter": {
    "PlanType": ["Large", "Max"],
    "UserNames": ["zhang_san", "li_si"]
  },
  "PageSize": 20,
  "PageNumber": 1,
  "SortBy": "AFPMonthly",
  "SortOrder": "Desc"
}
'
```

#### Response

```
{
  "ResponseMetadata": {
    "RequestId": "20260511041508C924A07ED1F36B8254",
    "Action": "ListSeatAFPUsage",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "cn-beijing"
  },
  "Result": {
    "ProjectName": "default",
    "TotalCount": 2,
    "PageNumber": 1,
    "PageSize": 20,
    "Items": [
      {
        "SeatID": "seat-agt-mx-001",
        "PlanType": "Max",
        "AFPFiveHour": {
          "Quota": "100.0",
          "Used": "42.3",
          "SubscribeTime": 1778788800000,
          "ResetTime": 1778806800000
        },
        "AFPDaily": {
          "Quota": "200.0",
          "Used": "78.1",
          "SubscribeTime": 1778716800000,
          "ResetTime": 1778803200000
        },
        "AFPWeekly": {
          "Quota": "1000.0",
          "Used": "421.5",
          "SubscribeTime": 1778457600000,
          "ResetTime": 1779062400000
        },
        "AFPMonthly": {
          "Quota": "4000.0",
          "Used": "1872.8",
          "SubscribeTime": 1777939200000,
          "ResetTime": 1780531200000
        }
      },
      {
        "SeatID": "seat-agt-lg-001",
        "PlanType": "Large",
        "AFPFiveHour": {
          "Quota": "50.0",
          "Used": "15.7",
          "SubscribeTime": 1778788800000,
          "ResetTime": 1778806800000
        },
        "AFPDaily": {
          "Quota": "100.0",
          "Used": "31.2",
          "SubscribeTime": 1778716800000,
          "ResetTime": 1778803200000
        },
        "AFPWeekly": {
          "Quota": "500.0",
          "Used": "187.5",
          "SubscribeTime": 1778457600000,
          "ResetTime": 1779062400000
        },
        "AFPMonthly": {
          "Quota": "2000.0",
          "Used": "943.6",
          "SubscribeTime": 1777939200000,
          "ResetTime": 1780531200000
        }
      }
    ]
  }
}
```
