netgate-ldap API (24.06)

The YANG module provides a data-model for the LDAP client.

Copyright 2023, 2024 Rubicon Communications, LLC.

ldap-client

returns netgate.ldap.LdapClient

LDAP client configuration for PAM subsystem.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client"

	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

Content type
application/yang-data+json
{
  • "netgate-ldap:ldap-client": {
    }
}

creates netgate.ldap.LdapClient

LDAP client configuration for PAM subsystem.

Request Body schema: application/yang-data+json

netgate.ldap.LdapClient to be added to list

object (netgate.ldap.ldapclient.Client)

The LDAP client parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:client": {
    }
}

creates or updates netgate.ldap.LdapClient

LDAP client configuration for PAM subsystem.

Request Body schema: application/yang-data+json

netgate.ldap.LdapClient to be added or updated

object (netgate.ldap.LdapClient)

LDAP client configuration for PAM subsystem.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:ldap-client": {
    }
}

removes netgate.ldap.LdapClient

LDAP client configuration for PAM subsystem.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client"

	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.ldap.ldapclient.Client

The LDAP client parameters.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client"

	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

Content type
application/yang-data+json
{
  • "netgate-ldap:client": {
    }
}

creates netgate.ldap.ldapclient.Client

The LDAP client parameters.

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.Client to be added to list

netgate-ldap:bind-password
string

Bind password.

netgate-ldap:bind-dn
string

Distinguished name to bind to the server with.

Array of objects (netgate.ldap.ldapclient.client.Servers)
netgate-ldap:group-dn
string

Group DN.

netgate-ldap:scope
string (netgate.ldap.SearchScope)
Enum: "sub" "one" "base"
object (netgate.ldap.ldapclient.client.Attributes)
netgate-ldap:transport
string (netgate.ldap.TransportType)
Enum: "tcp" "tcp-starttls" "tcp-ssltls"
netgate-ldap:version
integer <int64>

Protocol version to use.

netgate-ldap:base-dn
string

Base DN to bind to.

netgate-ldap:peer-ca
string

Name of the certificate in the certificate store for the CA which issued the server's certificate.

netgate-ldap:timeout
integer <int64>

Timeout for server requests.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:bind-password": "string",
  • "netgate-ldap:bind-dn": "string",
  • "netgate-ldap:servers": [
    ],
  • "netgate-ldap:group-dn": "string",
  • "netgate-ldap:scope": "sub",
  • "netgate-ldap:attributes": {
    },
  • "netgate-ldap:transport": "tcp",
  • "netgate-ldap:version": 0,
  • "netgate-ldap:base-dn": "string",
  • "netgate-ldap:peer-ca": "string",
  • "netgate-ldap:timeout": 0
}

creates or updates netgate.ldap.ldapclient.Client

The LDAP client parameters.

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.Client to be added or updated

object (netgate.ldap.ldapclient.Client)

The LDAP client parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:client": {
    }
}

removes netgate.ldap.ldapclient.Client

The LDAP client parameters.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client"

	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.ldap.ldapclient.client.Attributes

returns netgate.ldap.ldapclient.client.Attributes

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/attributes"

	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

Content type
application/yang-data+json
{
  • "netgate-ldap:attributes": {
    }
}

creates netgate.ldap.ldapclient.client.Attributes

creates netgate.ldap.ldapclient.client.Attributes

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.client.Attributes to be added to list

Array of objects (netgate.ldap.ldapclient.client.attributes.Overrides)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:overrides": [
    ]
}

creates or updates netgate.ldap.ldapclient.client.Attributes

creates or updates netgate.ldap.ldapclient.client.Attributes

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.client.Attributes to be added or updated

object (netgate.ldap.ldapclient.client.Attributes)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:attributes": {
    }
}

removes netgate.ldap.ldapclient.client.Attributes

removes netgate.ldap.ldapclient.client.Attributes

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/attributes"

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

}

