Posts

Showing posts with the label apictl

WSO2 APIM- apictl import error and error in publishing the api

Image
Hi everyone!  Let me share another troubleshooting experience with WSO2 API Manager.  Environment: RHEL8.3 WSO2 APIM Version: 3.2.0.x Tools: apictl (API Controller) Problem I have tried importing an API from one environment to the other via apictl. This API contains a custom sequence as well. However, the apictl api-import command returned the HTTP 500 error with following message Response: {"code":500,"message":"Internal server error", "description":"Error while importing API","moreInfo":"","error":[]} Further, WSO2 carbon logs shows the below error message- [2022-12-28 15:19:29,139] ERROR - APIUtil Issue is in accessing the Registry [2022-12-28 15:19:29,140] ERROR - APIMappingUtil Error occurred while getting the uuid of the mediation sequence org.wso2.carbon.apimgt.api.APIManagementException: Issue is in accessing the Registry         at org.wso2.carbon.apimgt.impl.utils.APIUtil.getMediationPolicyAttribu...

WSO2 API Manager APICTL api-import error

Image
  WSO2 APIM version: 3.2.0.85 APICTL Version:  3.2.4 Recently I have updated my WSO2 API manager version 3.2.0 with latest patch level 85 and tried using api controller for api export/import to a different environment. Earlier it was working fine with default pack 3.2.0 but api import starts giving error while importing the API. Below is the error stack trace in apictl- APICTL errors: apictl import-api --file D:\test\Test001-API_1.0.0.zip -e dev -k Error importing API. Status: 500 Response: {"code":500,"message":"Internal server error","description":"The server encountered an internal error. Please contact administrator.","moreInfo":"","error":[]} apictl: Error importing API Reason: 500 Exit status 1 wso2carbon logs: [2021-10-15 23:42:49,635] ERROR - GlobalThrowableMapper An unknown exception has been captured by the global exception mapper. com.google.gson.JsonSyntaxException: Oct 14, 2021, 10:26:10 AM    ...

WSO2 API Manager APICTL Commands

Image
WSO2 API Manager apictl commands APICTL version used Version: 3.2.4 Build Date: 2021-10-12 03:45:30 UTC Step#1 Environment Add & Remove apictl add-env -e dev --apim <APIM_URL>  apictl add-env -e dev --apim https://localhost:9443  apictl remove env <ENV> apictl remove env dev Step#2 List environment  apictl list envs Step#3 Login to the environment  apictl login <ENV> -u <USERNAME> -p <PASSWORD> -k  apictl login dev -u admin -p admin -k  Step#4 Set API export directory apictl set --export-directory D:\APIMLab\export [path belongs to windows] Step#5 List APIs apictl list apis -e <ENV> -k apictl list apis -e dev -k  Step#6 Export 1 API apictl export-api -n <API-name> -v <version> -r <provider> -e <environment> -k  apictl export-api -n HelloWorld -v 1.0.0 -r admin -e dev -k  Other options apictl export-api --name <API-name> --version <version> --provider <provider> ...