Definitions of configuration history feature data and operations. Copyright 2021 Rubicon Communications, LLC. All rights reserved.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-conf-history:conf-history-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-conf-history:conf-history-config": {
- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
}
Config database archive configurations.
netgate.conf.history.ConfHistoryConfig to be added to list
object (netgate.conf.history.confhistoryconfig.VersionHistoryConfig) |
{- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
Config database archive configurations.
netgate.conf.history.ConfHistoryConfig to be added or updated
object (netgate.conf.history.ConfHistoryConfig) Config database archive configurations. |
{- "netgate-conf-history:conf-history-config": {
- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-conf-history:conf-history-config" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
returns netgate.conf.history.confhistoryconfig.VersionHistoryConfig
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-conf-history:conf-history-config/version-history-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
creates netgate.conf.history.confhistoryconfig.VersionHistoryConfig
netgate.conf.history.confhistoryconfig.VersionHistoryConfig to be added to list
netgate-conf-history:conf-history-autosave-period | integer <int64> |
netgate-conf-history:conf-history-enabled | boolean Default: true |
{- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
creates or updates netgate.conf.history.confhistoryconfig.VersionHistoryConfig
netgate.conf.history.confhistoryconfig.VersionHistoryConfig to be added or updated
object (netgate.conf.history.confhistoryconfig.VersionHistoryConfig) |
{- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
removes netgate.conf.history.confhistoryconfig.VersionHistoryConfig
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-conf-history:conf-history-config/version-history-config" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
returns netgate.conf.history.ConfHistoryState
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-conf-history:conf-history-state" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-conf-history:conf-history-state": {
- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
}
returns netgate.conf.history.confhistorystate.VersionHistoryConfig
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-conf-history:conf-history-state/version-history-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-conf-history:version-history-config": {
- "netgate-conf-history:conf-history-autosave-period": 0,
- "netgate-conf-history:conf-history-enabled": true
}
}
operates on netgate.conf.history.ConfHistoryDiffVersions
object (netgate.conf.history.confhistorydiffversions.Input) |
{- "input": {
- "netgate-conf-history:version2": "string",
- "netgate-conf-history:version1": "string"
}
}
{- "output": {
- "netgate-conf-history:plain-diff": "string"
}
}
operates on netgate.conf.history.ConfHistoryDropVersions
object (netgate.conf.history.confhistorydropversions.Input) |
{- "input": {
- "netgate-conf-history:version-name": "string"
}
}
operates on netgate.conf.history.ConfHistoryGetLog
object (netgate.conf.history.confhistorygetlog.Input) |
{- "input": {
- "netgate-conf-history:commit-header": "string"
}
}
{- "output": {
- "netgate-conf-history:logs": {
- "netgate-conf-history:log": [
- {
- "netgate-conf-history:commit": "string"
}
]
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/operations/netgate-conf-history:conf-history-get-versions" req, _ := http.NewRequest("POST", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "output": {
- "netgate-conf-history:versions": {
- "netgate-conf-history:version": [
- {
- "netgate-conf-history:version-name": "string"
}
]
}
}
}
operates on netgate.conf.history.ConfHistoryLoadVersion
object (netgate.conf.history.confhistoryloadversion.Input) |
{- "input": {
- "netgate-conf-history:version-name": "string"
}
}
operates on netgate.conf.history.ConfHistorySaveVersion
object (netgate.conf.history.confhistorysaveversion.Input) |
{- "input": {
- "netgate-conf-history:version-name": "string"
}
}