-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dev/foxglove dashboards #16
Conversation
cf247ad
to
6db5596
Compare
cos_registration_server/devices/migrations/0003_device_foxglove_layouts_and_more.py
Outdated
Show resolved
Hide resolved
@@ -9,4 +9,9 @@ | |||
# make a version API url | |||
path("v1/devices", views.devices, name="devices"), | |||
path("v1/devices/<str:uid>", views.device, name="device"), | |||
path( | |||
"v1/devices/<str:uid>/foxglove_layouts/<str:layout_uid>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better for the layout_uid to be a query param ? foxglove_layouts/some_name
vs foxglove_layouts?layout=some_name
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinions but usually path are for resources on the server and parameters for performing action (download a file, connect to a remote, sort, filter).
The stack exchange doc seems to follow that: https://api.stackexchange.com/docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My (rough) understanding was that paths are for things that won't change while params are for things that may change (e.g. v1
or devices
will never change while the name of a layout may change).
That's why we need to put that on paper ^^
c933bf9
to
92a580e
Compare
Successfully tested with Foxglove in ROB COS.