You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 93 Next »

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. Get the team information.

4. Use the token and team information 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.

     Service available !

    POST

    Resource: authorize 

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

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

    Headers
    Content-Type: application/json
    


    JSON
    {
     "user_id" : "test@bimplus.net",
     "password" : "test"
    }
    Status
    Status: 200 OK
    


    JSON
    {
    access_token: "9c1874a62c974dcfa75e0132c423a088"
    expires_in: 2591999
    token_type: "BimPlus"
    }

    2. Receive the authentication token 

    The token is received in the request.

       Service available !

      POST

      Resource: authorize 

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

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

      Headers
      Authorization: BimPlus c939ebf5b96646528e0022a35f7a2e67
      Content-Type: application/json
      


      JSON
      {
       "user_id" : "test@bimplus.net",
       "password" : "test"
      }
      Status
      Status: 200 OK
      


      JSON
      {
      access_token: "c939ebf5b96646528e0022a35f7a2e67"
      expires_in: 2591999
      token_type: "BimPlus"
      }

      3. Get the team information

      The team has to be specified and setup through the  bimplus portal as so-called slugs to present a clean URL. Slugs are lowercase unique identifiers based on English characters and numbers. The team slug will be used to know which tenant database to work on. If you are not sure of your team slug please use our user administration service.

         Service available !

        GET

        Resource: teams 

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

        Get all the available teams.

        Headers
        Content-Type: application/json
        
        Status
        Status: 200 OK
        


        JSON
        [2]
        0:  {
        id: "82884f54-96bf-4e9c-a2fb-44db8379378d"
        slug: "nemetschek"
        name: "Nemetschek"
        owner: "132a78a5-b523-4bf2-8382-7098fac3f803"
        totalStorage: 0
        storageStats: null
        status: "Active"
        teamWorksConnection: "RGF0YSBTb3VyY2U9YmltcGx1cy5tYW50cm8ubmV0OyBJbml0aWFsIENhdGFsb2c9QmltUGx1cy5UZW5hbnQuRGV2OyBVc2VyIElkPWRiYmltbWFudHJvdGVzdDsgUGFzc3dvcmQ9MWprdGNudG9DcU9qeGtIMU9QOXg7IENvbm5lY3QgdGltZW91dD0xMA=="
        dataStorageStatus: "Online"
        }-
        1:  {
        id: "7eab1453-a4e7-4d05-983e-031544540e6f"
        slug: "bimplus-demo"
        name: "BimPlus Demo"
        owner: "5592c628-588e-f5c0-b08b-088d43de9209"
        totalStorage: 53687091200
        storageStats: null
        status: "Active"
        teamWorksConnection: "RGF0YSBTb3VyY2U9YmltcGx1cy5tYW50cm8ubmV0O0luaXRpYWwgQ2F0YWxvZz1CaW1QbHVzLlRlbmFudC5iaW1wbHVzLWRlbW87VXNlciBJRD1iaW1wbHVzLWRlbW87UGFzc3dvcmQ9YWI3ZDRmNDc5ZGM4YjI1Yjg2MDc0Y2ZmZTNiNDBjZmY2OWQwNzQ1YjtDb25uZWN0IFRpbWVvdXQ9MTA="
        dataStorageStatus: "Online"
        }

        4. 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.

        For example, we can use this token to get the project list.

           Service available !

          GET

          Resource: projects 

          URLhttps://api.bimplus.net/v2/<company>/projects

          Examplehttps://api.bimplus.net/v2/bimplus/projects

          Get available project list with main properties.

          Headers
          Authorization: BimPlus c939ebf5b96646528e0022a35f7a2e67
          Content-Type: application/json
          
          Status
          Status: 200 OK
          


          JSON
          [3]
          0:  {
          id: "c8c8e6f2-4495-484c-929d-0049f1f9d4ff"
          name: "!!!!!_VORTEILSHAUS V40 SD45 Traufeingang"
          }-
          1:  {
          id: "2d703abe-b4f9-407c-af53-a39c5b7ba872"
          name: "__5 999 Parklife Salzburg Lehen"
          }-
          2:  {
          id: "c480cc54-aec4-4bef-8d35-93bb090e1aba"
          name: "0811-Wohnhaus Kraus - Carport1"
          }

          Tools 


          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/

          • No labels