Managing Data Collectors

This page applies to Apigee and Apigee hybrid.

View Apigee Edge documentation.

A data collector resource enables you to collect a wide variety of custom data from API traffic. Once you have created a data collector, you specify the data you want to gather using the DataCapture policy. The data collector is like a shopping cart, and the DataCapture policy is a shopping list for the data you want to capture.

For a list of the quantities related to API traffic that you can capture using the data collector resource, see Metrics.

Creating a data collector

You can create a data collector resource in the Apigee UI or with the Apigee API:

Apigee UI

To create a data collector resource using Apigee UI:

  1. In the Google Cloud console, go to the Management > Data Collectors page.

    Go to Data Collectors

  2. In the Data Collectors view, click Create.
  3. In the Add data collector dialog, enter the following information:
    • Name: A name for the data collector.
    • Type: The type of the data to be collected (Integer, String, and so on).
    • Description: An informal description of the data to be collected, possibly including the reason for collecting it. This is for the benefit of other API developers who may be involved in analyzing the data.
  4. Click Add.

To edit or delete a data collector, click the three dots at the end of its row under Actions, and select either Edit or Delete.

Apigee API

You can create a data collector resource using the Apigee API. For example:

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -X POST -H "content-type:application/json" \
  -d '
{
  "name": "dc_data_collector",
  "description": "Collects data for analysis.",
  "type": "STRING",
}' \
  "https://apigee.googleapis.com/v1/organizations/ORG/datacollectors"

where ORG is the name of the organization. This creates a resource named dc_data_collector, which you can use in the DataCapture policy.