【发布时间】:2019-08-26 13:41:29
【问题描述】:
我有 wso2am-2.5.0 和 apimcli-1.1.0
全部从这里下载:https://wso2.com/api-management/install/
我尝试在本地运行 wso2am 配置和使用 apimcli
所以,我添加了名为 local 的环境:
apimcli add-env -n local
--apim https://localhost:9443
--registration https://localhost:9443/identity/connect/register
--import-export https://localhost:9443/api-import-export-2.2.0-v2
--api_list https://localhost:9443/api/am/publisher/v0.12/apis
--token https://localhost:9443/oauth2/token
注意文档中定义为--list的参数--api_list
但是 apimcli add-env --help 显示 --api_list 而不是
最后我尝试获取 api 列表:
apimcli list apis -e local -u admin -p admin --insecure --verbose
但它给了我以下输出:
Executed ImportExportCLI (apimcli) on Wed, 26 Sep 2018 15:59:48 EEST
[INFO]: Insecure: true
[INFO]: apis called
[INFO]: Environment: 'local'
[INFO]: Reg Endpoint read: https://localhost:9443/identity/connect/register
Getting ClientID, ClientSecret: Status - 403 Forbidden
Error: <nil>
Body:
<html>
<head>
<title>Error 403</title>
</head>
<body>
<h1>Error 403 - Forbidden</h1>
</body>
</html>
Error: Request didn't respond 200 OK: 403 Forbidden
[INFO]: EnvKeysAll: &{map[]}
[ERROR]: connecting to https://localhost:9443/oauth2/token
apimcli: Unable to connect. Reason: Status: 400 Bad Request
[ERROR]: Unable to connect.: Status: 400 Bad Request
Exit status 1
【问题讨论】: