0

I have question about how to create API GET method in wso2 ? and this is what I have to do

<?xml version="1.0" encoding="UTF-8"?>
<api context="/request" name="Request" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET">
        <inSequence/>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>

My question is how to create and read the parameter from API GET METHODS using wso2?

For example like

If I need to http://localhost:8280/request?vtid=1278$token=1234

how to create the api? and how to read value from parameter vtid and token ? using wso2?

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
yuyu kungkung
  • 137
  • 2
  • 13

1 Answers1

0

As stated in this answer:

<resource methods="GET" uri-template="/testwso2/{symbol}?arg1={value1}">

get-property('query.param.arg1')
get-property('uri.var.symbol')

Notice that the URL of your API already accounts for the amount of parameters you need.

NOTE: I know this is an older version of WSO2 but this functionality I think did not change.

JustLudo
  • 1,690
  • 12
  • 29