DNSUpdate configuration
This API is based on the Device Configuration API framework. For guidance on how to use these APIs, please refer to Device Configuration APIs.
Description
The VAPIX® DNSUpdate configuration API makes it possible to configure the DNS (Dynamic Name Server) name registration for the device. When enabled, the device will register a DNS name on the network, allowing it to be reached with a hostname instead of an IP address.
The configuration includes the ability to enable or disable the DNS update feature, set the name to be registered, and configure the Time To Live (TTL) value for the DNS records.
The default values on first boot is an empty name, a TTL of 30 and the DNSUpdate will be disabled.
Use cases
Manage DNSUpdate settings
- The DNSUpdate settings control how the device registers itself with the DNS server. The settings entity
dnsupdate-configuration.v2.settingscontains the configuration to enable the feature, setting the registered name, and specifying the TTL. - The
dnsupdate-configuration.v2.settings.enabledparameter indicates whether DNSUpdate is currently active. - The
dnsupdate-configuration.v2.settings.nameparameter indicates the name that will be registered in DNS. - The
dnsupdate-configuration.v2.settings.ttlparameter indicates the Time To Live value used for the DNS records.
Get DNSUpdate settings
Use dnsupdate-configuration.v2.settings to retrieve all DNSUpdate configuration settings.
Example:
- curl
- HTTP
curl --request GET \
--anyauth \
--user "<username>:<password>" \
--http1.1 \
--header "Content-Type: application/json" \
http://my-device/config/rest/dnsupdate-configuration/v2/settings
GET /config/rest/dnsupdate-configuration/v2/settings HTTP/1.1
HOST: my-device
Content-Type: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success",
"data": {
"enabled": true,
"name": "mydevice",
"ttl": 300
}
}
Enable DNSUpdate
Use dnsupdate-configuration.v2.settings.enabled to enable DNS name registration.
Example:
- curl
- HTTP
curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--http1.1 \
--header "Content-Type: application/json" \
http://my-device/config/rest/dnsupdate-configuration/v2/settings/enabled \
--data '{
"data": true
}'
PATCH /config/rest/dnsupdate-configuration/v2/settings/enabled HTTP/1.1
HOST: my-device
Content-Type: application/json
{
"data": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success"
}
Disable DNSUpdate
Use dnsupdate-configuration.v2.settings.enabled to disable DNS name registration.
Example:
- curl
- HTTP
curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--http1.1 \
--header "Content-Type: application/json" \
http://my-device/config/rest/dnsupdate-configuration/v2/settings/enabled \
--data '{
"data": false
}'
PATCH /config/rest/dnsupdate-configuration/v2/settings/enabled HTTP/1.1
HOST: my-device
Content-Type: application/json
{
"data": false
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success"
}
Set DNSUpdate name
Use dnsupdate-configuration.v2.settings.name to configure the name that will be registered in DNS.
If DNSUpdate is enabled, the current DNS servers are sent updated with the new information.
Example:
- curl
- HTTP
curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--http1.1 \
--header "Content-Type: application/json" \
http://my-device/config/rest/dnsupdate-configuration/v2/settings/name \
--data '{
"data": "mydevice"
}'
PATCH /config/rest/dnsupdate-configuration/v2/settings/name HTTP/1.1
HOST: my-device
Content-Type: application/json
{
"data": "mydevice"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success"
}
Set DNSUpdate TTL
Use dnsupdate-configuration.v2.settings.ttl to configure the Time To Live value for the DNS records.
Example:
- curl
- HTTP
curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--http1.1 \
--header "Content-Type: application/json" \
http://my-device/config/rest/dnsupdate-configuration/v2/settings/ttl \
--data '{
"data": 300
}'
PATCH /config/rest/dnsupdate-configuration/v2/settings/ttl HTTP/1.1
HOST: my-device
Content-Type: application/json
{
"data": 300
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success"
}
API definition
Structure
dnsupdate-configuration.v2 (Root Entity)
├── settings (Entity)
├── enabled (Property)
├── name (Property)
├── ttl (Property)
Entities
dnsupdate-configuration.v2
- Description: DNSUpdate Configurations.
- Type: Singleton
- Operations
- Get
- Attributes
- Dynamic Support: No
Properties
This entity has no properties.
Actions
This entity has no actions.
dnsupdate-configuration.v2.settings
- Description: Configuration settings.
- Type: Singleton
- Operations
- Get
- Set
- Attributes
- Dynamic Support: No
Properties
enabled
- Description: The enabled state of DNSUpdate.
- Datatype: boolean
- Operations
- Get (Permissions: admin)
- Set (Permissions: admin)
- Attributes
- Nullable: No
- Dynamic Support: No / Dynamic Enum: No / Dynamic Range: No
name
- Description: The name to be registered.
- Datatype: string
- Operations
- Get (Permissions: admin)
- Set (Permissions: admin)
- Attributes
- Nullable: No
- Dynamic Support: No / Dynamic Enum: No / Dynamic Range: No
ttl
- Description: The TTL used.
- Datatype: Ttl
- Operations
- Get (Permissions: admin)
- Set (Permissions: admin)
- Attributes
- Nullable: No
- Dynamic Support: No / Dynamic Enum: No / Dynamic Range: No
Actions
This entity has no actions.
Data types
Ttl
- Description: A valid Time To Live.
- Type: integer
- Minimum Value: 0
- Maximum Value: 4294967295