Fix URL for editing API docs #7463

Closed
opened 2025-12-29 20:23:43 +01:00 by adam · 2 comments
Owner

Originally created by @kmanwar89 on GitHub (Jan 5, 2023).

Change Type

Correction

Area

Integrations/API

Proposed Changes

In the rendered version of the API documentation, the code snippet for provisioning a token via REST API is missing a " character in the password data field:

$ curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://netbox/api/users/tokens/provision/ \
--data '{
    "username": "hankhill",
    "password: "I<3C3H8", <--------missing " prior to the :
}'

When selecting the edit icon through the website, it presents a 404 error as the link is incorrect (https://github.com/netbox-community/netbox/edit/master/docs/rest-api/authentication.md)

Looking through the code, it seems the rest-api folder has been removed, and is now present under /netbox/docs/integrations/rest-api.md instead.

This request is to update the URL that is generated on the website to point to the correct URL, as well as to fix the rendering of the code snippet to fix the missing character. I did confirm the actual rest-api.md file has the correct code snippet, so it seems something is lost during the rendering of the website.

Originally created by @kmanwar89 on GitHub (Jan 5, 2023). ### Change Type Correction ### Area Integrations/API ### Proposed Changes In the [rendered version](https://cpd.ipcore.com/static/docs/rest-api/authentication/) of the API documentation, the code snippet for provisioning a token via REST API is missing a `"` character in the password data field: ``` $ curl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json; indent=4" \ https://netbox/api/users/tokens/provision/ \ --data '{ "username": "hankhill", "password: "I<3C3H8", <--------missing " prior to the : }' ``` When selecting the edit icon through the website, it presents a 404 error as the link is incorrect (https://github.com/netbox-community/netbox/edit/master/docs/rest-api/authentication.md) Looking through the code, it seems the `rest-api` folder has been removed, and is now present under `/netbox/docs/integrations/rest-api.md` instead. This request is to update the URL that is generated on the website to point to the correct URL, as well as to fix the rendering of the code snippet to fix the missing character. I did confirm the actual `rest-api.md` file has the correct code snippet, so it seems something is lost during the rendering of the website.
adam added the type: documentation label 2025-12-29 20:23:43 +01:00
adam closed this issue 2025-12-29 20:23:43 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 5, 2023):

This is because you're on an older version of NetBox (v3.0.8). The example is correct in the current version.

@jeremystretch commented on GitHub (Jan 5, 2023): This is because you're on an older version of NetBox (v3.0.8). The example is correct in the current version.
Author
Owner

@kmanwar89 commented on GitHub (Jan 6, 2023):

This is because you're on an older version of NetBox (v3.0.8). The example is correct in the current version.

Hi Jeremy, thanks for replying.

I tried a different approach - if I Google "NetBox API", one of the top results points to https://cpd.ipcore.com/static/docs/release-notes/

However, if I use the demo Netbox instance and select Docs at the bottom, it takes me to https://demo.netbox.dev/static/docs/, with the correct syntax present on the page https://demo.netbox.dev/static/docs/integrations/rest-api/#initial-token-provisioning

So perhaps this is more of a matter of SEO?

@kmanwar89 commented on GitHub (Jan 6, 2023): > This is because you're on an older version of NetBox (v3.0.8). The example is correct in the current version. Hi Jeremy, thanks for replying. I tried a different approach - if I Google "NetBox API", one of the top results points to https://cpd.ipcore.com/static/docs/release-notes/ However, if I use the demo Netbox instance and select Docs at the bottom, it takes me to https://demo.netbox.dev/static/docs/, with the correct syntax present on the page https://demo.netbox.dev/static/docs/integrations/rest-api/#initial-token-provisioning So perhaps this is more of a matter of SEO?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7463