Hello,
I am working on a json-rpc api and I would like some feedback on the parameters for the RPC request.
Background:
Consider this example. We have a RPC call that sends an email. The email can go To multiple email addresses but only comes From one email address. If a user sends an email To 5 people in one request, then when it gets to the server, we separate the request into 5 separate emails.
We also create unique ids ((UUIDs) for the emails, client side so we don't have to wait for the server response. So each To email address needs an associated UUID.
Question:
What is the best format for the api parameters?
Should it be something like (pseudo json):
Option 1 - Parallel Parameter Arrays
To_IDs = [UUID1, UUID2, UUID3]
Option 2 - Key/Value List
Option 3 - Other