{ "swagger": "2.0", "info": { "description": "swagger api for [ads](https://test.adsdesk.cn/)", "title": "Ads Api Docs", "contact": {}, "version": "1.0" }, "host": "127.0.0.1:8000", "basePath": "/api/v1", "paths": { "/report/ad": { "post": { "description": "查询广告计划数据报表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "report" ], "summary": "查询广告计划数据报表", "parameters": [ { "description": "请求参数", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/biz.ListReportRequest" } } ], "responses": { "200": { "description": "success", "schema": { "allOf": [ { "$ref": "#/definitions/biz.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/biz.ListAdResponse" } } } ] } } } } }, "/report/campaign": { "post": { "description": "查询广告组数据报表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "report" ], "summary": "查询广告组数据报表", "parameters": [ { "description": "请求参数", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/biz.ListReportRequest" } } ], "responses": { "200": { "description": "success", "schema": { "allOf": [ { "$ref": "#/definitions/biz.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/biz.ListCampaignResponse" } } } ] } } } } }, "/report/creative": { "post": { "description": "查询广告创意数据报表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "report" ], "summary": "查询广告创意数据报表", "parameters": [ { "description": "请求参数", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/biz.ListReportRequest" } } ], "responses": { "200": { "description": "success", "schema": { "allOf": [ { "$ref": "#/definitions/biz.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/biz.ListCreativeResponse" } } } ] } } } } } }, "definitions": { "biz.Ad": { "type": "object", "properties": { "active": { "description": "激活数", "type": "integer" }, "active_cost": { "description": "激活成本", "type": "number" }, "active_pay_cost": { "description": "首次付费成本", "type": "number" }, "active_pay_rate": { "description": "首次付费率", "type": "number" }, "active_rate": { "description": "激活率", "type": "number" }, "active_register_cost": { "description": "注册成本", "type": "number" }, "active_register_rate": { "description": "注册率", "type": "number" }, "ad_id": { "description": "广告计划id", "type": "string" }, "ad_name": { "description": "广告计划名称", "type": "string" }, "advertiser_id": { "description": "广告主id", "type": "string" }, "attribution_active_pay_intra_one_day_amount": { "description": "游戏行业-激活后24h付费金额", "type": "number" }, "attribution_active_pay_intra_one_day_count": { "description": "游戏行业-激活后24h首次付费数", "type": "integer" }, "attribution_convert": { "description": "转化数(计费时间)", "type": "integer" }, "attribution_convert_cost": { "description": "转化成本(计费时间)", "type": "number" }, "attribution_deep_convert": { "description": "深度转化数(计费时间)", "type": "integer" }, "attribution_deep_convert_cost": { "description": "深度转化成本(计费时间)", "type": "number" }, "attribution_game_pay_7d_count": { "description": "7日付费次数(激活时间)", "type": "integer" }, "attribution_next_day_open_cnt": { "description": "次留回传数", "type": "integer" }, "attribution_next_day_open_cost": { "description": "次留成本", "type": "number" }, "attribution_next_day_open_rate": { "description": "次留率", "type": "number" }, "average_play_time_per_play": { "description": "视频数据-平均单次播放时长,单位:秒", "type": "number" }, "avg_click_cost": { "description": "点击成本", "type": "number" }, "avg_show_cost": { "description": "计算字段", "type": "number" }, "campaign_id": { "description": "广告组ID", "type": "string" }, "campaign_name": { "description": "广告主组名称", "type": "string" }, "click": { "description": "点击量", "type": "integer" }, "click_install": { "description": "点击安装数", "type": "integer" }, "convert": { "description": "转化数", "type": "integer" }, "convert_cost": { "description": "转化成本", "type": "number" }, "convert_rate": { "description": "转化率", "type": "number" }, "cost": { "description": "花费", "type": "number" }, "ctr": { "description": "点击率", "type": "number" }, "deep_convert": { "description": "深度转化数", "type": "integer" }, "deep_convert_cost": { "description": "深度转化成本", "type": "number" }, "deep_convert_rate": { "description": "深度转化率", "type": "number" }, "download_finish": { "description": "安卓下载完成数", "type": "integer" }, "download_finish_cost": { "description": "安卓下载完成成本", "type": "number" }, "download_finish_rate": { "description": "安卓下载完成率", "type": "number" }, "download_start": { "description": "安卓下载开始数", "type": "integer" }, "download_start_cost": { "description": "安卓下载开始成本", "type": "number" }, "download_start_rate": { "description": "安卓下载开始率", "type": "number" }, "game_addiction": { "description": "关键行为数", "type": "integer" }, "game_addiction_cost": { "description": "关键行为成本", "type": "number" }, "game_addiction_rate": { "description": "关键行为率", "type": "number" }, "game_pay_count": { "description": "付费次数", "type": "integer" }, "in_app_cart": { "description": "APP内加入购物车", "type": "integer" }, "in_app_detail_uv": { "description": "APP内访问详情页", "type": "integer" }, "in_app_order": { "description": "APP内下单", "type": "integer" }, "in_app_pay": { "description": "APP内付费", "type": "integer" }, "in_app_uv": { "description": "APP内访问", "type": "integer" }, "install_finish": { "description": "安卓安装完成数", "type": "integer" }, "install_finish_cost": { "description": "安卓安装完成成本", "type": "number" }, "install_finish_rate": { "description": "安卓安装完成率", "type": "number" }, "next_day_open": { "description": "次留数", "type": "integer" }, "next_day_open_cost": { "description": "次留成本", "type": "number" }, "next_day_open_rate": { "description": "次留率", "type": "number" }, "pay_count": { "description": "首次付费次数", "type": "integer" }, "play_100_feed_break": { "description": "视频数据-99%进度播放数", "type": "integer" }, "play_25_feed_break": { "description": "视频数据-25%进度播放数", "type": "integer" }, "play_50_feed_break": { "description": "视频数据-50%进度播放数", "type": "integer" }, "play_75_feed_break": { "description": "视频数据-75%进度播放数", "type": "integer" }, "play_duration_sum": { "description": "视频数据-播放时长,单位ms", "type": "integer" }, "play_over_rate": { "description": "播完率", "type": "number" }, "register": { "description": "注册数", "type": "integer" }, "show": { "description": "展示量", "type": "integer" }, "stat_datetime": { "description": "数据起始时间(yyyy-MM-dd HH:mm:ss)", "type": "integer" }, "timestamp": { "description": "创建时间(yyyy-MM-dd HH:mm:ss)", "type": "string" }, "total_play": { "description": "视频数据-播放数", "type": "integer" }, "valid_play": { "description": "视频数据-有效播放数", "type": "integer" }, "valid_play_cost": { "description": "有效播放成本", "type": "number" }, "valid_play_rate": { "description": "有效播放率", "type": "number" } } }, "biz.Campaign": { "type": "object", "properties": { "active": { "description": "激活数", "type": "integer" }, "active_cost": { "description": "激活成本", "type": "number" }, "active_pay_cost": { "description": "首次付费成本", "type": "number" }, "active_pay_rate": { "description": "首次付费率", "type": "number" }, "active_rate": { "description": "激活率", "type": "number" }, "active_register_cost": { "description": "注册成本", "type": "number" }, "active_register_rate": { "description": "注册率", "type": "number" }, "advertiser_id": { "description": "广告主id", "type": "string" }, "attribution_active_pay_intra_one_day_amount": { "description": "游戏行业-激活后24h付费金额", "type": "number" }, "attribution_active_pay_intra_one_day_count": { "description": "游戏行业-激活后24h首次付费数", "type": "integer" }, "attribution_convert": { "description": "转化数(计费时间)", "type": "integer" }, "attribution_convert_cost": { "description": "转化成本(计费时间)", "type": "number" }, "attribution_deep_convert": { "description": "深度转化数(计费时间)", "type": "integer" }, "attribution_deep_convert_cost": { "description": "深度转化成本(计费时间)", "type": "number" }, "attribution_game_pay_7d_count": { "description": "7日付费次数(激活时间)", "type": "integer" }, "attribution_next_day_open_cnt": { "description": "次留回传数", "type": "integer" }, "attribution_next_day_open_cost": { "description": "次留成本", "type": "number" }, "attribution_next_day_open_rate": { "description": "次留率", "type": "number" }, "average_play_time_per_play": { "description": "视频数据-平均单次播放时长,单位:秒", "type": "number" }, "avg_click_cost": { "description": "点击成本", "type": "number" }, "avg_show_cost": { "description": "计算字段", "type": "number" }, "campaign_id": { "description": "广告组ID", "type": "string" }, "campaign_name": { "description": "广告主组名称", "type": "string" }, "click": { "description": "点击量", "type": "integer" }, "click_install": { "description": "点击安装数", "type": "integer" }, "convert": { "description": "转化数", "type": "integer" }, "convert_cost": { "description": "转化成本", "type": "number" }, "convert_rate": { "description": "转化率", "type": "number" }, "cost": { "description": "花费", "type": "number" }, "ctr": { "description": "点击率", "type": "number" }, "deep_convert": { "description": "深度转化数", "type": "integer" }, "deep_convert_cost": { "description": "深度转化成本", "type": "number" }, "deep_convert_rate": { "description": "深度转化率", "type": "number" }, "download_finish": { "description": "安卓下载完成数", "type": "integer" }, "download_finish_cost": { "description": "安卓下载完成成本", "type": "number" }, "download_finish_rate": { "description": "安卓下载完成率", "type": "number" }, "download_start": { "description": "安卓下载开始数", "type": "integer" }, "download_start_cost": { "description": "安卓下载开始成本", "type": "number" }, "download_start_rate": { "description": "安卓下载开始率", "type": "number" }, "game_addiction": { "description": "关键行为数", "type": "integer" }, "game_addiction_cost": { "description": "关键行为成本", "type": "number" }, "game_addiction_rate": { "description": "关键行为率", "type": "number" }, "game_pay_count": { "description": "付费次数", "type": "integer" }, "in_app_cart": { "description": "APP内加入购物车", "type": "integer" }, "in_app_detail_uv": { "description": "APP内访问详情页", "type": "integer" }, "in_app_order": { "description": "APP内下单", "type": "integer" }, "in_app_pay": { "description": "APP内付费", "type": "integer" }, "in_app_uv": { "description": "APP内访问", "type": "integer" }, "install_finish": { "description": "安卓安装完成数", "type": "integer" }, "install_finish_cost": { "description": "安卓安装完成成本", "type": "number" }, "install_finish_rate": { "description": "安卓安装完成率", "type": "number" }, "next_day_open": { "description": "次留数", "type": "integer" }, "next_day_open_cost": { "description": "次留成本", "type": "number" }, "next_day_open_rate": { "description": "次留率", "type": "number" }, "pay_count": { "description": "首次付费次数", "type": "integer" }, "play_100_feed_break": { "description": "视频数据-99%进度播放数", "type": "integer" }, "play_25_feed_break": { "description": "视频数据-25%进度播放数", "type": "integer" }, "play_50_feed_break": { "description": "视频数据-50%进度播放数", "type": "integer" }, "play_75_feed_break": { "description": "视频数据-75%进度播放数", "type": "integer" }, "play_duration_sum": { "description": "视频数据-播放时长,单位ms", "type": "integer" }, "play_over_rate": { "description": "播完率", "type": "number" }, "register": { "description": "注册数", "type": "integer" }, "show": { "description": "展示量", "type": "integer" }, "stat_datetime": { "description": "数据起始时间(yyyy-MM-dd HH:mm:ss)", "type": "integer" }, "timestamp": { "description": "创建时间(yyyy-MM-dd HH:mm:ss)", "type": "string" }, "total_play": { "description": "视频数据-播放数", "type": "integer" }, "valid_play": { "description": "视频数据-有效播放数", "type": "integer" }, "valid_play_cost": { "description": "有效播放成本", "type": "number" }, "valid_play_rate": { "description": "有效播放率", "type": "number" } } }, "biz.Creative": { "type": "object", "properties": { "active": { "description": "激活数", "type": "integer" }, "active_cost": { "description": "激活成本", "type": "number" }, "active_pay_cost": { "description": "首次付费成本", "type": "number" }, "active_pay_rate": { "description": "首次付费率", "type": "number" }, "active_rate": { "description": "激活率", "type": "number" }, "active_register_cost": { "description": "注册成本", "type": "number" }, "active_register_rate": { "description": "注册率", "type": "number" }, "ad_id": { "description": "广告计划id", "type": "string" }, "ad_name": { "description": "广告计划名称", "type": "string" }, "advertiser_id": { "description": "广告主id", "type": "string" }, "attribution_active_pay_intra_one_day_amount": { "description": "游戏行业-激活后24h付费金额", "type": "number" }, "attribution_active_pay_intra_one_day_count": { "description": "游戏行业-激活后24h首次付费数", "type": "integer" }, "attribution_convert": { "description": "转化数(计费时间)", "type": "integer" }, "attribution_convert_cost": { "description": "转化成本(计费时间)", "type": "number" }, "attribution_deep_convert": { "description": "深度转化数(计费时间)", "type": "integer" }, "attribution_deep_convert_cost": { "description": "深度转化成本(计费时间)", "type": "number" }, "attribution_game_pay_7d_count": { "description": "7日付费次数(激活时间)", "type": "integer" }, "attribution_next_day_open_cnt": { "description": "次留回传数", "type": "integer" }, "attribution_next_day_open_cost": { "description": "次留成本", "type": "number" }, "attribution_next_day_open_rate": { "description": "次留率", "type": "number" }, "average_play_time_per_play": { "description": "视频数据-平均单次播放时长,单位:秒", "type": "number" }, "avg_click_cost": { "description": "点击成本", "type": "number" }, "avg_show_cost": { "description": "计算字段", "type": "number" }, "campaign_id": { "description": "广告组ID", "type": "string" }, "campaign_name": { "description": "广告主组名称", "type": "string" }, "click": { "description": "点击量", "type": "integer" }, "click_install": { "description": "点击安装数", "type": "integer" }, "convert": { "description": "转化数", "type": "integer" }, "convert_cost": { "description": "转化成本", "type": "number" }, "convert_rate": { "description": "转化率", "type": "number" }, "cost": { "description": "花费", "type": "number" }, "creative_id": { "description": "创意id", "type": "string" }, "ctr": { "description": "点击率", "type": "number" }, "deep_convert": { "description": "深度转化数", "type": "integer" }, "deep_convert_cost": { "description": "深度转化成本", "type": "number" }, "deep_convert_rate": { "description": "深度转化率", "type": "number" }, "download_finish": { "description": "安卓下载完成数", "type": "integer" }, "download_finish_cost": { "description": "安卓下载完成成本", "type": "number" }, "download_finish_rate": { "description": "安卓下载完成率", "type": "number" }, "download_start": { "description": "安卓下载开始数", "type": "integer" }, "download_start_cost": { "description": "安卓下载开始成本", "type": "number" }, "download_start_rate": { "description": "安卓下载开始率", "type": "number" }, "game_addiction": { "description": "关键行为数", "type": "integer" }, "game_addiction_cost": { "description": "关键行为成本", "type": "number" }, "game_addiction_rate": { "description": "关键行为率", "type": "number" }, "game_pay_count": { "description": "付费次数", "type": "integer" }, "in_app_cart": { "description": "APP内加入购物车", "type": "integer" }, "in_app_detail_uv": { "description": "APP内访问详情页", "type": "integer" }, "in_app_order": { "description": "APP内下单", "type": "integer" }, "in_app_pay": { "description": "APP内付费", "type": "integer" }, "in_app_uv": { "description": "APP内访问", "type": "integer" }, "install_finish": { "description": "安卓安装完成数", "type": "integer" }, "install_finish_cost": { "description": "安卓安装完成成本", "type": "number" }, "install_finish_rate": { "description": "安卓安装完成率", "type": "number" }, "next_day_open": { "description": "次留数", "type": "integer" }, "next_day_open_cost": { "description": "次留成本", "type": "number" }, "next_day_open_rate": { "description": "次留率", "type": "number" }, "pay_count": { "description": "首次付费次数", "type": "integer" }, "play_100_feed_break": { "description": "视频数据-99%进度播放数", "type": "integer" }, "play_25_feed_break": { "description": "视频数据-25%进度播放数", "type": "integer" }, "play_50_feed_break": { "description": "视频数据-50%进度播放数", "type": "integer" }, "play_75_feed_break": { "description": "视频数据-75%进度播放数", "type": "integer" }, "play_duration_sum": { "description": "视频数据-播放时长,单位ms", "type": "integer" }, "play_over_rate": { "description": "播完率", "type": "number" }, "register": { "description": "注册数", "type": "integer" }, "show": { "description": "展示量", "type": "integer" }, "stat_datetime": { "description": "数据起始时间(yyyy-MM-dd HH:mm:ss)", "type": "integer" }, "timestamp": { "description": "创建时间(yyyy-MM-dd HH:mm:ss)", "type": "string" }, "total_play": { "description": "视频数据-播放数", "type": "integer" }, "valid_play": { "description": "视频数据-有效播放数", "type": "integer" }, "valid_play_cost": { "description": "有效播放成本", "type": "number" }, "valid_play_rate": { "description": "有效播放率", "type": "number" } } }, "biz.ListAdResponse": { "type": "object", "properties": { "list": { "description": "数据信息", "type": "array", "items": { "$ref": "#/definitions/biz.Ad" } }, "page_info": { "description": "页码信息", "allOf": [ { "$ref": "#/definitions/common.PageInfo" } ] } } }, "biz.ListCampaignResponse": { "type": "object", "properties": { "list": { "description": "数据信息", "type": "array", "items": { "$ref": "#/definitions/biz.Campaign" } }, "page_info": { "description": "页码信息", "allOf": [ { "$ref": "#/definitions/common.PageInfo" } ] } } }, "biz.ListCreativeResponse": { "type": "object", "properties": { "list": { "description": "数据信息", "type": "array", "items": { "$ref": "#/definitions/biz.Creative" } }, "page_info": { "description": "页码信息", "allOf": [ { "$ref": "#/definitions/common.PageInfo" } ] } } }, "biz.ListReportRequest": { "type": "object", "properties": { "end_date": { "description": "结束时间(格式YYYY-MM-DD)", "type": "string" }, "order_by": { "description": "排序字段", "type": "string" }, "order_by_mode": { "description": "排序方式 desc asc", "type": "string" }, "page": { "description": "页码", "type": "integer" }, "page_size": { "description": "每页大小", "type": "integer" }, "start_date": { "description": "开始时间(格式YYYY-MM-DD)", "type": "string" }, "time_granularity": { "description": "时间粒度(允许值:STAT_TIME_GRANULARITY_DAILY (按天维度),STAT_TIME_GRANULARITY_HOURLY (按小时维度))", "allOf": [ { "$ref": "#/definitions/biz.TimeGranularity" } ] } } }, "biz.Response": { "type": "object", "properties": { "code": { "type": "string" }, "data": {}, "msg": { "type": "string" }, "request_id": { "type": "string" } } }, "biz.TimeGranularity": { "type": "string", "enum": [ "STAT_TIME_GRANULARITY_DAILY", "STAT_TIME_GRANULARITY_HOURLY" ], "x-enum-comments": { "StatTimeGranularityDaily": "按天维度", "StatTimeGranularityHourly": "按小时维度" }, "x-enum-varnames": [ "StatTimeGranularityDaily", "StatTimeGranularityHourly" ] }, "common.PageInfo": { "type": "object", "properties": { "page": { "description": "当前页码", "type": "integer" }, "page_size": { "description": "每页大小", "type": "integer" }, "total_number": { "description": "数据总数", "type": "integer" }, "total_page": { "description": "总页码数", "type": "integer" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "token", "in": "header" } } }