[REST API] Questions and improvements

by Armaghan Saqib, Tuesday, May 02, 2023, 01:17 (354 days ago) @ bohte

Hi Bohdan,

Nice to meet you.

Yes you are right regarding error handling, not found status code on empty result as well as other standard status codes, json response for error messages. Fixes for these will be done this week hopefully and I shall update.

Regarding Authentication, I am not familiar with the architecture of new version you are working on. Can you please explain it a bit to me? Is it being built with server side rendering (node, express) or client side rendering (vue, react, angular) etc? Most importantly how user's session is created and maintained in the application. This can help us decide on authentication. If you have your own idea of key rotation, please share that too.

Regarding your point 5 (actual issue or lack of understanding), I investigate and fix this too.

Regarding your point 4 (ambiguity), yes, you are right. But what we are doing is not developing our own API functionality from scratch. Rather we are using SQL-Ledger's existing code for all the work from the SL/*.pm folder.

This method requires least testing effort as this code is already tested. So we need to send data to the API in the format required by SQL-Ledger which you can always see by looking at the source of respective screens form fields in SQL-Ledger. So this code many times will include both department_id as well as department--department_id.

Similarly data returned by our API is in the format which is returned by SL/*.pm modules search procedures.

Ideally we should build a brand new API for clarify and efficiency reasons but that will require a lot of development time as well as testing which probably is not feasible for this project right now due to tight deadlines.

Regarding LedgerImproved, I have asked, Hashim, who is developing it to respond with details about that work including Authentication and API.


Complete thread:

 RSS Feed of thread