API-Version response header missing #5331

Closed
opened 2025-12-29 19:26:45 +01:00 by adam · 3 comments
Owner

Originally created by @gstorme on GitHub (Sep 7, 2021).

NetBox version

v3.0.1

Python version

3.8

Steps to Reproduce

Install or upgrade v3.0.1
curl -I https://netbox/api/

Expected Behavior

Version 2.x and 3.0-beta2 gave these responses:
API-Version: 2.11
API-Version: 3

Observed Behavior

Since 3.0.1, there is no API-Version response header

Originally created by @gstorme on GitHub (Sep 7, 2021). ### NetBox version v3.0.1 ### Python version 3.8 ### Steps to Reproduce Install or upgrade v3.0.1 curl -I https://netbox/api/ ### Expected Behavior Version 2.x and 3.0-beta2 gave these responses: API-Version: 2.11 API-Version: 3 ### Observed Behavior Since 3.0.1, there is no API-Version response header
adam added the type: bug label 2025-12-29 19:26:45 +01:00
adam closed this issue 2025-12-29 19:26:45 +01:00
Author
Owner

@gstorme commented on GitHub (Sep 7, 2021):

It's because of d2fe59ae8f (diff-a884cc97453294b269cf8c9ca6839327b8b3b2dd453102266a9c1899fa7fe409)

When I add request header "Content-Type: application/json", it returns the API-Version response.

@gstorme commented on GitHub (Sep 7, 2021): It's because of https://github.com/netbox-community/netbox/commit/d2fe59ae8f9c34c1f8a7d51c0d113348d7bed937#diff-a884cc97453294b269cf8c9ca6839327b8b3b2dd453102266a9c1899fa7fe409 When I add request header "Content-Type: application/json", it returns the API-Version response.
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2021):

This change was intentional: The inclusion of the nonstandard API-Version header is of no significance to web browsers and should have been omitted for non-JSON clients.

@gstorme does this still impose an issue for you, or are you good now with the addition of the Content-Type header in your queries?

@jeremystretch commented on GitHub (Sep 7, 2021): This change was intentional: The inclusion of the nonstandard `API-Version` header is of no significance to web browsers and should have been omitted for non-JSON clients. @gstorme does this still impose an issue for you, or are you good now with the addition of the `Content-Type` header in your queries?
Author
Owner

@gstorme commented on GitHub (Sep 7, 2021):

Ok clear, works fine with the request header, so all good

@gstorme commented on GitHub (Sep 7, 2021): Ok clear, works fine with the request header, so all good
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5331