Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting unknown URL #4

Closed
psuet opened this issue Aug 10, 2018 · 1 comment · Fixed by #5
Closed

Requesting unknown URL #4

psuet opened this issue Aug 10, 2018 · 1 comment · Fixed by #5

Comments

@psuet
Copy link
Contributor

psuet commented Aug 10, 2018

For GET /api/virtualization/clusters/ HTTP/1.1 the result is

{ "count": 1, "next": null, "previous": null, "results": [ { "id": 4, "name": "Proxmox", "type": { "id": 7, "url": "http://x-aachen.de/api/virtualization/cluster-types/7/", "name": "Proxmox", "slug": "proxmox" }, "group": null, "site": { "id": 1, "url": "http://x-aachen.de/api/dcim/sites/1/", "name": "x-aachen.de", "slug": "kullen" }, "comments": "", "tags": [], "custom_fields": {}, "created": "2017-12-21", "last_updated": "2017-12-21T15:12:49.124749+01:00" } ]

See https://pastebin.com/nTdUsQeJ for correct layout.

and the Script requests

GET /api/virtualization/clusters/4?limit=1000000 HTTP/1.1

gets redirected (301) to (see #3)

GET /api/virtualization/clusters/4/?limit=1000000 HTTP/1.1

This request results in a 404 because the page doesn't exist

@psuet psuet changed the title Requesting wrong ID Requesting wrong Aug 10, 2018
@psuet psuet changed the title Requesting wrong Requesting unknown URL Aug 10, 2018
@luto
Copy link
Member

luto commented Aug 12, 2018

Thanks for the report!

So /api/virtualization/clusters returns a cluster with ID 4, but requesting additional information using /api/virtualization/clusters/4 yields a 404? All the listed cluster IDs on our netbox are also available as detail views using their respective IDs. weird.

I've got a couple of questions:

  • Which netbox version are you running?
  • Which permissions does the API user have? superuser? a smaller set?
  • Is the "Proxmox" cluster shown on /virtualization/clusters/ (without /api)? If yes, which URL does it redirect you to, when you click on it?
  • What does /virtualization/clusters/4 (without /api) show?

Thank you :)

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 a pull request may close this issue.

2 participants