Analytics Charts Download - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guide
language
English

This API returns all the points used for generating analytics charts. For more information, see Analytics Application chapter of the AFS Back Office User Guide.

An "Analytics Charts 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 chart.
  • endDate is the end of the chart.
  • afsLog allows to filters involved queries (NOPROBE, ALL, USER, BOT, PROBE).
  • view is the View ID used to filter returned data (see Find the id of a View).

Method: GET

API usage example:

  • $HOST: 10.61.8.175
  • $SERVICE_ID: 1
  • $SERVICE_STATUS: stable.
  • scale: THIRTY_MINUTE (30 minutes)
  • startDate: 2012-02-02T02%3A30%2B01%3A00 (2nd february 2012 02h30 GMT+01:00h)
  • endDate: 2012-02-03T14%3A00%2B01%3A00 (3rd february 2012 14h00 GMT+01:00h)
  • afsLog: NOPROBE (without probe)

http://10.61.8.175/bo-ws/service/1/instance/stable/analytics?scale=THIRTY_MINUTE&endDate=2012-02-03T14%3A00%2B01%3A00&startDate=2012-02-02T02%3A30%2B01%3A00&afsLog=NOPROBE&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": "scale",
"value": "THIRTY_MINUTE"
},
{
"name": "endDate",
"value": "2012-02-03T14:00+01:00"
},
{
"name": "startDate",
"value": "2012-02-02T02:30+01:00"
},
{
"name": "afsLog",
"value": "NOPROBE"
}
]
},
"properties": {
"afs:t": "x:dynamic"
}
},
"result": {
"afs:t": "AnalyticsReply",
"dots": {
"afs:t": "collection",
"x:values": [
{
"afs:t": "DataDot",
"date": 1328146200,
"indicator": {
"afs:t": "BasicIndicator",
"type": "BASIC",
"avgTime": 0,
"nbQueries": 0,
"nbQueriesPerMin": 0,
"nbReplies": 0,
"nbRepliesPerMin": 0,
"totalTime": 0
}
},
{
"afs:t": "DataDot",
[...]
},

[...]

]
},
"effectiveNbDots": 72,
"expectedNbDots": 72
}
}

There are as many "DataDot" blocks as there are dots returned by the API.

The XML result of the previous request is shown below:

<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">
<afs:query xsi:type="afs:ws.response.query">
<afs:locale>fr</afs:locale>
<afs:parameters>
<afs:parameter name="scale" value="THIRTY_MINUTE"/>
<afs:parameter name="endDate" value="2012-02-03T14:00+01:00"/>
<afs:parameter name="startDate" value="2012-02-02T02:30+01:00"/>
<afs:parameter name="afsLog" value="NOPROBE"/>
</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>1328146200</afs:date>
<afs:indicator xsi:type="afs:BasicIndicator">
<afs:type>BASIC</afs:type>
<afs:avgTime>0</afs:avgTime>
<afs:nbQueries>0</afs:nbQueries>
<afs:nbQueriesPerMin>0</afs:nbQueriesPerMin>
<afs:nbReplies>0</afs:nbReplies>
<afs:nbRepliesPerMin>0</afs:nbRepliesPerMin>
<afs:totalTime>0</afs:totalTime>
</afs:indicator>
</afs:item>
<afs:item xsi:type="afs:DataDot">
[...]
</afs:item>

[...]

</afs:dots>
<afs:effectiveNbDots>72</afs:effectiveNbDots>
<afs:expectedNbDots>72</afs:expectedNbDots>
</afs:result>
</afs:value>

There are as many <afs:item> blocks as there are dots returned by the API.