Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

facebook Twitter
Email
Print Bookmark Alert me when this article is updated

Feedback

HOW TO: Retain/maintain the order of parameters while making REST api call in IICS Rest v2 connector
Solution
Rest v2 connector doesn't send the query/URL parameters in the same order as in swagger fine. If the API needs the parameters then perform the following workaround.

Example

If the api url is https://sample.com?parm1=value1&parm2=value2&parm3=value3
api might need parm1/2/3 in the same order without which it might not give the expected response

Existing swagger:
"parameters" : [ {
          "name" : "parm1",
          "in" : "query",
          "description" : null,
          "required" : false,
          "type" : "string"
        }, {
          "name" : "parm2",
          "in" : "query",
          "description" : null,
          "required" : false,
          "type" : "string"
        }, {
          "name" : "parm3",
          "in" : "query",
          "description" : null,
          "required" : false,
          "type" : "string"
        }]

Even though parms in swagger are in the required order, task at runtime does not retain this order. So we have to modify the swagger to 1 single parameter

"parameters" : [ {
          "name" : "parm1",
          "in" : "query",
          "description" : null,
          "required" : true,
          "type" : "string"
        } 

And pass the value to parm1 as value1&parm2=value2&parm3=value3 in Webservice transformation or at Source request configuration.

Feature Request CCON-17968 to retain the order of parameters in runtime same as in swagger.
More Information
Reference
Applies To
Product: Cloud Data Integration
Problem Type: Configuration
User Type: Developer
Project Phase: Implement
Product Version:
Database:
Operating System:
Other Software:
Attachments
Last Modified Date:3/30/2020 4:46 AMID:577949
People who viewed this also viewed

Feedback

Did this KB document help you?



What can we do to improve this information (2000 or fewer characters)