Missing api documentation for "POST /api/extras/scripts/" request #9907

Closed
opened 2025-12-29 21:24:15 +01:00 by adam · 2 comments
Owner

Originally created by @ngotzmann on GitHub (Jun 26, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.0.5

Python Version

3.11

Steps to Reproduce

  1. Go to https://demo.netbox.dev/api/schema/swagger-ui/#/extras/extras_scripts_create or your self hosted
    1.1. Under "Parameters", you will notice there are no parameters

  2. Trying to call the api endpoint without body, will result in an error (who would have expected this 😄 )

  3. I used following curl command:

curl -X 'POST' \
  'https://netbox/api/extras/scripts/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Token XXX" \
  -d ''

Expected Behavior

Having all fields available on this endpoint documented

Observed Behavior

{
  "error": "null value in column \"module_id\" of relation \"extras_script\" violates not-null constraint\nDETAIL:  Failing row contains (19, , null, t).",
  "exception": "IntegrityError",
  "netbox_version": "4.0.5",
  "python_version": "3.11.2"
}
Originally created by @ngotzmann on GitHub (Jun 26, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.0.5 ### Python Version 3.11 ### Steps to Reproduce 1. Go to https://demo.netbox.dev/api/schema/swagger-ui/#/extras/extras_scripts_create or your self hosted 1.1. Under "Parameters", you will notice there are no parameters 2. Trying to call the api endpoint without body, will result in an error (who would have expected this :smile: ) 3. I used following curl command: ```bash curl -X 'POST' \ 'https://netbox/api/extras/scripts/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H "Authorization: Token XXX" \ -d '' ``` ### Expected Behavior Having all fields available on this endpoint documented ### Observed Behavior ```bash { "error": "null value in column \"module_id\" of relation \"extras_script\" violates not-null constraint\nDETAIL: Failing row contains (19, , null, t).", "exception": "IntegrityError", "netbox_version": "4.0.5", "python_version": "3.11.2" } ```
adam added the type: bugstatus: duplicatetopic: OpenAPI labels 2025-12-29 21:24:15 +01:00
adam closed this issue 2025-12-29 21:24:15 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Jun 27, 2024):

Thanks for reporting a problem in NetBox.

I've reproduced the problem in a fresh install of NetBox v4.0.6. With a little bit of lateral exploring I'm finding the lack of parameter documentation is not unique to extras/scripts; for example, extras_tags_create also lacks parameter documentation, though POSTing to that endpoint with an empty body provides useful feedback rather than an internal server error.

I'm moving your issue out of triage and into needs owner status. If you or another developer with the requisite skills and capacity would like to work it through to a PR, please say so and a maintainer will assign the issue to you.

@jeffgdotorg commented on GitHub (Jun 27, 2024): Thanks for reporting a problem in NetBox. I've reproduced the problem in a fresh install of NetBox v4.0.6. With a little bit of lateral exploring I'm finding the lack of parameter documentation is not unique to `extras/scripts`; for example, `extras_tags_create` also lacks parameter documentation, though POSTing to that endpoint with an empty body provides useful feedback rather than an internal server error. I'm moving your issue out of triage and into `needs owner` status. If you or another developer with the requisite skills and capacity would like to work it through to a PR, please say so and a maintainer will assign the issue to you.
Author
Owner

@arthanson commented on GitHub (Jul 12, 2024):

Closing this as duplicate of #16670

@arthanson commented on GitHub (Jul 12, 2024): Closing this as duplicate of #16670
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9907