API mailbox - RapturePlatform/Rapture GitHub Wiki
Mailbox API
Each Rapture environment has a single mailbox, although it is divided into logical parts by authority and category. Remote users (usually remote systems) can submit items to a mailbox, whereupon an event is signaled to allow for any processing of that item. Typical processing validates the mailbox content and creates real entities within the local system (e.g. an incoming order is converted into a real order if valid). When processed the category of an item can be changed to 'Done' to ensure it isn't reprocessed.
putMessage
HttpMailboxApi mailboxApi = new HttpMailboxApi(loginApi);
String retVal = mailboxApi.putMessage(messageUri, content);
retVal = baseAPI.doMailbox_PutMessage(messageUri, content);
Entitlement: /mail/post/$f(messageUri)
This method is used to post a message onto a category (for a authority).
Function Parameters
Parameter | Type | Description |
---|---|---|
messageUri | String | |
content | String |
Return value
Type | Description |
---|---|
String |
moveMessage
HttpMailboxApi mailboxApi = new HttpMailboxApi(loginApi);
void retVal = mailboxApi.moveMessage(messageUri, newMessageUri);
retVal = baseAPI.doMailbox_MoveMessage(messageUri, newMessageUri);
Entitlement: /mail/move/$f(messageUri)
Moves a message from one category to another.
Function Parameters
Parameter | Type | Description |
---|---|---|
messageUri | String | |
newMessageUri | String |
Return value
Type | Description |
---|---|
void |
createMailboxRepo
HttpMailboxApi mailboxApi = new HttpMailboxApi(loginApi);
void retVal = mailboxApi.createMailboxRepo(mailboxConfig, idGenConfig);
retVal = baseAPI.doMailbox_CreateMailboxRepo(mailboxConfig, idGenConfig);
Entitlement: /admin/mail
Define the config for mailbox storage.
Function Parameters
Parameter | Type | Description |
---|---|---|
mailboxConfig | String | |
idGenConfig | String |
Return value
Type | Description |
---|---|
void |
getMessages
HttpMailboxApi mailboxApi = new HttpMailboxApi(loginApi);
List<RaptureMailMessage> retVal = mailboxApi.getMessages(mailboxUri);
retVal = baseAPI.doMailbox_GetMessages(mailboxUri);
Entitlement: /admin/mail/$f(mailboxUri)
Retrieves all mailbox messages for a category.
Function Parameters
Parameter | Type | Description |
---|---|---|
mailboxUri | String |
Return value
Type | Description |
---|---|
List |