Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
user19
Contributor
Contributor

How to Map the Endpoint

I am trying to create a Rest route in Talen ESB open studio. I have an endpoint which has multiple methods inside.I access my API from Metadata. how can I reroute each endpoint according to its method. lets say endpoint is http://Example/api/version/Method/operation. it has four methods Rawdata, balancing, customdata and final data. all these methods has multiple operations. http://Example/api/version/Rawdata/getRawdata

http://Example/api/version/Rawdata/getdatafromfields

http://Example/api/version/balancing/getfiltereddata

How can I tell talend that when I call Rawdata in Soapui send this endpoint. which components i can use or can Java code can do it? Any help would be appreciated.

0695b00000PNHk2AAH.png

0695b00000PNHk7AAH.png

Labels (3)
15 Replies
user19
Contributor
Contributor
Author

@Richard Hall​  or if I uncheck the box

0695b00000QCFsQAAX.pngstill there is swagger in services list

0695b00000QCFt4AAH.pnghow can disable it?

 

Anonymous
Not applicable

I'm afraid you are not giving enough information. Why would you want to disable exposing the Swagger specification? It won't change how the API is called. In order to know how to call your API, we would need to know the specification of your API.

 

 

user19
Contributor
Contributor
Author

I can call the API using the route but I can't call the API using swagger exposed by talend, so I think it's better to Remove Swagger because API will work fine, but even I can't remove it after unchecking the box.

Anonymous
Not applicable

If that is not working, you will need to raise a Support case.

user19
Contributor
Contributor
Author

@Richard Hall​  I want to make the Resource case insensitive. by using simple("${header.CamelHttpPath}") it iscase sensitive. s I tried

 

String Path = (String)exchange.getIn().getHeader("HTTP_PATH");

String LCPath = Path.toLowerCase();

 

 

String apiParams = (String)exchange.getIn().getHeader("QUERY_STRING");

String LCapiParams = apiParams.toLowerCase();

 

context.relativePath = LCPath.concat(LCapiParams);

but it is returning null.

I also tried StringHandling.DOWNCASE(("${header.CamelHttpPath}" )+ context.RelativePath) but nothing works.

Do you have any dea how can we convert it into lowercase so it canbe case Insensitive?

Anonymous
Not applicable

You need to find out precisely where the null is coming from. Between each line of code add a System.out.println() to show the value that has been set. This should give you some clues as to where the issue is.

 

Also, where is context.relativePath being used? Context variables in Routes behave different to how they behave in Jobs. Once an endpoint has been initialised, you cannot dynamically change configurations. So this could be a cause of this.