Generally, the Bim+ REST API calls consist of three steps for accessing the resources.
1. Send a request for the authentication token.\[#Test\]
2. Receive the authentication token.
3. Use the token for making the API request for any resource.
The authentication request for accessing the BimPlus resource should be sent in the JSON format using the Authorization service.
Example:
POST https://api.bimplus.net/v2/authorize
JSON Request:
{ "user_id" : "test@bimplus.net", "password" : "test" } |
Header:
If the Browser based REST clients does not select the Content-Type as "application/json", then please mention the content type in the header(Content-Type: application/json)
{deck:id=bimRequestToken} {card:label=Implementation Status} !check.gif|border=1! Service available \! {card} {card:label=HTTP Method} POST {card} {card:label=URL / Resource / Parameters} *Resource*: authorize *URL*: {nolink:https://api.bimplus.net/v2/}authorize {card}{card:label=Description}Authenticates a user and returns a token which can be used for further API calls for accessing the desired resources. {card}{card:label=Request|default=true} {code:title=Headers|borderColor=Green} Content-Type: application/json {code} \\ {code:title=JSON|borderColor=Red}{ "user_id" : "test@bimplus.net", "password" : "test" }{code} {card} {card:label=Response} {code:title=Status|borderColor=Green} Status: 200 OK {code} \\ {code:title=JSON|borderColor=Red}{ access_token: "c939ebf5b96646528e0022a35f7a2e67" expires_in: 2591999 token_type: "BimPlus" }{code} {card} {deck} h3. 2. Receive the authentication token The token is received in the request {deck:id=bimReceiveToken} \\ {card:label=Implementation Status} !check.gif|border=1! Service available \! {card} \\ {card:label=HTTP Method} POST {card} \\ {card:label=URL / Resource / Parameters} *Resource*: authorize *URL*: {nolink:https://api.bimplus.net/v2/}authorize {card}\\ {card:label=Description}Authenticates a user and returns a token which can be used for further API calls for accessing the desired resources. {card}\\ {card:label=Request} \\ {code:title=Headers|borderColor=Green} Content-Type: application/json {code} \\ {code:title=JSON|borderColor=Red}{ "user_id" : "test@bimplus.net", "password" : "test" }{code} \\ {card} \\ {card:label=Response|default=true} \\ {code:title=Status|borderColor=Green} Status: 200 OK {code} \\ {code:title=JSON|borderColor=Red}{ access_token: "c939ebf5b96646528e0022a35f7a2e67" expires_in: 2591999 token_type: "BimPlus" }{code} \\ {card} \\ {deck} {code}{ access_token: "c939ebf5b96646528e0022a35f7a2e67" expires_in: 2591999 token_type: "BimPlus" }{code} h3. 3. Request the desired resource Using the authentication token, the necessary resource can be accessed and the desired action can be performed on that resource using the BimPlus REST API. Example: {color:#000000}{*}Get Project List{*}{color} |
|
Get Project Properties
|
Tools
Plugins for doing REST based calls (REST Client)
Chrome --> Advanced REST client, Postman - REST client, Simple REST client
Firefox --> RESTClient
For validating or formatting JSON --> http://jsonlint.com/