Expression Hit Parade Download - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guide
language
English

This API returns the 200 most frequent expressions (used to generate Hit Parade). For more information, see Analytics Application chapter of the AFS Back Office User Guide.

An "Expression Hit Parade Download" API request takes the following form:

http://$HOST/bo-ws/service/$SERVICE_ID/instance/$SERVICE_STATUS/analytics?parameters

The list of parameters and their possible values are enumerated below.

  • $HOST is the server hosting the Back Office.
  • $SERVICE_ID is the number of the desired service.
  • $SERVICE_STATUS is the status of the desired service.
  • scale is the delay between two points. Available values are: MINUTE, TEN_MINUTE, THIRTY_MINUTE, HOUR, TWO_HOUR, EIGHT_HOUR, DAY, WEEK, MONTH, QUARTER, YEAR.
  • startDate is the beginning of the period
  • endDate is the end of the period.
  • afsLog allows to filters involved queries (NOPROBE, ALL, USER, BOT, PROBE).
  • type allows to choose the desired analytics. Use =TOP_EXPR for Expression Hit Parade. Use =TOP_EXPR_WREPLY for only expressions which returned replies.
  • view is the View ID used to filter returned data (see Find the id of a View).

Method: GET

The startDate and endDate parameters are optional. If not provided, the last period corresponding to the scale is used.

API usage example:

  • $HOST: 10.61.8.175
  • $SERVICE_ID: 1
  • $SERVICE_STATUS: stable
  • scale: DAY (one day)
  • startDate: 2012-03-12%2B00%3A00 (12th March 2012 GMT+00:00h)
  • endDate: none
  • type: TOP_EXPR (Expression Hit Parade)
  • afsLog: USER (only queries made by users)

http://10.61.8.175/bo-ws/service/1/instance/stable/analytics?startDate=2012-03-12%2B00%3A00&scale=DAY&type=TOP_EXPR&afsLog=USER&afs:login=login://$USER:$PASSWORD@$AUTHENTICATION_AUTHORITY

API responses are returned in the format indicated by the "Accept" header.

The JSON result of the previous request is shown below:

{
"afs:t": "ws.response",
"query": {
"afs:t": "ws.response.query",
"locale": "fr",
"parameters": { "afs:t": "collection",
"x:values": [
{
"name": "startDate",
"value": "2012-03-12+00:00"
},
{
"name": "scale",
"value": "DAY"
},
{
"name": "type",
"value": "TOP_EXPR"
},
{
"name": "afsLog",
"value": "USER"
}
]
},
"properties": {
"afs:t": "x:dynamic"
}
},
"result": {
"afs:t": "AnalyticsReply",
"dots": {
"afs:t": "collection",
"x:values": [
{
"afs:t": "DataDot",
"date": 1331510400,
"indicator": {
"afs:t": "TopExprIndicator",
"type": "TOP_EXPR",
"topList": {
"afs:t": "collection",
"x:values": [
{
"afs:t": "CountedExpr",
"count": 254, // This is the number of hit of this top expression
"data": "Top Expression Number 1"
},

// [...] There are as many afs:CountedExpr as there are Top Expression

]
},
"topSize": 200,
"totalExpr": 176 // This is the total number of top expressions (max 200)
}
}
]
},
"effectiveNbDots": 1,
"expectedNbDots": 1
}
}

The XML result of the previous request is shown below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<afs:value
xsi:schemaLocation="http://ref.antidot.net/v7/bo/output http://ref.antidot.net/v7.4/bo/output.xsd"
xsi:type="afs:ws.response" xmlns:afs="http://ref.antidot.net/v7/bo/output"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<afs:query xsi:type="afs:ws.response.query">
<afs:locale>fr</afs:locale>
<afs:parameters>
<afs:parameter name="startDate" value="2012-03-12+00:00"/>
<afs:parameter name="scale" value="DAY"/>
<afs:parameter name="type" value="TOP_EXPR"/>
<afs:parameter name="afsLog" value="USER"/>
</afs:parameters>
<afs:properties xsi:type="afs:dynamic"/>
</afs:query>
<afs:result xsi:type="afs:AnalyticsReply">
<afs:dots>
<afs:item xsi:type="afs:DataDot">
<afs:date>1331510400</afs:date>
<afs:indicator xsi:type="afs:TopExprIndicator">
<afs:type>TOP_EXPR</afs:type>
<afs:topList>
<afs:item xsi:type="afs:CountedExpr">
<afs:count>254</afs:count> <!-- This is the number of hit of this top expression -->
<afs:data>Top Expression Number 1</afs:data>
</afs:item>

<!-- [...] There are as many afs:CountedExpr as there are Top Expressions -->

</afs:topList>
<afs:topSize>200</afs:topSize>
<afs:totalExpr>176</afs:totalExpr> <!-- This is the total number of top expressions (max 200) -->
</afs:indicator>
</afs:item>
</afs:dots>
<afs:effectiveNbDots>1</afs:effectiveNbDots>
<afs:expectedNbDots>1</afs:expectedNbDots>
</afs:result>
</afs:value>