Is it practical or even possible to generate a REST API for the LCL controls? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- vfclists · 2024-09-15 15:21 Is it practical or even possible to generate a REST API for the LCL controls? Can it be generated automatically from its published properties? I just saw this announcement New Swagger/OpenAPI Client Generator for FPC  by @abouchez. Forgive me if my question sounds stupid, but REST APIs have never been a thing for me. I've never truly worked with them. ---------------------------------------------------------------------- nummer8 · 2024-09-15 15:32 I don't know if I understand your question correctly but check the following package lazarus->components->sqldbrest-> lazsqldbrest.lpk It is a package to assist you visually in creating REST endpoints direct from data. ---------------------------------------------------------------------- Thaddy · 2024-09-15 17:13 Yes, that is possible. A good example are the Google API' s that are machine generated and fully rest. The package also contains the code that does the actual generation. You could adapt it to an LCL api generator since components can already be represented in JSON, ---------------------------------------------------------------------- Jurassic Pork · 2025-08-30 08:21 Hello, here is an example using SQLDBRestBridge In attachment a zip file with two projects and a sqlite3 database to compile the projects you must install  lazsqldbrest and weblaz packages. To use the sqlite3 database you must have the sqlite client library installed. The first project restreadonly launch a rest api server on port 3000. This server is connected to the sqlite3 database .  The connection to the database is here in the code : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i begin    // Or set in code.   // C.ConnectionType:=TPQConnectionDef.TypeName;   // C.DatabaseName:='fpctest';   // C.HostName:='localhost';   // C.UserName:='user';   // C.Password:='secret';   C.ConnectionType:=TSQLite3ConnectionDef.TypeName;   C.DatabaseName:='selzig.db3';   // C.HostName:='localhost';   // C.UserName:='user';   // C.Password:='secret';    end;The second project jsonclient  is used  to connect to  the rest Api server and get data in json format. the two projects come from fpcsource and lazarus. Friendly, J.P