Skip to Content
Technical Articles
Author's profile photo Arshi .

How to delete an API in SAP APIM

How to delete an API in SAP APIM

Everyone who is starting to learn SAP APIM, will know that while practicing on the go, we make many demo and test APIs. But what if we want to delete those later, when we learn? What sort of errors we get while doing so and how to get rid of them?

This blog will help you in deleting your test APIs.

This is my first blog on SAP APIM and I too am a beginner and learner of APIM. While I was trying to delete my initially created APIs, it was showing an error like unable to delete an API because it is linked with a product/application. I’d like to share this little learning, which might help you in your journey with API πŸ™‚

 

Problem:-

 

Lets assume we want to delete an API, which is published into our Business Hub and we have subscribed to it.

 

 

 

 

 

The error above means that, we could only delete the API after the product associated with it gets deleted or we remove this API from the group of APIs published as a product.

 

But, when we try to delete the product associated with this API

 

 

 

 

 

This error states that, this published product is being subscribed by some applicant and it will only be deleted after we delete the application linked to this product.

 

Which means , to delete an API we first need to delete any application linked to it following with the deletion of the product associated to the API and finally we can delete the main API.

 

But where could we delete the Application?

 

All the applications could be seen under this application tab

 

But there we don’t see any option to delete the same πŸ™

 

Then? How can we delete the same if we cant see it?

 

Solution:-

 

The solution is right there in top right corner of the page πŸ™‚

 

Yes, our API Business Hub…

 

 

 

There in Business Hub, go to My Workspace, where we can view and mange our created Applications.

 

 

There we see an option of delete under Actions tab. Go ahead and delete the application.

 

 

 

 

After successful deletion of the application, we can easily delete our Published Products followed by API deletion.

 

I hope you too could find this helpful πŸ™‚

 

Assigned Tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sumandeep Kaur
      Sumandeep Kaur

      Very nice Arshi.

      Author's profile photo Arshi .
      Arshi .
      Blog Post Author

      Thank you Suman.

      Author's profile photo Ramya P
      Ramya P

      Hi Arshi,

      Well written blog post. Sometimes simplest of things feels humongous without the right guidance.

       

      Thanks,

      Ramya

      Author's profile photo Arshi .
      Arshi .
      Blog Post Author

      Thank You Ramya. The motive is to help others who are also learning like us.

      Author's profile photo Nandhini Ramasamy
      Nandhini Ramasamy

      Hi Arshi,

      It is really nice and helpful.. Thank You!

      Author's profile photo Arshi .
      Arshi .
      Blog Post Author

      Thank You Nandhini.

      Author's profile photo David Nguyen
      David Nguyen

      Hi Arshi,

      Thank you for you blog. I don't have any applications associated with my API, but still received the error below. Do you know why?

      Cannot delete API

      Unable to delete API Proxy. API Proxy is associated with API Product.
      [Req ID: 954c1157-c4be-44c6-b88e-0e7765e25ab1]

       

      Since I don't have any application, but when I tried to delete the product that associcated with this API

      Unable to delete Product

      [Req ID: a829fdcd-838e-4895-b098-2c1a66fcfe6e]
      while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object returned from com.sap.apimgmt.asmprov.commons.api.exception.APIManagementBusinessException.getMessage()

       

      Thank you for your help in advance,

      DN

      Author's profile photo Arshi .
      Arshi .
      Blog Post Author

      Hi DN,

      You can try to remove that API from the associated Product and then try to delete that API

       

      1. Go to Develop -> Products
      2. Select your product
      3. Click on Edit -> API
      4. Select your API which you want to delete and then click on Remove
      5. Publish your Product

      I hope now you will be able to delete your API.

       

      Thanks

      Arshi

      Author's profile photo Declan Moore
      Declan Moore

      Hi Arshi,

       

      I'm running into the same problem as David above there.

      Unfortunately when I try to Remove the API from the Product the option to Publish the product goes greyed-out/unavailable. So there doesn't seem to be a workaround now to this issue.

      Let me know if you can advise?

       

      Thanks,

       

      Declan

      Author's profile photo Vandana Dogra
      Vandana Dogra

      Simple yet meaningful blog Arshi.