Reporting Limits:
1 connection per 15 minutes
No connections from 12:00AM to 2:00AM Central Time
Overview
Get report on Number of hits(requests) for all premium keywords created in a group across the company.
Syntax
C#
[OperationContractAttribute()] SBT.API.DataContracts.Common.WSReportKeywordsResponse Keywords( string securityToken, string orgCode, string fromDate, string toDate )
WSDL
Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/ReportWSService.svc?singlewsdl
Staging: https://test.solutionsbytext.com/Sbt.App.SetUp/WSServices/ReportWSService.svc?singlewsdl
Parameters
securityToken
– String[1000] (Required) – SecurityToken to authenticate the user
orgCode
– String[50] (Required) – Default Organization Code for the company, organization, division or group.
fromDate
– String[20] (Required) – Start date for report of keyword request. Date format is [mm/dd/yyyy].
toDate
– String[20] (Required) – End date for report of keyword request. Date format is [mm/dd/yyyy].
Return Value
WSReportKeywordsResponse
| Name | Type | Description |
|---|---|---|
| Result | bool | True/False whether the call was successful or not. |
| ErrorCode | int | For Success/Failure it returns an error number. |
| Message | string | Message related to error code. |
| Response | List <WSReportKeywordRow> |
If there are transaction details, these will be displayed: |
Examples
C#
lblError.Text = "";
ReportClient reportService = new ReportClient("ReportWSServiceHttpEndpoint");
string securityToken = txtToken.Text; ;
string orgCode = txtOrgCode.Text;
string fromDate = dtFromDate.Text;
string toDate = dtToDate.Text;
WSReportKeywordsResponse wSReportKeywordsResponse = reportService.Keywords(securityToken, orgCode, fromDate, toDate);
if (!wSReportKeywordsResponse.Result)
{
//handle error
lblError.Text = wSReportKeywordsResponse.Message;
}
else
{
//handle success
lblError.Text = wSReportKeywordsResponse.Message;
}SOAP
Soap Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
<soapenv:Header/>
<soapenv:Body>
<ser:Keywords>
<!--Required:-->
<ser:securityToken>Security Token</ser:securityToken>
<!--Required:-->
<ser:orgCode>Org code</ser:orgCode>
<!--Required:-->
<ser:fromDate>From Date</ser:fromDate>
<!--Required:-->
<ser:toDate>To Date</ser:toDate>
</ser:Keywords>
</soapenv:Body>
</soapenv:Envelope>
Soap Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<KeywordsResponse xmlns="http://SBTService/ServiceContracts/">
<KeywordsResult xmlns:a="http://SBTAPIService/DataContract/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Result>true</a:Result>
<a:ErrorCode>1439</a:ErrorCode>
<a:Message>Successfully retrieved keywords report</a:Message>
<a:Response>
<a:WSReportKeywordRow>
<a:AutoSubscribe>Yes</a:AutoSubscribe>
<a:CallbackUrl/>
<a:Group>Org01->Div01->Group001</a:Group>
<a:KeywordType>Premium</a:KeywordType>
<a:Notifications/>
<a:Response>Keyword Response Message</a:Response>
<a:SubscribedResponse>Already Subscribed Message</a:SubscribedResponse>
<a:Timestamp>8/25/2016 8:34:41 AM</a:Timestamp>
<a:Word>Keyword-a30</a:Word>
<a:TotalNoOfRequests>6</a:TotalNoOfRequests>
</a:WSReportKeywordRow>
</a:WSReportKeywordRow>
</a:Response>
</KeywordsResult>
</KeywordsResponse>
</s:Body>
</s:Envelope>JAVA
ReportWSService srv = new ReportWSService();
IReport iReport = srv.getReportWSServiceHttpEndpoint1();
WSReportKeywordsResponse res = null;
String securityToken = "securityToken";
String orgCode = "OrgCode";
String fromDate = "08/22/2013";
String toDate = "09/22/2013";
try {
res = iReport.keywords(securityToken, orgCode, fromDate, toDate);
} catch (Throwable e) {
e.printStackTrace();
}
if(res == null ){
System.out.println("::Erron::");
return;
}
if (res.isResult() == null || !res.isResult())
{
//handle error
System.out.println("ErrorCode::"+res.getErrorCode());
System.out.println("ErrorMessage::"+res.getMessage().getValue());
}
else
{
//handle success
System.out.println("ID::"+res.getId());
System.out.println("Message::"+res.getMessage().getValue());
}PHP
<?php
$client = new SoapClient("https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/ReportWSService.svc?wsdl");
$param = array(
'securityToken' => 'securityToken',
'orgCode' => 'orgCode',
'fromDate' => '08/22/2013',
'toDate' => '10/22/2013'
);
$response = $client->__soapCall('Keywords', array($param));
echo '<pre/>';
print_r($response);
if($response->KeywordsResult->Result){
echo 'Message: '.$response->KeywordsResult->Message;
}
else {
echo 'Message: '.$response->KeywordsResult->Message;
}
?>REST
Method: GET
URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/ReportRSService.svc/Keywords?securityToken=safdsfs&orgCode=dfsf&fromDate=01/31/2015 00:00:00&toDate=01/30/2016 00:00:00
Response:
The response will be in JSON format like below:
{" KeywordsResult": {
"Result": true,
"ErrorCode": 1439,
"Message": " Successfully retrieved keywords report",
"Response": { "List<WSReportKeywordRow> response –
Subscribers details like Group,KeywordType,Notifications etc. Information will display" }
}}