Some times you may accidentally delete an Api from the carbon management console. If you delete an API from Management console (Which is not the correct way) It will only delete API related metadata. Some of the data related to that API won't get removed from APi Manager tables. This will corrupt the Database and result in errors.
The recommended way of deleting an API is to use the APIM Publisher application and delete it. This will remove all information related to the API. And if there are subscriptions for that API, it will inform you to unsubscribe it first (these won't happen if you use the management console. It is only provided for management tasks such as user management, etc)
Following is a list of things you need to do to completely remove the api from the API manager 1.8.
Please keep a backup of the database and any other resources before you do this.
Please keep a backup of the database and any other resources before you do this.
Step 1 - Remove subscriptions of that api.
1. execute following query to get the application related information (You will need the APPLICATION_ID value to unsubscribe an API from that application)
SELECT * FROM AM_APPLICATION;
2. execute following query to get the API related information (You will need the API_ID value to unsubscribe an API from an application)
SELECT * FROM AM_API;
3. execute following to delete the subscription (Set the necessary ids. If you do not know which Application id to use, the use all ids from the AM_APPLICATION table. it will delete only the correct combination)
DELETE FROM AM_SUBSCRIPTION WHERE API_ID = ? AND APPLICATION_ID = ?;
Step 2 - Remove API
1. If you have an icon to this api, To delete it, go to following registry location in the management console and and delete the API (select 'Action' and delete)
/_system/governance/apimgt/applicationdata/icons/admin
2. Delete API related meta data by login to the management console and navigating to Home > Metadata > List > APIs (You have already done that)
3. To delete the Swagger resources related to this API , go to following registy location and delete the resource collection (select on the api-doc resource and it will display swagger docs for all the resources. delete related on by selecting the Action button)
/_system/governance/apimgt/applicationdata/api-docs
4. Delete the synapse configuration for that api in AM_HOME/repository/deployment/server/synapse-configs/default/api location
5. Run following database queries to remove api related data
DELETE FROM AM_API_LC_EVENT WHERE API_ID=? DELETE FROM AM_API_COMMENTS WHERE API_ID=? DELETE FROM AM_API_RATINGS WHERE API_ID=? DELETE FROM AM_SUBSCRIPTION WHERE API_ID=? DELETE FROM AM_EXTERNAL_STORES WHERE API_ID=? DELETE FROM AM_API WHERE API_PROVIDER=? AND API_NAME=? AND API_VERSION=? DELETE FROM AM_API_URL_MAPPING WHERE API_ID = ?
following are two sample queries
DELETE FROM AM_SUBSCRIPTION WHERE API_ID=5; DELETE FROM AM_API WHERE API_PROVIDER='admin' AND API_NAME='SampleAPI' AND API_VERSION='1.0';
6. remove api related collection from the registry location
/_system/governance/apimgt/applicationdata/provider/<user>. There should be an empty collection with the api name on it.
/_system/governance/apimgt/applicationdata/provider/<user>. There should be an empty collection with the api name on it.
7. Restart the AM to remove any cached content.
This should remove all the content related to the api.
I would like to thank ChamilaA who provided the resources needed for this post. Hope this would help someone who is in need. Please drop a comment if you have further queries.
I would like to thank ChamilaA who provided the resources needed for this post. Hope this would help someone who is in need. Please drop a comment if you have further queries.
Thank you, very helpful
ReplyDeletenp :)
DeleteThank you very much.
ReplyDeletethe blog is good and Interactive it is about Mulesoft API Developer it is useful for students and Mulesoft Developers for more updates on Mulesoft mulesoft Online training hyderabad
ReplyDeleteThis Blog Provides Very Useful and Important Information. I just Want to share this blog with my friends and family members. Mulesoft Certification Training
ReplyDeleteThank you so much!!
ReplyDeleteThanks a lot! This was very helpful :D
ReplyDeletezonguldak eskort
ReplyDeleteartvin eskort
samsun eskort
izmit eskort
yozgat eskort
ankara eskort
düzce bayan
manisa bayan
izmit bayan
görükle bayan
afyon masöz
ReplyDeleteburdur masöz
bilecik masöz
amasya masöz
yalova masöz
konak masöz
karabük masöz
kırşehir masöz
kütahya masöz
Good content. You write beautiful things.
ReplyDeletemrbahis
mrbahis
sportsbet
korsan taksi
hacklink
sportsbet
vbet
vbet
taksi
alsancak
ReplyDeleteçankırı
düzce
gaziemir
kaş
6V6
tekirdağ
ReplyDeletetokat
elazığ
adıyaman
çankırı
UFQV1C
tekirdağ
ReplyDeletetokat
elazığ
adıyaman
çankırı
PQQAB7
görüntülü show
ReplyDeleteücretlishow
W7C
https://titandijital.com.tr/
ReplyDeleteağrı parça eşya taşıma
maraş parça eşya taşıma
muğla parça eşya taşıma
uşak parça eşya taşıma
İFZPOW
D7774
ReplyDeleteIsparta Şehirler Arası Nakliyat
Ünye Evden Eve Nakliyat
Ankara Parke Ustası
Balıkesir Lojistik
Ünye Fayans Ustası
Afyon Lojistik
Tokat Parça Eşya Taşıma
Manisa Parça Eşya Taşıma
Karabük Evden Eve Nakliyat
Thanks for shareing comments
ReplyDeleteEFD03
ReplyDeletemardin sohbet uygulamaları
tokat kadınlarla ücretsiz sohbet
bayburt rastgele sohbet odaları
diyarbakır görüntülü sohbet sitesi
kilis ücretsiz sohbet siteleri
istanbul telefonda canlı sohbet
zonguldak en iyi ücretsiz sohbet siteleri
balıkesir mobil sohbet chat
ankara ücretsiz sohbet uygulamaları
ABAA3
ReplyDeleteburdur ücretsiz sohbet
kırklareli görüntülü sohbet uygulama
maraş canlı sohbet
diyarbakır en iyi rastgele görüntülü sohbet
isparta görüntülü sohbet ücretsiz
eskişehir parasız sohbet siteleri
erzincan canlı ücretsiz sohbet
random görüntülü sohbet
ardahan sesli sohbet odası
98449
ReplyDeleteArdahan Kadınlarla Ücretsiz Sohbet
burdur bedava sohbet siteleri
telefonda sohbet
sohbet uygulamaları
Aksaray Kadınlarla Rastgele Sohbet
ücretsiz sohbet
elazığ bedava sohbet uygulamaları
giresun canlı sohbet et
istanbul sesli sohbet mobil
FE820
ReplyDeleteLikee App Takipçi Satın Al
Mexc Borsası Güvenilir mi
Periscope Takipçi Satın Al
Baby Doge Coin Hangi Borsada
Threads Yeniden Paylaş Hilesi
Linkedin Takipçi Satın Al
Facebook Takipçi Hilesi
Spotify Dinlenme Satın Al
Bulut Madenciliği Nedir
370D0
ReplyDeletesatoshi
safepal
shiba
dcent
trust wallet
yearn
phantom
dexscreener
metamask
Thanks for sharing all this information here on this page.
ReplyDeleteI truly enjoy looking through on this web site , it holds superb content .
ReplyDeleteRRFHYTYUJ
ReplyDeleteشركة تسليك مجاري بالجبيل
7A476ED15E
ReplyDeletesteroid
steroid satın al
www.ijuntaxmedikal.store
cialis
görüntülü show
skype show