getConnectionHistory()

ConnectionList getConnectionHistory(string usn,
 ConnectionHistoryQuery connectionHistoryQuery, int limit, int offset)

This method returns a connection list that contains the history of a subscription, for a given date range. The result returned can be limited with limit and offset.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription or account.
connectionHistoryQuery
Format: ConnectionHistoryQuery XML
Purpose: Defines a ConnectionHistoryQuery XML document that specifies the date range for the connection history.
limit
Format: integer
Purpose: Specifies the number of returned results. Default is 200.
offset
Format: integer
Purpose: (Optional) Specifies the starting point of results returned. Default is 0.

Example: A ConnectionHistoryQuery XML document

This example shows a ConnectionHistoryQuery XML document displaying the start and end dates of the connection query.

<ConnectionHistoryQuery xmlns="http://xml.inomial.com/smile/2.xsd">
  <Start>2013-01-01T00:00:00+11:00</Start>
  <end>2013-04-01T00:00:00+11:00</end>
</ConnectionHistoryQuery>         

Results

This method returns a ConnectionList XML document that contains information about the connection history of a subscription for a given date range.

If additional results exist for the subscription within the date range, the method returns moreResultExist="true".

There are no messages defined by this method.

Example: A returned ConnectionList XML document with two connection historys and has no more existing results

This example shows a returned ConnectionList XML document with two connection historys.

<ConnectionList xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2" moreResultExist="false">
  <Connection>
    <Start>2013-01-11T14:11:30.647+11:00<Start>
    <End>2013-01-11T15:01:30.647+11:00<End>
    <DisconnectReason>Unknown<DisconnectReason>
    <Bytesin>1000<Bytesin>
    <Bytesout>1000<Bytesout>
    <Seconds>3000<Seconds>
  <Connection>    
  <Connection>
    <Start>2013-04-18T09:00:30.000+10:00<Start>
    <End>2013-04-18T14:33:50.000+10:00<End>
    <DisconnectReason>Unknown<DisconnectReason>
    <Bytesin>3000<Bytesin>
    <Bytesout>10000<Bytesout>
    <Seconds>20000<Seconds>
  <Connection>
<ConnectionList>

Example: A returned ConnectionList XML document with connection history, and has no more existing results

This example shows a returned ConnectionList XML document with limit and offset set.

<ConnectionList xmlns="http://xml.inomial.com/smile/2.xsd"
 xmlns="http://ws.inomial.com/smile.2" moreResultExist="true">
  <Connection>
    <Start>2013-01-11T14:11:30.647+11:00<Start>
    <End>2013-01-11T15:01:30.647+11:00<End>
    <DisconnectReason>Unknown<DisconnectReason>
    <Bytesin>1000<Bytesin>
    <Bytesout>1000<Bytesout>
    <Seconds>3000<Seconds>
  <Connection>    
<ConnectionList>

Example: A returned ConnectionList XML document without connection history

This example shows a returned ConnectionList document with no history.

<ConnectionList xmlns="http://xml.inomial.com/smile/2.xsd"
 xmlns="http://ws.inomial.com/smile.2" moreResultExist="false"/>

Faults

NoSuchItemException

This fault is returned when the specified USN does not match an account or subscription.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.GetConnectionHistory usn
 connectionHistoryQuery limit [offset]
usn
Purpose: Specifies the USN of the subscription or the account.
connectionHistoryQuery
Purpose: Defines the filename of the ConnectionHistoryQuery XML document.
limit
Purpose: Specifies the number of returned results.
offset
Purpose: (Optional) Specifies the starting point of results returned.
Note: For more information about the Java client and the options it accepts, see Java client syntax.