You can translate the question and the replies:

API run time parameter

Hi Team, I have a REST JSON API with a $select clause for 1 field, which will display results in a particular drop down field in user side portal - JIRA. (the view has multiple fields) Now, based on the selection on one of the values, from above API, user wants API to run again with selected value in the where condition and populate another field from denodo view in another JIRA field. So I customized the API with $select and &fieldname=xxxxxx. Now at moment in API this xxxxxx is hard coded with a value. My question is, this mapping must be done at JIRA side, or is there any option to parameterize it at denodo side, so that such API can be configued at JIRA. Related to xxxxxx. Please suggest. Thanks.
user
21-01-2022 15:10:24 -0500
code

8 Answers

Hi, In Denodo, to pass parameters at runtime I would make use of interpolation variables. That is, I would specify the interpolation variable(eg: @fieldname) in the HTTP GET method URL and create a base view. So, this base view will always look for a value for the “fieldname” while execution and I would specify the value at runtime. Follow the below steps to pass parameter value at runtime: 1. Create a [JSON](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/json_sources/json_sources#json-sources) data source, choose Data route as HTTP Client and click Configure. 1. In the Configuration tab, specify the URL with the interpolation variable inorder to pass parameters at runtime. For example, I would specify the url with an interpolation variable as val: <URL>?$filter=fieldname=@{val} 1. Click on TEST Connection and if it is successful, save the data source. 1. Then to create a base view, specify a sample value for the variable to introspect and build the schema. After this, while executing the base view I will be able to pass input parameter values dynamically and retrieve the results. Refer to the [Paths and Other Values with Interpolation Variables](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) section of the Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
24-01-2022 07:13:33 -0500
code
Hi Team, There is some confusion here. I have a view in Denodo, which I am publishing to end user as a Denodo REST JSON web service API. Now this web service is designed to pick only one field in its output. (from the main web service which is generated after deploying, I have customized it using $select prameter in web service url.) This web service is used by end user in a JIRA drop doen fiels to display the values. When user would select a value and display in on JIRA form. Now, user wants basis on this seleted field from web service, another 3 fields drop down list be populated based on the value selcted. So this would involve firing 3 different rest web service query to Denodo. Each will have same where cluase (value picked from first API), and 3 different $select clauses for the display field. So, how must these 3 API be configured? the where clause in the query, how to configure it, so that Denodo can pick value from first API. Thanks.
user
24-01-2022 23:47:34 -0500
Please update.
user
27-01-2022 13:50:03 -0500
Hi, From the case description, I understand that you need to configure the trigger of three different web services with a select clause and where condition to retrieve data from Denodo on the execution of the first API request (which you have already configured). At the moment, we believe it is not possible to send simultaneous API requests to Denodo from JIRA. In general, the API call works in a sequence, in which each API request returns one row. That is, if an API call is running then it first completes the first call and moves to the next API call. Additionally, in order to better assist with your use case and if you are a user with valid support access, create a support case in [Denodo Support Site](https://support.denodo.com/) so that our support team will assist you further. Hope this helps!
Denodo Team
27-01-2022 23:13:45 -0500
code
Hi Team, Yes you are getting it correct now. Now, it is ok for me to run 3 API calls one after the other completion, based on receiving input from 1st root API. But question arises how to configue the filter condition in them. I was able to deocde the API till this level as below, now the filter value must be mapped in JIRA ? in some JIRA code logic ? or how ? https://<denodo_server>/server/<denodo_db_name>/<ws_name>/views/<view_name>?$select=<field_name>&$filter=<field_name>=<xxxxxxx> Question is on <xxxxxxx> Thanks
user
28-01-2022 00:01:02 -0500
Hi, In Denodo, to pass the result of one API request as the input value of another API request, I generally use Denodo logic such as the interpolation variable or create a join view to pass the input to the API requests. Hence, for your requirement, you can check with the JIRA team regarding how to pass the filter value in JIRA using the JIRA logic. Hope this helps!
Denodo Team
28-01-2022 01:54:42 -0500
code
any solution suggestion from denodo end implementation,please.
user
28-01-2022 02:36:09 -0500
Hi, Since this question is mostly related to configuration on the JIRA side, you could connect with the JIRA team for further assistance. On referring to the JIRA community, I suspect that the [Elements Connect](https://marketplace.atlassian.com/apps/23337/elements-connect-external-data-fields?hosting=server&tab=overview) will help you to bring the external data into JIRA and it also allows you to use the REST API as a datasource. Hence, you will be able to fetch and pass the data of your API within JIRA. For more references, check the [REST APIs](https://developer.atlassian.com/server/jira/platform/rest-apis/#) and [Jira REST API examples](https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/) documentation for more information. Hope this helps!
Denodo Team
31-01-2022 23:06:12 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here