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:
Select Management > Data collectors in the navigation pane.
In the Data Collectors view, click Create.
Click + Create to display the Add data collector dialog.
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.
Click ADD.
Classic Apigee
To create a data collector resource using the Classic Apigee:
Select Admin > Data Collectors in the navigation pane.
This displays the 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.
Click + CREATE to display the Add data collector dialog.
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.
Click ADD.
The new data collector now appears in the Data collector 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eData collector resources in Apigee and Apigee hybrid allow for the collection of custom data from API traffic, functioning like a shopping cart for data.\u003c/p\u003e\n"],["\u003cp\u003eThe DataCapture policy specifies the data to be collected, serving as a shopping list, and works in conjunction with the data collector.\u003c/p\u003e\n"],["\u003cp\u003eData collectors can be created through the Apigee UI (both Apigee in Cloud console and Classic Apigee) or via the Apigee API.\u003c/p\u003e\n"],["\u003cp\u003eData collector names must start with \u003ccode\u003edc_\u003c/code\u003e, and creating collectors with names that only differ in case is prohibited due to potential errors.\u003c/p\u003e\n"],["\u003cp\u003eIf a Data collector is used in multiple policies, the last policy to run will overwrite any captured data from earlier executions.\u003c/p\u003e\n"]]],[],null,[]]