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 in Cloud console

To create a data collector resource using Apigee in Cloud console:

  1. Open the Apigee UI in Cloud console in a browser.
  2. Select Management > Data collectors in the navigation pane.
  3. In the Data Collectors view, click Create.
  4. Click + Create to display the Add data collector dialog.
  5. Add the following information in the dialog:
    • 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.
  6. Click ADD.

Classic Apigee

To create a data collector resource using the Classic Apigee:

  1. Open the Apigee UI in a browser.
  2. Select Admin > Data Collectors in the navigation pane.

    Select Data Collectors.

    This displays the Data Collectors pane.

    Data Collectors pane

    The pane shown above is empty because no data collectors have been created yet. At this point, you can create a new data collector. Once some data collectors have been created, you can click their names in the pane to edit them.

  3. Click + CREATE to display the Add data collector dialog.

    Add Data Collectors pane
  4. Add the following information in the dialog:
    • 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.
  5. Click ADD.

The new data collector now appears in the Data collector pane.

New data collector in the pane.

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.