Using Console
Using CLI
<api-id>
with the ID of the API and <stage-name>
with the name of the stage you want to check. This command will return the details of the specified stage.
metricsEnabled
field. If its value is true
, then Cloudwatch Metrics are enabled for that API. If its value is false
or if the metricsEnabled
field is not present, then Cloudwatch Metrics are not enabled for that API.
Using Python
get_rest_apis
function from the apigateway
client in boto3 to get a list of all APIs in API Gateway. Here is a sample script:
metricsEnabled
attribute of the methodSettings
for each method of each resource of the API. Here is a sample script: