Summary:
List information about, modify, or delete an IP SLA.
URL:
http(s)://{server hostname}/api/ipsla/{id}
Methods summary
- GET Method - displays information about the IP SLA.
- PUT Method - modifies a particular IP SLA creator.
- DELETE Method - deletes a particular IP SLA creator.
Request and response
The following attributes must be present for every IP SLA type:
Name | Description |
---|---|
id |
IP SLA object ID |
name |
name |
index |
association index, used to match IP SLA creators and pollers |
tag |
zone flags |
lifetime |
creator’s lifetime |
frequency |
frequency of polling |
timeout |
polling timeout |
vrfName |
VRF (Virtual Routing and Forwarding) instance name |
failureCause |
cause of failure |
changesPending |
changes pending |
type |
creator type, one of the following:
|
In addition, each type provides a specific set of attributes:
IP SLA Type |
Required attributes |
---|---|
DHCP |
|
DNS |
|
ECHO and ECHO_PATH |
|
HTTP |
|
HTTP_RAW |
|
JITTER |
|
VOIP |
|
TCP |
|
UDP |
|
GET Method detail
Returns detailed information about a particular IP SLA creator.
Response:
Refer to the Request and response section above.
Examples:
INPUT
curl -u admin:admin https://localhost/api/ipsla/772?media=json
OUTPUT
{
"attributes" :
{
"frequency" : "300",
"id" : "772",
"index" : "2",
"lifetime" : "forever",
"name" : "B",
"nameserver" : "127.0.0.1",
"tag" : "a",
"targetAddress" : "127.0.0.1",
"timeout" : "1000",
"type" : "DNS",
"vrfName" : "a"
}
}
INPUT
curl -u admin:admin https://localhost/api/ipsla/772?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ipslaDetails>
<attributes>
<id>772</id>
<type>DNS</type>
<index>2</index>
<name>B</name>
<tag>a</tag>
<lifetime>forever</lifetime>
<frequency>300</frequency>
<timeout>1000</timeout>
<vrfName>a</vrfName>
<targetAddress>127.0.0.1</targetAddress>
<nameserver>127.0.0.1</nameserver>
</attributes>
</ipslaDetails>
PUT Method detail
Modifies parameters of an IP SLA creator.
Note, the parameters “id”, “index” and “type” are not supposed to be modified and are therefore ignored.
Request:
A set of attributes that define an IP SLA creator, according to the details described in the Request and Response section above.
Response:
Actual IP SLA creator parameters, as described in the Request and response section above.
Examples:
INPUT
curl -u admin:admin https://localhost/api/ipsla/1481?media=json -X PUT -H "content-type:application/json" -d \
'{>
"frequency" : 2000,>
"lifetime" : 0,>
"name" : "Y",>
"sourcePort" : 2666,>
"tag" : "x",>
"targetAddress" : "127.0.0.2",>
"timeout" : 1000,>
"vrfName" : "x">
}'
OUTPUT
{
"attributes" : {
"frequency" : "2000",
"id" : "1481",
"index" : "3",
"lifetime" : "0",
"name" : "Y",
"sourceAddress" : "null",
"sourcePort" : "2666",
"tag" : "x",
"targetAddress" : "127.0.0.2",
"timeout" : "1000",
"type" : "DHCP",
"vrfName" : "x"
}
}
INPUT
curl -u admin:admin https://localhost/api/ipsla/1481?media=xml -X PUT -H "content-type:application/xml" -d \
'<ipslaCreator>
<name>Y</name>
<tag>x</tag>
<lifetime>0</lifetime>
<frequency>2000</frequency>
<timeout>1000</timeout>
<vrfName>x</vrfName>
<targetAddress>127.0.0.2</targetAddress>
<sourcePort>2666</sourcePort>
</ipslaCreator>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ipslaDetails>
<attributes>
<id>1481</id>
<type>DHCP</type>
<index>3</index>
<name>Y</name>
<tag>x</tag>
<lifetime>0</lifetime>
<frequency>2000</frequency>
<timeout>1000</timeout>
<vrfName>x</vrfName>
<targetAddress>127.0.0.2</targetAddress>
<sourceAddress>null</sourceAddress>
<sourcePort>2666</sourcePort>
</attributes>
</ipslaDetails>
DELETE Method detail
The list of users returned is restricted for non-administrators: only the user object corresponding to the current user is returned.
Response:
“OK” message if the IP SLA was properly deleted, an error message otherwise.
Examples:
INPUT
curl -u admin:admin https://localhost/api/ipsla/772?media=json -X DELETE
OUTPUT
{
"message" : "OK"
}
INPUT
curl -u admin:admin https://localhost/api/ipsla/1481?media=xml -X PUT -H "content-type:application/xml" -d \
'<ipslaCreator>
<name>Y</name>
<tag>x</tag>
<lifetime>0</lifetime>
<frequency>2000</frequency>
<timeout>1000</timeout>
<vrfName>x</vrfName>
<targetAddress>127.0.0.2</targetAddress>
<sourcePort>2666</sourcePort>
</ipslaCreator>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ipslaDetails>
<attributes>
<id>1481</id>
<type>DHCP</type>
<index>3</index>
<name>Y</name>
<tag>x</tag>
<lifetime>0</lifetime>
<frequency>2000</frequency>
<timeout>1000</timeout>
<vrfName>x</vrfName>
<targetAddress>127.0.0.2</targetAddress>
<sourceAddress>null</sourceAddress>
<sourcePort>2666</sourcePort>
</attributes>
</ipslaDetails>
Comments
0 comments
Please sign in to leave a comment.