Skip to content

Instantly share code, notes, and snippets.

@nomaster
Last active April 28, 2022 07:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nomaster/26487448b1c9f4dbabc0b80bda27a94b to your computer and use it in GitHub Desktop.
Test NetBox API docs requests with curl
% curl -I -X GET -H "Content-Type: application/json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/\?format\=openapi
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 06:59:18 GMT
Content-Type: application/openapi+json; charset=utf-8
Content-Length: 1064721
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Thu, 28 Apr 2022 20:40:14 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
API-Version: 3.2
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
% curl -I -X GET -H "Content-Type: application/json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 06:59:27 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 2236
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Thu, 28 Apr 2022 11:28:10 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
API-Version: 3.2
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
% curl -I -X GET -H "Accept: application/json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/\?format\=openapi
HTTP/1.1 406 Not Acceptable
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 07:06:34 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 18
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Thu, 28 Apr 2022 07:06:34 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
% curl -I -X GET -H "Accept: application/json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 06:59:47 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 1064641
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Fri, 29 Apr 2022 06:59:47 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
% curl -I -X GET -H "Accept: application/openapi+json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 07:00:06 GMT
Content-Type: application/openapi+json; charset=utf-8
Content-Length: 1064646
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Fri, 29 Apr 2022 07:00:06 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
% curl -I -X GET -H "Accept: application/openapi+json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/\?format\=openapi
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 07:00:29 GMT
Content-Type: application/openapi+json; charset=utf-8
Content-Length: 1064646
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Fri, 29 Apr 2022 07:00:29 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
% curl -I -X GET -H "Accept: application/json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/\?format\=openapi
HTTP/1.1 406 Not Acceptable
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 07:06:34 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 18
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Thu, 28 Apr 2022 07:06:34 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: SAMEORIGIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment