glygener / glygen-issues

Repository for public GlyGen tickets
GNU General Public License v3.0
0 stars 0 forks source link

New apis needed for biomarker portal. #1305

Open sujeetvkulkarni opened 1 month ago

sujeetvkulkarni commented 1 month ago

swagger api link: https://api.tst.glygen.org/

Also domain name for api is needed like https://api.tst.glygen.org/.

Biomarker search, list, details page : Screenshot 2024-05-07 at 2 15 22 PM

Biomarker table pagination like publication section etc: Screenshot 2024-05-07 at 2 27 46 PM

Biomarker logging api : Screenshot 2024-05-07 at 2 16 41 PM

Typeahead api for search interface : Screenshot 2024-05-07 at 2 21 22 PM

Home init api for home page : Screenshot 2024-05-07 at 2 18 01 PM

Download api for list page, details page and table download : Screenshot 2024-05-07 at 2 20 00 PM

Contact api for feedback widget : Screenshot 2024-05-07 at 2 25 19 PM

seankim658 commented 1 month ago

Will start digging into these tomorrow and through the weekend. I'll reach out if I have any questions.

seankim658 commented 1 month ago

Miguel and I are working on this. We likely won't be finished for a week or two. The biomarker portal won't be launched until sometime in early June so I will keep you updated as we port over the GlyGen API.

seankim658 commented 1 month ago

@sujeetvkulkarni Just an update, I believe I'll have the biomarker detail, list, search, search_init, and search_simple and the logging endpoints done by later this week. After that will work on the pagination/page and last priority right now is the typeahead endpoint.

Could you let me know what you are looking for in the /pages/home_init/ endpoint? Besides versioning information?

sujeetvkulkarni commented 1 month ago

@seankim658 please refer API: https://api.tst.glygen.org/pages/home_init home page : https://tst.glygen.org/

primarily species data (species name, glycan count, protein count, glycoproteins count), version, events (any new announcements), video to be shown on home page.

seankim658 commented 1 month ago

Ok, the biomarker project only has data for humans so species delineation isn't important for us but I'll implement the assessed entity type counts.

sujeetvkulkarni commented 1 month ago

ok, use same data format.

seankim658 commented 1 month ago

Have finished the preliminary endpoints:

Root URL for the tst endpoints is: https://hivelab.tst.biochemistry.gwu.edu/biomarker/api/

Working on the logging, home_init, and getting the swagger pages. Note some functionality in the endpoints such as filtering aren't implemented yet (you can pass those in with the query parameters but the results just won't be filtered when returned). We just need to make sure the base endpoint functionality works with the portal pages and then I'll go back and flush out the optimization and filtering.

sujeetvkulkarni commented 1 month ago

@seankim658 dont change the endpoint keep them same. Change only root url. /search/init should be /search_init/ /search/full should be /search/ etc.

seankim658 commented 1 month ago

Got it, I'll make that change today

seankim658 commented 1 month ago

@sujeetvkulkarni Made these changes, the URL's are now: /detail/ /search_init /search_simple /search /list

the filtering and pagination and supplementary query string arguments should all be working now and match the GlyGen biomarker APIs.

seankim658 commented 1 month ago

Working on logging and home_init endpoints next, those should be done by end of today. Let me know if you find anything that needs to be fixed. Thanks again

sujeetvkulkarni commented 1 month ago

@seankim658 it needs to be /biomarker/search_init/ etc

please have a look at below image

image

Also, please see above images on top of the ticket to see exact endpoints.

seankim658 commented 1 month ago

@sujeetvkulkarni Is there anyway we can avoid that? Then our endpoints will be at the root URL https://hivelab.tst.biochemistry.gwu.edu/biomarker/api/biomarker. I can make the change but just would prefer to not have the redundancy in the root URL.

sujeetvkulkarni commented 1 month ago

@seankim658 no, the endpoints needs to stay same. Dont add /biomarker/ to the root url add it to the endpoint like /biomarker/search_init/. Also not all endpoint have biomarker in it. like /pages/home_init/ /typeahead/typeahead/ etc Please see above images for the exact names. Or you can go to https://api.tst.glygen.org/.

"https://api.tst.glygen.org" is the root part. "/biomarker/search_init/", /typeahead/typeahead/ or /pages/home_init/ are specific endpoints. You can change the root part "https://api.tst.glygen.org" to "https://hivelab.tst.biochemistry.gwu.edu/biomarker/api" etc but dont change actual endpoint.

seankim658 commented 1 month ago

@sujeetvkulkarni Ok I'll just do the redundancy route so the root will stay https://hivelab.tst.biochemistry.gwu.edu/biomarker/api and the biomarker endpoints will be at the namespace https://hivelab.tst.biochemistry.gwu.edu/biomarker/api/biomarker. I'll make this change and let you know when its done.

I can't have the root not include biomarker in it because this project and API is not hosted from its own server like GlyGen. This is just on the general Hivelab server. There are other general projects being hosted on this server that have their own APIs/databases/logging/etc so just having the root be https://hivelab.tst.biochemistry.gwu.edu/api and endpoints like https://hivelab.tst.biochemistry.gwu.edu/api/logging/log will lead to confusion/issues down the line.

seankim658 commented 1 month ago

Ok biomarker endpoints have moved to /biomarker, so detail is at https://hivelab.tst.biochemistry.gwu.edu/biomarker/api/biomarker/detail/<biomarker_id> and so on. Root is still https://hivelab.tst.biochemistry.gwu.edu/biomarker/api/.

sujeetvkulkarni commented 1 month ago

ok, I have updated api, please test - https://glygen.ccrc.uga.edu/frontend/.

seankim658 commented 1 month ago

@sujeetvkulkarni I had a quick question regarding the portal, when the user clicks "modify search" to be taken back to the home/search page how come the frontend hits the biomarker/list endpoint again before re-rendering the search page?

sujeetvkulkarni commented 1 month ago

@seankim658 it get's search field data from list api to pre-fill the search fields.