Rendering the API list in portal dashboard gives error.

Document ID : KB000004463
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

When we try to display the list of APIs in the CA API Developer Portal then nothing is displayed. We get an error message in the Catalina.out file. This error message seems to be related to an API we had referenced earlier but removed from the list of APIs (removing "Set as Portal Managed" from its policy. 

Symptoms: Unable to get the list of API in CA API Developer Portal

Catalina.out file in portal shows following stack trace

Customer Stack Trace: 

10/04 06:48:27.768 ERROR (http-37080-3:) - [APIListXS general] -- java.lang.NumberFormatException: For input string: "1.0.0"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at com.thelevel.lrs.gateway.APIServices.getAPI(APIServices.java:629)
	at com.thelevel.lrs.gateway.APIListXS.getXML(APIListXS.java:198)
	at com.thelevel.cms.xmlsources.AbstractXMLSource.getXML(AbstractXMLSource.java:172)
	at com.thelevel.cms.site.PageRule.handleRequest(PageRule.java:237)
	at com.thelevel.cms.site.CMSSiteHandler.handleRequest(CMSSiteHandler.java:488)
	at com.thelevel.cms.site.CMSSiteHandler.handleRequest(CMSSiteHandler.java:439)
	at com.thelevel.cms.site.SiteServlet.processRequest(SiteServlet.java:409)
	at com.thelevel.cms.site.SiteServlet.instrumentRequest(SiteServlet.java:215)
	at com.thelevel.cms.site.SiteServlet.filterRequest(SiteServlet.java:169)
	at com.thelevel.cms.site.SiteServlet.service(SiteServlet.java:119)
Cause:

Incorrect method to remove the API. Deleting the API directly from CA API Gateway without removing it from CA API Developer Portal using recommended method.

 

 

Resolution:

1. Login into CMS /admin 
2. Go to 
/sitebuilder/content/groups/APIs 
3. Find the .xml file which has format API-ID.xml 
4. Identify the file which related to the API which was deleted( Opening the file you will see the API name which was published) or the filename is the API-ID that matches the id in  Set as Portal Managed assertion 
5. Delete the file.

Additional Information:

However the problem can be avoided if a proper procedure is followed as mentioned in wiki
https://docops.ca.com/ca-api-developer-portal/3-5/en/manage-the-api-portal/manage-apis/remove-apis