GetCustomURLReport
Overview
Returns the Customized Short URLs generated based on input Date and Time Range.
C#
[OperationContractAttribute()] [O SBT.API.DataContracts.Admin.WSReportCustomUrlDetailsResponse GetCustomUrlReport( string securityToken, string orgCode, string fromDate, string toDate );
WSDL
Production: https://ui.solutionsbytext.com/SBT.App.SetUp/wsservices/SmartclickWSService.svc?singlewsdl
Staging: https://test.solutionsbytext.com/SBT.App.SetUp/wsservices/SmartclickWSService.svc?singlewsdl
Parameters
securityToken
– String[1000] (Required) – Security Token to authenticate the user
orgCode
– String[20] (Required) – Organization Code for the group, division, organization.
fromDate
– String[20] (Required) – Start date for report of Customized Short URLs generated. Date format is [mm/dd/yyyy hh:mm:ss].
toDate
– String[20] (Required) – End date for report of Customized Short URLs generated. Date format is [mm/dd/yyyy hh:mm:ss].
Return Value
WSGetShortUrlReportResponse
| 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 the Error code. |
Response | <a:WSReportCustomUrlDetailsRow> | List of Response parameters, CustomizedShortURL – Customized Short URL generated based on Long URL and domain passed in request. LongURL- Long URL passed in request to get Customized Short URL. CreatedOn – Customized Short URL Created Date. AccessOn – Customized Short URL latest updated date. TotalRequest – Count of number of times same Customized Short URL is requested |
Example
C#
lblError.Text = "";
SmartClickClient smartClickResult = new SmartClickClient("SmartClickWSServiceHttpEndpoint");
string securityToken = txtToken.Text;
string orgCode = txtOrgCode.Text;
string fromDate = txtFromDate.Text;
string toDate = txtToDate.Text;
WSReportCustomUrlDetailsResponse wSResponse = smartClickResult.GetCustomUrlReport(securityToken, orgCode, fromDate, toDate);
if (!wSResponse.Result)
{
//handle error
lblError.Text = wSResponse.Message;
}
else
{
//handle success
lblError.Text = wSResponse.Message;
}
SOAP
Soap Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
<soapenv:Header/>
<soapenv:Body>
<ser:GetCustomUrlReport>
<!--Optional:-->
<ser:securityToken>Security Token</ser:securityToken>
<!--Optional:-->
<ser:orgCode>Org Code</ser:orgCode>
<!--Optional:-->
<ser:fromDate>05/07/2018 02:00:00</ser:fromDate>
<!--Optional:-->
<ser:toDate>05/07/2018 03:00:00</ser:toDate>
</ser:GetCustomUrlReport>
</soapenv:Body>
</soapenv:Envelope>
Soap Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetCustomUrlReportResponse xmlns="http://SBTService/ServiceContracts/">
<GetCustomUrlReportResult xmlns:a="http://SBTAPIService/DataContract/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Result>true</a:Result>
<a:ErrorCode>1555</a:ErrorCode>
<a:Message>Successfully retrieved custom URL.</a:Message>
<a:Response>
<a:WSReportCustomUrlDetailsRow>
<a:CustomizedShortURL>sclk.me/CustomKeyWord</a:CustomizedShortURL>
<a:LongURL>http://www.LongURL.com</a:LongURL>
<a:CreatedOn>5/7/2018 2:46:31 AM</a:CreatedOn>
<a:AccessOn>5/7/2018 2:47:08 AM</a:AccessOn>
<a:TotalRequest>2</a:TotalRequest>
</a:WSReportCustomUrlDetailsRow>
</a:Response>
</GetCustomUrlReportResult>
</GetCustomUrlReportResponse>
</s:Body>
</s:Envelope>
REST
Response:
The response will be in JSON format as below:
{
"GetCustomUrlReportResult": {
"Result": true,
"ErrorCode": 1555,
"Message": "Successfully retrieved custom URL.",
"Response": [
{
"CustomizedShortURL": "sclk.me/CustomKeyWord",
"LongURL": "http://www.LongURL.com",
"CreatedOn": "5/7/2018 2:46:31 AM",
"AccessOn": "5/7/2018 2:47:08 AM",
"TotalRequest": 2
}
]
}
}