HTTP API - problem to publish function via GET

Hello, I noticed a strange issue.

I have one service function, called GetOrderStatus. If I set HttpApiMethod=POST on it, I can see it via swagger info (service root path) normally. But if I set HttpApiMethod=GET, this function is not visible in swagger at all. Current DEV build (1503, 1505). Other (test) function, called GetTime, is visible via GET without problems.

// This is OK, visible

Operation Name=“GetTime” UID="{C03F4A64-4029-40ED-BF87-DF9E92F2BA9E}">
CustomAttributes>
HttpApiPath Value=“GetTime” />
HttpApiMethod Value=“GET” />
HttpApiResult Value=“200” />
/CustomAttributes>
Parameters>
Parameter Name=“Result” DataType=“RTResponse” Flag=“Result”>
/Parameter>
/Parameters>
/Operation>

// This is NOT visible via GET (but POST is OK)

Operation Name=“GetOrderStatus” UID="{26679AB5-74E8-4E47-8398-8D9EEE9742E1}">
CustomAttributes>
HttpApiPath Value=“GetOrderStatus” />
HttpApiMethod Value=“GET” />
HttpApiResult Value=“200” />
/CustomAttributes>
Parameters>
Parameter Name=“Result” DataType=“RTGetOrderStatusResponse” Flag=“Result”>
/Parameter>
Parameter Name=“Request” DataType=“RTGetOrderStatus” Flag=“In” >
/Parameter>
/Parameters>
/Operation>

// I’ve deleted opening tags (<), since the code was not visible here.

Do you have some relevant tips?

Thanks, Peter.

Hi,

how do you pass Request parameter in GET mode?
you haven’t specified HttpApiQueryParameter=1 or HttpApiHeaderParameter=1 so it can be passed only as a body parameter that isn’t supported by GET mode.

you can put xml or any other code like

```
<Operation Name=“GetOrderStatus” UID="{26679AB5-74E8-4E47-8398-8D9EEE9742E1}">
<CustomAttributes>
<HttpApiPath Value=“GetOrderStatus” />
```

Hi Evgeny,

well, you’re right, it is obvious with BODY, it was my suspicion, but wasn’t sure.

So I’ll try use it as URL parameter. Thanks!

Evgeny,

would be possible to add direct support for HttpApiQueryParameter or HttpApiHeaderParameter in Service Builder for service method parameters? Since RODL is my preferred service definition way, it wasn’t simply visible to me.

Thanks, Peter.

you can do it like:

OK, I see,

but my intention was to add similar “helper button”, like “Http Api attributes” in Service Definition:

image

with predefined HttpApiQueryParameter and HttpApiHeaderParameter values.

Thanks, Peter.