17

I have created an API in Amazon API Gateway using the web browser. Now How can I get the ID of the API that I have just created???

LynAs
  • 6,407
  • 14
  • 48
  • 83

3 Answers3

42

It can be found using the following command

aws apigateway get-rest-apis

needless to say you need to setup aws cli

LynAs
  • 6,407
  • 14
  • 48
  • 83
  • If you have jq installed, then this might also help when scripting things: `REST_ID=$(aws apigateway get-rest-apis | jq -r '.items[] | .id') ; aws apigateway create-deployment --rest-api-id $REST_ID --stage-name dev` – Michael Behrens Sep 07 '22 at 18:28
20

If you'd rather not kick out to a terminal window you can grab the RestApi ID from the URL in the browser:

https://console.aws.amazon.com/apigateway/home?region={region}#/apis/{api-id}/...
Lorenzo d
  • 2,016
  • 10
  • 17
4

To add another answer, on the AWS console, access the "API Gateway", and look for your API, it is shown right there in the list.

enter image description here

TechFree
  • 2,600
  • 1
  • 17
  • 18