This function is designed to give you the statistics of historical data files uploaded in CustomerGauge.


Resource Information

Response formats JSON (default), XML
HTTP method GET
Response family file
Header
Authorization: api_key XXXXX


Resource URL

Production Server:

https://api.customergauge.com/v4.1/file/historical.json


Parameters

id 
optional
File upload id
Example Values: 12
date_range_from 
optional
Filter the data from date
Example Values: 2012-09-01
date_range_to
optional
Filter the data to date
Example Values: 2012-10-01
start
optional
default: 0
Example Values: 10
limit
optional
 default: 1000
Example Values: 200. Maximum is 1000


Example Requests

GET (json) https://api.customergauge.com/v4.1/file/historical.json?date_range_from=2012-11-10&date_range_to=2014-10-19&limit=100&start=100
GET (xml) https://api.customergauge.com/v4.1/file/historical.xml?date_range_from=2012-11-10&date_range_to=2014-10-19&limit=100&start=100


Example Result

Message reported on successful operation:





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25




{
  "Data":
    [
       {
         "id":"1",
         "status":"Processed",
         "source_filename":"example_file.csv",
         "date_upload":"2014-10-13 11:56:48",
         "total_records":"100",
         "successful_records":"100",
         "unsuccessful_records":"0"
         "logs":["Record 2: Duplicate Record"]
       },
       {
         "id":"2",
         "status":"InProgress",
         "source_filename":"example_file.csv",
         "date_upload":"2014-10-13 11:56:48",
         "total_records":"0",
         "successful_records":"0",
         "unsuccessful_records":"0",
         "logs":[]
       }
    ]
}




Message reported on failed operation:




1




{"Error":{"Message":"file not found","Code":400200}}