.. rst-class:: break_before .. note:: XiBIF provides a webinterface which can be used to interact with the Webserver. You can access it under `reg.xibif.ch `_. 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 --enable_webserver False For security reasons, you must authenticate against the webserver by providing the board's UUID when making a request. The UUID must be supplied by providing a bearer token in the HTTP Authorization header. You can find the UUID in the `.xibif` project file in the root of your project directory. 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.