wso2am API 管理器 2.1 发布者更改生命周期问题



我部署了API Manager 2.1.0并设置了此处描述的api-import-export-2.1.0 war文件。通过上传 zip 文件导入我的 API 端点后,状态 = 已创建。

要实际发布 API,我调用了发布者的更改生命周期 API,但我收到以下异常:

TID: [-

1234] [] [2017-07-06 11:11:57,289] 错误 {org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper} - 全局异常映射器捕获了未知异常。 {org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper} java.lang.NoSuchMethodError: org.wso2.carbon.apimgt.api.APIProvider.changeLifeCycleStatus(Lorg/wso2/carbon/apimgt/api/model/APIIdentifier;Ljava/lang/String;(Z

有什么想法吗?

我可以获取一个访问令牌(范围 apim:api_view(并调用它

:9443/api/am/publisher/v0.10/API

列出 API 就好了。

我得到一个不同的acces_token(对于范围:apim:api_publish(,然后调用

:9443/api/am/publisher/v0.10/api/change-lifecycle

但得到上述异常。下面是示例:

[root@localhost]  ./publish.sh 
View APIs (token dc0c1497-6c27-3a10-87d7-b2abc7190da5 scope: apim:api_view)
curl -k -s -H "Authorization: Bearer dc0c1497-6c27-3a10-87d7-b2abc7190da5" https://gw-node:9443/api/am/publisher/v0.10/apis 
{
"count": 1,
"next": "",
"previous": "",
"list": [
{
"id": "d214f784-ee16-4067-9588-0898a948bb17",
"name": "Health",
"description": "health check",
"context": "/api",
"version": "v1",
"provider": "admin",
"status": "CREATED"
}
] }
Publish API (token b9a31369-8ea3-3bf2-ba3c-7f2a4883de7d scope: apim:api_publish)   
curl -k -H "Authorization: Bearer b9a31369-8ea3-3bf2-ba3c-7f2a4883de7d" -X POST https://gw-node:9443/api/am/publisher/v0.10/apis/change-lifecycle?apiId=d214f784-ee16-4067-9588-0898a948bb17&action=Publish
{
"code":500,
"message":"Internal server error",
"description":"The server encountered an internal error. Please contact administrator.",
"moreInfo":"",
"error":[]
}

问题已解决。在 apim 2.1 中,发布者和商店 API 版本发生了变化。

在 apim 2.0 中,我使用了:

:9443/api/am/publisher/v0.10/API :9443/api/am/store/v0.10/API 但在 APIM 2.1 中,它们是: :9443/api/am/publisher/v0.11/API :9443/api/am/store/v0.11/API

最新更新