REST API Quick Start Guide
A quick start to get up-and-running with the matterial APIs and start building your matterial integration
A quick start to get up-and-running with the matterial APIs and start building your matterial integration
Integrating matterial into your app or website can begin as soon as you create a matterial instance, requiring the following steps:
Congrats! Read on to begin integrating matterial.
The term instance (in the API documentation the term data source is used) refers to a matterial environment containing documents, users and all other matterial data.
Since it is possible, that one user owns multiple instances, you have to specify the desired instance to work with in a separate request and the server will answer with a redirect to the actual server hosting your instance (which might be the same that you sent your login request to).
In the documentation the urls are specified like this: <application-url>/api/logon...
The default <application-url> of the matterial SaaS site consists of the host https://my.matterial.com and the suffix mtr-backend. So the default <application-url> is https://my.matterial.com/mtr-backend.
Matterial uses a cookie JSESSIONID to handle authentication. The cookie is set after a successful authentication request and must be added in each subsequent request.
The standard procedure looks as follows:
<application-url>/api/logon/prelogin with user id and password as payload (json or XML). If successfully authenticated, it returns all instances (data sources) of the current logged on user as json or xml. Also the cookie having the id JSESSION is set.<application-url>/api/logon/login/<instanceId> in order to get a redirect to the actual server hosting your instance.Now you can start using the rest of the API.
App - Development: Rest Interface