Need example of calling call REST JSON service using page properties

We're evaluating Radzen as our go to tool for rapid prototyping. Most of our apps are connected to JSON REST services. We're looking to call a REST JSON service using page properties that are bound to the components (text box, dropdown etc) on the page. We have the schema and operation defined but cannot find any documentation on how to map page properties to the operation parameters defined as a schema when specifying the submission button event.

Any simple examples would be greatly appreciated as we're trying to complete our evaluation by middle of this month.

Thanks

Salil Kumar
650-740-1646

1 Like

You've missed this article:

Mapping page properties to data source method invoke is the same of all data source types.

Actually no - we went thru this article. This showed us how to create the REST datasource and schema etc but it doesn't show how to take the input from a user on a page and call a REST service. It only shows how to load data from a REST service in a grid.

Thanks

Salil Kumar
650-740-1646

I recommend checking the fundamentals series of articles. They show how to create properties, get user input etc.

We understand all that - all we're trying to get an example of is how to map the page props to the operation parameter - is it an expression, do we have to write code or sthing else? We can always try to keep digging and figure it out but hoping for some documentation/example so our teams can do this themselves once we decide on this product.

Thanks

Salil
650-740-1646

The the REST article linked above shows how to set a parameter of the rest service ...

If you are looking for dedicated support - you can check our pricing options.

Thanks for your feedback. We were hoping since this is a very basic use case that it should be properly documented but I understand that you want us to get support for this. Unfortunately, we can't do that without completing our evaluation and buying the product so we will try to figure this out first - hopefully we can do it within our evaluation timeline.

Thanks again for your help.

Salil Kumar
650-740-1646

And sorry I forgot to mention that passing the parameter as you showed is straightforward. Our requirement is to have a structure matching the schema built out of the page inputs not straight property to parameter passing since our operation is a post that requires a JSON body.

Thanks

Salil Kumar

Hi salilkumar,

I'm in the same situation as you (evaluating to purchase, using a use case with Form input > JSON > REST API).

But it's hard to understand the concepts of how to perform an everyday task like this (mapping a form to JSON, to POST in a REST API). I know Radzen can do this, but I can't find a reference in the documentation to help me understand how to do this and I'm spending days on a task that should be simple, it's definitely some concept I didn't understand yet...

If you find a way, please post here (I'll do the same if I figure it out).

Thanks!

Regards,

Eduardo

The first response to this thread contains a link to Radzen's documentation.

Hi @korchev,

Thanks for reply, but it uses a datagrid to retrieve JSON data and what we're trying to do is to collect user input using a form and post it as JSON.

I didnt find anything like this in the docs, and I dont know how to map the form to the created schema, to post it as json.

I've created the schema succesfully (and that article helped to understand this part), but when I submit the form, It doesnt post a json object in the body (even setting the parameter 'in/where' to 'body' on the data source editor).

Thanks,

Eduardo

Radzen should send as JSON an operation parameter configured as "in body". Check the generated code.

Got it working after some research, thanks for your attention.

Regards,

Eduardo