Versions Compared

Key

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

...

Assign a project element(s) into existing hierarchy structure
Deck of Cards
idbimcreateStructurebimAssignProjectElements
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: projects/<project_id>/structures/<structure_id>/attributeassign 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/projects/<project_id>/structures/<structure_id>/attributeassign

Example:https://api-stage.bimplus.net/v2/bimplus/projects/f1ee5e9a-c7c9-40bc-8871-5d13a99d5794/structures/b7d583e2-a3a6-4e11-b324-401f8723840e/attributeassign

JSON Structure

Name

Mandatory / Optional

Type

Description

attributeIdmandatorystring(guid)

Free attribute Id.

variantTypeoptionalstring(guid)Variant Type Id to whom the object will be assigned.


Card
labelHTTP Method
 PUT
Card
labelDescription

Assign a project element(s) into existing hierarchy structure according attribute value of element
(i.e. structure hierarchy description is identical to free attribute value) 

Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
langxml
titleJSON
{
   "attributeId": "8ef4d2fd-8959-4aa1-8da9-3e238b1c7705",
   "variantType": "d120adc6-8382-4a0c-9638-a0d246590ed3"
}
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
  Status: 201 Created
          Function ended OK and minimal one project element was assigned to structure node

 
  Status: 204 NoContent
          Function ended OK, but no project element was assigned to structure node (i.e. no project element with requested free attribute was found)
Code Block
borderColorRed
langxml
titleJSON
{
  "structuretypeid": "512b5bcd-619d-4ef5-9644-7fe5d783b73a",
  "children": [
    {
      "structuretypeid": "512b5bcd-619d-4ef5-9644-7fe5d783b73a",
      "children": [],
      "elements": [
        {
          "structureId": "f0ebc65f-6ddc-4fa3-8f02-2911665adee4",
          "objectId": "72bd0a48-f0e8-4385-9d95-f242d42deb60",
          "name": "Basic Wall:Standard 20.0:491928",
          "nr": 0,
          "id": "23ee744f-0cca-4e39-adcd-e91396ad10ea"
        },
        {
          "structureId": "f0ebc65f-6ddc-4fa3-8f02-2911665adee4",
          "objectId": "228b0d93-f3fd-433a-9242-c4dbfe806b53",
          "name": "Basic Wall:Standard 20.0:491025",
          "nr": 0,
          "id": "c2586c7a-5b61-456a-ba84-c27ffe0976d6"
        }
      ],
      "parentId": "653afdf7-7cfb-42e5-a9b5-e99275ce5cf4",
      "name": "Subnode3",
      "description": "TestStrukturyPreAtributy1",
      "type": "FreeAttrTestStructure",
      "nr": 4,
      "color": 0,
      "disableElementAssignment": false,
      "id": "f0ebc65f-6ddc-4fa3-8f02-2911665adee4"
    }
  ],
  "elements": [],
  "projectId": "3904db18-cf1a-4665-9c2b-152b84293259",
  "name": "FreeAttrStructure",
  "description": "MainNode",
  "type": "FreeAttrTestStructure",
  "nr": 1,
  "color": 0,
  "disableElementAssignment": false,
  "id": "653afdf7-7cfb-42e5-a9b5-e99275ce5cf4"
}

...