Comments (11)
Also when saving resources
they are in the root of the signalk tree, not under vessels
. Hence the PUT should be to
/signalk/v1/api/resources/waypoints/urn:mrn:signalk:uuid:66d0...94f83
and not
/signalk/v1/api/vessels/self/resources/waypoints/urn:mrn:signalk:uuid:66d...94f83
from freeboard-sk.
Freeboard currently uses http PUT by default for sending resources to the server.
The other option is to use web socket UPDATE messages.
Websocket PUT is not currently used.
HTTP PUT does actually target ..../vessels/self/resources.
This is more than likely a mis-alignment between my GPXLoad plugin operation (on node-server) and Artemis. Most likely due to the way I have interpreted the spec and the assumptions made to fill in the gaps.
Seems like an opportunity to align things.
from freeboard-sk.
Ive just merged SignalK/specification#523 into specification which clarifies the PUT message and makes vessels.self
as the default context. But thinking about your case above when there is no context...
So thats broken already :-(
I'll fix it now, vessels.self
should not be a default context as it makes absolute paths like /resources difficult. Easier to include vessels.self
when you want that then it is for the server to decide when its needed or not.
from freeboard-sk.
from freeboard-sk.
@rob42 given SignalK/specification#536 refers to websocket PUT and freeboard uses HTTP PUT, can this issue be closed?
from freeboard-sk.
No I dont think so.
I think the http PUT is targeting the /vessels/self
path when it should not.
Hence the PUT should be to
/signalk/v1/api/**resources/waypoints/**urn:mrn:signalk:uuid:66d0...94f83
and not
/signalk/v1/api/**vessels/self/**resources/waypoints/urn:mrn:signalk:uuid:66d...94f83
Also see SignalK/specification#538 which superceeds SignalK/specification#536
from freeboard-sk.
I have raised a question on Slack plugins
channel as currently the GPXLoad plugin cannot accept a put to /signalk/v1/api/resources/waypoints
or /signalk/v1/api/resources/routes
.
If there is no immediate answer it may be that a change might be requires in node server to allow this.
Once GPXLoad plugin can accept a put to the correct path I will update Freeboard to use the correct path.
from freeboard-sk.
This confusion stems from trying to do HTTP over ws, when simple REST would work:
- POST to
/signalk/v1/api/resources/waypoint/
to create a new route, the server responds with 201 created and Location of the created route - PUT to
/signalk/v1/api/resources/waypoint/<sk uuid>
to modify an existing route or to add a new one with an id that the client already knows - DELETE to
/signalk/v1/api/resources/waypoint/<sk uuid>
to delete a route
from freeboard-sk.
See https://stackoverflow.com/questions/630453/put-vs-post-in-rest
It should be possible to create with a PUT, which also simplifies the code so you dont need to consider if a waypoint is being updated or created, just PUT it anyway.
Also with a default /vessels/self
the server will try to execute
PUT /signalk/v1/api/vessels/self/resources/waypoint/
unless you add code to explicitly check and correct for known root paths. See #538
from freeboard-sk.
It should be possible to create with a PUT
Sure, this is why I said add a new one in my comment above.
Also with a default
/vessels/self
the server will try to execute
PUT /signalk/v1/api/vessels/self/resources/waypoint/
No. context
plays no role when you use http.
from freeboard-sk.
Have raised /signalk-server-node/issues/738 to address HTTP PUT to /signalk/v1/api/vessels/self/resources/*
path issue.
from freeboard-sk.
Related Issues (20)
- Unknown wind shown as 0 HOT 1
- wind next legs HOT 3
- Overlap between mbtiles files. HOT 12
- Blank screen between mbtiles files when zooming in or out HOT 5
- heading. HOT 11
- delete menu. HOT 2
- Alarm Operation HOT 5
- Autopilot v2 API alignment
- Remove built-in PyPilot connectivity.
- Setting dialog options menu overflow HOT 1
- Measure, distance and angles HOT 1
- enhancement of waypoints HOT 4
- Meteo context pop-up title not updated HOT 1
- Make welcome screen skippable via URL params HOT 4
- show laylines to waypoint HOT 17
- Show windbarbs HOT 2
- show kip steering widget in freeboard.
- "No weather data found." HOT 20
- measure. HOT 2
- Route description.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freeboard-sk.