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

Compare with Current View Page History

« Previous Version 7 Next »

Model Service


 

Model Service


A Model is basically a technical building plan which could be created or imported. 

Create a new model
    Resource: divisions 

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

    Examplehttps://api-stage.bimplus.net/v2/bimplus/projects/743a24f9-baaa-41b9-90b3-91717238043c/divisions

    JSON Structure

    Name

    Mandatory / Optional

    Type

    Description

    name

    mandatory

    string

    Name of the model

    description

    optional

    string

    Short description of the model

    projectId

    will be ignored

    string (guid)

    Id of the project to which the model belongs

    topologyId optional string (guid) Id of the topology to which the model belongs
    disciplines optional object The discipline list of the model
    status will be ignored string(enum)

    The status of the imported file. It could be one of the following

    • PREPARING (Uploading the file)
    • PENDING (Waiting in the queue after upload to be processed)
    • PROCESSING (Processing)
    • DONE (Processed)
    • DONE_REFRESHED (Processed & sent the notification)
    • FAILED
    • UNKNOWN
     POST
     Creates a new model.
    Headers
    Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
    Content-Type: application/json
    
    JSON
    {
     "name":"Model D", 
     "description":"Creating a model via API"
    }
    Status
    Status: 201 Created
    
    JSON
    {
        "name": "Model D",
        "description": "Creating a model via API",
        "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
        "topologyId": "0fb09e03-20fc-42d9-a60b-254803950519",
        "disciplines": [
            "0f106af0-a919-44c5-b211-15bd5ef620b6",
            "33826b01-c267-4b25-9f8e-79ac2953c443",
            "30114b52-bc05-47c1-80b5-c7d5485d5840",
            "09e623d4-1e12-4a77-b358-ea1d0b28e4a7"
        ],
        "url": "/bimplus/divisions/2e0ca9e9-dd11-48d0-bd31-5a65225fe28a/download",
        "fileType": "Ifc",
        "inputType": "UNKNOWN",
        "created": "2015-11-06T09:34:45",
        "createdby": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com"
        },
        "changed": "2015-11-06T09:39:04",
        "changedby": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com"
        },
        "size": 7216128,
        "sizeMB": "6,88",
        "importFileName": "SMC Building.ifc",
        "status": "DONE_REFRESHED",
        "id": "2e0ca9e9-dd11-48d0-bd31-5a65225fe28a"
    }

    Get the logged in user's model list
       GET
       Gets the list of existing models that belong to the logged in user.
      Headers
      Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
      Content-Type: application/json
      
      Status
      Status: 200 OK
      
      JSON
      [
          {
              "name": "Model A - Vogel",
              "description": null,
              "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
              "topologyId": "fc4be8b1-bf85-4c6f-b9c2-bac6474ddb1d",
              "id": "d81494b9-9731-4d2e-8fbe-da62f5270182"
          },
          {
              "name": "Model B - house sketchup",
              "description": null,
              "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
              "topologyId": "2d20d707-9c18-44c0-92f4-282948cd5cf5",
              "id": "deec1913-2c6e-4580-a40f-7e1ad33a6300"
          },
          {
              "name": "Model C - Nemetschek",
              "description": null,
              "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
              "topologyId": "d762b01d-6e63-4c68-9192-fc62faccbe87",
              "id": "e687b45b-d90d-4361-94ab-baf269588c0a"
          }
      ]

      Get the list of existing models inside a project
         GET
         Gets the list of existing models inside a project.
        Headers
        Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
        Content-Type: application/json
        
        Status
        Status: 200 OK
        
        JSON
        [
            {
                "name": "Model A - Vogel",
                "description": null,
                "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
                "topologyId": "fc4be8b1-bf85-4c6f-b9c2-bac6474ddb1d",
                "id": "d81494b9-9731-4d2e-8fbe-da62f5270182"
            },
            {
                "name": "Model B - house sketchup",
                "description": null,
                "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
                "topologyId": "2d20d707-9c18-44c0-92f4-282948cd5cf5",
                "id": "deec1913-2c6e-4580-a40f-7e1ad33a6300"
            },
            {
                "name": "Model C - Nemetschek",
                "description": null,
                "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
                "topologyId": "d762b01d-6e63-4c68-9192-fc62faccbe87",
                "id": "e687b45b-d90d-4361-94ab-baf269588c0a"
            }
        ]

        Get the model details
          Resource: divisions/<division_id>

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

          Examplehttps://api-stage.bimplus.net/v2/bimplus-gmbh/divisions/e687b45b-d90d-4361-94ab-baf269588c0a

           GET
           Get all the details of a model using its id.
          Headers
          Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
          Content-Type: application/json
          
          Status
          Status: 200 OK
          
          JSON
          {
              "name": "Model C - Nemetschek",
              "description": null,
              "projectId": "743a24f9-baaa-41b9-90b3-91717238043c",
              "topologyId": "d762b01d-6e63-4c68-9192-fc62faccbe87",
              "disciplines": [
                  "0f106af0-a919-44c5-b211-15bd5ef620b6",
                  "09e623d4-1e12-4a77-b358-ea1d0b28e4a7"
              ],
              "id": "e687b45b-d90d-4361-94ab-baf269588c0a"
          }

          Get the list of discipines from the model
             Resource: divisions/<division_id>/disciplines

            URLhttps://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/disciplines

            Examplehttps://api-stage.bimplus.net/v2/bimplus-gmbh/divisions/e687b45b-d90d-4361-94ab-baf269588c0a/disciplines

             GET
             Get all the details of a model using its id.
            Headers
            Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
            Content-Type: application/json
            
            Status
            Status: 200 OK
            
            JSON
            [
                {
                    "category": "/1/",
                    "name": "ID_BuildingModel",
                    "ifcType": null,
                    "id": "0f106af0-a919-44c5-b211-15bd5ef620b6"
                },
                {
                    "category": "/2/",
                    "name": "ID_RoomModel",
                    "ifcType": null,
                    "id": "09e623d4-1e12-4a77-b358-ea1d0b28e4a7"
                }
            ]

            Update the model
              Resource: divisions/<division_id>

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

              Examplehttps://api-stage.bimplus.net/v2/bimplus-gmbh/divisions/e687b45b-d90d-4361-94ab-baf269588c0a

              JSON Structure

              Name

              Mandatory / Optional

              Type

              Description

              name

              mandatory

              string

              Name of the model

              description

              optional

              string

              Short description of the model

              projectId

              optional

              string (guid)

              Id of the project to which the model belongs

              topologyId optional string (guid) Id of the topology to which the model belongs
              disciplines optional object The discipline list of the model
               PUT
               Update or replace a specified existing model with a new one.
              Headers
              Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
              Content-Type: application/json
              
              JSON
              {
               "name":"Model D", 
               "description":"Updating the model D"
              }
              Status
              Status: 200 OK
              

              Download the model
                Resource: divisions 

                URLhttps://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/download OR https://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/download?api-token=token (If the client cannot use the token in the header request)

                Examplehttps://api-stage.bimplus.net/v2/bimplus-gmbh/divisions/743a24f9-baaa-41b9-90b3-91717238043c/download OR https://api-stage.bimplus.net/v2/bimplus-gmbh/divisions/743a24f9-baaa-41b9-90b3-91717238043c/download?api-token=9c1874a62c974dcfa75e0132c423a088

                 GET
                 Download the already uploaded model. There also exists a POST method for downloading the model where you have to pass the "token" as a form parameter.
                Headers
                Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
                Content-Type: application/json
                
                Status
                Status: 200 OK
                
                JSON
                {
                    "name": "Model A",
                    "description": null,
                    "projectId": "481338c4-81f2-45bc-864a-bcd048a13a4c",
                    "topologyId": "149e81c4-5270-4b44-b25b-c65fa88a7f14",
                    "disciplines": [
                        "0f106af0-a919-44c5-b211-15bd5ef620b6",
                        "09e623d4-1e12-4a77-b358-ea1d0b28e4a7"
                    ],
                    "ifcFile": "/bimplus-gmbh/divisions/e45412f8-cd22-4c7e-a5f8-410de55824e2/download",
                    "id": "e45412f8-cd22-4c7e-a5f8-410de55824e2"
                }

                Delete the model
                  Resource: divisions/<division_id> 

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

                  Examplehttps://api-stage.bimplus.net/v2/bimplus-gmbh/divisions/e687b45b-d90d-4361-94ab-baf269588c0a

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