213
Views
8
Comments
How to create Rest API in OutSystems with different version?
Question
Application Type
Reactive

I have an existing rest API created in OutSytems which can be accessed from

https://xxxxx.outsystemsenterprise.com/[module_name]/rest

But I want to create a new version for the same API and would like to expose it as 

https://xxxxx.outsystemsenterprise.com/[version]/[module_name]/rest

Anyone know how to do this in OutSystems?


Thanks,

Constance

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Constance,

What you want is not possible with OutSystems. However, you can easily add the version to the path that the Platform generates:

https://xxxxx.outsystemsenterprise.com/[module_name]/rest/[api_name]/v2

Of course, this means you must add that to every method you expose, but on the other hand, this also allows for a per-method versioning.

2021-11-23 14-27-55
Constance Li

Thanks for your reply. 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

You're most welcome. If my answer helped you solve your problem, could you please mark it as solution? Thanks. 

2023-10-16 05-50-48
Shingo Lam

for this case, I think it is more convenient to clone the api module and change the url

Thanks and best regards

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

I don't think so, that would mean you'd have to maintain two seperate modules instead of a single one, and have a different module name does not have a clear indication it's a different version.

2023-10-16 05-50-48
Shingo Lam

It should depend on the purpose of exposing new version. 

I think @Constance Li wanna to keep the old version for current use, create version for refactoring or expanding business. When the new version is total consumed and adapted, she will deprecate the old version. 

On the other hand, structures, logic, etc are harder to maintain if keep both of them in 1 module

Thanks and best regards


2021-11-23 14-27-55
Constance Li

Thanks all for the reply.

In the end, I duplicated the API and managed to get the URL formatting works using customization but I had to rename my API as vx but that works for me. Because we want to keep both version until we are ready to move to v2. 

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Expose_REST_APIs/Customize_REST_URLs



2025-04-17 13-53-00
Mohit Mathew

Hi Constance, 

Can we try different versions of the API to comply with different versions specifications. Both versions must translate the different types of inputs into an OutSystems Record List before calling the actual service. 

article link 

https://success.outsystems.com/Documentation/Best_Practices/Architecture/Designing_the_Architecture_of_Your_OutSystems_Applications

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.