Skip to content

Add user who makes API request to Journal Entry created_by field #6850

@jlemesh

Description

@jlemesh

NetBox version

v2.11.9

Feature type

Change to existing functionality

Proposed functionality

When creating Journal Entry through API there is a possibility to add user ID to created_by field. The user can be any which IMHO does not make much sense (I can create Journal Entry and say it was created by someone else, but in change log there still will be noted that Journal Entry was created by me). When creating Journal Entry through UI created_by user is always the one who "clicked the save button".

My proposal would be to automatically add the ID of the user who made API request to created_by field if no created_by field is specified. Now if it is not specified, user is displayed as 'None'.

Use case

To create Journal Entry with correct user (intuitively thinking this should be the one who made an API call), you need first make an API call to users resource and find yourself (e. g. by email), then add this user ID to Journal Entry. Not only you need two API calls, you also need to give extra permissions to every other user to see users and their information. This functionality would greatly simplify Journal Entry creation through API.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

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