Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Standard Procedure

Generally, the Bim+ REST API calls consist of three steps for accessing the resources.

1. Send a request for the authentication token.

Wiki Markup
\[#Test\]

2. Receive the authentication token.

3. Use the token for making the API request for any resource.

1. Authentication token request 

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:

Code Block
{
 "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)

Composition Setup

Deck of Cards
idbimGetProjectList
Card
labelImplementation Status

 Service available !

Card
labelHTTP Method

POST

Card
labelURL / Resource / Parameters

Resource: authorize 

URLhttps://api.bimplus.net/v2/authorize

Card
defaulttrue
labelDescription

Authenticates a user and returns a token which can be used for further API calls for accessing the desired resources.

Card
labelRequest
Code Block
borderColorGreen
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json


Code Block
borderColorRed
titleJSON
{
 "user_id" : "test@bimplus.net",
 "password" : "test"
}
Card
labelResponse
Code Block
borderColorGreen
titleStatus
Status: 200 OK


Code Block
borderColorRed
titleJSON
{
access_token: "c939ebf5b96646528e0022a35f7a2e67"
expires_in: 2591999
token_type: "BimPlus"
}

2. Receive the authentication token 

The token is received in the request

Code Block
{
access_token: "c939ebf5b96646528e0022a35f7a2e67"
expires_in: 2591999
token_type: "BimPlus"
}

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:

GET https://api.bimplus.net/v2/bimplus/projects

JSON Response:

Code Block
[4]
0:  {
id: "c8c8e6f2-4495-484c-929d-0049f1f9d4ff"
name: null
}-
1:  {
id: "f404ee03-2e04-4d81-873e-13d672b02b7d"
name: null
}-
2:  {
id: "1dc48a10-f283-497a-83de-e5f1b56c4a41"
name: null
}-
3:  {
id: "586b02be-43b8-4e27-b698-e067e85e38e2"
name: "!!!!!_VORTEILSHAUS V40 SD45 Traufeingang"
}

Tools 

Anchor
Test
Test

Plugins for doing REST based calls (REST Client)

Chrome --> Advanced REST clientPostman - REST clientSimple REST client

Firefox --> RESTClient

For validating or formatting JSON --> http://jsonlint.com/