Date ranges in the UserVoice Admin API

Any interaction with the UserVoice Admin API requires a trusted API client. You can create one by following this guide.

Overview

The UserVoice Admin API provides two date filters, updated_before and updated_after, that allow you to select data within the desired date range. These filters are available on all UserVoice resources that have a GET endpoint.

updated_before

The updated_before filter will select records updated before the given date.

updated_after

The updated_after filter will select records updated after the given date.

Format

All date parameters used in the UserVoice Admin API expect an ISO 8601 format. In string representation, this format is YYYY-mm-ddThh:mm:ssZ.

Considerations

While we do provide a mechanism for including associated data in the response, filters applied to a UserVoice Admin API request will be applied only to the primary resource of the request.

All UserVoice Admin API requests are paginated. See our documentation on pagination for an in-depth explanation.

All UserVoice Admin API requests are subject to rate-limiting. See our documentation on rate-limiting for an in-depth explanation.

Common Scenarios

Scenario: You want to routinely get your UserVoice data

For your initial population, you’d want to omit any updated parameters to retrieve data from all time. However, once you’ve successfully retrieved all of the data you desire, make note of the datetime that you synced at. You can then use this time in the updated_after filter to retrieve data since the last sync instead of crawling through all data again.

Scenario: You want to retrieve all suggestions updated in the last month

For example, today is January 30th, 2018. To retrieve all data in the past month, apply the updated_after filter from 1 month ago - December 30th, 2018. In curl,

curl https://.uservoice.com/api/v2/admin/suggestions \
    -X "GET" \
    -H "Authorization: Bearer " \
    -G \
    -d updated_after=2017-12-30T00:00:00.000Z \

Scenario: You want to retrieve all users updated during a specific time range

For example, you want users updated between October 1, 2017, and October 15, 2017. Apply both the updated_after and updated_before filter to create your date range. In curl,

curl https://.uservoice.com/api/v2/admin/users \
    -X "GET" \
    -H "Authorization: Bearer " \
    -G \
    -d updated_after=2017-10-01T00:00:00.000Z \
  -d updated_before=2017-10-15T00:00:00.000Z \

Didn’t find what you’re looking for?

Check out the UserVoice Help Center for more documentation.

Explore the Help Center