Get Route Entries from a Specific Route Set

get

/{versionId}/routeSets/{routeSetId}/entries

Display either all or a subset ofroute sets entries that exist on the SDM server. You can use query parameters with this task to retrieve specific route set entries. User can provide filter criteria as part of method body to get subset of routes matching criteria. 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
Query Parameters
  • The order defines whether it should be ascending order or not.
  • The page size repesents how many elements in each page.
  • The page number which needs ot be fetched.
Back to Top

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
Back to Top

Examples

Examples of Accessing the API

See Authenticate for how to acquire a session cookie.

The following example shows how to get all or subset of route entries from a perticular route set using curl.

curl -X GET \
    -b sessionid.txt \
    --header "Accept: application/xml" \
    "https://example.com:8443/rest/v1.3/routeSets/{routeSetId}/entries"

The following example shows how to get all or subset of route entries from a perticular route set using Python.

import requests
from lxml import etree
url = "https://example.com:8443/rest/v1.3/routeSets/{routeSetId}/entries"
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>22</carrierIdCode>
        <description>LastnonEmptyDescEntered</description>
        <destinationGroup>xxx</destinationGroup>
        <format></format>
        <nextHop>xxx</nextHop>
        <npa></npa>
        <nxx></nxx>
        <objectId>ID1</objectId>
        <priority></priority>
        <pubId>12345689</pubId>
        <pubIdFormula></pubIdFormula>
        <routingNum>33</routingNum>
        <sed>ThirdaddtestentryRestAPIEnonmpty</sed>
        <sedFormula></sedFormula>
        <trunkContext>xxx</trunkContext>
        <trunkGroup>xxx</trunkGroup>
        <user1>u1</user1>
        <user2>xxx</user2>
        <user3>xxx</user3>
        <user4>xxx</user4>
        <user5>xxx</user5>
        <weight></weight>
        <pUser1>admin</pUser1>
        <pUser2>admin1</pUser2>
    </routeSetEntries>
</routeSetEntries>

The following example shows the contents of the response body in JSON.

{
  "pageInfo": {
      "limitation": 50,
      "numberOfElements": 2,
      "offset": 1
  },
  "routeSetEntries": [{
      "carrierIdCode": "22",
      "description": "LastnonEmptyDescEntered",
      "destinationGroup": "xxx",
      "format": "",
      "nextHop": "xxx",
      "npa": "",
      "nxx": "",
      "objectId": "ID2",
      "pUser1": "admin",
      "pUser2": "admin1",
      "priority": "",
      "pubId": "123456",
      "pubIdFormula": "",
      "routingNum": "33",
      "sed": "ThirdaddtestentryRestAPIEnonmpty",
      "sedFormula": "",
      "trunkContext": "xxx",
      "trunkGroup": "xxx",
      "user1": "u1",
      "user2": "xxx",
      "user3": "xxx",
      "user4": "xxx",
      "user5": "xxx",
      "weight": ""
  },{
      "carrierIdCode": "22",
      "description": "LastnonEmptyDescEntered",
      "destinationGroup": "xxx",
      "format": "",
      "nextHop": "xxx",
      "npa": "",
      "nxx": "",
      "objectId": "ID1",
      "pUser1": "admin",
      "pUser2": "admin1",
      "priority": "",
      "pubId": "1234568",
      "pubIdFormula": "",
      "routingNum": "33",
      "sed": "ThirdaddtestentryRestAPIEnonmpty",
      "sedFormula": "",
      "trunkContext": "xxx",
      "trunkGroup": "xxx",
      "user1": "u1",
      "user2": "xxx",
      "user3": "xxx",
      "user4": "xxx",
      "user5": "xxx",
      "weight": ""
  }]
}

Example for Range Type RouteSet

This example shows the request and response available in NNC 9.0.2 and later.

An example XML request body:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<filterCriteria>
  <rangeStart>100</rangeStart>
  <Usr1></Usr1>
</filterCriteria>

An example JSON request body:

{
  "filterCriteria": {
     "rangeStart": 10,
     "rangeEnd": 999
  }
}

An example XML response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routeSetEntries>
 <pageInfo>
    <limitation>50</limitation>
    <numberOfElements>1</numberOfElements>
    <offset>1</offset>
 </pageInfo>
 <routeSetEntries>
    <carrierIdCode>22</carrierIdCode>
    <description>LastnonEmptyDescEntered</description>
    <destinationGroup>xxx</destinationGroup>
    <format></format>
    <nextHop>xxx</nextHop>
    <objectId>ID3</objectId>
    <priority></priority>
    <rangeEnd>110</rangeEnd>
    <rangeStart>100</rangeStart>
    <routingNum>33</routingNum>
    <sed>abcde</sed>
    <sedFormula></sedFormula>
    <trunkContext>xxx</trunkContext>
    <trunkGroup>xxx</trunkGroup>
    <user1>u1</user1>
    <user2>xxx</user2>
    <user3>xxx</user3>
    <user4>xxx</user4>
    <user5>xxx</user5>
    <weight></weight>
 </routeSetEntries>
</routeSetEntries>

An example JSON response:

{
  "pageInfo": {
      "limitation": 50,
      "numberOfElements": 1,
      "offset": 1
  },
  "routeSetEntries": [{
    "carrierIdCode": 22,
    "description": "Test",
    "destinationGroup": "xxx",
    "format": "",
    "nextHop": "xxx",
    "objectId": "ID1",
    "priority": "",
    "rangeEnd": "99",
    "rangeStart": "29",
    "routingNum": "33",
    "sed": "SED2",
    "sedFormula": "",
    "trunkContext": "",
    "trunkGroup": "xxx",
    "user1": "u1",
    "user2": "",
    "user3": "",
    "user4": "",
    "user5": "",
    "weight": ""
  }]
}
Back to Top