Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Route: getting URI parameters and send custom ResponseCode

Hey all

I'm currently trying to develop a route for creating a rest service, but I have two issues :

 

1/ Getting URI parameter

I use a cCXFRS with the URI pattern /{id}, but don't find any ways to retrieve the id in the road (body/header) nor in the cTalendJob that I use after that. What is the best way to do it ?

 

2/ Sending a custom ResponseCode

I wish to choose the response code sending back by the road, by configuring it in the tRouteOutput of my cTalendJob, but no way to find the correct syntax to add it. Same question that above ^^

 

Thanks

 

0683p000009LtRO.jpg

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

Answer to your first question

One way of retrieving the id in your route is to use the cSetHeader component by following the below steps.

  1. Add a cSetHeader component to the canvas
  2. Click the Add (Plus sign) button in Basic settings in the Component tab
  3. Enter your chosen header name in Name column
  4. Choose Simple in the Language column
  5. Enter "${headers.CamelCxfMessage[jaxrs.template.parameters][id][0]}" in the Value column

Now the header you created above will have the value of id

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hello,
Nobody have any clues ?
Anonymous
Not applicable
Author

Hi,

Answer to your first question

One way of retrieving the id in your route is to use the cSetHeader component by following the below steps.

  1. Add a cSetHeader component to the canvas
  2. Click the Add (Plus sign) button in Basic settings in the Component tab
  3. Enter your chosen header name in Name column
  4. Choose Simple in the Language column
  5. Enter "${headers.CamelCxfMessage[jaxrs.template.parameters][id][0]}" in the Value column

Now the header you created above will have the value of id