Managing Data Collectors

This pageapplies toApigee andApigee hybrid.

View Apigee Edge documentation.

Adata 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 theDataCapture policy.The data collector is like a shopping cart, and the DataCapture policy is a shopping listfor the data you want to capture.

Note: If you use a data collector in multiple policies, the captured data will be overwritten by the last policy that executes.

For a list of the quantities related to API traffic that you can captureusing the data collector resource, seeMetrics.

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 theManagement> Data Collectors page.

    Go to Data Collectors

  2. In theData Collectors view, clickCreate.
  3. In theAdd data collector dialog, enter the following information:
  4. ClickAdd.

To edit or delete a data collector, click the three dots at the end of its row underActions, and select eitherEdit orDelete.

Apigee API

You can create adata 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"

whereORG is the name of the organization. This creates a resource nameddc_data_collector, which you can use intheDataCapture policy.

Notes:
  • The name of the data collector resource must begin with the prefixdc_.
  • If you use a data collector in multiple DataCapture policies, the captured data will be overwritten by the last policy that executes.
Warning: Donot create two data collectors whose names differ only by case, such asdc_my_data anddc_My_Data, as then exporting data will result in a "duplicate column names" error.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.