rest - RESTful representation of RPC call -


We are trying to re-engineer our SOAP API with a lush (using ASP.NET Web API).

I know how much to replace the RPC-style call with the REP, but I still have not found anything where I want it where I want it. This may be a failure of the imagination or the fundamental misconception of the other principles (I will let you be the judge of that!)

I have made an example below which is broadly obtained like maps Trying to do

Suppose we have a resource that I will get booking

... / booking / booking / 1

< / Blockquote>

And we need to cancel this booking which was already prepared with something.

So this is the booking ID and reason code.

Or we may need the ability to cancel multiple bookings in a single request.

... Cancel (" Nealer required)

(Little raw, but I'm trying to keep the example simple!)

We call it a How to model the best in Rental Architecture?

One suggestion is that we have a resource Like CA, something called is the cancellation term and can we post any of these on the server?

  Post ... / booking / cancellation request {"bookingIdis": "1,2,3", "Cancellation Season": "Notifier"}  

Will probably process it and then return a cancel to cancel booking (s)?

But I do not know that this is the best way to get the terms of the REST.

Can anyone give advice?

(One note: It is useless to say that / bookings / booking /: id I also agree that the resources should start with lowercase letters. In that case, you will address the resource as / bookings /: id .)

A decent amount of opinion among the designers that should be done properly. I am not a fan of the individually celebrated conventions so closely that allows the API to be cheesy or difficult or understand.

However, your case seems very straightforward:

Multiple resources:

Delit / Bookings? ArizonaCode = Result. Longer Undetermined Mausoleum = 1 & amp; id = 2 & amp; id = 3

Single Resource:

Delete / Bookings? Season Mode = Result. Insert Most Essentials <1

Which Digits for

Delete / Booking / ID:? ReasonCode = Reason. More time required

See also


Comments