Get All or subset of route entries from a particular routeset
get
/{versionId}/routeSets/{routeSetId}/routes
Use this (GET) method to display all/subset of route sets entries that exist on the SDM server. You can use query parameters with this task to retrieve specific route set entries.No Filter criteria will be applied to this method. 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.
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.
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 all routes from a specific route set using curl.
curl -X GET \
-b sessionid.txt \
--header "Accept:application/xml" \
"https://example.com:8443/rest/v1.3/routeSets/{routeSetId}/routes"The following example shows how to get all routes from a specific route set using Python.
import requests
from lxml import etree
url = "https://example.com:8443/rest/v1.3/routeSets/{routeSetId}/routes"
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>3</numberOfElements>
<offset>1</offset>
</pageInfo>
<routeSetEntries>
<carrierIdCode></carrierIdCode>
<description></description>
<destinationGroup></destinationGroup>
<format></format>
<nextHop></nextHop>
<npa></npa>
<nxx></nxx>
<objectId>ID3</objectId>
<order></order>
<preference></preference>
<priority></priority>
<pubId>10</pubId>
<pubIdFormula></pubIdFormula>
<routingNum></routingNum>
<sed>sed10</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": 2,
"offset": 1
},
"routeSetEntries": [
{
"carrierIdCode": "",
"description": "",
"destinationGroup": "",
"format": "",
"nextHop": "",
"npa": "",
"nxx": "",
"objectId": "ID1",
"order": "",
"pUser1": "",
"pUser2": "",
"preference": "",
"priority": "",
"pubId": "PB1",
"pubIdFormula": "",
"routingNum": "",
"sed": "sed1",
"sedFormula": "",
"trunkContext": "",
"trunkGroup": "",
"user1": "",
"user2": "",
"user3": "",
"user4": "",
"user5": "",
"weight": ""
}
]
}