|
报表服务 | 报表服务(Restful)
getReportState
查询报告是否生成
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/report/getReportState
请求参数体:
{
"body": {//
"reportId": ""//
},
"header": {
"adType": 1,
"agentpassword": "",
"agentusername": "",
"apiusertype": "",
"password": "xxxxxx",
"token": "xxxxxx",
"username": "xxxxxx"
}
}
|
响应结果:
{
"data": {//
"isGenerated": 0//
},
"desc": "success",
"failures": [],
"oprs": 1,
"oprtime": 1,
"quota": 1,
"rquota": 100,
"status": 0
}
|
getReportPath
获取报告下载地址
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/report/getReportPath
请求参数体:
{
"body": {//
"reportId": ""//
},
"header": {
"adType": 1,
"agentpassword": "",
"agentusername": "",
"apiusertype": "",
"password": "xxxxxx",
"token": "xxxxxx",
"username": "xxxxxx"
}
}
|
响应结果:
{
"data": {//
"reportPath": ""//
},
"desc": "success",
"failures": [],
"oprs": 1,
"oprtime": 1,
"quota": 1,
"rquota": 100,
"status": 0
}
|
getReportId
通过 getReportId ,您可以获取推广效果的详细报表。由于产生报表需要一定的时间,我们采用了异步的方式对报表进行处理。您首先需要通过 getReportId() 方法获得一个字符串类型的 reportId ,然后通过 pull 的方式轮询调用 getReportState() 方法检查报表是否产生。待产生后,则可调用 getReportPath() 方法获取报表的下载地址。根据该地址即可下载您所需要的报表。 报告 id 采用 <32 位 16 进制数 > 的取值形式,例如: 8e7e3f2d84a19c5df1415957434b2bd8。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/report/getReportId
请求参数体:
{
"body": {//
"performanceData": [],//
"levelOfDetails": 0,//
"showLocateMode": 0,//
"format": 0,//
"reportType": 0,//
"statIds": [],//
"statRange": 0,//
"unitOfTime": 0,//
"products": 0,//
"platform": 0,//
"regions": [],//
"startDate": "",//
"endDate": "",//
"idOnly": false//
},
"header": {
"adType": 1,
"agentpassword": "",
"agentusername": "",
"apiusertype": "",
"password": "xxxxxx",
"token": "xxxxxx",
"username": "xxxxxx"
}
}
|
参数说明:
startDate |
dateTime |
统计开始时间,格式参考:
2010-08-01 00:00:00 |
必填 |
endDate |
dateTime |
统计结束时间,格式参考:
2010-08-17 23:59:59 |
必填 |
响应结果:
{
"data": {//
"reportId": ""//
},
"desc": "success",
"failures": [],
"oprs": 1,
"oprtime": 1,
"quota": 1,
"rquota": 100,
"status": 0
}
|
|