CTICloud OpenAPI CLI — 24 interfaces (task, cdr, record, monitor)
Project description
tinet-cticloud-cli
CTICloud 命令行客户端(0.0.7),封装 24 个 OpenAPI 接口,与 cti-link-wiki 中预测式外呼、任务呼叫记录、平台监控与实时统计文档参数与响应一致,适合脚本化集成与 Agent 调用。
功能概览
| 子命令 | 说明 |
|---|---|
task |
预测/自动外呼任务全生命周期:创建、查询、更新、启动/暂停/结束、删除;号码导入与查询;任务批次列表/详情;运行中任务监控总览与详情 |
cdr |
外呼任务呼叫记录(话单)查询,支持 Wiki 全量筛选与 --all 自动翻页 |
record |
根据录音文件名获取试听/下载 URL,可选 --output 落盘 |
monitor |
平台监控与实时统计:座席/队列/话机/业务/中继监控;座席/满意度/队列实时统计 |
config |
本地凭证管理(~/.cticloud/config.json) |
典型闭环:
任务创建 → … → 任务监控 → 话单 → 录音
平台监控 (monitor agent/queue/…) → 实时统计 (monitor statistics-*)
monitor 子命令
| 命令 | 说明 |
|---|---|
agent |
座席监控 |
enterprise-call-latest |
企业最新业务监控 |
trunk-monitor |
中继组并发监控 |
exten |
话机监控(--extens 或 --cnos 二选一) |
queue |
队列监控(--queue-monitor-fields 必填) |
statistics-agent |
座席实时统计 |
statistics-investigation |
满意度调查实时统计 |
statistics-queue |
队列实时统计 |
环境要求
- Python ≥ 3.10
- 运行时需访问
api-{region}.cticloud.cn - CTICloud 部门 token(环境变量或配置文件)
安装
pip install tinet-cticloud-cli
tinet-cticloud-cli --version # 0.0.7
tinet-cticloud-cli --help
macOS 等受限环境可使用 pipx:
pipx install tinet-cticloud-cli
从源码安装(开发):
cd cli-anything-cticloud/agent-harness
pip install -e ".[dev]"
配置凭证
环境变量:
export CTICLOUD_REGION=1
export CTICLOUD_VALIDATE_TYPE=2
export CTICLOUD_ENTERPRISE_ID=your_enterprise_id
export CTICLOUD_TOKEN=your_token
或配置文件:
tinet-cticloud-cli config set \
--region 1 \
--validate-type 2 \
--enterprise-id your_enterprise_id \
--token your_token
快速示例
# 查询任务列表
tinet-cticloud-cli task query --limit 10
# 任务监控总览(运行中或暂停)
tinet-cticloud-cli task monitor-tasks --status 2
# 查询呼叫记录
tinet-cticloud-cli cdr list-auto-task --start-time 1700000000 --start-time-end 1700086400
# 平台监控与实时统计(--json 输出 Wiki 原始 JSON)
tinet-cticloud-cli --json monitor agent --limit 10
tinet-cticloud-cli --json monitor enterprise-call-latest
tinet-cticloud-cli --json monitor queue --queue-monitor-fields queueParams --qnos 1000
tinet-cticloud-cli --json monitor statistics-queue
全局 --json 输出 Wiki 原始 JSON;默认人类可读摘要,并对手机号、password / encryptPassword 等敏感字段脱敏。
文档
- 完整使用指南:源代码仓库
cli-anything-cticloud/CTICLOUD-CLI.md - 包内参数与 Wiki 对照:安装包内
cli_anything/cticloud/README.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinet_cticloud_cli-0.0.7.tar.gz.
File metadata
- Download URL: tinet_cticloud_cli-0.0.7.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b0b0de240d9c696b62c2d180d8f6a71715f84da2ea07f55e6bbbd2fbc4ed7cd
|
|
| MD5 |
da13d4c4413082d204ccdd6a23b1e17d
|
|
| BLAKE2b-256 |
7b8a413c8175299bc85e56be676d0d880b6c0c055b56f0be02ea1a89fdc591a7
|
File details
Details for the file tinet_cticloud_cli-0.0.7-py3-none-any.whl.
File metadata
- Download URL: tinet_cticloud_cli-0.0.7-py3-none-any.whl
- Upload date:
- Size: 71.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90e4f50e706b5ce73bccc43ac6fcbd8e21b30ef5fc17a084196f281babf7137f
|
|
| MD5 |
a261b324379efad5ab5d207dd0387ced
|
|
| BLAKE2b-256 |
57bfeaa2157ec84e4c591184b484c189165ac4ce3215d332d2e4f738eed977fb
|