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

APIM-cli import conflicts with older retired versions of a feAPI #469

Closed
emmanuel-galindo opened this issue Mar 12, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@emmanuel-galindo
Copy link

APIM-CLI version

1.14.4

API-Management version

7.7.20231130

Bug description

When running apim-cli import for a feAPI that has 3 entries in APIM, two of them retired and one published, being the published the one that should be selected, api-cli exits because no unique api was found:

2024-03-12 15:38:10,374 [RestAPICall] DEBUG: Http verb:GET and URI: https://xxxx.com:8075/api/portal/v1.4/proxies/0fbe7852-e780-4318-a2ac-dbbc8b53d7b8/image
2024-03-12 15:38:11,190 [APIManagerAPIMethodAdapter] DEBUG: Load API-Methods for API: 0fbe7852-e780-4318-a2ac-dbbc8b53d7b8 from API-Manager
2024-03-12 15:38:11,191 [RestAPICall] DEBUG: Http verb:GET and URI: https://xxxx.com:8075/api/portal/v1.4/proxies/0fbe7852-e780-4318-a2ac-dbbc8b53d7b8/operations
2024-03-12 15:38:11,467 [APIImportApp] ERROR: No unique API found. Found 3 APIs based on filter: APIFilter{id='null', apiId='null', name='null', vhost='null', apiPath='/unique-path-api', queryStringVersion='null', state='null', backendBasepath='null', inboundSecurity='null', outboundAuthentication='null', organization='null', createdOn='null', type=ACTUAL_API, policyName='null', tag='null', customProperties=null, deprecated=false, retired=false, apiType='null', translateMethodMode=AS_NAME, loadBackendAPI=false, includeOperations=false, includeQuotas=true, includeClientOrganizations=true, includeClientApplications=true, includeClientAppQuota=false, includeImage=true, includeRemoteHost=false, includeOriginalAPIDefinition=true, useFEAPIDefinition=false, failOnError=true, includeMethods=true, translatePolicyMode=TO_NAME}
com.axway.apim.lib.error.AppException: No unique API found. Found 3 APIs based on filter: APIFilter{id='null', apiId='null', name='null', vhost='null', apiPath='/unique-path-api', queryStringVersion='null', state='null', backendBasepath='null', inboundSecurity='null', outboundAuthentication='null', organization='null', createdOn='null', type=ACTUAL_API, policyName='null', tag='null', customProperties=null, deprecated=false, retired=false, apiType='null', translateMethodMode=AS_NAME, loadBackendAPI=false, includeOperations=false, includeQuotas=true, includeClientOrganizations=true, includeClientApplications=true, includeClientAppQuota=false, includeImage=true, includeRemoteHost=false, includeOriginalAPIDefinition=true, useFEAPIDefinition=false, failOnError=true, includeMethods=true, translatePolicyMode=TO_NAME}
at com.axway.apim.adapter.apis.APIManagerAPIAdapter.getUniqueAPI(APIManagerAPIAdapter.java:200)
at com.axway.apim.adapter.apis.APIManagerAPIAdapter.getAPI(APIManagerAPIAdapter.java:121)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:91)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:52)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:129)
at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:72)
2024-03-12 15:38:11,470 [APIManagerAdapter] DEBUG: Closing cache ...

Steps to reproduce

Sharing data on a private email

Relevant log output

No response

@emmanuel-galindo emmanuel-galindo added the bug Something isn't working label Mar 12, 2024
rathnapandi pushed a commit that referenced this issue Mar 12, 2024
@rathnapandi rathnapandi self-assigned this Mar 12, 2024
@rathnapandi
Copy link
Member

@emmanuel-galindo,

Please test the fix with -
axway-apimcli-1.14.4-SNAPSHOT.zip

@rathnapandi
Copy link
Member

Fixed in 1.14.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants