Getting Import from Web API to work with a weird URL

Hello, all. First off, I’m an “API noob”, just getting them to work for me recently. Due to confidentiality issues, I’ll need to truncate settings.

I have a Web Location connector set up to a base URL. API calls to this come in two flavors. The URL of the connector ends in “/cases”.

The first format is: /[param1]/[param2] - which I build using a formula and set it as the Path. There is another parameter that is set in the URL parameters. This all works fine. I get data back and am generally happy.

The second format is the problem. When passing in names, the format after “/cases” is:
?lastName=[lname]&firstName=[fname]&&&&&&&&&&&&&
So the final result would be: /cases?lastName=[lname]&firstName=[fname]&&&&&&&&&&&&&

I am suspecting the trailing set of "&"s may be the problem, and I’m not sure if they’re mandatory, but I can’t seem to get it to work without them, and haven’t figured out how to append them properly to use them. (It appears these extra &s are placeholders for other optional parameters.)

Note: There are other parameters that may be used, and it appears the “formula” is (15 &s - the # of params being passed in). So, I’m passing in 2 params (fname and lname) so 13 &s are appended to the end.)

Any ideas on how to build such a URL would be greatly appreciated.

Thanks very much, EasyMorph Community!
CraigT

And, to anyone who read this and may have started working on it. I figured it out.

  • I duplicated the connector, removing the “/cases” from the end of the URL.
  • I entered “cases” into the Path field.
  • Entered the “lastName” and “firstName” parameters (with values) into the URL parameters tab.

…and it worked.

So, it appears the long string of &s are not required.

Again, thanks much to anyone who may have started looking at this.

CraigT