Versions Compared

Key

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

...

Deck of Cards
idbimCreateBimFreeAttribute
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: content/freeattributes

URLhttps://api-stage.bimplus.net/v2/content/freeattributes

Example: https://api-stage.bimplus.net/v2/content/freeattributes

JSON Structure

Name

Mandatory / Optional

Type

Description

name

mandatory

string

Name of the attribute

description

optional

string

Short description of the attribute

type

mandatory

string

Type of free attributes. It could be one of the following: "int", "double", "string", "guid", "datetime", "binary", "boolean"
minvalueoptionalstring(numbers)Minimum value constraint of the attribute
maxvalueoptionalstring(numbers)Maximum value constraint of the attribute
defaultvalueoptionalstring(numbers)Default value of the attribute (if it's value is not specified)
decimaloptionalintNumber of decimals
unitidoptionalstring(guid)Id of the unit
optionalsymboloptionalstring(symbol)Optional symbol
visibleoptionalint0 or 1. It determines whether the attribute should be visible
changeableoptionalint0 or 1. It determines whether the attribute should be chnageable
controltypeoptionalstringThe control type (eg: "textbox"Checkbox", "Datepicker", "TextBox", "Enumeration", "Combobox")
enumDefinitionoptionalstring

Mandatory for controltype "Enumeration"

List of items - pair of key,value separated with ";" (Separator of key and value is "|" )

 (eg: "0|Undefined;1|Extension;2|Finish;3|New building;4|Reconstruction;5|Building alteration")

Mandatory for controltype "Combobox"

List of items - values separated with "|"

 (eg: "Undefined|Extension|Finish|New building|Reconstruction|Building alteration")

symbolwill be ignoredstringSymbol of the unit
parentoptionalstring(guid)Id of the attribute group. If not specified, then the created attribute is a stand-alone one.
Card
labelHTTP Method
 POST
Card
labelDescription
 Creates a new custom attribute. The created attribute could be either stand-alone ( parent not specified ), or part of the custom attribute group (the id of the parent has to be specified)
Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
langxml
titleJSON
{
 "name": "NewFreeAttribute",
 "description": "Test attribute",
 "type": "int",
 "minvalue" : "1",
 "maxvalue" : "1000",
 "defaultvalue" : "1",
 "decimal" : "0",
 "attribunitnameid" : "F99F40CF-DA64-4C4F-8434-CB90722BA485",
 "optionalsymbol" : "$",
 "visible" : "1",
 "changeable" : "1",
 "controltype" : "textbox",
 "parent" : "6e57160e-5d5d-46a4-b4d3-b9e46d03ee75"
}
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created
Code Block
borderColorRed
langxml
titleJSON
{
  "freeattribtype": "int",
  "minvalue": "1",
  "maxvalue": "1000",
  "defaultvalue": "1",
  "decimal": 0,
  "attribunitnameid": "f99f40cf-da64-4c4f-8434-cb90722ba485", --> unitId (we already know it is attribute)
  "symbol": "mm",
  "optionalsymbol": "$",
  "visible": 1,
  "changeable": 1,
  "controltype": "textbox", --> The client should decide
  "id": "d6cac39a-4b6e-473f-813f-87f7fb92d3fe",
  "name": "NewFreeAttribute",
  "description": "Test attribute",
  "parent" : "6e57160e-5d5d-46a4-b4d3-b9e46d03ee75"
}

...