You are here: Publishers > Event-level Feeds > Listing available files for an event feed

Listing available files for an event feed

After you log in to the OpenX system that you want to access data for, you can retrieve the list of event feed files available to you per event type. For example, if you are interested in click events, retrieve the list of click event feed files. Then you can determine what files you want to download.

To retrieve the list of available data sets for a particular event type:

  1. Build the URL and call the API, using the following format:

    http://openx_server_name/ox/4.0/eventfeed?type=click&range=number&format=json&pretty

    Where:

    • http is the protocol.

    • openx_server_name is the hostname of the Platform API server.

    • /ox/4.0 is the base path for the API.

    • /eventfeed is the method, or action to perform, in this case, a request for the list of event feed files.

    • ? indicates the start of URI parameters.

    • type=click represents the ad serving event feed that you want to track; in this case, click event feed. This can be either request, impression, click, or conversion, depending on your OpenX configuration.

    • format=json represents the format that you want to view the response in. This must be json.

    • pretty indicates that you want the response that OpenX returns to be formatted in an easily-readable form. This parameter is useful if you are performing a manual inspection of the event feed response (that is, if you paste the URL in your browser and click ENTER).

    • range=number indicates the serial number for the last feed that you looked at (located in the serial: key). The range parameter is like a bookmark that indicates where you want to continue viewing feeds. For example, use the value for the serial: key in the last feed that you viewed. Alternatively, specify the start and end parameters, but do not specify them in addition to range.

      Important: Do not use a range value of 0 because this can negatively impact the event feed.

    Optional:

    • breakdown=minutely is the default feed interval, which is not necessary to specify unless your account manager enabled a custom configuration for your account. The minutely value indicates that you want the response limited to minutely feeds only. The hourly value limits the response to hourly feeds, but it is disabled for most accounts. This field is required if you have both hourly and minutely feeds enabled. Please check with your OpenX account manager if you are unsure of what type of feed you have.

    OpenX returns a JSON response similar to the one described in the sample response.

  2. As necessary, look at event feed timestamps or serial numbers and rebuild the URL as necessary.

    To avoid inconsistencies, especially when your implementation uses an automatic system to process event feeds, use the range parameter to retrieve serial numbers in the JSON response (serial: key) as your bookmarks for viewing feeds rather than the start and end parameters.

  3. Parse the response for timestamps or serial numbers and file paths and download the event feed files that you want to access.

    For more details, see eventfeed.html in the API reference.

Response listing available files for an event feed

{
  "dataset": [
    {
      "@dataSize": "352", 
      "@id": "3169793", 
      "@recordCount": "0", 
      "@revision": "177", 
      "@status": "READY", 
      "dateCreated": "2015-10-26 08:08:07 UTC", 
      "endTimestamp": "2015-10-22 21:01:00 UTC", 
      "feed": {
        "@id": "496", 
        "@name": "d8568240-c334-11e2-8b8b-0800200c9a66_ox_click_log_minutely"
      }, 
      "parts": {
        "part": {
          "@compressionType": "GZIP", 
          "@dataSize": "352", 
          "@digest": "498b8331dcfa44c55d5980a6ead8a218", 
          "@gzipped": "true", 
          "@id": "3257451", 
          "@index": "1", 
          "@locator": "http://openx_server_name/ox/4.0/eventfeed/fetch?file=/d8568240-c334-11e2-8b8b-0800200c9a66/
ox_click_log_minutely/2015-10/clicks_v4_2015-10-22_21-00_d8568240-c334-11e2-8b8b-0800200c9a66.txt.gz", 
          "@recordCount": "0"
        }
      }, 
      "readableInterval": "2015-10-22_21:00:00", 
      "schema": {
        "@locator": "http://openx_server_name/ox/4.0/eventfeed/schema?version=4&name=OX_EventLog", 
        "@name": "OX_EventLog", 
        "@version": "4"
      }, 
      "serial": "133612", 
      "startTimestamp": "2015-10-22 21:00:00 UTC"
    }, 
    {
      "@dataSize": "352", 
      "@id": "3156608", 
      "@recordCount": "0", 
      "@revision": "1", 
      "@status": "READY", 
      "dateCreated": "2015-10-26 04:17:29 UTC", 
      "endTimestamp": "2015-10-25 07:59:00 UTC", 
      "feed": {
        "@id": "496", 
        "@name": "d8568240-c334-11e2-8b8b-0800200c9a66_ox_click_log_minutely"
      }, 
      "parts": {
        "part": {
          "@compressionType": "GZIP", 
          "@dataSize": "352", 
          "@digest": "498b8331dcfa44c55d5980a6ead8a218", 
          "@gzipped": "true", 
          "@id": "3244335", 
          "@index": "1", 
          "@locator": "http://openx_server_name/ox/4.0/eventfeed/fetch?file=/d8568240-c334-11e2-8b8b-0800200c9a66/
ox_click_log_minutely/2015-10/clicks_v4_2015-10-25_07-58_d8568240-c334-11e2-8b8b-0800200c9a66.txt.gz", 
          "@recordCount": "0"
        }
      }, 
      "readableInterval": "2015-10-25_07:58:00", 
      "schema": {
        "@locator": "http://openx_server_name/ox/4.0/eventfeed/schema?version=4&name=OX_EventLog", 
        "@name": "OX_EventLog", 
        "@version": "4"
      }, 
      "serial": "133611", 
      "startTimestamp": "2015-10-25 07:58:00 UTC"
    }, 
    {
      "@dataSize": "352", 
      "@id": "3156610", 
      "@recordCount": "0", 
      "@revision": "1", 
      "@status": "READY", 
      "dateCreated": "2015-10-26 04:17:29 UTC", 
      "endTimestamp": "2015-10-25 08:00:00 UTC", 
      "feed": {
        "@id": "496", 
        "@name": "d8568240-c334-11e2-8b8b-0800200c9a66_ox_click_log_minutely"
      }, 
      "parts": {
        "part": {
          "@compressionType": "GZIP", 
          "@dataSize": "352", 
          "@digest": "498b8331dcfa44c55d5980a6ead8a218", 
          "@gzipped": "true", 
          "@id": "3244340", 
          "@index": "1", 
          "@locator": "http://openx_server_name/ox/4.0/eventfeed/fetch?file=/d8568240-c334-11e2-8b8b-0800200c9a66/
ox_click_log_minutely/2015-10/clicks_v4_2015-10-25_07-59_d8568240-c334-11e2-8b8b-0800200c9a66.txt.gz", 
          "@recordCount": "0"
        }
      }, 
      "readableInterval": "2015-10-25_07:59:00", 
      "schema": {
        "@locator": "http://openx_server_name/ox/4.0/eventfeed/schema?version=4&name=OX_EventLog", 
        "@name": "OX_EventLog", 
        "@version": "4"
      }, 
      "serial": "133611", 
      "startTimestamp": "2015-10-25 07:59:00 UTC"
    },
    ...
    
 ]
}

This topic applies to Ad Server. This topic applies to Ad Exchange. This topic applies to Programmatic Direct.

Feedback form