Hi Saurav, 

The REST API is mapped to the Airavata API in 
django_airavata/apps/api/views.py. For the example you mentioned, you can see 
in the following link the implementation of GET/POST/PUT/DELETE /api/groups: 

https://github.com/apache/airavata-django-portal/blob/master/django_airavata/apps/api/views.py#L79-L141
 
<https://github.com/apache/airavata-django-portal/blob/master/django_airavata/apps/api/views.py#L79-L141>
 


From: saurav kumar jha <imsauravgaurav...@gmail.com>
Date: Wednesday, July 12, 2023 at 1:48 PM
To: dev@airavata.apache.org <dev@airavata.apache.org>
Subject: Re: airavata api endpoint handler/controller implementation 

Hi Suresh, 

Thanks for the response, it was very helpful. 


Now, I am able to understand interface definitions, handler function 
implementations etc., but couldn't understand how an endpoint (for example 
/api/groups) is mapped to a particular function (for example getGatewayGroups) 
? 

Thanks & Regards, 


Saurav Kumar Jha 




On Mon, Jul 10, 2023 at 11:15 PM Suresh Marru <sma...@apache.org 
<mailto:sma...@apache.org>> wrote: 

Hi Saurav, 


You have to look into Thrift API descriptions 
https://github.com/apache/airavata/tree/develop/thrift-interface-descriptions 
<_blank> - follow the handlers from - 
https://github.com/apache/airavata/blob/develop/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
 <_blank> 



If you haven’t done it, I encourage you to build a simple Apache Thrift example 
with Java server and Python clients so it will give you the right context to 
follow the code. 



Suresh 



On Jul 10, 2023, at 1:19 PM, saurav kumar jha <imsauravgaurav...@gmail.com 
<_blank>> wrote: 


Hi Community, 


For an api request made by airavata-django-portal , for example on /api/groups 
( https://testdrive.airavata.org <_blank>/api/groups/?limit=10&offset=10 ) , 
where can I find corresponding controller or handler function in airavata code 
<_blank> where it is being exposed as an endpoint or handled?

I need this because for "User groups created within a given period", I want to 
load the creation date of groups along with other details using an api call.
In one of the implementations, the date is not being fetched, so I wanted to 
look at the implementation. 

Thanks & Regards, 

Saurav Kumar Jha 













Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to