Versions Compared

Key

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

...

Deck of Cards
idbimCreateNewRole


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/bimplus/roles

JSON Structure

Name

Mandatory / Optional

Type

Description

id

optional

string (guid)

Id of the role

name

mandatory

string

The name of the role

parent

optional

string (guid)

The Id of the parent role

customRole

optional

boolean

When this flag is true the role is custom role otherwise will role is 'built in' role

resources

optional

JSON Array

Array of the right resource type definition objects for which the role is valid

projectRightsRolesTemplatemandatoryJSON objectThe object contains id of rights and roles template guid.

JSON Structure of the right resource type definition object

Name

Mandatory / Optional

Type

Description

idoptionalstring(Guid)Id of the right resource type

resource

mandatory

string

Describe kind of right resource type e.g. Global" or "Layer", etc.

rights

mandatory

JSON Array

Array of the strings with right names e.g.: "FreeAttributeView", "RoomModel"

rightsAccessmandatoryJSON Array

Array of the objects with properties id, name, access :

  • id is string (Guid) represent id of right
  • name is string representing name of right e.g. "RoomModel",
  • access is string representing access right of the right e.g. "View"



Card
labelHTTP Method
 POST


Card
labelDescription
 Creates a new role with defined properties and resources to be valid for.


Card
labelRequest


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


Code Block
borderColorRed
langxml
titleJSON
{
  "name":"Test",
  "customRole":true,
  "resources":[{
      "id":"4e587ea1-5098-45cd-9655-15f90c16dc58",
      "resource":"Layer",
      "rights":["RoomModelRoom"
      ],
      "rightsAccess":[{
          "id":"52bbc329-dab3-a81c-b548-09c715786a81",
          "name":"RoomModel",
          "access":"Edit"
        }
      ]
    }
  ],
  "projectRightsRolesTemplate":{
    "id":"894072db-e1cb-48f1-a672-999356d66311"
  }
}



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created


Code Block
borderColorRed
langxml
titleJSON
{
  "name":"Test",
  "customRole":true,
  "resources":[{
      "id":"4e587ea1-5098-45cd-9655-15f90c16dc58",
      "resource":"Layer",
      "rights":["RoomModelRoom"
      ],
      "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"
  }
}



Anchor
getRoleDetails
getRoleDetails

...