How to rename an AWS API Gateway API instance?
Solution 1
Yes it's available in the API or CLI.
In the API you use a PATCH request on the 'name' field. http://docs.aws.amazon.com/apigateway/api-reference/resource/rest-api/
In the CLI, see docs http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-rest-api.html
The PATCH op is 'replace' and the path would be '/name'
Edit: Thanks @Canotto90 for the example
aws apigateway update-rest-api --rest-api-id IDOfTheAPIThatNeedsTobeUpdated --patch-operations op=replace,path=/name,value=NewName
Solution 2
Here is how you can get the list of APIs and their IDs:
aws apigateway get-rest-apis
Use the Id to update name of API as mentioned by Canotto90 above:
aws apigateway update-rest-api --rest-api-id IDOfTheAPIThatNeedsTobeUpdated --patch-operations op=replace,path=/name,value=NewName
Solution 3
It turns out, there is now a way to rename the API!
Under the Amazon API Gateway service, select APIs
. You will see the list of your APIs.
Now, click the little cog wheel in the top right corner of the API that you wish to rename...
Simply change the name, hit save, and you're good!
Solution 4
From https://console.aws.amazon.com/apigateway -> Select API by Name -> Settings -> General Settings -> Name
Solution 5
I know this is an old question, but people may still need an answer as I just did.
Amazon's AWS UI isn't always clear. There is no "Rename" function to change the name of an existing API. However, it can be done by cloning your existing API.
To rename your API, click the "Create API" button and select "Clone from existing API". This will allow you to give it a new name.
Tomas Romero
Updated on June 03, 2022Comments
-
Tomas Romero almost 2 years
In AWS API Gateway, is it possible to rename an API instance somehow?
I don't see the option on the UI, but maybe it's possible by using some API call.
-
Tomas Romero over 8 yearsThanks! Running:
aws apigateway update-rest-api --rest-api-id miApiId --patch-operations op=replace,path=/name,value=testName
worked. -
Ezekiel Victor over 7 yearsThank you @canotto90. Saved me some time concocting that command.
-
Defozo over 7 yearsWhy it's not available in the UI?
-
blueprintchris over 5 yearsThank god they allowed us to change it in the console