REST API design for message forwarding

90 views
Skip to first unread message

Jurgen Camilleri

unread,
Feb 9, 2017, 4:30:06 AM2/9/17
to API Craft, david....@gmail.com
Hi all,

I have a question regarding designing a REST API which is capable of receiving a request containing a message and forwarding this message to another entity (for example another REST API). We already have a messaging API which is able to deliver messages to an end user (for example via sms or email) and we would like to extend this API to support this functionality. The way we see it is that there are two options:

  1. Reusing the existing message resource but adding an optional parameter in the request body indicating whether the message should be delivered or forwarded.
  2. Adding a new resource specifically for this feature. In this case, we are at a loss as to what we should name the resource.

Your opinions would be greatly appreciated.

Thanks,
Jürgen

Lukas Rosenstock

unread,
Feb 12, 2017, 5:54:37 AM2/12/17
to api-...@googlegroups.com
Hello Jürgen,
as you mentioned your API sends messages to end users via email or SMS. Are these two different actions or simply a different way of specifying the receiver? In the latter case I’d say you can simply add another type of receiver which is another API.
Can you share more about your existing API design and data format?

Lukas Rosenstock


--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at https://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages