Starting a job via Web-API
Based on the documentation, I'm using the following endpoint for the POST request:
POST http://localhost:3344/printer/job/<slug>?a=upload&autostart=<autostart>&name=<NewName>&sess=<session key>
However, I'm unsure about the exact process and how to include the g-code file content in the "filename" field. I'm working in a Vue.js environment, and I'd like to achieve this on the client-side if possible.
I would greatly appreciate it if someone could provide me with a clear explanation or an example code/pseudocode snippet demonstrating the correct procedure for uploading and starting a new print., and if I'm reading the server logs correctly, it seems like my problem has to do with the payload of my request.
Thank you in advance for your time and assistance.
Comments
If you check the websocket api in api documentation you will see that you can also query stored gcodes and start them, but these require different api calls. In general all our gui only use this api so anything you do there can be achieved. If in doubt check browser network and websocket communication on the commands issued to do so. Anything involving file uploads/downloads use a simple api call. All actions with only a bit of data uses the much faster websocket solution which is also used to deliver events to keep your interface up to date.