Hi Preston,

I will change the REST API to support both POST and GET.

Thanks and Regards,

*Erandi Ganepola*
Undergraduate
BSc. Management and Information Technology (IT Sp.)
University of Kelaniya, Sri Lanka

<https://www.linkedin.com/in/erandiganepola/>
<https://github.com/erandiganepola>   <https://twitter.com/erandiganepola>

On Wed, Aug 16, 2017 at 8:46 AM, Preston Carman <[email protected]> wrote:

> Erandi,
>
> Can we support both GET and POST? Maybe a few of the parameters are
> restricted to the POST request.
>
> The Swagger IO configuration is a starting point to create a REST API. If
> we have a good reason to change the specification, lets make the change. At
> this point only the CLI and XTest are clients to the REST API.
>
> Preston
>
> On Tue, Aug 15, 2017 at 11:23 AM, Erandi Ganepola <
> [email protected]> wrote:
>
>> Hi Till,
>>
>> I agree with you. But we have this [1] agreed REST API specification, in
>> which we are using GET requests to communicate. Right now, we are sending
>> statement to be executed as a query parameter and so on.
>>
>> The problem here is, if we want to send a map (source file map) to REST
>> API, we cannot do that with GET by appending query parameters. We have to
>> go for POST. So the idea of me raising this question was to ask for
>> permissions to change the request type in the specification to POST. Hope
>> you got the context.
>>
>> [1] https://cwiki.apache.org/confluence/display/VXQUERY/Swag
>> gerIO+Configuration
>>
>> *Erandi Ganepola*
>> Undergraduate
>> BSc. Management and Information Technology (IT Sp.)
>> University of Kelaniya, Sri Lanka
>>
>> <https://www.linkedin.com/in/erandiganepola/>
>> <https://github.com/erandiganepola>
>> <https://twitter.com/erandiganepola>
>>
>> On Tue, Aug 15, 2017 at 9:06 PM, Till Westmann <[email protected]> wrote:
>>
>>> Hi Erandi,
>>>
>>> I think that I might not have all the context for the discussion so maybe
>>> I’m working on flawed assumptions.
>>> If the request that we are talking about is a request to submit a query
>>> to
>>> the system, I think that POST is an adequate HTTP verb. We’re not really
>>> using the URL to identify a resource, but we are submitting a job for
>>> evaluation/execution.
>>>
>>> Hope this makes sense.
>>>
>>> Cheers,
>>> Till
>>>
>>> On 14 Aug 2017, at 23:54, Erandi Ganepola wrote:
>>>
>>> Hi Preston,
>>>>
>>>> If I'm to add the source file map to parameters, we have to change the
>>>> REST
>>>> API methods to *POST* because GET method doesn't support sending maps
>>>> (set
>>>> of key value pairs). Will that be ok?
>>>>
>>>> *Erandi Ganepola*
>>>> Undergraduate
>>>> BSc. Management and Information Technology (IT Sp.)
>>>> University of Kelaniya, Sri Lanka
>>>>
>>>> <https://www.linkedin.com/in/erandiganepola/>
>>>> <https://github.com/erandiganepola>   <https://twitter.com/erandiga
>>>> nepola>
>>>>
>>>> On Mon, Aug 14, 2017 at 9:00 PM, Preston Carman <
>>>> [email protected]>
>>>> wrote:
>>>>
>>>> I included the dev list to help document this conversation.
>>>>>
>>>>> Go ahead and add a parameter to the rest API for the source map.
>>>>>
>>>>> The documentation should be in two places. First let's keep the wiki up
>>>>> today with the changes you have made. Also the final user documentation
>>>>> should be on the VXQuery website. Under the VXQuery maven project, you
>>>>> will
>>>>> find a src/site folder where all the xml and apt files are stored to
>>>>> produce the website. I think we probably need a new page that defines
>>>>> and
>>>>> shows examples like the wiki. The site has documentation on how to
>>>>> build
>>>>> the site.
>>>>>
>>>>>
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On Aug 13, 2017, at 8:13 PM, Erandi Ganepola <[email protected]
>>>>> >
>>>>> wrote:
>>>>>
>>>>> Hi  Ian and Preston,
>>>>>
>>>>> Adding to the previous email, can you point me out where should I write
>>>>> documentation?
>>>>>
>>>>> *Erandi Ganepola*
>>>>> Undergraduate
>>>>> BSc. Management and Information Technology (IT Sp.)
>>>>> University of Kelaniya, Sri Lanka
>>>>>
>>>>> <https://www.linkedin.com/in/erandiganepola/>
>>>>> <https://github.com/erandiganepola>   <https://twitter.com/erandiga
>>>>> nepola>
>>>>>
>>>>> On Sun, Aug 13, 2017 at 5:11 PM, Erandi Ganepola <
>>>>> [email protected]
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>
>>>>> Hi Ian and Preston,
>>>>>>
>>>>>> I started migrating XTests to use REST API as discussed [1]. But
>>>>>> there is
>>>>>> a small problem when using the REST API.
>>>>>>
>>>>>> In XTests (at [2]), we have to pass a *source file map* which will be
>>>>>> used by the *CompilerControllerBlock *to determine the collections
>>>>>> mentioned in the queries. When we go through the REST API, currently
>>>>>> there
>>>>>> is no way to pass such a parameter (a map). Passing such a value at
>>>>>> initialization time is not possible as far as I see.
>>>>>>
>>>>>> As I understand, one solution will be to use POST requests in the REST
>>>>>> API and allow the source file map to be sent as well. What do you
>>>>>> suggest?
>>>>>>
>>>>>> [1] https://github.com/erandiganepola/vxquery/commit/8f85db5
>>>>>> f4c087f4fb414b42de5461bd48665d863
>>>>>> [2] https://github.com/apache/vxquery/blob/master/vxquery-xt
>>>>>> est/src/main/java/org/apache/vxquery/xtest/TestRunner.java#L144
>>>>>>
>>>>>> Thanks and Regards,
>>>>>> *Erandi Ganepola*
>>>>>> Undergraduate
>>>>>> BSc. Management and Information Technology (IT Sp.)
>>>>>> University of Kelaniya, Sri Lanka
>>>>>>
>>>>>> <https://www.linkedin.com/in/erandiganepola/>
>>>>>> <https://github.com/erandiganepola>
>>>>>> <https://twitter.com/erandiganepola>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>
>

Reply via email to