Get the History via a Single dynamic requests (API)
Hi there,
Is it possible to get a history list (txt or json) via a single dynamic requests (API) ?
Or if not, maybe get the export CSV by the same way ?
I saw that it's possible to get a log file this way : http://localhost:3344/printer/log/<slug>?a=download&sess=<session key>&l=<log name>
And that works pretty fine...
Thanks in advance,
Regards,
Fred
Is it possible to get a history list (txt or json) via a single dynamic requests (API) ?
Or if not, maybe get the export CSV by the same way ?
I saw that it's possible to get a log file this way : http://localhost:3344/printer/log/<slug>?a=download&sess=<session key>&l=<log name>
And that works pretty fine...
Thanks in advance,
Regards,
Fred
Comments
Action is historyList and required parameter are:
Thank you for your answer.
I have tried these two syntaxes :
http://192.168.1.251:3344/historyList/PP3D?apikey=ourAPIKEY&limit=10&uuid=&allPrinter=false
Is there something wrong in my syntax ?
Best regards,
Fred
https://www.repetier-server.com/manuals/programming/API/index.html
especially how to issue websocket commands directly. All params go into the data parameter which is the json string in url encoded form.
192.168.12.169:3344/printer/api/P430?a=historyList&data=%7Bstart%3A0%2Climit%3A0%2Cslug%3AP430%2Cuuid%3A%2CallPrinter%3Atrue%7D&apikey= <MyAPI-KEY>
Regards,
https://prgdoc.repetier-server.com/v1/docs/index.html#/en/web-api/websocket/jobs?id=show-history-of-last-prints
192.168.2.169:3344/printer/api/P430?a=historyList&data=%7Bstart%3A0%2Climit%3A10%2Cslug%3AP430%2CallPrinter%3Atrue%7D&apikey=
192.168.2.169:3344/printer/api/P430?a=listPrinter&apikey=
[{"active":true,"job":"none","name":"peek","online":0,"pauseState":0,"paused":false,"slug":"peek"},{"active":true,"job":"none","name":"P430","online":0,"pauseState":0,"paused":false,"slug":"P430"}]
But when I decode your data part I get
{start:0,limit:10,slug:P430,allPrinter:true}
which is no valid json. Valid json would be
{"start":0,"limit":10,"slug":P430,"allPrinter":true}
See the double quotes for strings and names!
This is the http request I'm using:
[mylocalhost]:3344/printer/api/prusa_1?a=historyList&data=%7B%0A%20%20%20%20%22start%22%3A1%2C%0A%20%20%20%20%22limit%22%3A100%2C%0A%20%20%20%20%22slug%22%3A%22prusa_1%22%2C%0A%20%20%20%20%22uuid%22%3A%22%22%2C%0A%20%20%20%20%22allPrinter%22%3Atrue%0A%7D&apikey=[myapikey]
The data JSON for this request is supposed to be:
{