Skip to content

API Request - id_changed_object_type/action #3001

@zmaster7

Description

@zmaster7

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5.8

Proposed Functionality

From what I can tell, there is no way to pull possible values for "id_changed_object_type" ("content_type") for the changelog via API (/api/extras/object-changes/), and the "action" field only lists available ids without a description of said id (e.g. 1 = Created, 2 = Updated, 3 = Deleted)

I propose, if possible, to add the available options for "changed_object_type" and/or "action" under "/api/extras/_choices/", or a new "/api/extras/object-changes/_choices/" path with both an id and description/name.

Also, the "content_type" does not show up with a Get request on "/api/extras/object-changes/", so you cannot filter after the fact based on object type.

Use Case

Currently, in order to determine the id value of the object type for a change log entry, you would have to go to "/extras/changelog/" (not the API), select the object type you want to filter by, and look at the URI for "changed_object_type=#" (or inspect the dropdown field) for possible options.

It would be beneficial to gather the options via API, rather then hard coding the options and having them change.

Metadata

Metadata

Assignees

No one assigned

    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