Skip to end of metadata
Go to start of metadata

Check Usage Statistics

Alpha-Beta Notice

This field or feature is part of functionality currently in either Alpha or Beta phase. It is therefore subject to change.

REST API call

When making a call to the API to retrieve statistics, the following fields can be set in the query string:

  • agg can be omitted in order to obtain an hourly/detailed report
  • agg=true can be used to obtain an aggregated report
  • start date should be set in the following format: 2015-11-01+01:00:00
  • end date should be set in the following format: 2015-12-01+01:00:00 

The statistics are deduplicated per request made to the service. For example, if the same user is added to the same segment in three different requests, num_valid_adds and num_valid_users would show "3". When using agg=true, there will be one entry in the report property of the response. It will be an aggregation of all usage statistics in the date range that's specified. error_log_lines and segment_log_lines will be empty, and the processed hour will be for the last hour in the date range that's specified. However, if no date range is specified, the report will show the data from the last two weeks.

Ex: Aggregated Usage Report
Ex: Hourly Report

Report object JSON (for objects in report array):

Field nameDescriptionExample value
processed_hour
Hour during which uploads went through.
"2014-05-22 00:00:00"
match_rate
The percentage of valid users uploaded (num_valid_users/(num_valid_users+num_invalid_users)) 75.00
num_valid_users
Total number of valid users that were streamed through the service. This is NOT the number of unique users for the hour.124578
num_valid_adds

Total number of associations that were added (that is, user-segment pairs, expiration !=-1)

98765432
num_valid_removes
Total number of associations that were removed (that is, user-segment pairs with expiration = -1)98765432
num_invalid_users

Total number of users that were in requests, however do not exist on the AppNexus platform.

4000
num_unauth_segments
Total number of associations that failed due to attempting to access unauthorized segments.500
num_inactive_segments
Total number of associations that failed due to attempting to access inactive segments.200
num_invalid_segments
Total number of associations that failed due to attempting to access invalid segments.3
num_other_errors
Total number of failed calls for other reasons.0
error_log_lines

An updating 200 line sample of the errors that prevented the user and segment associations from being successful.

"Inactive users: 15805576978434842 Inactive segments (id, code, segment owner member id): (321456, 'segment_312456', 123)

Invalid segments (id, code, segment owner member id): (0, 'segment_654321', 123)

Unauthorized segments (id, code, segment owner member id): (0, 'segment_123456', 123)"

segment_log_lines

An updating 200 line sample of the segments and the number of valid associations for each.

"Valid users: 1580557697843484206

Valid segments (id, code, segment owner member id): (3737552, 'segment_3737552', 123), (3737547, 'segment_3737547', 123)

Valid additions (user id, segment id, expiration): (1580557697843484206, 3737552, 1440), (1580557697843484206, 3737547, 1440)

Valid removals (user id, segment id, expiration): (1580557697843484206, 3737552, -1), (1580557697843484206, 3737547, -1)"


Related Topics