netgate-kea API (19.02)

This YANG module provides a data model for the Kea DHCP server.

Copyright 2019 Rubicon Communications, LLC.

kea-config

returns netgate.kea.KeaConfig

get /data/netgate-kea:kea-config

Example URL

https://hostname/restconf/data/netgate-kea:kea-config

returns netgate.kea.KeaConfig

Responses

200

netgate.kea.KeaConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-kea:kea-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))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-kea:kea-config":
    {
    }
}

creates netgate.kea.KeaConfig

post /data/netgate-kea:kea-config

Example URL

https://hostname/restconf/data/netgate-kea:kea-config

creates netgate.kea.KeaConfig

Request Body schema: application/yang-data+json

netgate.kea.KeaConfig to be added to list

dhcp4-server
object (netgate.kea.keaconfig.Dhcp4Server)
keactrl
object (netgate.kea.keaconfig.Keactrl)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "dhcp4-server":
    {
    },
  • "keactrl":
    {
    }
}

creates or updates netgate.kea.KeaConfig

put /data/netgate-kea:kea-config

Example URL

https://hostname/restconf/data/netgate-kea:kea-config

creates or updates netgate.kea.KeaConfig

Request Body schema: application/yang-data+json

netgate.kea.KeaConfig to be added or updated

netgate-kea:kea-config
object (netgate.kea.KeaConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-kea:kea-config":
    {
    }
}

removes netgate.kea.KeaConfig

delete /data/netgate-kea:kea-config

Example URL

https://hostname/restconf/data/netgate-kea:kea-config

removes netgate.kea.KeaConfig

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-kea:kea-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.kea.keaconfig.Dhcp4Server

get /data/netgate-kea:kea-config/netgate-kea:dhcp4-server

Example URL

https://hostname/restconf/data/netgate-kea:kea-config/netgate-kea:dhcp4-server

Gather all the parts that contribute to the DHCP4 server.

Responses

200

netgate.kea.keaconfig.Dhcp4Server

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-kea:kea-config/netgate-kea:dhcp4-server"

	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))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-kea:dhcp4-server":
    {
    }
}

creates netgate.kea.keaconfig.Dhcp4Server

post /data/netgate-kea:kea-config/netgate-kea:dhcp4-server

Example URL

https://hostname/restconf/data/netgate-kea:kea-config/netgate-kea:dhcp4-server

Gather all the parts that contribute to the DHCP4 server.

Request Body schema: application/yang-data+json

netgate.kea.keaconfig.Dhcp4Server to be added to list

Logging
object (netgate.kea.KeaLoggingGroup)
Dhcp4
object (netgate.kea.keaconfig.dhcp4server.Dhcp4)

Configuration for the Kea DHCP IPv4 Server

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "Logging":
    {
    },
  • "Dhcp4":
    {
    }
}

creates or updates netgate.kea.keaconfig.Dhcp4Server

put /data/netgate-kea:kea-config/netgate-kea:dhcp4-server

Example URL

https://hostname/restconf/data/netgate-kea:kea-config/netgate-kea:dhcp4-server

Gather all the parts that contribute to the DHCP4 server.

Request Body schema: application/yang-data+json

netgate.kea.keaconfig.Dhcp4Server to be added or updated

netgate-kea:dhcp4-server
object (netgate.kea.keaconfig.Dhcp4Server)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-kea:dhcp4-server":
    {