2.2.2.1 GPIO List Getting

The list of GPIOs stored in the array container is returned. Name {in1, in2, out1, out2, io1, io2, relay1, relay2} is the input identifier that is subsequently used for GPIO identification in the HTTP API communication too. Direction takes the values {in, out, io}.

URL:

https://<IP>/api/v1/gpio

HTTP method:

GET

Response code:

Standard HTTP response code, treating syntactic errors

Response data:

{
    "data": {
        "pins": [
            {
                "id": 0,
                "name": "In1",
                "value": 1
            },
            {
                "id": 1,
                "name": "In2",
                "value": 1
            },
            {
                "id": 2,
                "name": "Out1",
                "value": -7
            },
            {
                "id": 3,
                "name": "Out2",
                "value": -7
            },
            {
                "id": 4,
                "name": "IO1",
                "value": 1
            },
            {
                "id": 5,
                "name": "IO2",
                "value": 1
            },
            {
                "id": 6,
                "name": "Relay1",
                "value": 0
            },
            {
                "id": 7,
                "name": "Relay2",
                "value": 0
            }
        ]
    }
}