> [!CAUTION]
> **Caution:** This documentation covers Edge for Private Cloud 4.51.00, which is no longer supported. Google does not provide security patches, bug fixes, or technical support for this version. The current supported version is 4.54.00. See the [Edge for Private Cloud documentation](https://docs.apigee.com/private-cloud/latest/overview) for the current version, or [All versions](https://docs.apigee.com/private-cloud/versions) to compare releases.

All Edge for Private Cloud customers are required to submit statistics about API
proxy traffic to Apigee. Apigee recommends that you upload that information once a day, possibly by
creating a cron job.

You must submit the statistics for your production API deployments, but not for APIs in development
or testing deployments. In most Edge installations, you will define specific organizations or
environments for your production APIs. The statistics that you submit are only for those production
organizations and environments.

## Submit your API traffic statistics to Apigee

To submit your statistcs to Apigee:

1. [Collect the data](https://docs.apigee.com/private-cloud/v4.51.00/uploading-api-traffic-data-apigee-beta-release#collect-the-data) using the Edge management API.
2. Send the data through email to: edge.apiops@google.com

You must repeat this process for every production organization and
environment in your Edge installation.

### Collect the data

Use the following `curl` command to gather traffic data for a specific organization and
environment for a specified time interval:

```
curl -X GET -u apigee_mgmt_api_email:apigee_mgmt_api_password \
"http://ms_IP:8080/v1/organizations/org_name/environments/env_name/stats/apiproxy?select=sum(message_count)&timeRange=MM/DD/YYYY%20HH:MM~MM/DD/YYYY%20HH:MM&timeUnit=hour"
```

This command uses the Edge Get API message count API. In this command:

- <var translate="no">apigee_mgmt_api_email:apigee_mgmt_api_password</var> specifies the email address of an account with access to the Edge /stats APIs.
- <var translate="no">ms_IP</var> is the IP address or DNS name of the Edge Management Server.
- <var translate="no">org_name</var> and <var translate="no">env_name</var> specifies the org and environment.
- <var translate="no">apiproxy</var> is the dimenesion that groups metrics by API proxies.
- `MM/DD/YYYY%20HH:MM~MM/DD/YYYY%20HH:MM&timeUnit=hour` specifies the time range divided into time units of the metrics to gather. Notice that the `curl` command uses the hex code `%20` for spaces in the time range.

For example, to gather API proxy message counts hour by hour over a 24 hour period, use the
following [API call](https://docs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/environments/%7Benv_name%7D/stats/%7Bdimension_name%7D-0).

```
curl -X GET -u apigee_mgmt_api_email:apigee_mgmt_api_password \
"http://192.168.56.103:8080/v1/organizations/myOrg/environments/prod/stats/apiproxy?select=sum(message_count)&timeRange=01%2F01%2F2018%2000%3A00~01%2F02%2F2018%2000%3A00&timeUnit=hour"
```

(Note that `timeRange` contains URL-encoded characters.)

You should see a response in the form:

```
{
  "environments" : [ {
    "dimensions" : [ {
      "metrics" : [ {
        "name" : "sum(message_count)",
        "values": [
                {
                  "timestamp": 1514847600000,
                  "value": "35.0"
                },
                {
                  "timestamp": 1514844000000,
                  "value": "19.0"
                },
                {
                  "timestamp": 1514840400000,
                  "value": "58.0"
                },
                {
                  "timestamp": 1514836800000,
                  "value": "28.0"
                },
                {
                  "timestamp": 1514833200000,
                  "value": "29.0"
                },
                {
                  "timestamp": 1514829600000,
                  "value": "33.0"
                },
                {
                  "timestamp": 1514826000000,
                  "value": "26.0"
                },
                {
                  "timestamp": 1514822400000,
                  "value": "57.0"
                },
                {
                  "timestamp": 1514818800000,
                  "value": "41.0"
                },
                {
                  "timestamp": 1514815200000,
                  "value": "27.0"
                },
                {
                  "timestamp": 1514811600000,
                  "value": "47.0"
                },
                {
                  "timestamp": 1514808000000,
                  "value": "66.0"
                },
                {
                  "timestamp": 1514804400000,
                  "value": "50.0"
                },
                {
                  "timestamp": 1514800800000,
                  "value": "41.0"
                },
                {
                  "timestamp": 1514797200000,
                  "value": "49.0"
                },
                {
                  "timestamp": 1514793600000,
                  "value": "35.0"
                },
                {
                  "timestamp": 1514790000000,
                  "value": "89.0"
                },
                {
                  "timestamp": 1514786400000,
                  "value": "42.0"
                },
                {
                  "timestamp": 1514782800000,
                  "value": "47.0"
                },
                {
                  "timestamp": 1514779200000,
                  "value": "21.0"
                },
                {
                  "timestamp": 1514775600000,
                  "value": "27.0"
                },
                {
                  "timestamp": 1514772000000,
                  "value": "20.0"
                },
                {
                  "timestamp": 1514768400000,
                  "value": "12.0"
                },
                {
                  "timestamp": 1514764800000,
                  "value": "7.0"
                }
              ]
            }
          ],
          "name" : "proxy1"
      } ],
    "name" : "prod"
  } ],
  "metaData" : {
    "errors" : [ ],
    "notices" : [ "query served by:53dab80c-e811-4ba6-a3e7-b96f53433baa", "source pg:6b7bab33-e732-405c-a5dd-4782647ce096", "Table used: myorg.prod.agg_api" ]
  }
}
```