Creating a REST Resource with a Query String parameter

In previous post I showed how to create a REST Resource inside our TIBCO BusinessWorks 6 projects. If you don’t remember the post you can take a look again here. In that post I showed how to create a REST resource without any kind of parameter but that’s not the real word.

When you define a REST interface it is usual to have parameters inside the URL that you have to use inside your process to make some kind of processing logic. It is common to have parameters to filter the current invocation or so. For example, think about this URL:

freegeoip.net/{format}/ip={IP_or_hostname}

Here, we have two type of parameters:

  • The first one {format} it is “inside” the URL because it is a path step.
  • The second one {IP or hostname} it is a queryString parameter.

This post’s idea it is to show how to do this in TIBCO BusinessWorks 6.

To do that, we have to define this parameters inside the URL resource when we create the REST resource using the wizard as you can see:

TIBCOBusinessStudio_2016-03-11_21-24-57

Now, when the REST resource is created when you try to do some mapping inside your process, you are going to see these new parameters:

TIBCOBusinessStudio_2016-03-11_21-37-27

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s