Versions Compared

Key

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

...

Deck of Cards
idbimGetAllRoles


Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: <team_slug>/roles 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/roles

Examplehttps://api-stage.bimplus.net/v2/best-company/roles

Optional query parameters

NameTypeDefault valueDescription
rightsbooleantrue

When query parameter "rights=false" is defined, the API call will returns all roles. i.e. not only roles which contains
resources and right definitions.
When query parameter is missing, the API call returns only roles which includes resources and rights definitions.

customroleboolean

When query parameter customrole is defined e.g. "customrole=true", the API call will returns only roles which have value of property "customRole" equal to query parameter.
When query parameter is missing, the API call returns all roles (i.e. their customRole property can be true or false)

rightsandrolestemplatestring (guid)

When query parameter rightsandrolestemplate is defined e.g. "rightsandrolestemplate=482176be-84ab-4d8f-93e4-2c58863d4eae",
only roles which belongs to exact rightsandrolestemplate id are returned.



Card
labelHTTP Method
 GET


Card
labelDescription

 Get all the available roles. Right now, we support only project based roles and custom roles.

Here is the definition of Bimplus Rights and Roles.


Account OwnerProject AdminProject EditorProject Viewer
Create projectx


Admin projectxx

Delete projectxx

Edit projectxxx
View projectxxxx
Create modelxx

View all modelsxxxx

Model rights and roles are not supported yet, the project rights are used instead - meaning e.g. update model requires ProjectEdit rights


The custom roles contains also definition for which resource and rights are valid.



Card
labelRequest


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



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 Ok


Code Block
borderColorRed
langxml
titleJSON
[
    {
        "id": "94a60a79-7c81-454b-8158-ffdb9a2bf4d6",
        "name": "TEST1",
        "customRole": true,
        "resources": [
            {
                "id": "4e587ea1-5098-45cd-9655-15f90c16dc58",
                "resource": "Layer",
                "rights": [
                    "RoomModel"
                ],
                "rightsAccess": [
                    {
                        "id": "52bbc329-dab3-a81c-b548-09c715786a81",
                        "name": "RoomModel",
                        "access": "Edit"
                    }
                ]
            }
        ],
     },
   "projectRightsRolesTemplate": {
            "id": "482176be391fb0fc-84ab43ec-4d8f464c-93e4bd18-2c58863d4eaeb5223b32bd14",
            "name": "DefaultProjectRightsRolesTemplateTEST2",
            "descriptioncustomRole": "Default template for rights and roles"
 true,
        "resources": [
           } {
    },
    {
        "id": "391fb0fc9dae8bb5-43ec77c1-464c47a6-bd18a916-b5223b32bd14d4948583b0b9",
                "nameresource": "TEST2Global",
        "customRole": true,
        "resourcesrights": [
                 {   "AllModels",
                "id": "9dae8bb5-77c1-47a6-a916-d4948583b0b9    "ProjectCreate",
                   "resource": "GlobalAllAttributes",
                "rights": [
  ],
                  "AllModelsrightsAccess",: [
                    "ProjectCreate",{
                    "AllAttributes"
       "id": "cc3416d3-c570-4dc6-aa84-72216d3f58da",
         ],
                "rightsAccessname": ["AllModels",
                    {
    "access": "Edit"
                   "id": "cc3416d3-c570-4dc6-aa84-72216d3f58da" },
                    {
    "name": "AllModels",
                        "access": "Edit"
                      },
                    {
                        "id": "6bbc401b-7cd5-4684-a11d-e2448befb3c1",
                        "name": "ProjectCreate",
                        "access": "Edit"
                    },
                    {
                        "id": "99bad6fc-0539-4848-84af-62b6df31eaa3",
                        "name": "AllAttributes",
                        "access": "Edit"
                    }
                ]
            }
        ],
        "projectRightsRolesTemplate": {
            "id": "482176be-84ab-4d8f-93e4-2c58863d4eae",
            "name": "DefaultProjectRightsRolesTemplate",
            "description": "Default template for rights and roles"
        }
    }
...
]

...

}
...
]



Anchor
getAllRights
getAllRights

Get all the available rights
Deck of Cards
idbimGetAllRights


Card
defaulttrue
labelURL / Resource / JSON Structure

Resource: <team_slug>/rights 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/rights

Examplehttps://api-stage.bimplus.net/v2/best-company/rights

JSON Structure

Name

Mandatory / Optional

Type

Description

id

mandatory

string (guid)

Id of the right resource type

resource

mandatory

string

The name of the right resource type

rights

mandatory

object

Dictionary of the pairs of right id together with its name

access

mandatory

JSON Array

Array of the strings represented access right. Can be combination of predefined rights "View", "Edit", "Admin"


Optional query parameters:
Following query parameters allows reduce set of returned right resource types. By default will be returned all defined right resource types.

Name

Type

Default value

Description

project

boolean

true

When query parameter "project=false" is defined, the API call will returns all right resource types except project right resource type.

global

boolean

true

When query parameter "global=false" is defined, the API call will returns all right resource types except global right resource type.

document

boolean

true

When query parameter "document=false" is defined, the API call will returns all right resource types except document right resource type.

globalfreeattributes

boolean

true

...

Get all the available rights
Deck of Cards
idbimGetAllRights
Optional query parameters:
Following query parameters allows reduce set of returned right resource types. By default will be returned all defined right resource types.
Card
defaulttrue
labelURL / Resource / JSON Structure

Resource: <team_slug>/rights 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/rights

Examplehttps://api-stage.bimplus.net/v2/best-company/rights

JSON Structure

Name

Mandatory / Optional

Type

Description

id

mandatory

string (guid)

Id of the right resource type

resource

mandatory

string

The name of the right resource type

rights

mandatory

object

Dictionary of the pairs of right id together with its name

access

mandatory

JSON Array

Array of the strings represented access right. Can be combination of predefined rights "View", "Edit", "Admin"

When query parameter "project project

Name

Type

Default value

Description

project

boolean

true

When query parameter "globalfreeattributes

=false" is defined, the API call will returns all right resource types except

globalfreeattributes right resource type.global



boolean
Card
label

true

When query parameter "global=false" is defined, the API call will returns all right resource types except global right resource type.

document

boolean

true

When query parameter "document=false" is defined, the API call will returns all right resource types except document right resource type.

globalfreeattributes

boolean

true

When query parameter "globalfreeattributes=false" is defined, the API call will returns all right resource types except globalfreeattributes right resource type.

Card
labelHTTP Method
 GET
Card
labelDescription

 Get all the available rights returns array of right resource types with defined rights.

HTTP Method
 GET


Card
labelDescription

 Get all the available rights returns array of right resource types with defined rights.


Card
labelRequest


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



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 Ok


Code Block
borderColorRed
langxml
titleJSON
[  {
    "id":"4e587ea1173e7a88-509816d9-45cd4d88-965592bf-15f90c16dc58270fff458435",
    "resource":"LayerDocument",
    "rights":{
      "231222ba73ca755b-7495eb41-f4384abf-cf388d72-629cf04823646360f638a34c":"buildingdocumentshare",
      "dd9b9e2cf53dac0d-f4af8ef8-576f48bd-4dda9fa5-9e122ab13d31b49831bcf671":"general objectsdocumentdelete",
      "92f8a3616513c54f-59900531-0cb047e2-b257853d-e13c85f0f7b156a25a226765":"mepdocumentdownloaddenied",
      "0047e2ed820eb26b-33487469-a97b48bd-93d2b10f-a6817cc9cb8e0c69e631c910":"steel designdocumentviewdenied",
      "8095dfcfd7727bed-fbdf38b8-33174a77-b873b61d-a7cbccccb206397fb01f1ad8":"timber designdocumentupdate",
    },
    "f7819a2d-1498-2468-b120-fdefedfccf0baccess":["terrain"Edit"
    ]
  },
  {
    "903fe394-5e84-5c8d-2760-eeadad3baa35id":"cc49128e-9416-4bfc-a695-b17365dc7a5e",
    "resource":"reinforcementProject",
      "44c2ff85-9691-6def-9583-56d8b776c846":"finish","rights":{
      "6719f657815ce797-ea4ada07-30164372-1bda8a59-0c56c7f113d4609f7106ab09":"inventoryproject",
    },
    "52bbc329-dab3-a81c-b548-09c715786a81access":["roomView",
      "4a4da391-b804-b20f-f49a-470bdc68be8f":"structural analysis"Edit",
      "7f27fd11-7992-8fb5-3541-9daa4f8196b2":"opening"Admin"
    ]
  },
  {
    "id":"8ba5ec829dae8bb5-5b9377c1-619247a6-55b0-b7790f4d0007a916-d4948583b0b9",
    "resource":"door/windowGlobal",
    "rights":{
      "5c695e85c64151c5-ea7cecde-7df44e2c-9fb7ba53-eca7aa1f69fdd0390f480461":"precastprojectdelete",
      "85d0b1a96bbc401b-11bb7cd5-6de14684-9cfda11d-54f85ee11da3e2448befb3c1":"bridgeprojectcreate",
      "d726e8d299bad6fc-12c60539-641d4848-b19d84af-37511349dce162b6df31eaa3":"structural loadsallattributes",
      "3517d0e23b3f10c1-981493a6-fc084d15-b3e7a727-59d453940efae38e2fb9b0b2":"connectionalldocuments",
    }  "cc3416d3-c570-4dc6-aa84-72216d3f58da":"allmodels",
    "access  "9351251b-9631-499e-8e23-68ffe70ef3b7":["Viewallprojects",
    },
    "access":["Edit"
    ]
  },
  {
    "id":"173e7a88500766a6-16d92525-4d8845db-92bfb9cd-270fff458435b2a3d8092ba9",
    "resource":"DocumentGlobalFreeAttributes",
    "rights":{
      "73ca755b061a3842-eb419b4d-4abf4d19-8d728651-6360f638a34c2f9373c42842":"documentsharefreeattribute",
      "f53dac0d63b9bfad-8ef8db9f-48bd4bbe-9fa5a902-b49831bcf6717716c440a200":"documentdeleteattributetemplate",
      "6513c54f04f5c272-05313dec-47e24bce-853d85ae-56a25a2267656abb2e936ef8":"documentdownloaddeniedprojectattributetemplate",
      "820eb26b2a0e7bed-74699fbf-48bd46bc-b10f987a-0c69e631c9107a6c5c638f98":"documentviewdeniedfreeattributegroup",
      "d7727bedb886cab2-38b8fcce-4a77-b61dab2d-397fb01f1ad809f704e363b7":"documentupdateteammembership"
    },
    "access":["Edit"
    ]
  }View",
  {
    "id":"cc49128e-9416-4bfc-a695-b17365dc7a5e",Edit"
    "resource":"Project",
    "rights":{
      "815ce797-da07-4372-8a59-609f7106ab09":"project"
    },
    "access":["View",
      "Edit",
      "Admin"
    ]
  },
  {
    "id":"9dae8bb5-77c1-47a6-a916-d4948583b0b9",
    "resource":"Global",
    "rights":{
      "c64151c5-ecde-4e2c-ba53-d0390f480461":"projectdelete",
      "6bbc401b-7cd5-4684-a11d-e2448befb3c1":"projectcreate",
      "99bad6fc-0539-4848-84af-62b6df31eaa3":"allattributes",]
  }
]




Anchor
getRoleDetails
getRoleDetails

Get details of the role
Deck of Cards
idbimGetRoleDetails


Card
defaulttrue
labelURL / Resource / JSON Structure

Resource: <team_slug>/roles/<role_id>

URLhttps://api-stage.bimplus.net/v2/<team_slug>/roles/<role_id>

Examplehttps://api-stage.bimplus.net/v2/bimplus/roles/94a60a79-7c81-454b-8158-ffdb9a2bf4d6


Card
labelHTTP Method
 GET


Card
labelDescription
 Get details of a specified role.


Card
labelRequest


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



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK


Code Block
borderColorRed
langxml
titleJSON
{
  "id" : "94a60a79-7c81-454b-8158-ffdb9a2bf4d6",
  "name":"Test",
  "customRole":true,
  "resources":[{
      "3b3f10c1-93a6-4d15-a727-e38e2fb9b0b2":"alldocumentsid":"4e587ea1-5098-45cd-9655-15f90c16dc58",
      "cc3416d3-c570-4dc6-aa84-72216d3f58daresource":"allmodelsLayer",
      "9351251b-9631-499e-8e23-68ffe70ef3b7rights":["allprojectsRoom"
    }  ],
      "accessrightsAccess":["Edit"{
    ]
  },
  {
    "id":"500766a652bbc329-2525dab3-45dba81c-b9cdb548-b2a3d8092ba909c715786a81",
          "resourcename":"GlobalFreeAttributesRoomModel",
    "rights":{
      "061a3842-9b4d-4d19-8651-2f9373c42842access":"freeattributeEdit",
      "63b9bfad-db9f-4bbe-a902-7716c440a200":"attributetemplate",
      "04f5c272-3dec-4bce-85ae-6abb2e936ef8":"projectattributetemplate",}
      "2a0e7bed-9fbf-46bc-987a-7a6c5c638f98":"freeattributegroup",]
      "b886cab2-fcce-4a77-ab2d-09f704e363b7":"teammembership"
    },
    "access":["View",
      "Edit"
    ]
  }
]

...

}
  ]
}




Anchor
getAllProjectRolesFromRightsAndRolesTemplate
getAllProjectRolesFromRightsAndRolesTemplate

Get all project's roles assigned by right and roles template

...

Deck of Cards
idbimGetRoleDetailsbimGetAllProjectRolesFromRightsAndRolesTemplate


Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: <team_slug>/roles/<roleprojects/<project_id>/roles 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/rolesprojects/<role<project_id>/roles 

Examplehttps://api-stage.bimplus.net/v2/bimplus/rolesprojects/94a60a79b8615afc-7c8199cc-454b4bcd-8158-ffdb9a2bf4d6b0ca-ff0593ce15c6/roles

JSON Structure: The structure of object is the same as in get all available roles.
The rightsandrolestemplate query parameter should not be used, due to it is implicitly set to actual project rights and roles template id.


Card
labelHTTP Method
 GET


Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json

Card
labelDescription
 Get details of a specified role.

Each project has by default assigned free attribute "RightsAndRoles template" which defines rights and roles template.

The API call will returns all project's roles assigned by rights and roles template.

Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders


Card
labelResponseRequest


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK
Code Block
borderColorRed
langxml
titleJSON
{
  "id" : "94a60a79-7c81-454b-8158-ffdb9a2bf4d6",
  "name":"Test",
  "customRole":true,
  "resources":[{
      "id":"4e587ea1-5098-45cd-9655-15f90c16dc58",
      "resource":"Layer",
      "rights":["Room"
      ],
      "rightsAccess":[{
          "id":"52bbc329-dab3-a81c-b548-09c715786a81",
          "name":"RoomModel",
          "access":"Edit"
        }
      ]
    }
  ],
  "projectRightsRolesTemplate":{
    "id":"894072db-e1cb-48f1-a672-999356d66311",
    "name":"CustomProjectRightsRolesTemplate",
    "description":"Custom template for rights and roles"
  }
}

...

Headers
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created


