Skip to content

Parent group is required attribute on contact group object when using REST API #8051

@rodvand

Description

@rodvand

NetBox version

v3.1.0

Python version

3.8

Steps to Reproduce

curl -X POST \
-H "Authorization: Token TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://NETBOX_URL/api/tenancy/contact-groups/ \
--data '{
    "name": "Test Contact Group",
    "slug": "contact-group-slug" }'

Expected Behavior

A contact group is created.

Observed Behavior

{
    "parent": [
        "This field is required."
    ]
}

I reported a similar issue when creating a Contact object - #7771

In the API docs the parent is required, but nullable. I guess it is automatically set to null when using the Web UI. It would be handy if it defaults to null using the API to avoid having to explicitly set it to null when making requests.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions