分析 CLI
如何使用工具箱 CLI 访问分析数据。
关于本任务
过程
- 安装工具包设置 API Connect 工具包
- 使用 CLI 登录。例如:
其中apic login --server platform-api-host-name --sso<platform-api-host-name>是托管 API 管理器("管理服务器")的服务器的主机名部分 URL。 要确定主机名,请在浏览器中打开 API 管理器,然后在地址栏中复制 URL 中的主机名(从 " https:// "之后开始,到"/manager "之前结束),如下例所示:
工具箱提示输入上下文时,输入https://platform-api.us-east-1.d-r01.apic.cloud.ibm.com/managerprovider并按 Enter 键:
有关工具包 CLI 的更多信息,请参阅设置 API Connect 工具包。Context? provider - 使用
-m analytics -h查看可用的工具包分析命令。 - 使用
events命令查看分析事件。apic -m analytics events -h Type "apic [command] --help" for help on the following related commands: events:catalogCount Count events at catalog scope. events:catalogGet Get specific event at catalog scope. events:catalogList List events at catalog scope. events:orgCount Count events at organization scope. events:orgGet Get specific event at organization scope. events:orgList List events at organization scope. events:spaceCount Count events at space scope. events:spaceGet Get specific event at space scope. events:spaceList List events at space scope.注: 提及 "云 "的命令不适用于 API Connect Enterprise as a Service。