Show the next hop for a specific route
https://{managementIp}/rest/{version}/admin/test/lrt
Request
- 
                    version(required):  string
                    
                    REST API version string.
Available values: v1.2 
- 
                            lrtName(required): string
                            
                            Specifies the name of the local route table.
 - 
                            maxElements: integer(int32)
                            
                            Minimum Value:
0The maximum number of configuration element instances that is returned in a paged response. If there are not maxInstances element instances in the requested result set, then the response contains fewer instances than maxInstances. The maxElements range is between 1 and 100. - 
                            offset: integer(int32)
                            
                            Minimum Value:
1When requesting multiple instances of a configuration element type that supports paging and a subset of all configured element instances is desired, offset must be supplied and specifies, using a 1-based index, the first instance that is returned in the response. - 
                            user(required): string
                            
                            Specifies the name of the user within the local route table.
 
- 
                            Authorization(required): 
                            
                            The value in the Authorization header must be the string "
Bearer {access token}", where{access token}is a valid, unexpired token received in response to a prior/rest/{version}/auth/tokenrequest. 
There's no request body for this operation.
Back to TopResponse
- application/xml
 
200 Response
400 Response
objectobject- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string 
401 Response
objectobject- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string 
403 Response
objectobject- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string 
404 Response
objectobject- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string 
Examples
Examples of Accessing the API
See Authenticate for how to acquire a token.
The following example shows how to get the next hop from the local route table using curl.
curl -X GET \
    --header "Accept: application/xml" \
    --header "Authorization: Bearer $TOKEN" \
    "https://${SBCIP}/rest/v1.1/admin/test/lrt?lrtName=LRT1&user=370"The following example shows how to get the next hop from the local route table using Python.
import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url  = "https://" + sbcip + "/rest/v1.1/admin/test/lrt?lrtName=LRT1&user=370"
resp = requests.get(url, headers=headers)Note:
The local-route-config element must have been already configured.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"?>
<response>
<data>
  <testLrt>
  <UserName>370</UserName>
  <EntryType>E164</EntryType>
  <Priority>1</Priority>
  <Weight>10</Weight>
  <NextHop>!^.*$!sip:\0@SAG-CarrierE!</NextHop>
  <NextHopType>regexp</NextHopType>
  <Priority>2</Priority>
  <Weight>10</Weight>
  <NextHop>!^.*$!sip:\0@SAG-CarrierD!</NextHop>
  <NextHopType>regexp</NextHopType>
  <Priority>3</Priority>
  <Weight>20</Weight>
  <NextHop>!^.*$!sip:\0@SAG-CarrierC!</NextHop>
  <NextHopType>regexp</NextHopType>
  <Priority>4</Priority>
  <Weight>30</Weight>
  <NextHop>!^.*$!sip:\0@SAG-CarrierB!</NextHop>
  <NextHopType>regexp</NextHopType>
  <Priority>5</Priority>
  <Weight>40</Weight>
  <NextHop>!^.*$!sip:\0@SAG-CarrierA!</NextHop>
  <NextHopType>regexp</NextHopType>
  </testLrt>
</data>
<messages/>
<links/>
</response>
                  Example 2 of Accessing API
Use the maxElements parameter to specify the number of elements to return
and the offset parameter to specify where to start fetching the entries.
The offset parameter uses a 1-based index.
When using paging, the <links> element contains links to the next page. 
If there are no pages left, the <links> element is empty.
                  
curl -X GET \
    --header "Accept: application/xml" \
    --header "Authorization: Bearer $TOKEN" \
    "https://${SBCIP}/rest/v1.1/admin/test/lrt?lrtName=LRT1&user=370&maxElements=1&offset=2"The following shows an example response.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
  <testLrt>
  <UserName>370</UserName>
  <EntryType>E164</EntryType>
  <Priority>2</Priority>
  <Weight>10</Weight>
  <NextHop>!^.*$!sip:\0@SAG-CarrierD!</NextHop>
  <NextHopType>regexp</NextHopType>
  </testLrt>
</data>
<messages/>
<links>
  <link>https://10.0.0.3/rest/v1.1/admin/test/lrt?lrtName=LRT1&user=370&offset=3&maxElements=1</link>
</links>
</response>