| POST | /v4/report/links |
|---|
"use strict";
export class Item {
/** @param {{id?:string,displayName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
displayName;
}
export class ReportData {
/** @param {{id?:string,item?:Item,totalClicks?:number,clicks?:number,junkClicks?:number,spiderClicks?:number,dateUtc?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {Item} */
item;
/** @type {number} */
totalClicks;
/** @type {number} */
clicks;
/** @type {number} */
junkClicks;
/** @type {number} */
spiderClicks;
/** @type {string} */
dateUtc;
}
export class Error {
/** @param {{code?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
code;
}
/** @typedef {'Default'|'Retailer'|'Date'} */
export var GroupBy;
(function (GroupBy) {
GroupBy["Default"] = "Default"
GroupBy["Retailer"] = "Retailer"
GroupBy["Date"] = "Date"
})(GroupBy || (GroupBy = {}));
/** @typedef {'ShortUrl'|'Group'|'User'} */
export var ReportType;
(function (ReportType) {
ReportType["ShortUrl"] = "ShortUrl"
ReportType["Group"] = "Group"
ReportType["User"] = "User"
})(ReportType || (ReportType = {}));
export class ReportRequest {
/** @param {{items?:string[],groupBy?:GroupBy[],attribute?:string,type?:ReportType,fromStartUtcInclusive?:string,fromEndUtcInclusive?:string,retailers?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string[]} */
items;
/** @type {GroupBy[]} */
groupBy;
/** @type {string} */
attribute;
/** @type {ReportType} */
type;
/** @type {string} */
fromStartUtcInclusive;
/** @type {string} */
fromEndUtcInclusive;
/** @type {string[]} */
retailers;
}
export class Report {
/** @param {{data?:ReportData[],executionTimeMs?:number,totalItems?:number,errors?:Error[],request?:ReportRequest,totalClicks?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ReportData[]} */
data;
/** @type {number} */
executionTimeMs;
/** @type {number} */
totalItems;
/** @type {Error[]} */
errors;
/** @type {ReportRequest} */
request;
/** @type {number} */
totalClicks;
}
export class PostLinkReportResponse {
/** @param {{reports?:Report[],responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Report[]} */
reports;
/** @type {ResponseStatus} */
responseStatus;
}
export class PostLinkReportRequest {
/** @param {{reports?:ReportRequest[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ReportRequest[]} */
reports;
}
JavaScript PostLinkReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v4/report/links HTTP/1.1
Host: reporting-api-zane.dev.platform.georiot.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}