Wiki Markup |
---|
h2. Standard Procedure |
...
Generally, the Bim\+ REST API calls consist of three steps for accessing the resources. |
...
1. Send a request for the authentication token. |
...
2. Receive the authentication token. |
...
3. Use the token for making the API request for any resource. |
...
h3. 1. Authentication token request |
...
The authentication request for accessing the BimPlus resource should be sent in the JSON format using the [Authentication Service|bimplus:2.1.2 Authentication Service]. |
...
Example: |
...
[http://bimplus-dev.mantro.net/v2/authorize |
...
] { "user_id": "test@bimplus.net", |
...
"password": "test" |
...
} h3. 2. Receive the authentication token |
...
The token is received in the request |
...
3. Request the desired resource
Tools
Plugins for doing REST based calls (REST Client)
Chrome --> Advanced REST client, Postman - REST client, Simple REST client
Firefox --> RESTClient
...
. {color:#000000}{{color} {color:#333333}access_token: "{color}{color:#333333}92d6261ef0044736a92ebfe744180314{color}{color:#333333}"{color} {color:#333333}expires_in: 2591999{color} {color:#333333}token_type: "{color}{color:#333333}BimPlus{color}{color:#333333}"{color} {color:#333333}}{color} h3. 3. Request the desired resource h4. h2. Tools Plugins for doing REST based calls (REST Client) Chrome \--> [Advanced REST client|https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo], [Postman - REST client|https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en], [Simple REST client|https://chrome.google.com/webstore/detail/simple-rest-client/fhjcajmcbmldlhcimfajhfbgofnpcjmb] Firefox \--> [RESTClient|https://addons.mozilla.org/de/firefox/addon/restclient/] For validating or formatting JSON \--> [http://jsonlint.com/|http://jsonlint.com/] |