GET the list of templates on the SDM Server
get
/{versionId}/routeSets/importTemplates
Use this API(GET) to get all the Templates configured by user on SDM Server
Request
Path Parameters
-
versionId:
The rest api version, it's value is v1.3
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
Example of Accessing the API with cURL
The following example shows how to get the list of templates on the SDM server by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X GET \
-b sessionid.txt \
--header "Accept: application/xml" \
"https://example.com:8443/rest/v1.3/routeSets/importTemplates"
Example of Accessing the API with Python
The following example shows how to get the list of templates on the SDM server by submitting a GET request on the REST resource using Python. This example assumes the cookie
variable contains a valid authentication cookie. For an example of authenticating with Python, see Authenticate.
import requests
url = "https://example.com:8443/rest/v1.3/routeSets/importTemplates"
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 format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<importTemplates>
<importTemplates>
<columnMappings>
<columnMapping>
<columnName>nextHop</columnName>
<csvName>6</csvName>
</columnMapping>
<columnMapping>
<columnName>trunkContext</columnName>
<csvName>10</csvName>
</columnMapping>
<columnMapping>
<columnName>description</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>pubUser2</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>pubUser1</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>sed</columnName>
<csvName>3</csvName>
</columnMapping>
<columnMapping>
<columnName>pubId</columnName>
<csvName>2</csvName>
</columnMapping>
<columnMapping>
<columnName>npa</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>order</columnName>
<csvName>7</csvName>
</columnMapping>
<columnMapping>
<columnName>formulaFeapp</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>user1</columnName>
<csvName>13</csvName>
</columnMapping>
<columnMapping>
<columnName>user2</columnName>
<csvName>14</csvName>
</columnMapping>
<columnMapping>
<columnName>preference</columnName>
<csvName>8</csvName>
</columnMapping>
<columnMapping>
<columnName>trunkGroup</columnName>
<csvName>9</csvName>
</columnMapping>
<columnMapping>
<columnName>format</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>weight</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>priority</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>user5</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>user3</columnName>
<csvName>15</csvName>
</columnMapping>
<columnMapping>
<columnName>nxx</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>user4</columnName>
<csvName>16</csvName>
</columnMapping>
<columnMapping>
<columnName>destGroup</columnName>
<csvName>5</csvName>
</columnMapping>
<columnMapping>
<columnName>formulaFeappPubId</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>name</columnName>
<csvName>Template1</csvName>
</columnMapping>
<columnMapping>
<columnName>formula</columnName>
<csvName></csvName>
</columnMapping>
<columnMapping>
<columnName>rn</columnName>
<csvName>11</csvName>
</columnMapping>
<columnMapping>
<columnName>cic</columnName>
<csvName>12</csvName>
</columnMapping>
<columnMapping>
<columnName>operation</columnName>
<csvName>1</csvName>
</columnMapping>
</columnMappings>
<name>Template1</name>
<objectId>ID9</objectId>
<sedFormula></sedFormula>
</importTemplates>
</importTemplates>