.. rst-class:: break_before Webserver ========= XiBIF includes a simple webserver that can be used to read and write registers via HTTP requests. The Webserver is by default enabled and listens on port 80. It can be disabled by running .. code-block:: bash xibif settings --hw.enable_webserver False API --- The webserver exposes a simple REST API that can be used to read and write registers. GET /register/map ~~~~~~~~~~~~~~~~~ Returns the complete register map as JSON. This endpoint provides information about all available registers in the system. Example Request """"""""""""""" .. code-block:: bash curl http:///register/map Response (JSON) """"""""""""""" JSON object containing the register map definition. POST /register/read ~~~~~~~~~~~~~~~~~~~ Reads a value from a specific register address with configurable bit range. Request Body (JSON) """"""""""""""""""" - ``address`` (number): Register address to read from - ``lsb`` (number): Least significant bit position (0-31) - ``width`` (number): Number of bits to read (1-32) Example Request """"""""""""""" .. code-block:: bash curl -X POST http:///register/read \ -H "Content-Type: application/json" \ -d '{"address": 0, "lsb": 0, "width": 32}' Response (JSON) """"""""""""""" .. code-block:: json { "address": 0, "lsb": 0, "width": 32, "value": 12345 } POST /register/write ~~~~~~~~~~~~~~~~~~~~ Writes a value to a specific register address with configurable bit range. Only the specified bits are modified (read-modify-write operation). Request Body (JSON) """"""""""""""""""" - ``address`` (number): Register address to write to - ``lsb`` (number): Least significant bit position (0-31) - ``width`` (number): Number of bits to write (1-32) - ``value`` (number): Value to write (will be masked to width) Example Request """"""""""""""" .. code-block:: bash curl -X POST http:///register/write \ -H "Content-Type: application/json" \ -d '{"address": 0, "lsb": 0, "width": 32, "value": 12345}' Response (JSON) """"""""""""""" .. code-block:: json { "address": 0, "lsb": 0, "width": 32, "value": 12345 } .. note:: Both decimal and hexadecimal (with ``0x`` prefix) values are supported in JSON requests.