Page 1 of 1

RESTful Transfer

Posted: 01 Mar 2019, 01:38
by jhudson649
Has anyone implemented this on the system?

j

Re: RESTful Transfer

Posted: 04 Mar 2019, 16:02
by RevPiModIO
What do you mean?

Do you want to read the IOs via a GET and set IOs via a POST?

For example:

Code: Select all

GET http://revpi.local/api/
> {
    "ioname1": iovalue,
    "ioname2": iovalue2
}
and

Code: Select all

POST http://revpi.local/api/
< {
    "ioname2": newvalue2
}
> {
    "success": true
}
This would be very simple with Python and RevPiModIO. I could try to write an example code, if this is what you mean :D

Regards, Sven