Skip to content

/extras/object-changes API does not accept object type names, instead requiring ids that are hard to obtain #4431

@ctrowat

Description

@ctrowat

Environment

  • Python version: 3.7
  • NetBox version: 2.7.10

When utilizing the API /extras/object-changes there is a parameter changed_object_type that requires you to specify a numeric identifier (such as 47), despite having it's type specified as string, for the object type you want to query. This is inconsistent with the result set returned by this API call which uses a serialized value for the changed_object_type field for each result (such as ipam.ipaddress). This causes a lot of frustration when learning how to use this API and overall "feels" like a bug.

I am not certain but this may be related to issue #3001 which ended with a vague suggestion to open a new issue for "this".

Steps to Reproduce

  1. Make a request to the API endpoint /extras/object-changes/?changed_object_type=ipam.ipaddress

Expected Behavior

Results for changed IP addresses should be returned

Observed Behavior

The following is returned:

{
    "changed_object_type": [
        "Select a valid choice. That choice is not one of the available choices."
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions