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)



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": "94a60a79a298b28d-7c819711-454b4a76-81589a7d-ffdb9a2bf4d6910cbf144ee5",
        		"name": "TEST1Project_Admin",
		"type":        "Project",
		"rank": 3,
		"customRole": true,
        		"resources": [{
            {
                "id": "4e587ea1-5098-45cd-9655-15f90c16dc58",
                				"id": "cc49128e-9416-4bfc-a695-b17365dc7a5e",
				"resource": "LayerProject",
                				"rights": [
                    "RoomModel"
                ],
                					"ProjectAdmin"
				],
				"rightsAccess": [{
                    {
                        "id": "52bbc329-dab3-a81c-b548-09c715786a81",
                        						"id": "815ce797-da07-4372-8a59-609f7106ab09",
						"name": "RoomModelProject",
                        						"access": "Edit"
                    }
                ]
            }
        ]
    },
    {
        Admin"
					}
				]
			}
		]
	}, {
		"id": "391fb0fca618d075-43ec7e4a-464c4bde-bd189d58-b5223b32bd14d2979696fa96",
        		"name": "TEST2Project_Viewer",
        "customRole		"type": true"Project",
		"rank":        1,
		"customRole": true,
		"resources": [
            {
                {
				"id": "9dae8bb5cc49128e-77c19416-47a64bfc-a916a695-d4948583b0b9b17365dc7a5e",
                				"resource": "GlobalProject",
                				"rights": [
                    "AllModels",
                    "ProjectCreate",
                    "AllAttributes"
                ],
                "rightsAccess": [
                    {
                        "id": "cc3416d3-c570-4dc6-aa84-72216d3f58da",
                        "name": "AllModels",
                        "access": "Edit"
                    },
                    {
                        "id": "6bbc401b-7cd5-4684-a11d-e2448befb3c1",
                        "name": "ProjectCreate",
                        "access": "Edit"
                    },
                    {
                        					"ProjectView"
				],
				"rightsAccess": [{
						"id": "99bad6fc815ce797-0539da07-48484372-84af8a59-62b6df31eaa3609f7106ab09",
                        						"name": "AllAttributesProject",
                        						"access": "Edit"
                    }
                ]
            }
        ]
    View"
					}
				]
			}
		]
	}
...
]



Anchor
getAllRights
getAllRights

...