Code Block
borderColorRed
langxml
titleJSON
[
    

...

Get all project's roles assigned by right and roles template
Deck of Cards
idbimGetAllProjectRolesFromRightsAndRolesTemplate
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: projects/<project_id>/roles 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/projects/<project_id>/roles 

Examplehttps://api-stage.bimplus.net/v2/bimplus/projects/b8615afc-99cc-4bcd-b0ca-ff0593ce15c6/roles

JSON Structure: The structure of object is the same as in get all available roles.
The rightsandrolestemplate query parameter should not be used, due to it is implicitly set to actual project rights and roles template id.

Card
labelHTTP Method
 GET
Card
labelDescription

Each project has by default assigned free attribute "RightsAndRoles template" which defines rights and roles template.

The API call will returns all project's roles assigned by rights and roles template.

Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created
Code Block
borderColorRed
langxml
titleJSON
[
    {
        "id": "94a60a79-7c81-454b-8158-ffdb9a2bf4d6",
        "name": "TEST1",
        "customRole": true,
        "resources": [
            {
                "id": "4e587ea1-5098-45cd-9655-15f90c16dc58",
                "resource": "Layer",
                "rights": [
                    "RoomModel"
                ],
                "rightsAccess": [
                    {
                        "id": "52bbc32994a60a79-dab37c81-a81c454b-b5488158-09c715786a81ffdb9a2bf4d6",
        "name": "TEST1",
        "customRole": true,
        "nameresources": "RoomModel",[
            {
                "accessid": "Edit"4e587ea1-5098-45cd-9655-15f90c16dc58",
                "resource": "Layer",
   }
                ]"rights": [
            }
        ],
     "RoomModel"
   "projectRightsRolesTemplate": {
            "id": "482176be-84ab-4d8f-93e4-2c58863d4eae" ],
                "namerightsAccess": "DefaultProjectRightsRolesTemplate",[
            "description": "Default template for rights and roles"        {
        }
    },
    {
        "id": "391fb0fc52bbc329-43ecdab3-464ca81c-bd18b548-b5223b32bd1409c715786a81",
                        "name": "TEST2RoomModel",
                  "customRole      "access": true,"Edit"
         "resources": [
          }
  {
              ]
  "id": "9dae8bb5-77c1-47a6-a916-d4948583b0b9",
         }
       "resource": "Global", ]
    },
    {
        "rightsid": ["391fb0fc-43ec-464c-bd18-b5223b32bd14",
            "name": "TEST2",
        "AllModelscustomRole": true,
        "resources": [
            "ProjectCreate",{
                    "AllAttributes""id": "9dae8bb5-77c1-47a6-a916-d4948583b0b9",
                ] "resource": "Global",
                "rightsAccessrights": [
                    {"AllModels",
                        "id": "cc3416d3-c570-4dc6-aa84-72216d3f58da",
  "ProjectCreate",
                      "name": "AllModels",
           AllAttributes"
             "access": "Edit"
   ],
                 },"rightsAccess": [
                    {
                        "id": "6bbc401bcc3416d3-7cd5c570-46844dc6-a11daa84-e2448befb3c172216d3f58da",
                        "name": "ProjectCreateAllModels",
                        "access": "Edit"
                    },
                    {
                        "id": "99bad6fc6bbc401b-05397cd5-48484684-84afa11d-62b6df31eaa3e2448befb3c1",
                        "name": "AllAttributesProjectCreate",
                        "access": "Edit"
                    },
                    {
                        "id": "99bad6fc-0539-4848-84af-62b6df31eaa3",
     }
                ]
   "name": "AllAttributes",
        }
        ],
        "projectRightsRolesTemplateaccess": {
"Edit"
                "id": "482176be-84ab-4d8f-93e4-2c58863d4eae",
   }
         "name": "DefaultProjectRightsRolesTemplate",
      ]
      "description": "Default template for rights and roles"}
        }]
    }
...
]



Anchor
assignProjectRole
assignProjectRole

...