-
1. Re: Consume Rest API through Rest webservice and deploy VDB to Rest API
srinath0533 Sep 4, 2018 4:54 PM (in response to srinath0533)Any help is very much appreciated please. Thank you.
-
2. Re: Consume Rest API through Rest webservice and deploy VDB to Rest API
ecabrerar Sep 5, 2018 9:19 AM (in response to srinath0533)Hi,
We need more information about your issue, maybe you can post a code snippet or your project.
Best Regards
-
3. Re: Consume Rest API through Rest webservice and deploy VDB to Rest API
srinath0533 Sep 19, 2018 1:57 PM (in response to ecabrerar)Hello Eudris,
For example if I’m loading the below json data into elastic search index and exposing the index to Rest API, the output look like the URL (https://reqres.in/api/users?page=2)
{
"username" : "my_username",
"password" : "my_password",
"validation-factors" : {
"validationFactors" : [
{
"name" : "remote_address",
"value" : "127.0.0.1"
}
]
}
}
Once we load the above json and expose to Elastic Search to Rest API the output will look like below. To show you an example I saved the file on my desktop and open in browser. However when I open the original Rest API output will be same as below.
Now I would like to consume a URL like above and expose it through DV layer as is. So I will import the above URL from import>Teiid Importer>Rest and create a InvokeHttp which is the source model.
Now I would like to know how can I expose this source model(Invoke HTTP) to Rest API through DV. The reason we want to expose the URL through DV is custom security. Earlier i created a table in viewmodel on top of source model and a Rest Proc on top of table and deployed the VDB for rest access but we could not access as Rest URL as the json file has multiple nested loops and transformation SQL between table and Rest Proc in viewmodel did not support multiple nested loops. Please let me know if there is a way i can expose the source Rest API as is without creating table and rest procs.
Thanks & regards,
Srinath