This document provides an overview of WebSpectator's integration services and API for consuming real-time and reporting data. It describes the infrastructure for handling real-time and reported data separately, with real-time data accessed through a publish/subscribe system and reporting data available via HTTP APIs. Samples are given for requesting real-time application or campaign data and for generating auto-monetization reports by date or website.
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
Integration Overview
1. WebSpectator for Publishers
IntegrationServices Overview
USA (HQ)
100 Wilshire Blvd
Santa Monica CA, 90401
United States
Phone: (+1) 310 566 0340
Brazil
Avenida das Nações Unidas,
11.541, 14º Andar
04578-907 São Paulo
Phone: (+55) 11 5504 3350
United Kingdom
23 Berkeley Square
London, W1J 6HE
Phone: (+44) 2032 869092
Portugal
Rua Fernando Namora, 4
2º Piso A, Ed. Metropolitan
Business Center
2675-487 Odivelas
Phone: (+351) 21 934 03 22
2. Contents
Summary............................................................................................................................................................ 2
Overview............................................................................................................................................................ 3
API Samples ....................................................................................................................................................... 4
Real-time ....................................................................................................................................................... 4
Get application data .................................................................................................................................. 5
Get campaign data .................................................................................................................................... 6
Integration services ....................................................................................................................................... 7
Auto-monetizer report by date ................................................................................................................. 7
Auto-monetizer report by website ............................................................................................................ 8
Sample dashboard and report ........................................................................................................................... 9
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
1
21-02-2014
3. Summary
This document presents a high-level overview about the WebSpectator services and integration API to
provide the necessary means for clients and third-parties data consuming.
WebSpectator offers a consistent, reliable and scalable integration infrastructure, so real-time and
reporting data can easily be consumed by any authorized user, despite of the location or the device he is
accessing from.
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
2
21-02-2014
4. Overview
The figure below shows the overall picture of the WebSpectator, differentiating how real-time and other
type of data can be consumed from the system.
WebSites
BackOffice
Others
Consume real-time data
(dashboards)
ORTC
Consume
reporting data
Integration services
Internal services and
data processing
Data storage
(business data, real-time data,
reports data)
All the data collected from WebSpectator powered applications is processed, aggregated and stored in
databases, using both on-disk and in-memory approaches to persist historically data, as long as offering a
fast access to most recent available data.
Real-time data, typically for dashboards, is queried and consumed using a third-party component called
ORTC, a real-time infrastructure used to accomplish bidirectional communication between WebSpectator
servers and clients, based on a publish/subscribe pattern, providing integration API for several well-known
languages (.Net, Java, Android, iOS, etc.).WebSpectator BackOffice, for example, feeds dashboards realtime data using JavaScript API, sending and receiving JSON messages.
Other type of logged data, used for reports and graphics, can be accessed via WebSpectator Integration
Services, a HTTP based services layer replying with JSON formatted responses.
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
3
21-02-2014
5. API Samples
The following sections show examples of using each one of the integration API.
Real-time
Prior to present samples on using this API, it is important to explain how authenticationis done and
messages are sent and received in ORTC system.
Each application is given a unique key used to identify it in the ORTC services and to get an authentication
token. The application key and token are then used toconnect the client to the server and authorize each
request. Real-time messages from the server are received in the client subscribing to channels, using
asynchronous callbacks to process each response.
Once the connection is successfully established, client subscribes to real-time channels, sending a message
signaling WebSpectator it wants to be notified on a period basis about certain types of data. Such a request
is sent using aJSON message, with the following structure:
Request
Property
queryName
Description
Real time query to execute and to retrieve data back to client.
action
Action to be performed for the specified query. Client sends a
start message to begin accepting data messages from server.
When no more data is intended to be received (e.g. the user
leaves the page or the application), client sends a stop message.
The identifier of the application client wants to monitor.
The identifier of the entity being queried.
A session identifier generated by the client.
Frequency (seconds) the query will be executed with and data
returned to the client processing callback.
Number of minutes client wants data grouped by (granularity).
Timespan in hours data will be fetched until now, i.e. get data
from the last specified number of hours.
applicationId
entityId
clientId
interval
dataResolution
hours
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
4
Sample values
ApplicationRTDataQuery
AdUnitRTDataQuery
TopZonesForApplicationRTDataQuery
OrderLineRTDataQuery
start | stop
Integer > 0
Integer > 0
String
Integer > 0
Integer >= 0; if 0, no grouping occurs
Integer > 0
21-02-2014
8. Integration services
All the available services included in this API accept as the first required parameter the account private key
associated with each publisher. This key is validated and processed by the WebSpectator servers to
authenticate and ensure authorized access to the requested information.
Invalid authentication or unauthorized access result in an error being returned, as also invalid parameters
specification (for example, inexistent website or start date greater than end date).
Auto-monetizer report by date
Arguments
Key – Account private key
DateStart – Report interval start date in the format “yyyy-MM-dd”, example: 2013-12-24
DateEnd – Report interval end date in the format “yyyy-MM-dd”, example: 2013-12-31
Websites – Optional argument, list of websites public keys separated by comma
Request
http://wsp.webspectator.com/PublicServices/GetAutoMonetizerReportByDate?key=[accountkey]&
dateStart=[yyyy-mm-dd]&dateEnd=[yyyy-mm-dd]&websites=[websites-public-key]
Response
{
"result": [
{
"date": "2013-12-29",
"revenue": 106.505,
"click": 890,
"print": 98155,
"ctr": 0.907,
"ecpm": 1.085
},
{
"date": "2013-12-30",
"revenue": 127.86,
"click": 1151,
"print": 120025,
"ctr": 0.959,
"ecpm": 1.065
}
],
"total": {
"revenue": 234.365,
"click": 2041,
"print": 218180,
"ctr": 0.935,
"ecpm": 1.074
}
}
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
7
21-02-2014
9. Auto-monetizer report by website
Arguments
Key – Account private key
DateStart – Report interval start date in the format “yyyy-MM-dd”, example: 2013-12-24
DateEnd – Report interval end date in the format “yyyy-MM-dd”, example: 2013-12-31
Websites – Optional argument, list of websites public keys separated by comma
Request
http://wsp.webspectator.com/PublicServices/GetAutoMonetizerReportByWebsite?key=[accountke
y]&dateStart=[yyyy-mm-dd]&dateEnd=[yyyy-mm-dd]&websites=[websites-public-key]
Response
{
"result": [
{
"website": "xpto.org",
"revenue": 30.54,
"click": 317,
"print": 21177,
"ctr": 1.497,
"ecpm": 1.442
},
{
"website": "example.com",
"revenue": 13.47,
"click": 75,
"print": 13713,
"ctr": 0.547,
"ecpm": 0.982
}
],
"total": {
"revenue": 44.01,
"click": 392,
"print": 34890,
"ctr": 1.124,
"ecpm": 1.261
}
}
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
8
21-02-2014
10. Sample dashboard and report
The figures show examples of how real-time and reporting data can be organized to present a complete
overview about an application or campaign.
WSP v2.0 –Integration Services Overview
Ref:#WS- 201401RF-NP
9
21-02-2014