Custom URI path in configuration service

Hello Community,

 

1. How does one achieve a custom URI path like '/customer/update/{id}' while building a custom configuration service? Can we use the UriTemplate attribute to define a custom path like below - 

[OperationContract]    
[WebInvoke(Method = "GET",UriTemplate = "/customer/update/{id}", BodyStyle = WebMessageBodyStyle.Wrapped,RequestFormat = WebMessageFormat.Json,ResponseFormat = WebMessageFormat.Json)]

2. Is there a way to avoid/bypass the '0/rest' prefix which gets added to every custom configuration service??

Thank you
Shrikanth

 

Like 0

Like

2 comments
Best reply

Hello M Shrikanth, 

1. Yes, you can use it. For more details on this please Check the official Microsoft docs.
For example, the following article;
https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.web.web…

2. No, unfortunately there is no way to bypass adding of the mentioned prefix. 

Kind regards, 
Roman

 

Hello M Shrikanth, 

1. Yes, you can use it. For more details on this please Check the official Microsoft docs.
For example, the following article;
https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.web.web…

2. No, unfortunately there is no way to bypass adding of the mentioned prefix. 

Kind regards, 
Roman

 

Roman Brown,

Hi Roman. Thank you for the response. 

How does one enable PUT and PATCH methods on a custom configuration service endpoint?? Are there any specific settings or attributes to be added? 

Show all comments