Get All or subset of route entries from a particular routeset
get
/{versionId}/routeSets/{routeSetId}/routeEntries
Use this (GET) method to display all/subset of route sets entries that exist on the SDM server. You can use Pub Id as path parameter with this task to retrieve specific route set entries.On the navigation pane, go to Get Started > Send Requests on the navigation pane. On the Send Requests page, scroll to the Pagination Parameters section for more information.
This request is only valid for E164 and for string type routeSets.
Request
Path Parameters
-
routeSetId(required):
The route set id whose route entries needs to be fetched.
-
versionId(required):
The REST API version. It's value is v1.3.
Query Parameters
-
ascending:
The order defines whether it should be ascending order or not.
-
limitation:
The page size represents how many elements in each page.
-
offset:
The page number which needs to be fetched.
-
pubId:
The pub ID of the route whose information needs to be fetched.
Response
200 Response
400 Response
The user input is invalid.
401 Response
The session ID is invalid.
403 Response
There is no permission to access the resources.
404 Response
The object (resource URI, device, and so on) of your input request cannot be found.
500 Response
Internal server error
Examples
Examples of Accessing the API
See Authenticate for how to acquire a session cookie.
The following example shows how to get route entries by PubID in a route set using curl.
curl -X GET \
-b sessionid.txt \
--header "Accept: application/xml" \
"https://example.com:8443/rest/v1.3/routeSets/{routeSetId}/routeEntries/?pubId={pubId}"The following example shows how to get route entries by PubID in a route set using Python.
import requests
from lxml import etree
url = "https://example.com:8443/rest/v1.3/routeSets/{routeSetId}/routeEntries/?pubId={pubId}"
headers = { "Accept":"application/xml", "Cookie":cookie }
resp = requests.get(url, headers=headers)Example of the Response Body
The following example shows the contents of the response body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routeSetEntries>
<pageInfo>
<limitation>50</limitation>
<numberOfElements>1</numberOfElements>
<offset>1</offset>
</pageInfo>
<routeSetEntries>
<carrierIdCode></carrierIdCode>
<description>2</description>
<destinationGroup></destinationGroup>
<format></format>
<nextHop></nextHop>
<npa></npa>
<nxx></nxx>
<objectId>ID50</objectId>
<order>1000000100</order>
<priority></priority>
<pubId>1000000099</pubId>
<pubIdFormula></pubIdFormula>
<routingNum></routingNum>
<sed>sed1000000099</sed>
<sedFormula></sedFormula>
<trunkContext></trunkContext>
<trunkGroup></trunkGroup>
<user1></user1>
<user2></user2>
<user3></user3>
<user4></user4>
<user5></user5>
<weight></weight>
<pUser1></pUser1>
<pUser2></pUser2>
</routeSetEntries>
</routeSetEntries>The following example shows the contents of the response body in JSON.
{
"pageInfo": {
"limitation": 50,
"numberOfElements": 1,
"offset": 1
},
"routeSetEntries": [
{
"carrierIdCode": "",
"description": "2",
"destinationGroup": "",
"format": "",
"nextHop": "",
"npa": "",
"nxx": "",
"objectId": "ID2",
"order": "1000000004",
"pUser1": "",
"pUser2": "",
"priority": "",
"pubId": "1000000003",
"pubIdFormula": "",
"routingNum": "",
"sed": "sed1000000003",
"sedFormula": "",
"trunkContext": "",
"trunkGroup": "",
"user1": "",
"user2": "",
"user3": "",
"user4": "",
"user5": "",
"weight": ""
}
]
}