apimcli 列表 api:400 错误请求

apimcli list apis : 400 Bad request

我有 wso2am-2.5.0 和 apimcli-1.1.0

全部从这里下载:https://wso2.com/api-management/install/

我尝试在本地配置和使用 apimcli 和 wso2am 运行

所以,我添加了名为 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

注意参数 --api_list 在文档中定义为 --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

看来发布者API版本有误。

--api_list https://localhost:9443/api/am/publisher/v0.12/apis

完成 v0.13 并重试。


编辑: 看来 DCR 端点也是错误的。改成这样。

--registration https://localhost:9443/client-registration/v0.13/register

cli 附带的自述文件似乎不正确。 :-/

请改用以下文档。

https://docs.wso2.com/display/AM250/Migrating+the+APIs+and+Applications+to+a+Different+Environment