Hi,
I am exposing a REST API with URL path "/V0.5/Users/auth/on-init". While entering the URL path, I am getting Invalid URL Path error. We found that the error is due to using "." in the URL path.
Can someone suggest how can we use "." in the URL path.
Thank you.
Hi Yerra,
To get around the Service Studio error, you can replace the "V0.5" part by an input parameter called (for example) Version, so your path would be "/{Version}/Users/auth/on-init". This makes "/V0.5/Users/auth/on-init" also a valid path. The only downside is that any "version" is valid, so you might want to add a check for "V0.5", and return a 404 if it's not.
Hi Kilian,
It worked, Thank you.
Good to hear! Happy coding :).
I don't know if that is possible. But it is also strange to see a minor version in the URL path of a REST endpoint.
You could consider alternative versioning via
Versioning through query parameters
Users/auth/on-init ?version=0.5
or adding a custom header:
Accepts-version: 1.0
Regards,
Daniel
Hi Daniel,
Thanks for your response.
Actually our requirement is we should get a callback to this exposed REST API and the url path we was given is "/V0.5/Users/auth/on-init".
Can you provide us some sample demo on adding a custom header so that it would be helpful for us.
Hi if you need to call this end point as is, then adding the custom header isn't going to solve your problem. You are basically required to use the end point as it is.
Can you share the error you get? I will ask around at OutSystems.
I have attached a screenshot where I am getting error.
Abstract from: https://success.outsystems.com/documentation/11/extensibility_and_integration/rest/expose_rest_apis/customize_rest_urls/
So this is a limitation from .NET, nothing OutSystems is going to fix.
Thanks for the information Daniel.
That's only about the part after the last slash, but the V0.5 is not after the last slash. Perhaps OutSystems has implemented this a bit too prohibitive?
Hi Yerra Chandra Mouli,
You can try to modify url path on before action of api.
I did not check this we can modify url path or not.
Thanks
Arun
That is not possible on a Exposed API, imho