getActivityStatementRange()
ActivityBatchURL getActivityStatementRange(string usn,
dateTime startTimestamp, dateTime endTimestamp)
This method returns a URL from which you can download unrated activity statements, or CDRs, that occur in a given date range.
You can only download information about activity that starts within the date range. For example, if a phone call begins at 10:59 am on 9 August 2012 and the date range begins at 11:00 am on 9 August 2012, the activity statement for the phone call is not included in the date range.
Use this method to download unrated activity statements for non-billing purposes, for example, to display activity statements to customers in a web interface.
Parameters
- usn
- Format: string
- startTimestamp
- Format: dateTime
- endTimestamp
- Format: dateTime
Results
This method returns a URL from which you can download the unrated activity statements. The URL is valid for 24 hours after it is generated by Smile and the activity statements are collated into a CSV file.
If there is no activity in the date range, the method returns activity="false".
This method and the URL both use basic access authentication. You must use the same credentials to access the URL as you did to call the method.
Example: A returned ActivityBatchURL XML document with activity statements
This example shows a returned ActivityBatchURL document with the URL from which you can download the activity statements.
<ActivityBatchURL xmlns="http://xml.inomial.com/smile/2.xsd" activity="true">
<BatchID>1409213</BatchID>
<URL>https://smile.example.com/activity?token=12049IASUBF9812p9</URL>
</ActivityBatchURL>
Example: A returned ActivityBatchURL XML document without activity
This example shows a returned ActivityBatchURL document with no activity.
<ActivityBatchURL xmlns="http://xml.inomial.com/smile/2.xsd" activity="false"/>
Faults
ActivityExceptionThis fault is returned when Smile cannot produce an activity statement.
NoSuchItemExceptionThis 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.SubscriptionActivityRange usn
startTimestamp endTimestamp
- usn
- Purpose: Specifies the USN of the account or subscription.
- startTimestamp
- Purpose: Specifies the date and time that starts the date range.
- endTimestamp
- Purpose: Specifies the date and time that ends the date range.