REST Service Base URL

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
robleer
Posts: 286
Joined: Wed Jul 14, 2010 7:01 pm

REST Service Base URL

Post by robleer »

Hi I want to connect Aware to an Multitenant system.

In the REST service you need to enter an base urel like: https://prd.learnlinq.com/WebAPI/v1/Cultures

But in my case, the base url can vary like:

https://CustomerA.learnlinq.com/WebAPI/v1/Cultures
https://CustomerB.learnlinq.com/WebAPI/v1/Cultures
https://CustomerC.learnlinq.com/WebAPI/v1/Cultures


Is there a way to change the base URL form within a process each time I run the process? So depending on the user it has to write or read data from different Base URL's..
Tia Rob
Using 8.7 Professional 3025 on MySQL/Windows
Jaymer
Posts: 2475
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: REST Service Base URL

Post by Jaymer »

is it really learnlinq ?
I can't find info about their API

the REST setup makes you enter a BASE URL, and you can only alter stuff AFTER it (via parameters).
I was trying to find another method in their docs to help you, but cant find the docs.
Hopefully they have a v2

jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
robleer
Posts: 286
Joined: Wed Jul 14, 2010 7:01 pm

Re: REST Service Base URL

Post by robleer »

Hi Jaymer,

The learnlinq is correct.

Check http://knowledgecenter.learnlinq.com and search for API.
Using 8.7 Professional 3025 on MySQL/Windows
Jaymer
Posts: 2475
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: REST Service Base URL

Post by Jaymer »

i see.

Set your BASE URL = "https:/" <-- notice only 1 slash
and then in your parameter string, build the entire required URL.
Using a new feature in the latest 2466 build, AIM no longer inserts the "?" divider between the BaseURL and the Parameters
.... IF your parameter starts with a "/"

So, you'll need to build a string like:
"/CustomerA.learnlinq.com/WebAPI/v1/Cultures"

then it should combine at runtime and be fine.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
robleer
Posts: 286
Joined: Wed Jul 14, 2010 7:01 pm

Re: REST Service Base URL

Post by robleer »

Thanks Jaymer, this works and solved a showstopper for me.

Rob
Using 8.7 Professional 3025 on MySQL/Windows
Jaymer
Posts: 2475
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: REST Service Base URL

Post by Jaymer »

In the next day or so, the next Build will allow us to use a variable as the BASE URL, so if you DO have to use the parameter string in the future, you'll be able to calculate the URL (based on your tenant) AS WELL AS dynamically building the Parms. Right now, you can't do both if you need to send the data from an object (like a JSON string).
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
robleer
Posts: 286
Joined: Wed Jul 14, 2010 7:01 pm

Re: REST Service Base URL

Post by robleer »

Hi Jaymer,

Ok thanks for your info. What do you exactly mean with 'a day or so'? Is this really a few days?

That I cannot use it both is a showstopper for me...
Using 8.7 Professional 3025 on MySQL/Windows
Jaymer
Posts: 2475
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: REST Service Base URL

Post by Jaymer »

Like now. Build has been released
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
robleer
Posts: 286
Joined: Wed Jul 14, 2010 7:01 pm

Re: REST Service Base URL

Post by robleer »

Ok, thats super ! Thanks and I will download this version
Using 8.7 Professional 3025 on MySQL/Windows
Post Reply