creates netgate.ldap.ldapclient.client.attributes.Overrides

creates netgate.ldap.ldapclient.client.attributes.Overrides

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.client.attributes.Overrides to be added to list

netgate-ldap:value
string

LDAP value to override from server.

netgate-ldap:attribute
string (netgate.ldap.PasswordAttributeType)
Enum: "userPassword" "gidNumber" "gecos" "homeDirectory" "loginShell" "uidNumber"

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:value": "string",
  • "netgate-ldap:attribute": "userPassword"
}

returns netgate.ldap.ldapclient.client.attributes.Overrides

returns netgate.ldap.ldapclient.client.attributes.Overrides

path Parameters
attribute
required
string

Id of overrides

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/attributes/overrides=%7Battribute%7D"

	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

Content type
application/yang-data+json
{
  • "netgate-ldap:overrides": {
    }
}

creates or updates netgate.ldap.ldapclient.client.attributes.Overrides

creates or updates netgate.ldap.ldapclient.client.attributes.Overrides

path Parameters
attribute
required
string

Id of overrides

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.client.attributes.Overrides to be added or updated

object (netgate.ldap.ldapclient.client.attributes.Overrides)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:overrides": {
    }
}

removes netgate.ldap.ldapclient.client.attributes.Overrides

removes netgate.ldap.ldapclient.client.attributes.Overrides

path Parameters
attribute
required
string

Id of overrides

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/attributes/overrides=%7Battribute%7D"

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

}

creates netgate.ldap.ldapclient.client.Servers

creates netgate.ldap.ldapclient.client.Servers

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.client.Servers to be added to list

netgate-ldap:name
string

Server handle.

object (netgate.ldap.ServerTuple)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:name": "string",
  • "netgate-ldap:server": {
    }
}

returns netgate.ldap.ldapclient.client.Servers

returns netgate.ldap.ldapclient.client.Servers

path Parameters
name
required
string

Id of servers

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/servers=%7Bname%7D"

	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

Content type
application/yang-data+json
{
  • "netgate-ldap:servers": {
    }
}

creates or updates netgate.ldap.ldapclient.client.Servers

creates or updates netgate.ldap.ldapclient.client.Servers

path Parameters
name
required
string

Id of servers

Request Body schema: application/yang-data+json

netgate.ldap.ldapclient.client.Servers to be added or updated

object (netgate.ldap.ldapclient.client.Servers)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:servers": {
    }
}

removes netgate.ldap.ldapclient.client.Servers

removes netgate.ldap.ldapclient.client.Servers

path Parameters
name
required
string

Id of servers

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/servers=%7Bname%7D"

	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.ldap.ServerTuple

Server name or address, and port number.

path Parameters
name
required
string

Id of servers

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/servers=%7Bname%7D/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

Content type
application/yang-data+json
{
  • "netgate-ldap:server": {
    }
}

creates netgate.ldap.ServerTuple

Server name or address, and port number.

path Parameters
name
required
string

Id of servers

Request Body schema: application/yang-data+json

netgate.ldap.ServerTuple to be added to list

netgate-ldap:host
string
netgate-ldap:port
integer <int32>

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:host": "string",
  • "netgate-ldap:port": 0
}

creates or updates netgate.ldap.ServerTuple

Server name or address, and port number.

path Parameters
name
required
string

Id of servers

Request Body schema: application/yang-data+json

netgate.ldap.ServerTuple to be added or updated

object (netgate.ldap.ServerTuple)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ldap:server": {
    }
}

removes netgate.ldap.ServerTuple

Server name or address, and port number.

path Parameters
name
required
string

Id of servers

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ldap:ldap-client/client/servers=%7Bname%7D/server"

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

}

ldap-config-operation

operates on netgate.ldap.LdapConfigOperation

operates on netgate.ldap.LdapConfigOperation

Request Body schema: application/yang-data+json
object (netgate.ldap.ldapconfigoperation.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}