Adding custom REST calls

I have a windows xdata rest server working. How can I add my own calls to it? Is there a event or hook for it?

I don't understand what do you mean by this. Can you please elaborate?

I mean that I want to add my own endpoints/requests, on top of what the XData etc are providing.

1 Like

In addition - or as a summary - of what Andrew posted, the answer to the question (if I understood it correctly) is rather simple: service operations. That is actually the core and basics of XData: use service operations to create your endpoints. Automatic endpoints from Aurelius is just a plus.

The fun chapter from documentation (the very first chapter of documentation, after the introduction):

https://doc.tmssoftware.com/biz/xdata/guide/service.html

1 Like

These two are showing how to do a new Service. But I already have a REST server working with Entities and Crud. I dont really want another server.

I had assumed that creating a new service would create a new project. I didnt realise that the expert/wizard was smart enough to merge it my existing server.

All Good

1 Like

Next Stage

I see from Holger's videos that I can use the custom services by using RawInvoke method of the ClientDataset.

Is there a way to consume these services and produce some of the repetitious code automatically?

Again I didn't understand what you mean.

That's how you consume those services. Calling RawInvoke method of TXDataWebClient component.

Which repetitious code?

For each one I have to write a handler for the Response when it arrives.

I will have to see if I can make a generic one.

1 Like

I usually have user access rights as a set. Will the set transfer across in json from client to server (and back)

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.