> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 示例

> CloudX CLI 常见工作流的可复制示例，包括登录、报表、竞价检查、配置、JSON 输出与 CSV 导出。

# 示例

本页汇集了 `cloudx` CLI 的实用示例。

命令详情与标志支持，请参见 [报表命令](/zh/cli/reporting)、[竞价检查](/zh/cli/auction-inspection) 和 [配置](/zh/cli/configuration)。

## 报表基础

### 默认查看当日控制台汇总

```bash theme={null}
cloudx report dashboard
```

### 按国家与设备 OS 过滤的控制台汇总

```bash theme={null}
cloudx report dashboard --period last_7d --country US --device-os iOS
```

### 查看 CloudX 与外部聚合平台的控制台汇总

```bash theme={null}
cloudx report dashboard --period last_7d --source all
```

### 按 UTC 小时查看控制台图表

```bash theme={null}
cloudx report dashboard --period 2026-04-01 --granularity hourly
```

### 自定义日期范围的控制台 JSON 输出

```bash theme={null}
cloudx report dashboard --period 2026-04-01..2026-04-07 --json
```

### 为较重报表设置更长超时

```bash theme={null}
cloudx --timeout 90s report export --period 2026-04-01..2026-04-07
```

## 拆分报表

### 按日期和国家查看收入与 eCPM

```bash theme={null}
cloudx report breakdown --period last_7d --by day,country --metrics revenue,impressions,ecpm
```

### 按小时和应用查看填充率

```bash theme={null}
cloudx report breakdown --period 2026-04-01 --granularity hourly --by hour,app --metrics requests,impressions,fill_rate
```

### 按收入查看 Top 广告单元

```bash theme={null}
cloudx report breakdown --by app,ad_unit --metrics revenue,ecpm --top 10
```

### 使用指标过滤并输出 JSON

```bash theme={null}
cloudx report breakdown --by country --metrics revenue,impressions --having 'revenue > 10' --json
```

## 竞价方报表

### 默认查看当日竞价方表现

```bash theme={null}
cloudx report bidders
```

### 同时包含生产流量与测试流量

```bash theme={null}
cloudx report bidders --period last_30d --test-mode all --country US
```

### 以 JSON 输出竞价方报表

```bash theme={null}
cloudx report bidders --period yesterday --json
```

## 应用报表

### 默认查看当日应用表现

```bash theme={null}
cloudx report apps
```

### 按设备 OS 过滤

```bash theme={null}
cloudx report apps --period last_30d --device-os Android
```

### 按应用对比 CloudX 与 AppLovin

```bash theme={null}
cloudx report apps --period last_30d --source cloudx,applovin
```

### 单日应用报表的 JSON 输出

```bash theme={null}
cloudx report apps --period 2026-04-01 --json
```

## 广告单元报表

### 默认查看当日广告单元表现

```bash theme={null}
cloudx report ad-units
```

### 按应用与广告单元类型过滤

```bash theme={null}
cloudx report ad-units --app com.example.game --ad-unit-type BANNER
```

### 查看单个应用广告单元的外部聚合平台 ILRD

```bash theme={null}
cloudx report ad-units --app com.example.game --source all
```

### 以 JSON 输出广告单元报表

```bash theme={null}
cloudx report ad-units --period last_7d --country US --device-os iOS --json
```

## 展示级收入导出

### 提交已结束 UTC 日期的导出任务

```bash theme={null}
cloudx report impressions export --date 2026-07-16
```

### 等待并下载 gzip CSV

```bash theme={null}
cloudx report impressions export --date 2026-07-16 --output ./impressions-2026-07-16.csv.gz
```

### 按应用、国家与设备 OS 过滤

```bash theme={null}
cloudx report impressions export \
  --date 2026-07-16 \
  --app com.example.game \
  --country US \
  --device-os iOS \
  --output ./example-game-us-ios.csv.gz
```

### 验证并预览下载文件

```bash theme={null}
gzip -t ./impressions-2026-07-16.csv.gz
gzip -cd ./impressions-2026-07-16.csv.gz | head
```

## 导出

### 将当日数据以 CSV 导出至标准输出

```bash theme={null}
cloudx report export
```

### 按国家与设备 OS 过滤后以 CSV 导出

```bash theme={null}
cloudx report export --period last_30d --country US --device-os iOS
```

### 按 UTC 小时分桶导出 CSV

```bash theme={null}
cloudx report export --period 2026-04-01 --granularity hourly
```

### 以 JSON 而非 CSV 导出

```bash theme={null}
cloudx report export --period 2026-04-01..2026-04-07 --json
```

### 将 CSV 保存到文件

```bash theme={null}
cloudx report export --period last_7d > report.csv
```

## 竞价检查

### 列出当日竞价

```bash theme={null}
cloudx auction list --period today --test-mode all
```

### 列出包含 CloudX ILRD 的竞价

```bash theme={null}
cloudx auction list --period yesterday --has-ilrd
```

### 列出包含外部聚合平台 ILRD 的竞价

```bash theme={null}
cloudx auction list --period today --has-external-ilrd --mediator applovin
```

### 按库存与设备过滤竞价

```bash theme={null}
cloudx auction list --period today --app com.example.game --ad-unit-id adunit_interstitial_1 --country GB --device-os Android --limit 10
```

### 显示单次竞价及关联行

```bash theme={null}
cloudx auction show auc_123 --with rounds,bids,ilrd,external-ilrd --json
```

### 检查单次竞价的轮次

```bash theme={null}
cloudx auction rounds --auction-id auc_123
```

### 聚合轮次指标

```bash theme={null}
cloudx auction rounds --period today --metric skip-reason --test-mode all
```

### 按生效底价来源列出出价

```bash theme={null}
cloudx auction bids --period today --floor-source dynamic --country US --json
```

## 配置

### 显示实时配置

```bash theme={null}
cloudx config show
```

### 显示已发布配置版本

```bash theme={null}
cloudx config show --version 12
```

### 显示带元数据的配置草稿

```bash theme={null}
cloudx config show --draft --with-metadata
```

### 以 JSON 输出原始配置数据

```bash theme={null}
cloudx config show --id cfg_123 --json
```

### 验证本地配置文件

```bash theme={null}
cloudx config validate config.yaml
```

### 以 JSON 验证草稿

```bash theme={null}
cloudx config validate --id draft_123 --json
```

### 创建草稿订单项

```bash theme={null}
cloudx config edit create-line-item \
  --name "美国激励视频" \
  --priority 2 \
  --bidfloor 1.5 \
  --ad-unit-id au_123 \
  --bidder meta \
  --bidder unityAds
```

### 暂停订单项

```bash theme={null}
cloudx config edit update-line-item --id li_123 --status paused
```

### 修改订单项底价并在有警告时失败

```bash theme={null}
cloudx config edit update-line-item --id li_123 --bidfloor 1.5 --strict
```

### 从草稿中删除订单项

```bash theme={null}
cloudx config edit delete-line-item --id li_123 --summary "删除旧激励视频订单项"
```

### 发布配置草稿

```bash theme={null}
cloudx config publish --id draft_123 --version-label "5 月底价更新"
```

### 调整竞价底价并发布

```bash theme={null}
cloudx config edit update-line-item --id li_123 --bidfloor 1.5 --summary "提高美国激励视频底价"
cloudx config validate --id draft_123
cloudx config publish --id draft_123 --version-label "提高美国激励视频底价"
```

## 组合工作流

```bash theme={null}
cloudx report dashboard
cloudx report breakdown --period last_7d --by day,country --metrics revenue,impressions,ecpm
cloudx report bidders --period last_7d --country US
cloudx report apps --period last_7d --source cloudx,applovin
cloudx report ad-units --app com.example.game --source all
cloudx report export --period last_7d > report.csv
cloudx config validate config.yaml --strict
cloudx config edit update-line-item --id li_123 --bidfloor 1.5
cloudx config publish --id draft_123 --version-label "提高美国激励视频底价"
```

## 相关链接

* [CloudX CLI 概览](/zh/cli)
* [安装](/zh/cli/installation)
* [身份认证命令](/zh/cli/authentication)
* [报表命令](/zh/cli/reporting)
* [竞价检查](/zh/cli/auction-inspection)
* [配置](/zh/cli/configuration)
