List all Nameserver Groups
Returns a list of all Nameserver Groups
Request
curl -X GET https://api.netbird.io/api/dns/nameservers \
-H 'Accept: application/json' \
-H 'Authorization: Token <TOKEN>'
Response
[
{
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": true,
"groups": [
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": true,
"domains": [
"example.com"
],
"search_domains_enabled": true
}
]
Create a Nameserver Group
Creates a Nameserver Group
Request-Body Parameters
- Name
name
- Type
- string
- Required
- required
- Enum
- Possible Values:
>=1 characters
and <=40 characters
- Description
Name of nameserver group name
- Name
description
- Type
- string
- Required
- required
- Enum
- Description
Description of the nameserver group
- Name
nameservers
- Type
- object[]
- Required
- required
- Enum
- Possible Values:
>=1 objects
and <=3 objects
- Description
Nameserver list
- Name
ip
- Type
- string
- Required
- required
- Enum
- Description
Nameserver IP
- Name
ns_type
- Type
- string
- Required
- required
- Enum
- Description
Nameserver Type
- Name
port
- Type
- integer
- Required
- required
- Enum
- Description
Nameserver Port
- Name
enabled
- Type
- boolean
- Required
- required
- Enum
- Description
Nameserver group status
- Name
groups
- Type
- string[]
- Required
- required
- Enum
- Description
Distribution group IDs that defines group of peers that will use this nameserver group
- Name
primary
- Type
- boolean
- Required
- required
- Enum
- Description
Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
- Name
domains
- Type
- string[]
- Required
- required
- Enum
- Description
Match domain list. It should be empty only if primary is true.
- Name
search_domains_enabled
- Type
- boolean
- Required
- required
- Enum
- Description
Search domain status for match domains. It should be true only if domains list is not empty.
Request
curl -X POST https://api.netbird.io/api/dns/nameservers \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <TOKEN>' \
--data-raw '{
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": true,
"groups": [
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": true,
"domains": [
"example.com"
],
"search_domains_enabled": true
}'
Response
{
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": true,
"groups": [
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": true,
"domains": [
"example.com"
],
"search_domains_enabled": true
}
Retrieve a Nameserver Group
Get information about a Nameserver Groups
Path Parameters
- Name
nsgroupId
- Type
- string
- Required
- required
- Enum
- Description
The unique identifier of a Nameserver Group
Request
curl -X GET https://api.netbird.io/api/dns/nameservers/{nsgroupId} \
-H 'Accept: application/json' \
-H 'Authorization: Token <TOKEN>'
Response
{
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": true,
"groups": [
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": true,
"domains": [
"example.com"
],
"search_domains_enabled": true
}
Update a Nameserver Group
Update/Replace a Nameserver Group
Path Parameters
- Name
nsgroupId
- Type
- string
- Required
- required
- Enum
- Description
The unique identifier of a Nameserver Group
Request-Body Parameters
- Name
name
- Type
- string
- Required
- required
- Enum
- Possible Values:
>=1 characters
and <=40 characters
- Description
Name of nameserver group name
- Name
description
- Type
- string
- Required
- required
- Enum
- Description
Description of the nameserver group
- Name
nameservers
- Type
- object[]
- Required
- required
- Enum
- Possible Values:
>=1 objects
and <=3 objects
- Description
Nameserver list
- Name
ip
- Type
- string
- Required
- required
- Enum
- Description
Nameserver IP
- Name
ns_type
- Type
- string
- Required
- required
- Enum
- Description
Nameserver Type
- Name
port
- Type
- integer
- Required
- required
- Enum
- Description
Nameserver Port
- Name
enabled
- Type
- boolean
- Required
- required
- Enum
- Description
Nameserver group status
- Name
groups
- Type
- string[]
- Required
- required
- Enum
- Description
Distribution group IDs that defines group of peers that will use this nameserver group
- Name
primary
- Type
- boolean
- Required
- required
- Enum
- Description
Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
- Name
domains
- Type
- string[]
- Required
- required
- Enum
- Description
Match domain list. It should be empty only if primary is true.
- Name
search_domains_enabled
- Type
- boolean
- Required
- required
- Enum
- Description
Search domain status for match domains. It should be true only if domains list is not empty.
Request
curl -X PUT https://api.netbird.io/api/dns/nameservers/{nsgroupId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <TOKEN>' \
--data-raw '{
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": true,
"groups": [
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": true,
"domains": [
"example.com"
],
"search_domains_enabled": true
}'
Response
{
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": true,
"groups": [
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": true,
"domains": [
"example.com"
],
"search_domains_enabled": true
}
Delete a Nameserver Group
Delete a Nameserver Group
Path Parameters
- Name
nsgroupId
- Type
- string
- Required
- required
- Enum
- Description
The unique identifier of a Nameserver Group
Request
curl -X DELETE https://api.netbird.io/api/dns/nameservers/{nsgroupId} \
-H 'Authorization: Token <TOKEN>'
Retrieve DNS settings
Returns a DNS settings object
Request
curl -X GET https://api.netbird.io/api/dns/settings \
-H 'Accept: application/json' \
-H 'Authorization: Token <TOKEN>'
Response
{
"items": {
"disabled_management_groups": [
"ch8i4ug6lnn4g9hqv7m0"
]
}
}
Update DNS Settings
Updates a DNS settings object
Request-Body Parameters
- Name
disabled_management_groups
- Type
- string[]
- Required
- required
- Enum
- Description
Groups whose DNS management is disabled
Request
curl -X PUT https://api.netbird.io/api/dns/settings \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <TOKEN>' \
--data-raw '{
"disabled_management_groups": [
"ch8i4ug6lnn4g9hqv7m0"
]
}'
Response
{
"disabled_management_groups": [
"ch8i4ug6lnn4g9hqv7m0"
]
}