Watcher Profile Name
Configures, modifies and retrieves the watcher profile name. The URI is:
/watcher/config/profile/<profile-name>The URI to add the watcher profile name using the PATCH method is:
/watcher/config
{
"config" : {
"profile" : [
{
"name" : "w1",
"ippm" : {
"config" : {
"name": "w1"
}
}
}
]
}
}The
URI to modify watcher profile name using the PUT method
is:/watcher/config
{
"config" : {
"profile" : [
{
"name" : "w1",
"ippm" : {
"config" : {
"name": "w1"
}
}
}
]
}
}The
URI to add watcher profile name using the POST method
is:/watcher
{
"config" : {
"profile" : [
{
"name" : "w1",
"ippm" : {
"config" : {
"name": "w1"
}
}
}
]
}
}
Supported HTTP Operations
GET method to get a specific watcher profile is:
URL: https://<host>/restconf/data/watcher/config/profile/w1
Request body: None
Response body:
{
"icx-openconfig-watcher:config": {
"profile": [
{
"name": "w1",
"ippm": {
"config": {
"name": "w1",
"profile": "p1",
"frequency": "70"
},
"state": {
"action": {}
}
},
"action": {
"logging": {
"success": true,
"failure": true
}
}
}
]
}
}
GET method to get all watcher profiles is:
URL: https://<host>/restconf/data/watcher/config
Request body: None
Response body:
{
"icx-openconfig-watcher:config": {
"profile": [
{
"name": "w1",
"ippm": {
"config": {
"name": "w1",
"profile": "p2",
"frequency": "90"
},
"state": {
"action": {}
}
},
"action": {
"logging": {
"success": true,
"failure": true
}
}
},
{
"name": "w2",
"ippm": {
"config": {
"name": "w2",
"profile": "ip-sla",
"frequency": "60"
},
"state": {
"action": {}
}
},
"action": {
"logging": {
"success": true
}
}
}
]
}
}
POST
methodURL: https://<host>/restconf/data/watcher
Request body:
{
"config" : {
"profile" : [
{
"name" : "w1",
"ippm" : {
"config" : {
"name": "w1"
}
}
}
]
}
}
Response body: None
URL: https://<host>/restconf/data/watcher/config
Request body:
{
"config" : {
"profile" : [
{
"name" : "watcher2",
"ippm" : {
"config" : {
"name": "watcher2",
"profile" : "p3",
"frequency" : 90
}
},
"action": {
"logging": {
"success": true,
"failure": true
}
}
}
]
}
}
or
{
"config" : {
"profile" : [
{
"name" : "w4",
"ippm" : {
"config" : {
"name": "w4"
}
}
}
]
}
}
Response body: None
PUT
methodURL: https://<host>/restconf/data/watcher/config
Request body:
{
"config" : {
"profile" : [
{
"name" : "w2",
"ippm" : {
"config" : {
"name": "w2"
}
}
}
]
}
}
Response body: None
To
delete all the watcher profiles using the DELETE method
URL: https://<host>/restconf/data/watcher/config
Request body: None Response body: NoneTo delete a specific watcher profile using the DELETE method
URL: https://<host>/restconf/data/watcher/config/profile/w1
Request body: None Response body: None