Versions Compared

Key

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

...

Deck of Cards
idbimCreateTeamTemplate
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: attributetemplates

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

Example: https://api-stage.bimplus.net/v2/bimplus/attributetemplates

JSON Structure

Name

Mandatory / Optional

Type

Description

name

mandatory

string

Name of the attribute template

description

optional

string

Short description of the attribute template

freeattributesoptionalJSON Array

List of free attributes directly under this template ( in create, only IDs of those attributes are required )

The List defines also automatically the orderNumber of the attributes inside of the template

elementtypesmandatoryJSON ArrayList of element type ids to which the template will be assigned. At least one element type is mandatory.
groupsoptionalJSON ArraySub-groups of attributes
createdwill be ignoredstring ( Date )Creation date
createdBywill be ignoredJSON ( User )User who created the template
changedwill be ignoredstring ( Date )Date of last modification
changedBywill be ignoredJSON ( User )User who did the modification
orderNumberoptionalintegerwill be used for ordering current attribute template to existing templates
0 -> this template will be added at the end of all templates.
1...n -> this template will be added at a fixed position; all other templates will be reordered automatically

 

The property "groups" has following JSON structure:

NameMandatory / OptionalTypeDescription
namemandatorystringName of the group
descriptionoptionalstringGroup description
freeattributesoptionalJson ArrayList of free attributes directly under this group ( in create, only IDs of those attributes are required )
groupsoptionalJson ArrayList of subgroups of this group.
Card
labelHTTP Method
 POST
Card
labelDescription

Creates a new attribute template using free attributes & element types. For both free attributes and element types, it is enough to specify just their IDs in the request, the rest of the data will be loaded automatically from the database, and returned in the response.

Free attributes may be directly under the template, or you could use the "groups" property to create a logical hierarchy of attributes in groups.

Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
langxml
titleJSON
{
  "name": "My attribute template",
  "description": "Attribute template for Walls",
  "elementtypes": [
    {
      "id": "10074EEF-9418-4D64-9C6D-23932835A7F1"
    }
  ],
  "groups": [
    {
      "name": "Group 1",
      "description": "One of the top groups",
      "freeattributes": [
        {
          "id": "06124729-2778-4c16-98d1-9d89e760b195"
        }
      ]
    },
    {
      "name": "Group 2",
      "groups": [
        {
          "name": "SubGroup 3",
          "description": "Some sub group",
          "freeattributes": [
            {
              "id": "665b0658-e64f-4ce2-91b2-c5d152b177d5"
            }
          ]
        }
      ]
    }
  ]
}
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created
Code Block
borderColorRed
langxml
titleJSON
{
  "name": "My attribute template",
  "description": "Attribute template for Walls",
  "elementtypes": [
    {
      "type": "Wall",
      "category": "/1/10/1/",
      "name": "ID_ArchWall",
      "ifcType": "ID_IFCWallStandardCase",
      "id": "10074eef-9418-4d64-9c6d-23932835a7f1"
    }
  ],
  "groups": [
    {
      "id": "960005e0-c24b-44c1-a4e7-cc2d7316c1f3",
      "name": "Group 1",
      "description": "One of the top groups",
      "freeattributes": [
        {
          "type": "string",
          "decimal": 0,
          "changeable": 0,
          "id": "06124729-2778-4c16-98d1-9d89e760b195",
          "name": "FireRating",
          "description": ""
        }
      ]
    },
    {
      "id": "0f2ff22f-070d-4bbd-a67d-d2f47f1737ee",
      "name": "Group 2",
      "groups": [
        {
          "id": "e3a56ecd-3c75-40d3-8de7-fdaa1ba2eb4f",
          "name": "SubGroup 3",
          "description": "Some sub group",
          "freeattributes": [
            {
              "type": "int",
              "decimal": 0,
              "changeable": 0,
              "id": "665b0658-e64f-4ce2-91b2-c5d152b177d5",
              "name": "LoadBearing",
              "description": ""
            }
          ]
        }
      ]
    }
  ],
  "created": "2016-02-12T07:21:33.43",
  "createdby": {
    "id": "7c555899-5a5f-44d1-930e-284930678bed",
    "email": "test@nemetschek.com"
  },
  "id": "49d13da3-2acf-4f0b-b667-40fc0197585f"
}

...