QUERY LABELS
Returns all defined labels
This operation returns a list of all defined label names. The labels may be associated with broadcasts or numbers.
REQUEST PARAMETERS
Parameter | Data Type | Demo Value | Description |
---|---|---|---|
QueryLabels | object | ||
MaxResults | long | 1000 | Max number of results to return limited to 1000 (default: 1000) |
FirstResult | long | 0 | Start of next result set (default: 0) |
RESPONSE PARAMETERS
Parameter | Data Type | Description |
---|---|---|
LabelQueryResult | ||
TotalResults | long | Results count |
Label | ||
Name | string |
EXAMPLE
using RestSharp;
namespace [your-namespace]
{
public class [your-class]
{
public string QueryLabels()
{
var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");
var request = new RestRequest("label", Method.GET);
request.AddParameter("MaxResults", "3");
request.AddParameter("FirstResult", "1");
var response = client.Execute(request);
string content = response.Content;
return content;
}
}
}
The XML returned is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<r:ResourceList xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource" totalResults="5">
<Label>
<Name>BroadcastLabel-1</Name>
</Label>
<Label>
<Name>BroadcastLabel-2</Name>
</Label>
<Label>
<Name>New BroadcastLabel-3</Name>
</Label>
</r:ResourceList>