---
title: Amazon API Gateway REST (v1) monitoring integration
source: https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integrations-list/aws-api-gateway-v1-monitoring-integration
---

> #### ⚠️ IMPORTANT
>
> Enable the [AWS CloudWatch Metric Streams integration](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integrations-list/aws-metric-stream/) to monitor all CloudWatch metrics from your AWS services, including custom namespaces. Individual integrations are no longer our recommended option.

[New Relic infrastructure integrations](https://docs.newrelic.com/docs/infrastructure/introduction-infra-monitoring) include an integration for reporting your Amazon API Gateway data to New Relic. This document explains how to activate this integration and describes the data that can be reported.

> #### 💡 TIP
>
> API Gateway v1 (REST) metrics are available through both the [CloudWatch Metric Streams integration](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integrations-list/aws-metric-stream/) and the API polling integration for Amazon API Gateway.

## Features [#features]

[Amazon's API Gateway](https://aws.amazon.com/api-gateway/) is a fully managed service that allows you to create, publish, maintain, monitor, and secure APIs at any scale. With the New Relic API Gateway integration, you get more data about how your API layer is working behind the scenes. You'll receive metric data about the number of API calls, the requests served, the number of errors, latency counts, and more.

You can monitor and alert on your API Gateway data directly from [New Relic](https://docs.newrelic.com/docs/infrastructure), and query data and create dashboards.

## Requirements [#requierments]

API Gateway will not send "Call count by resource", "4xx error by resource" and "5xx errors by resource" metrics unless you have explicitly enabled detailed CloudWatch metrics.

> #### 💡 TIP
>
> Enabling these metrics may add additional charges to your [Amazon CloudWatch account pricing](https://aws.amazon.com/cloudwatch/pricing/).

To enable CloudWatch metrics, use either of these options:

-   Go to the AWS Management Console, select the **Settings** option for CloudWatch, then select the option to enable detailed CloudWatch metrics.
-   Call the `stage:update` action of the Amazon API Gateway REST API to update the [`metricsEnabled`](https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/#metricsEnabled) property to `true`.

## Activate integration [#activate]

To enable this integration, use one of the following methods:

-   **CloudWatch Metric Streams** (recommended): follow the procedure to [set up CloudWatch Metric Streams](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/connect/aws-metric-stream-setup/).
-   **API polling**: follow standard procedures to [Connect AWS services to New Relic](https://docs.newrelic.com/docs/infrastructure/infrastructure-integrations/getting-started/connect-aws-integrations-infrastructure).

## Configuration and polling [#polling]

You can change the polling frequency and filter data using [configuration options](https://docs.newrelic.com/docs/integrations/new-relic-integrations/getting-started/configure-polling-frequency-data-collection-cloud-integrations).

Default [polling](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integrations-list/aws-polling-intervals-infrastructure-integrations) information for the Amazon API gateway integration:

-   New Relic polling interval: 5 minutes
-   Amazon CloudWatch data interval: 1 minute

## Find and use data [#find-data]

To find your integration data in the infrastructure UI, go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > AWS** and select one of the API Gateway integration links.

How you query your data depends on the ingest method:

-   **CloudWatch Metric Streams**: data is reported as dimensional metrics. Go to **[one.newrelic.com](https://one.newrelic.com/all-capabilities) > Metrics & Events** and filter by `aws.apigateway`.
-   **API polling**: data is reported to the `ApiGatewaySample` [event type](https://docs.newrelic.com/docs/data-apis/understand-data/new-relic-data-types/#event-data), which you can [query and explore](https://docs.newrelic.com/docs/using-new-relic/data/understand-data/query-new-relic-data).

For more on how to use your data, see [Understand and use integration data](https://docs.newrelic.com/docs/infrastructure/integrations/find-use-infrastructure-integration-data).

## Metric data [#metrics]

This New Relic infrastructure integration collects the following Amazon API Gateway data:

| Metric               | Description                                                                                                                                                                                                   |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `4XXError`           | The number of client-side errors captured                                                                                                                                                                     |
| `5XXError`           | The number of server-side errors captured.                                                                                                                                                                    |
| `CacheHitCount`      | The number of requests served from the API cache.                                                                                                                                                             |
| `CacheMissCount`     | The number of requests served from the backend when API caching is enabled.                                                                                                                                   |
| `Count`              | The number of calls to API methods.                                                                                                                                                                           |
| `IntegrationLatency` | The time in milliseconds between when API Gateway relays a request to the backend and when it receives a response from the backend.                                                                           |
| `Latency`            | The time in milliseconds between when API Gateway receives a request from a client and when it returns a response to the client. The latency includes the integration latency and other API Gateway overhead. |

## Dimensions

You can use the [dimensions](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Dimension.html) in the following table to filter API Gateway metrics.

| Dimensions                               | Description                                                                                      |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `ApiName`                                | Filters API Gateway metrics for an API of the specified API name.                                |
| `ApiName`, `Method`, `Resource`, `Stage` | Filters API Gateway metrics for an API method of the specified API, stage, resource, and method. |
| `ApiName`, `Stage`                       | Filters API Gateway metrics for an API stage of the specified API and stage.                     |
