Skip to content

Conversation

dampfklon
Copy link
Contributor

This is a small feature addition to the API.

This change copies the inventory print function from the regular user to the API.
It would be available under https://{{host}}/api/v1/users/{{userId}}/print

Is there any way to update the API docs? I could not find a way to contribute.

Our goal is to generate these reports automatically as part of an automated process.

@dampfklon dampfklon requested a review from snipe as a code owner September 11, 2025 13:20
@snipe
Copy link
Member

snipe commented Sep 11, 2025

I feel a little weird returning a view here (and I don’t think we’d want to redirect on an API call anyway). What’s the use case?

@dampfklon
Copy link
Contributor Author

Our use case is a external automated offboarding script. We would use this endpoint to get the print report html which is then converted to pdf and sent via mail to the manager.

The redirect was a oversight on my part, i would change it to the default api error response. Instead of simply returning the view we could also change it to a regular success api response where the content is the html report

@dampfklon dampfklon marked this pull request as draft September 12, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants