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

Closed
opened 2025-12-29 19:24:30 +01:00 by adam · 1 comment
Owner

Originally created by @jlemesh on GitHub (Jul 30, 2021).

Originally assigned to: @jeremystretch on GitHub.

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

Originally created by @jlemesh on GitHub (Jul 30, 2021). Originally assigned to: @jeremystretch on GitHub. ### 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_
adam added the status: acceptedtype: feature labels 2025-12-29 19:24:30 +01:00
adam closed this issue 2025-12-29 19:24:31 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 4, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Oct 4, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5123