Spanning Tree Root Protect

Configures, modifies, and retrieves ports on root guard. The URI to configure data for root guard is:

/stp/interfaces

Supported HTTP Operations

POST method

URL: https://<host>/restconf/data/stp/interfaces
Request body: {
        "interface": [
            {
                "name": "ethernet 1/1/6",
                "config": {
                    "name": "ethernet 1/1/6",
                    "guard": "ROOT"
                }
            }
        ]
}
Response body: None

PUT method

URL: https://<host>/restconf/data/stp/interfaces
Request body: {
    "interfaces": {
        "interface": [
            {
                "name": "ethernet 1/1/4",
                "config": {
                 "name": "ethernet 1/1/4",
                   "guard": "ROOT"
                }
            }
        ]
    }
}
Response body: None

PATCH method

URL: https://<host>/restconf/data/stp/interfaces
Request body:
 {
    "interfaces": {
       "interface": [
            {
                "name": "ethernet 1/1/7",
                "config": {
                    "name": "ethernet 1/1/7",
                    "guard": "ROOT"
                }
            }
        ]
    }
}
Response body: None    

GET method

URL: https://<host>/restconf/data/stp/interfaces
Request body: None
Response body: {
    "openconfig-spanning-tree:interfaces": {
        "interface": [
            {
                "name": "ethernet 1/1/4",
                "config": {
                    "name": "ethernet 1/1/4",
                    "guard": "ROOT"
                },
                "state": {}
            },
            {
                "name": "ethernet 1/1/6",
                "config": {
                    "name": "ethernet 1/1/6",
                    "guard": "ROOT"
                },
                "state": {}
            },
            {
                "name": "ethernet 1/1/7",
                "config": {
                    "name": "ethernet 1/1/7",
                    "guard": "ROOT"
                },
                "state": {}
            }
        ]
    }
}

PATCH method

Use the "NONE" keyword to disable root guard on the port.

URL: https://<host>/restconf/data/stp/interfaces
Request body: {
    "interfaces": {
        "interface": [
            {
                "name": "ethernet 1/1/4",
                "config": {
                    "name": "ethernet 1/1/4",
                    "guard": "NONE"
                }
            }
        ]
    }
} 
Response body: Disables root guard on interface 1/1/4

DELETE

URL: https://<host>/restconf/data/stp/interfaces/interface/ethernet 1%2F1%2F7/config/guard
Request body: None    
Response body: Disables root guard on interface 1/1/7