Recent

Author Topic: REST Server/Client, how to request single record?  (Read 769 times)

kveroneau

  • Full Member
  • ***
  • Posts: 122
REST Server/Client, how to request single record?
« on: March 06, 2026, 07:35:25 pm »
I wasn't sure where part of the forum to post this into, as it does relate to pas2js as well, as that is the REST Client I am using, along with the REST Server.

I am building a blogging app using REST as the main data source, the problem is, when I access the content table this way, it currently downloads the entire content table from REST, and not just a specific record.  I tried to use the .SQL property on the client, but it just attempted to make a request to the non-existent customView endpoint, so perhaps I need to create customViews on my REST server?  Also when creating a REST schema, what is the Required option a user can have, a bit confused on that one.

This project I am working on is open source and on GitHub, all the components I mentioned above are in the repo: https://github.com/kveroneau/PascalPress

Each of the services are in each of the appropriately named directories.  This is my first time really using the REST Server/Client, so any additional guidance on anything I might be doing incorrectly or even insecurely would be nice.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1225
Re: REST Server/Client, how to request single record?
« Reply #1 on: March 09, 2026, 10:18:36 pm »
I wasn't sure where part of the forum to post this into, as it does relate to pas2js as well, as that is the REST Client I am using, along with the REST Server.

I am building a blogging app using REST as the main data source, the problem is, when I access the content table this way, it currently downloads the entire content table from REST, and not just a specific record.  I tried to use the .SQL property on the client, but it just attempted to make a request to the non-existent customView endpoint, so perhaps I need to create customViews on my REST server?  Also when creating a REST schema, what is the Required option a user can have, a bit confused on that one.

This project I am working on is open source and on GitHub, all the components I mentioned above are in the repo: https://github.com/kveroneau/PascalPress

Each of the services are in each of the appropriately named directories.  This is my first time really using the REST Server/Client, so any additional guidance on anything I might be doing incorrectly or even insecurely would be nice.

Connecting to a database with pas2js.
https://www.freepascal.org/~michael/articles/#pas2js4

pas2js WebAssembly SQLite demos
https://forum.lazarus.freepascal.org/index.php/topic,73499.0.html

 

TinyPortal © 2005-2018