Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ctrowat opened this issue Mar 31, 2020 · 1 comment
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@ctrowat
Copy link

ctrowat commented Mar 31, 2020

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."
    ]
}
@jeremystretch jeremystretch added API change status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Mar 31, 2020
@jeremystretch
Copy link
Member

I've re-raised this as #4897 with an expanded scope.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants