You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using APIM 2.6.0 version and they have some APIs which has white spaces in API names. In APIM 2.6.0(U2 level 61) having spaces in APIs was possible when creating through publisher APIs.
When they are trying to export APIs using APIMCLI using the below command they are getting below 400 error response for the APIs that has spaces in the API name.
Executed ImportExportCLI (apimcli) on Fri, 28 Jun 2024 12:59:09 +0530
[INFO]: Insecure: true
[INFO]: export-apis called
Login to prod2
Username:admin
Password:
Getting ClientID, ClientSecret: Status - 200 OK
Logged into prod2 environment
WARNING: credentials are stored as a plain text in /Users/imedya/.wso2apimcli/keys.json
Exporting APIs for the migration...
Cleaning all the previously exported APIs of the given target tenant, in the given environment if any, and prepare to export APIs from beginning
[INFO]: connecting to https://localhost:8243/token
[INFO]: URL: https://localhost:9443/api/am/publisher/v0.14/apis?limit=20&offset=0
[INFO]: Response: 200 OK
Found 7 of APIs to be exported in the iteration beginning with the offset #0. Maximum limit of APIs exported in single iteration is 20
[INFO]: ExportAPI: URL: https://localhost:9443/api-import-export-2.6.0-v19/export-api?name=mypetadmin API&version=1.0.0&provider=admin&preserveStatus=true&ignoreSwagger=true
Error exporting API: mypetadmin API - 1.0.0 of Provider: admin
Response Status: 400 Bad Request.
Response :
Response Headers: map[Date:[Fri, 28 Jun 2024 07:29:16 GMT] Server:[WSO2 Carbon Server]]
Response Time:34.7325ms
Response Received At:2024-06-28 12:59:16.474766 +0530 +0530 m=+6.740245334Exit status 1
APIMCLI version: apimcli-2.0.16 WSO2 API import/export tool: api-import-export-2.6.0-v19.war
Description
While using APIM 2.6.0 version and they have some APIs which has white spaces in API names. In APIM 2.6.0(U2 level 61) having spaces in APIs was possible when creating through publisher APIs.
When they are trying to export APIs using APIMCLI using the below command they are getting below 400 error response for the APIs that has spaces in the API name.
Command:
./apimcli export-apis -e prod2 --ignore-swagger-definition=true --verbose -k
Logs:
APIMCLI version: apimcli-2.0.16
WSO2 API import/export tool: api-import-export-2.6.0-v19.war
Steps to Reproduce
Get an APIM-2.6.0 pack to U2 level 61 and using publisher rest API[2] deploy an API with a space in the API name. Use the payload.json. (You can get the Postman collection from here https://api.postman.com/collections/13953519-463a4719-f41b-42fb-ace2-ecc3e7e3d3de?access_key=PMAT-01J1EXXMHTXN3351W8HR9FK5DF)
Set up the CLI environment and add the current environment using the below command
./apimcli export-apis -e prod2 --ignore-swagger-definition=true --verbose -k
You will observe the 400 bad request response for the API which has space in the API name.
Affected Component
APIM
Version
2.6.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: