Challenge Overview
Challenge Overview
Welcome to the MAPI middleware API challenge. Our goal here is to implement MAPI HTTP API endpoints and demo ROPs that return mock responses.
Project Overview
The project goal is to create EWS and MAPI middlewares and use them to provide access from Outlook to data from non-Microsoft apps/data sources. Integrating with those data sources is out of scope for this project - we will use static/demo data for verification only. EWS API is already implemented. This challenge will only implement MAPI HTTP endpoints and a subset of ROPs.
Technology Stack
-
Typescript
-
Loopback 4
-
MAPI
Assets
See forums for access to the project repository.
Individual requirements
The goal here is to implement MAPI HTTP API that reads some static data, point Outlook client to that API and get the communication working between them. Here is a system diagram of what we’re trying to do
MAPI protocol is fairly low level (lots of bit fiddling) and consists of two important segments:
-
Remote Operations (ROPs) that actually perform some business logic (check for emails, create folder, etc)
-
MAPI HTTP endpoints - a wrapper protocol around ROPs that allows calling the ROPs over HTTP
In this challenge we will focus on implementing the MAPI HTTP endpoints and a few ROPs that we can use to validate the http endpoints implementation.
See this link for the complete MAPI HTTP specification. See section #2 for endpoint details. All endpoints are in scope - there are 24 endpoints total:
-
Connect
-
Execute
-
Disconnect
-
NotificationWait
-
Bind
-
Unbind
-
CompareMinIds
-
DnToMinId
-
GetMatches
-
GetPropList
-
GetProps
-
GetSpecialTable
-
GetTemplateInfo
-
ModLinkAtt
-
ModProps
-
QueryRows
-
QueryColumns
-
ResolveNames
-
ResortRestriction
-
SeekEntries
-
UpdateStat
-
GetMailboxUrl
-
GetAddressBookUrl
-
Ping
Note that the MAPI HTTP protocol is stateful - needs to keep track of open connections (for connect, execute, disconnect flow). “Execute” operation is the one that calls individual ROPs.
ROPs are specified in a separate document. In this challenge we only want to implement Logon ROPs - a set of 13 operations. For each of them we can simply return a mock response, no need to add any business logic.
MAPI HTTP api should be implemented using Loopback framework, but note that the role of the framework is very minimal here - only one POST endpoint is used for the entire api.
Since working with MAPI and ROP protocol requires parsing binary data, we do need to create model classes to map the input binary data to objects and serialize object data back to binary data when returning the responses. Note that in Typescript/Node land it is not a straightforward task to map binary data to objects (like we can just cast it to a struct in C/C++/C#/..), so figuring out a straightforward way to do this will probably be the task that requires most effort in this challenge.
Lastly, we need to create an “autodiscover” http endpoint that returns XML response with MAPI HTTP endpoint details. This is already done in the EWS api we implemented earlier, so you can just duplicate the same logic and add a mapiHttp element to the response.
What to submit
-
Submit the MAPI HTTP API, Logon ROPs and autodiscover implementation
-
README document with deployment and verification steps
-
Postman collection to verify the endpoints