Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot export API Products with spaces in the name #3571

Open
niranRameshPeiris opened this issue Feb 4, 2025 · 0 comments
Open

Cannot export API Products with spaces in the name #3571

niranRameshPeiris opened this issue Feb 4, 2025 · 0 comments
Labels

Comments

@niranRameshPeiris
Copy link

Description

Hi Team,

We observed an issue while exporting API products. We were able to reproduce the same behavior locally in the latest U2 as well.

Thanks & Regards,
Niran Peiris

Steps to Reproduce

Please find the steps to reproduce the issue.

  • Start the API Manager.
  • Create and publish an API called "The Test API".
  • Create and publish an API Product called "The API Product".
  • Try to export the API using the below command.
./apictl export api -n The Test API -v 1.0 -e test1 --preserve-status=true --format JSON -k
  • You will get an error such as below.
{"code":900967,"message":"General Error","description":"Server Error Occurred","moreInfo":"","error":[]}
  • If you execute the same command such as below it exports the API successfully.
./apictl export api -n "The Test API" -v 1.0 -e test1 --preserve-status=true --format JSON -k

It seems like we have to use "" to properly expert APIs when there are spaces in between. However, we could not observe the same behavior when exporting an API Product.

  • Try to export the API Product using the below command.
./apictl export api-product -n The API Product -v  v1 -e test1 --preserve-status=true --format JSON -k
  • You will get an error such as below.
{"code":900967,"message":"General Error","description":"Server Error Occurred","moreInfo":"","error":[]}
  • Try to export the API Product using the below command.
./apictl export api-product -n "The API Product" -v  v1 -e test1 --preserve-status=true --format JSON -k
  • You will get an error such as below.
Error exporting API Product: 400 

When we look at the access logs we can see the logs get pointed such as below.
API:

127.0.0.1 - - [03/Feb/2025:16:03:50 -0300] GET /api/am/publisher/v4/apis/export?name=The+Test+API&version=1.0&providerName=&preserveStatus=true&format=JSON HTTP/1.1 200 2128 - go-resty/2.4.0 (https://github.com/go-resty/resty) 0.032

API Product:

127.0.0.1 - - [03/Feb/2025:16:54:29 -0300] GET /api/am/publisher/v4/api-products/export?name=The null 400 - - - 0.001

Version

4.4.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant