API

GPIO

GET /test_authentication

Endpoint to test authentication.

POST /gpio/(int: pin_nr)/setpoint

Enable or disable a GPIO pin.

Example Request:

POST /gpio/14/setpoint HTTP/1.1
Accept: application/json
Content-Type: application/json

{
    "value": 1
}

Example Response:

HTTP/1.1 200 SUCCESS
Content-Type: text/json

{
    "value": 1
}
Request Headers:
 
  • Accept – application/json
  • Content-Type – application/json
Response Headers:
 
  • Content-Type – application/json
Status Codes:
  • 200 – Success
  • 400 – Request body is invalid.
  • 403 – Unauthorized.
  • 404 – GPIO pin doesn’t exists.
  • 422 – Request body is not valid JSON.

Table Of Contents

Related Topics

This Page

Fork me on GitHub