Werk #17508 · Feb 23, 25
REST-API: change DCD request and response types
Incompatible change. Existing setups may behave differently after upgrading. Review the details below before updating.
This werk changes the connector configuration for create and get DCD endpoints.
For the create request:
- the connector specific configuration is now nested under the
connectorkey - the validation for
restrict_source_hostsandmatching_hostswas changed to only allow valid regular expressions
Before:
{
"title": "my-title",
"site": "my-site",
"dcd_id": "connection_1",
"connector_type": "piggyback",
// other connector keys, like interval, creation_rules etc.
}
After:
{
"title": "my-title",
"site": "my-site",
"dcd_id": "connection_1",
"connector": {
"connector_type": "piggyback",
// other connector keys, like interval, creation_rules etc.
}
}
For the responses of both create and get endpoints, the schema was adjusted to reflect the create endpoint. It is also now correctly documented.
Before:
{
// other keys omitted, as they didn't change
"extensions": {
"title": "my-title",
"comment": "...",
"docu_url": "...",
"disabled": false,
"site": "my-site",
"connector": [
"piggyback",
{
"source_filters": [
"some.+regex"
],
"interval": 60.0,
"creation_rules": [
{
"create_folder_path": "sub/folder",
"host_attributes": [
[
"tag_address_family",
"no-ip"
]
],
"delete_hosts": true,
"host_filters": [
"another.+regex"
]
}
],
"discover_on_creation": true,
"no_deletion_time_after_init": 600.0,
"max_cache_age": 3600.0,
"validity_period": 60.0
}
]
}
}
After:
{
// other keys omitted, as they didn't change
"extensions": {
"title": "my-title",
"comment": "...",
"documentation_url": "...", // renamed from docu_url
"disabled": false,
"site": "my-site",
"connector": { // now an object, not an array
"connector_type": "piggyback",
"restrict_source_hosts": [ // renamed from source_filters
"some.+regex"
],
"interval": 60, // now an integer, not a float
"creation_rules": [
{
"folder_path": "/sub/folder", // renamed from create_folder_path
"host_attributes": { // now an object, not an array
"tag_address_family": "no-ip"
},
"delete_hosts": true,
"matching_hosts": [ // renamed from host_filters
"another.+regex"
]
}
],
"discover_on_creation": true,
"no_deletion_time_after_init": 600, // now an integer, not a float
"max_cache_age": 3600, // now an integer, not a float
"validity_period": 60 // now an integer, not a float
}
}
}
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- REST API
- Versions:
- 2.5.0b1ProUltimateUltimate + MTCloud
- 2.4.0b1ProUltimateUltimate + MTCloud
- 2.3.0p28ProUltimateUltimate + MT