You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Structure Service


Structure Service


A hierarchical tree structure(eg: cost structure) could be added and later retrieved from a project/object using the Structure service

 

Create a new structure in a project
    Resource: projects/<project_id>/structures 

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

    Example:https://api-stage.bimplus.net/v2/bimplus/projects/622272da-f1ff-45ab-a3f0-c8f1255c80e8/structures

    JSON Structure

    Name

    Mandatory / Optional

    Type

    Description

    parentId

    mandatory

    string(guid)

    Parent node id of the structure (for the first structure, projectId is the parentId)

    name

    mandatory

    string

    Name of the structure

    description

    optional

    string

    Description of the structure

    type optional string Type of the structure (eg: costStructure, specificationStructure)
    nr will be ignored integer The index of the structure
    color optional integer Color of the structure
    id will be ignored string(guid) Unique guid of the structure


     POST
     Create a new structure(eg: cost structure, specification structure) under a project
    Headers
    Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
    Content-Type: application/json
    
    JSON
    {
        "name": "TestStructure",
        "description": "FullLifeCycleTest",
        "type": "CostStructure"
    }
    Status
    Status: 201 Created
    
    JSON
    {
        "parentId": "622272da-f1ff-45ab-a3f0-c8f1255c80e8",
        "name": "TestStructure",
        "description": "FullLifeCycleTest",
        "type": "CostStructure",
        "nr": 1,
        "color": 0,
        "id": "179439d6-df16-41cc-bd2c-74d05b7995d5"
    }

    Get the structure details
      Resource: structures/<structure_id> 

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

      Example:https://api-stage.bimplus.net/v2/bimplus/structures/179439d6-df16-41cc-bd2c-74d05b7995d5

       GET
       Get details of a specified structure.
      Headers
      Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
      Content-Type: application/json
      
      Status
      Status: 200 OK
      
      JSON
      {
          "name": "TestStructure",
          "description": "FullLifeCycleTest",
          "type": "CostStructure",
          "nr": 1,
          "color": 0,
          "id": "179439d6-df16-41cc-bd2c-74d05b7995d5"
      }

      Create a sub-node under the structure
        Resource: structures/<structure_id> 

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

        Example:https://api-stage.bimplus.net/v2/bimplus/structures/179439d6-df16-41cc-bd2c-74d05b7995d5

        JSON Structure

        Name

        Mandatory / Optional

        Type

        Description

        parentId

        mandatory

        string(guid)

        Parent node id of the structure (the id specified in the resource url)

        name

        mandatory

        string

        Name of the structure

        description

        optional

        string

        Description of the structure

        type optional string Type of the structure (eg: costStructure, specificationStructure)
        nr will be ignored integer The index of the structure
        color optional integer Color of the structure
        id will be ignored string(guid) Unique guid of the structure


         POST
         Create a sub-node under a particular structure
        Headers
        Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
        Content-Type: application/json
        
        JSON
        {
          "name": "Node 1"
        }
        Status
        Status: 201 Created
        
        JSON
        {
            "parentId": "179439d6-df16-41cc-bd2c-74d05b7995d5",
            "name": "Node 1",
            "type": "TopologyStructure",
            "nr": 1,
            "color": 0,
            "id": "adf506ae-3628-4501-9af1-22bcf27e4ab4"
        }

        Get the structure topology
          Resource: structures/<structure_id>/topology 

          URLhttps://api-stage.bimplus.net/v2/<team_slug>/structures/<structure_id>/topology

          Example:https://api-stage.bimplus.net/v2/bimplus/structures/179439d6-df16-41cc-bd2c-74d05b7995d5/topology

           GET
           Get details of a specified structure.
          Headers
          Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
          Content-Type: application/json
          
          Status
          Status: 200 OK
          
          JSON
          {
              "parent": null,
              "name": "TestStructure",
              "type": "Structure",
              "children": [
                  {
                      "parent": "179439d6-df16-41cc-bd2c-74d05b7995d5",
                      "name": "Node 1",
                      "type": "Structure",
                      "children": [],
                      "id": "adf506ae-3628-4501-9af1-22bcf27e4ab4"
                  }
              ],
              "id": "179439d6-df16-41cc-bd2c-74d05b7995d5"
          }

          Assign an object to the latest/last structure node
            Resource: structures/<structure_id>/assign/<object_id> 

            URLhttps://api-stage.bimplus.net/v2/<team_slug>/structures/<structure_id>/assign/<object_id> 

            Example:https://api-stage.bimplus.net/v2/bimplus/structures/179439d6-df16-41cc-bd2c-74d05b7995d5/assign/df4a81d6-42fb-4187-bbce-82a2fc093b2f

            JSON Structure

            Name

            Mandatory / Optional

            Type

            Description

            structureId

            will be ignored

            string(guid)

            The id of the last node to which an object will be assigned

            objectId

            will be ignored

            string(guid)

            The id of the object to whom a structure will be assigned

            name

            mandatory

            string

            The name of the structure-object connection

            nr will be ignored integer The index of the structure-object connection
            id will be ignored string(guid) Unique guid of the structure-object connection


             POST
             Assign an object to the latest/last structure node
            Headers
            Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
            Content-Type: application/json
            
            JSON
            {
              "name": "WallConnection"
            }
            Status
            Status: 201 Created
            
            JSON
            {
                "structureId": "adf506ae-3628-4501-9af1-22bcf27e4ab4",
                "objectId": "df4a81d6-42fb-4187-bbce-82a2fc093b2f",
                "name": "WallConnection",
                "nr": 1,
                "id": "35b986c2-e9cd-482e-9281-6000671a49f0"
            }

            Update the structure
              Resource: structures/<structure_id>

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

              Example:https://api-stage.bimplus.net/v2/bimplus/structures/179439d6-df16-41cc-bd2c-74d05b7995d5

              JSON Structure

              Name

              Mandatory / Optional

              Type

              Description

              parentId

              optional

              string(guid)

              Parent node id of the structure (for the first structure, projectId is the parentId)

              name

              optional

              string

              Name of the structure

              description

              optional

              string

              Description of the structure

              type optional string Type of the structure (eg: costStructure, specificationStructure)
              nr optional integer The index of the structure
              color optional integer Color of the structure
              id will be ignored string(guid) Unique guid of the structure
               PUT
               Update the specified structure
              Headers
              Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
              Content-Type: application/json
              
              JSON
              {
                "name": "Updated Structure"
              }
              Status
              Status: 200 OK
              
              JSON
              {
                  "parentId": "622272da-f1ff-45ab-a3f0-c8f1255c80e8",
                  "name": "Updated Structure",
                  "description": "FullLifeCycleTest",
                  "type": "CostStructure",
                  "nr": 1,
                  "color": 0,
                  "id": "179439d6-df16-41cc-bd2c-74d05b7995d5"
              }

              Delete the structure

                Resource: structures/<structure_id> 

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

                Example:https://api-stage.bimplus.net/v2/bimplus/structures/db540336-47a3-426e-b3bf-1e532bfac8ea

                 DELETE
                 Deletes a specified structure.
                Headers
                Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
                Content-Type: application/json
                
                Status
                Status: 200 OK
                
                • No labels