Skip to main content

Tinet CtiCloud OpenAPI CLI

Project description

CTICloud 命令行客户端(0.0.8),封装 OpenAPI 接口,与 CTICloud Wiki 中参数与响应一致,适合脚本化集成与 Agent 调用。

PyPI: https://pypi.org/project/tinet-cticloud-cli/

功能概览

子命令 说明
task 预测/自动外呼任务全生命周期:创建、查询、更新、启动/暂停/结束、删除;号码导入与查询;任务批次列表/详情;运行中任务监控总览与详情
cdr 外呼任务呼叫记录(话单)查询
record 根据录音文件名获取试听/下载 URL,可选 --output 落盘
monitor 平台监控与实时统计:座席/队列/话机/业务/中继监控;座席/满意度/队列实时统计
agent 座席操作与数据管理:上线/下线/置忙/置闲/咨询/挂机/查询/删除等
config 本地凭证管理(~/.cticloud/config.json

monitor agent平台座席监控(只读);agent *座席操作与数据管理(含写操作),二者语义分离。

环境要求

  • Python ≥ 3.10
  • 运行时需访问 api-{region}.cticloud.cn
  • CTICloud 部门 token(环境变量或配置文件)

安装

PyPI 安装(推荐):

pip install tinet-cticloud-cli
tinet-cticloud-cli --version   # 0.0.8
tinet-cticloud-cli --help

指定版本或升级:

pip install 'tinet-cticloud-cli==0.0.8'
pip install --upgrade tinet-cticloud-cli

macOS 等受限环境可使用 pipx

pipx install tinet-cticloud-cli

配置凭证

环境变量:

export CTICLOUD_REGION=your_enterprise_region
export CTICLOUD_VALIDATE_TYPE=2
export CTICLOUD_ENTERPRISE_ID=your_enterprise_id
export CTICLOUD_TOKEN=your_token

或配置文件:

tinet-cticloud-cli config set \
  --region your_enterprise_region \
  --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

# 座席操作
tinet-cticloud-cli agent query --limit 10
tinet-cticloud-cli agent get --cno 2000
tinet-cticloud-cli agent login --cno 2000 --bind-tel 13800000001 --bind-type 1

全局 --json 输出 Wiki 原始 JSON;默认人类可读摘要,并对手机号、password / encryptPassword 等敏感字段脱敏。

帮助与 API 文档

安装后通过 --help 查看各子命令及参数(与 Wiki Query/Body 字段一一对应):

tinet-cticloud-cli --help
tinet-cticloud-cli task --help
tinet-cticloud-cli monitor --help
tinet-cticloud-cli agent --help
tinet-cticloud-cli agent login --help
tinet-cticloud-cli cdr list-auto-task --help

OpenAPI 契约与字段说明见 CTICloud Wiki

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinet_cticloud_cli-0.0.8.tar.gz (62.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinet_cticloud_cli-0.0.8-py3-none-any.whl (88.6 kB view details)

Uploaded Python 3

File details

Details for the file tinet_cticloud_cli-0.0.8.tar.gz.

File metadata

  • Download URL: tinet_cticloud_cli-0.0.8.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for tinet_cticloud_cli-0.0.8.tar.gz
Algorithm Hash digest
SHA256 f20b1c29084cc147aa1056091f3991daee89e18ed39eef85730f48962e9d46e0
MD5 be32c8baf1738f84406bda8190352df0
BLAKE2b-256 5e68c4d53fdcc8736908429a37af1fe0dfabbb722b5856209dd83a7a10a66e2a

See more details on using hashes here.

File details

Details for the file tinet_cticloud_cli-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for tinet_cticloud_cli-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6350b9aa69222aaa016cde114594c109879bacef72c0289efb9aa8d2078ba655
MD5 e57e934c767626a2ee787cb8410dba1f
BLAKE2b-256 6b0f40d5b9e9b34af9747fbad8843ba2ad40faece449243dabbe4787f5f037fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page