/r1
|- POST <-- accidentally deleted, want to restore
|- GET <-- new method, will remove the POST from the previous deploy
One of the methods in one of our resources has been deleted. The resource is of course still in the most recent deploy, and we want to restore it so we can add, say, a GET method to the same resource.
If we just add the new GET and deploy, the POST will be removed. Is there no way to save and restore an API?
2017- You can now export a stage as Swagger + API Gateway Extensions (Stages > [your stage] > Export > Swagger + API Gateway Extensions)and import it through Actions > Import API
You can easily restore your AWS API Gateway
from a previous deployment. Go to API Gateway
and select your API
. Then select Stages
. Pick a stage that has the last version of your deployment that you want to restore. Select it and click the Export tab
, and export the JSON + Swagger
file. Then select the Resources
tab and under actions
click Import
. Once you import your swagger file, your API Gateway
resources will be restored to the version that was deployed to that aforementioned Stage
. I hope this helps.
Unfortunately this is not possible. You may want to manage your API moving forward using a Swagger or RAML definition and using the API import tool. Doing so will allow you to treat your API definition like source code, with tracking and ability to revert changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With