caching_config) has been removed from the plugins API (see #6639).cacheops_* metrics have been removed from the Prometheus exporter (see #6639).invalidate management command has been removed.?connected=True filter applied.This release introduces the /api/users/tokens/ REST API endpoint, which includes a child endpoint that can be employed by a user to provision a new REST API token. This allows a user to gain REST API access without needing to first create a token via the web UI.
$ curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://netbox/api/users/tokens/provision/
{
"username": "hankhill",
"password: "I<3C3H8",
}
If the supplied credentials are valid, NetBox will create and return a new token for the user.
This release introduces the CUSTOM_VALIDATORS configuration parameter, which allows administrators to map NetBox models to custom validator classes to enforce custom validation logic. For example, the following configuration requires every site to have a name of at least ten characters and a description:
from extras.validators import CustomValidator
CUSTOM_VALIDATORS = {
'dcim.site': (
CustomValidator({
'name': {
'min_length': 10,
},
'description': {
'required': True,
}
}),
)
}
CustomValidator can also be subclassed to enforce more complex logic by overriding its validate() method. See the custom validation documentation for more details.
color field to front and rear portsdisplay_field argument on ObjectVarCACHE_TIMEOUT configuration parameter has been removed.RELEASE_CHECK_TIMEOUT configuration parameter has been removed./api/users/tokens/ endpoint
provision/ child endpoint can be used to provision new REST API tokens by supplying a valid username and password/api/dcim/console-connections/api/dcim/power-connections/api/dcim/interface-connectionslength is now a decimal valuedisplay_name attribute (use display instead)display_name attribute (use display instead)color fieldcolor fielddisplay_name attribute (use display instead)color fieldcolor fieldlatitude and longitude are now decimal fields rather than stringsdisplay_name attribute (use display instead)mark_utilized boolean fielddisplay_name attribute (use display instead)display_name attribute (use display instead)vcpus is now a decimal field rather than a string