bimsync REST API v1.0

bimsync API is available from the api.bimsync.com domain. All API access is over HTTPS. Data is sent as query parameters and received as JSON.

Registration

Contact bimsync support to register your app.

Authentication

Authentication is based on the OAuth 2.0 Protocol.

GET /oauth/authorize

1. Obtain an authorization code

Open a browser window or redirect the user to this resource.

Redirects back to the specified redirect URI with the provided state as a query parameter or either...

  • ...an authorization code as a query parameter if the user allows your app to access the account.
  • ...the value "access_denied" in the error query parameter if the user denies access.

Resource URL

https://api.bimsync.com/1.0/oauth/authorize

Parameters

client_id string The client ID you received from bimsync when you registered your app.
redirect_uri string The URL where the response is sent. Must match the registered callback URL.
state string Any state which may be useful for you application. The state is returned by the response.
response_type string The value code

POST /oauth/access_token

2. Obtain an access token

After you have received the authorization code you can request an access token. The access token will be returned as JSON in the response body.

The access token is an arbitrary string, guarantied to fit in a varchar(255) field.

When requesting other resources the access token must be passed via the Authorization header using the Bearer scheme (e.g. Authorization: Bearer T9UNRV4sC9vr7ga).

Resource URL

https://api.bimsync.com/1.0/oauth/access_token

Parameters

Key value pairs encoded using the "application/x-www-form-urlencoded" content type.

client_id string The client ID you received from bimsync when you registered your app.
client_secret string The client secret you received from bimsync when you registered your app.
code string The code received as response to /oauth/authorize.
grant_type string The value authorization_code

Resources

GET /projects

Returns a collection of all projects the authenticated user has access to.

Resource URL

https://api.bimsync.com/1.0/projects

Example

Request

GET https://api.bimsync.com/1.0/projects

Response

[
   {
       "name": "Example project 1",
       "id": "9a1e6b9a668740b88b076a08fcca2b53"
   },
   {
       "name": "Example project 2",
       "id": "4950fb76d0bd4b98b3a7c2152bd62b79"
   }
]

POST /projects/new

Creates a new project. Returns the new project if successful.

Resource URL

https://api.bimsync.com/1.0/projects/new

Parameters

JSON encoded body using the "application/x-www-form-urlencoded" content type.

name string The project name

Example

Request

POST https://api.bimsync.com/1.0/projects/new

{
    "name": "Example project 3"
}

Response

{
   "name": "Example project 3",
   "id": "dabc6dfce6e849bfada976d9fa9e294a"
}

GET /project

Returns the project specified by the project_id parameter.

Resource URL

https://api.bimsync.com/1.0/project

Parameters

project_id string The ID of the project

Example

Request

GET https://api.bimsync.com/1.0/project?project_id=dabc6dfce6e849bfada976d9fa9e294a

Response

{
   "name": "Example project 3",
   "id": "dabc6dfce6e849bfada976d9fa9e294a"
}

PUT /project

Updates the project specified by the project_id parameter.

Resource URL

https://api.bimsync.com/1.0/project

Parameters

Query parameters.

project_id string The ID of the model

JSON encoded body using the "application/x-www-form-urlencoded" content type.

name string The project name

Example

Request

PUT https://api.bimsync.com/1.0/project?project_id=dabc6dfce6e849bfada976d9fa9e294a

{
    "name": "New name"
}

Response

{
   "name": "New name",
   "id": "dabc6dfce6e849bfada976d9fa9e294a"
}

DELETE /project

Deletes the project specified by the project_id parameter.

Resource URL

https://api.bimsync.com/1.0/project

Parameters

project_id string The ID of the project

Example

Request

DELETE https://api.bimsync.com/1.0/project?project_id=dabc6dfce6e849bfada976d9fa9e294a

GET /project/products

Returns all products from the current set of revisions in a project. The object ID is unique for the revision's instance of a product.

Resource URL

https://api.bimsync.com/1.0/project/products

Parameters

project_id string The ID of the project
page integer 1-based page number. Returns first page if omitted
per_page integer Number of items per page. Default is 100 and the maximum value is 1000.

Example

Request

GET https://api.bimsync.com/1.0/project/products?project_id=dabc6dfce6e849bfada976d9fa9e294a&page=1&per_page=100

Response

[
    {
        "objectId": 1,
        "parent": 0,
        "globalId": "247zxMA4zFuef9Vjr$GJAi"
        "type": "IfcProject",
        "name": "Project",
        "description": "An example project"
    },
    {
        "objectId": 2,
        "parent": 1,
        "globalId": "3rEiV8o4P5GQXrh$EsLqfa",
        "type": "IfcBuilding",
        "name": "Building",
        "description": "A fine building it is"
    },
    {
        "objectId": 3,
        "parent": 2,
        "globalId": "18DVBjQGbDNh4nL4pLc3T7",
        "type": "IfcBuildingStorey",
        "name": "Ground floor",
        "description: null
    },
    {
        "objectId": 4,
        "parent": 3,
        "globalId": "1w$bRVeDv68vuEsFJ0ich4",
        "type": "IfcBuildingStorey",
        "name": "First floor",
        "description": "An example storey"
    }
]

POST /project/products

Returns all products from the current set of revisions in a project. Optional type and object id filter can be provided.

Resource URL

https://api.bimsync.com/1.0/project/products

Query Parameters

project_id string The ID of the project
page integer 1-based page number. Returns first page if omitted
per_page integer Number of items per page. Default is 100 and the maximum value is 1000.

Optional Parameters

JSON encoded body using the "application/x-www-form-urlencoded" content type.

type array List of IFC entity types with IfcProduct as supertype or IfcProject
objectId array List of product object ids. Maximum number of elements is 100.
attributes boolean Return attributes - default is false
definedBy boolean Return assigned type and property set definitions - default is false

Example

Request

POST https://api.bimsync.com/1.0/project/products?project_id=dabc6dfce6e849bfada976d9fa9e294a&page=1&per_page=100

{
    "type": [ "IfcDoor", "IfcWall" ]
}

Response

[
    {
        "objectId": 100,
        "parent": 10,
        "globalId": "1Rma6fot5Frw$WVC2x1sRd"
        "type": "IfcDoor",
        "name": "Door 1",
        "description": null
    },
    {
        "objectId": 101,
        "parent": 10,
        "globalId": "3NX3hjsij3GvOZX_7mtgGR"
        "type": "IfcDoor",
        "name": "Door 2",
        "description": null
    },
    {
        "objectId": 200,
        "parent": 11,
        "globalId": "2Z0spqWz9Flf9Y4UTEw4g2",
        "type": "IfcWallStandardCase",
        "name": "Wall 1",
        "description": null
    },
    {
        "objectId": 201,
        "parent": 11,
        "globalId": "1BwrJZ$Hv31RHr52lKV3xF",
        "type": "IfcWallStandardCase",
        "name": "Wall 2",
        "description: null
    }
]

GET /product

Get the basic product information. If you know what revision the product belongs to, the resource GET /revision/product can be faster.

Resource URL

https://api.bimsync.com/1.0/project/product

Query Parameters

project_id string The ID of the project
object_id integer The ID of the product

Example

Request

GET https://api.bimsync.com/1.0/project/product?project_id=dabc6dfce6e849bfada976d9fa9e294a&object_id=100

Response

{
    "objectId": 100,
    "parent": 10,
    "globalId": "1Rma6fot5Frw$WVC2x1sRd"
    "type": "IfcDoor",
    "name": "Door 1",
    "description": null,
}

POST /project/product

Get product with attributes and assigned type and property set definitions. If you know what revision the product belongs to, the resource POST /revision/product can be faster.

Resource URL

https://api.bimsync.com/1.0/project/product

Query Parameters

project_id string The ID of the project
object_id integer The ID of the product

Optional Parameters

JSON encoded body using the "application/x-www-form-urlencoded" content type.

attributes boolean Return attributes - default is false
definedBy boolean Return assigned type and property set definitions - default is false

Example

Request

POST https://api.bimsync.com/1.0/project/product?project_id=dabc6dfce6e849bfada976d9fa9e294a&object_id=100

{
    "attributes": true,
    "definedBy": true
}

Response

{
    "objectId": 100,
    "parent": 10,
    "globalId": "1Rma6fot5Frw$WVC2x1sRd"
    "type": "IfcDoor",
    "name": "Door 1",
    "description": null,
    "attributes": {
        "OverallHeight": {
            "type": "Double",
            "value": 2100.0
        },
        "OverallWidth": {
            "type": "Double",
            "value": 900.0
        },
        ...
    },
    "definedBy": [
        {
            "type": "Entity",
            "value": {
                "objectId": 300,
                "type": "IfcDoorStyle"
                "attributes": {
                    "Name": {
                        "type": "String",
                        "value": "Skyvedør"
                    },
                    "OperationType": {
                        "type": "IfcDoorStyleOperationEnum",
                        "value": "SLIDING_TO_LEFT"
                    },
                    "ParameterTakesPrecedence": {
                        "type": "Tristate",
                        "value": "FALSE"
                    },
                    "Sizeable": {
                        "type": "Tristate",
                        "value": "FALSE"
                    },
                    "ConstructionType": {
                        "type": "IfcDoorStyleConstructionEnum",
                        "value": "NOTDEFINED"
                    },
                    "HasPropertySets": {
                        "type": "List",
                        "value": [
                            {
                                "type": "Entity",
                                "value": {
                                    "objectId": 301,
                                    "type": "IfcDoorLiningProperties"
                                    "attributes": {
                                        "CasingDepth": {
                                            "type": "Double",
                                            "value": 0.0
                                        },
                                        "CasingThickness": {
                                            "type": "Double",
                                            "value": 0.0
                                        },
                                        ...
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        }
    ]
}

GET /models

Returns a collection of all models belonging to a project, specified by the project_id parameter.

Resource URL

https://api.bimsync.com/1.0/models

Parameters

project_id string The ID of the project

Example

Request

GET https://api.bimsync.com/1.0/models?project_id=dabc6dfce6e849bfada976d9fa9e294a

Response

[
   {
       "name": "Architecture",
       "id": "c7e3b50fd64c49768e146c218d960181"
   },
   {
       "name": "Structure",
       "id": "b6246720af794ebdac0226c10b5c2daa"
   }
]

POST /models/new

Creates a new model to the specified project. Returns the new model if successful.

Resource URL

https://api.bimsync.com/1.0/models/new

Parameters

Query parameters.

project_id string The ID of the project

JSON encoded body using the "application/x-www-form-urlencoded" content type.

name string The model name

Example

Request

POST https://api.bimsync.com/1.0/models/new?project_id=dabc6dfce6e849bfada976d9fa9e294a

{
    "name": "HVAC"
}

Response

{
   "name": "HVAC",
   "id": "ebad2a8ffc1d44ab86341a6d3d98e87e"
}

GET /model

Returns the model specified by the model_id parameter.

Resource URL

https://api.bimsync.com/1.0/model

Parameters

model_id string The ID of the model

Example

Request

GET https://api.bimsync.com/1.0/model/?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

Response

{
   "name": "HVAC",
   "id": "ebad2a8ffc1d44ab86341a6d3d98e87e"
}

PUT /model

Updates the model specified by the model_id parameter.

Resource URL

https://api.bimsync.com/1.0/model

Parameters

Query parameters.

model_id string The ID of the model

JSON encoded body using the "application/x-www-form-urlencoded" content type.

name string The model name

Example

Request

PUT https://api.bimsync.com/1.0/model/?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

{
    "name": "New name"
}

Response

{
   "name": "New name",
   "id": "ebad2a8ffc1d44ab86341a6d3d98e87e"
}

DELETE /model

Delete the model specified by the model_id parameter.

Resource URL

https://api.bimsync.com/1.0/model

Parameters

model_id string The ID of the model

Example

Request

DELETE https://api.bimsync.com/1.0/model/?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

PUT /model/import

Imports a new revision of a model. Returns an import token if successfully registered. The model is processed asynchronously by bimsync.

If the callback_uri query parameter is present, bimsync will issue a GET request when the model has been processed. The GET request will contain the following query parameters:

  • token - the import token
  • result - either 'success' or 'error'.

Resource URL

https://api.bimsync.com/1.0/model/import

Request body

The model contents to be uploaded. Must be in IFC STEP format.

Parameters

Query parameters.

model_id string The ID of the model
file_name string The IFC STEP file name
comment string A comment describing the new revision
callback_uri string URL where the import result is sent. Must match the registered callback URL

Example

Request

PUT https://api.bimsync.com/1.0/model/import?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&file_name=HVAC.ifc&comment=Initial%20import


ISO-10303-21;
HEADER;
...
ENDSEC;
END-ISO-10303-21;

Response

{
   "token": "f638d2917157458581c6f3e5a7106b8a"
}

GET /model/import/status

Note: Specificiation in progress. This resource might change.

Returns the current status of an import.

Resource URL

https://api.bimsync.com/1.0/model/import/status

Parameters

Query parameters.

token string The import token

Example

Request

GET https://api.bimsync.com/1.0/model/import/status?token=f638d2917157458581c6f3e5a7106b8a

Response

While processing:

{
  "comment": "Initial import",
  "file_name": "HVAC.ifc",
  "model_id": "ebad2a8ffc1d44ab86341a6d3d98e87e",
  "project_id": "dabc6dfce6e849bfada976d9fa9e294a",
  "result": "running"
}

Successfully imported and processed:

{
  "comment": "Initial import",
  "file_name": "HVAC.ifc",
  "revision_id": 1,
  "model_id": "ebad2a8ffc1d44ab86341a6d3d98e87e",
  "project_id": "dabc6dfce6e849bfada976d9fa9e294a",
  "result": "success"
}

Failed import:

{
  "comment": "Initial import",
  "file_name": "HVAC.ifc",
  "model_id": "ebad2a8ffc1d44ab86341a6d3d98e87e",
  "project_id": "dabc6dfce6e849bfada976d9fa9e294a",
  "result": "error"
}

GET /revisions

Returns a collection of revisions of a model, specified by the model_id paramater. The collection is sorted by revision ID.

Resource URL

https://api.bimsync.com/1.0/revisions

Parameters

model_id string The ID of the model

Example

Request

GET https://api.bimsync.com/1.0/revisions?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

Response

[
   {
       "id": 2,
       "comment": "Add boiler",
       "timestamp": 1354184386000
   },
   {
       "id": 1,
       "comment": "Initial import",
       "timestamp": 1353665739878
   }
]

GET /revision

Returns a revision of a model, specified by a model ID and revision ID.

Resource URL

https://api.bimsync.com/1.0/revision

Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return latest revision if omitted

Example

Request

GET https://api.bimsync.com/1.0/revision?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2

Response

{
    "id": 2,
    "comment": "Add boiler",
    "timestamp": 1354184386000
}

GET /revision/export

Returns a revision of model in IFC STEP format, specified by a model ID and revision ID.

Resource URL

https://api.bimsync.com/1.0/revision/export

Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return latest revision if omitted

Example

Request

GET https://api.bimsync.com/1.0/revision/export?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2

Response

ISO-10303-21;
HEADER;
FILE_DESCRIPTION ((''), '2;1');
FILE_NAME ('', '2012-11-29T11:25:18', (''), (''), '', '', '');
FILE_SCHEMA (('IFC2X3'));
ENDSEC;
DATA;
...

GET /revision/products

Returns all products of a revision. The object ID is unique for the revision's instance of a product.

Resource URL

https://api.bimsync.com/1.0/revision/products

Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return products for latest revision if omitted
page integer 1-based page number. Returns first page if omitted
per_page integer Number of items per page. Default is 100 and the maximum value is 1000.

Example

Request

GET https://api.bimsync.com/1.0/revision/products?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2&page=1&per_page=100

Response

[
    {
        "objectId": 1,
        "parent": 0,
        "globalId": "247zxMA4zFuef9Vjr$GJAi"
        "type": "IfcProject",
        "name": "Project",
        "description": "An example project"
    },
    {
        "objectId": 2,
        "parent": 1,
        "globalId": "3rEiV8o4P5GQXrh$EsLqfa",
        "type": "IfcBuilding",
        "name": "Building",
        "description": "A fine building it is"
    },
    {
        "objectId": 3,
        "parent": 2,
        "globalId": "18DVBjQGbDNh4nL4pLc3T7",
        "type": "IfcBuildingStorey",
        "name": "Ground floor",
        "description: null
    },
    {
        "objectId": 4,
        "parent": 3,
        "globalId": "1w$bRVeDv68vuEsFJ0ich4",
        "type": "IfcBuildingStorey",
        "name": "First floor",
        "description": "An example storey"
    }
]

POST /revision/products

Returns all products of a revision. Optional type and object id filter can be provided.

Resource URL

https://api.bimsync.com/1.0/revision/products

Query Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return products for latest revision if omitted
page integer 1-based page number. Returns first page if omitted
per_page integer Number of items per page. Default is 100 and the maximum value is 1000.

Optional Parameters

JSON encoded body using the "application/x-www-form-urlencoded" content type.

type array List of IFC entity types with IfcProduct as supertype or IfcProject
objectId array List of product object ids. Maximum number of elements is 100.
attributes boolean Return attributes - default is false
definedBy boolean Return assigned type and property set definitions - default is false

Example

Request

POST https://api.bimsync.com/1.0/revision/products?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2&page=1&per_page=100

{
    "type": [ "IfcDoor", "IfcWall" ]
}

Response

[
    {
        "objectId": 100,
        "parent": 10,
        "globalId": "1Rma6fot5Frw$WVC2x1sRd"
        "type": "IfcDoor",
        "name": "Door 1",
        "description": null
    },
    {
        "objectId": 101,
        "parent": 10,
        "globalId": "3NX3hjsij3GvOZX_7mtgGR"
        "type": "IfcDoor",
        "name": "Door 2",
        "description": null
    },
    {
        "objectId": 200,
        "parent": 11,
        "globalId": "2Z0spqWz9Flf9Y4UTEw4g2",
        "type": "IfcWallStandardCase",
        "name": "Wall 1",
        "description": null
    },
    {
        "objectId": 201,
        "parent": 11,
        "globalId": "1BwrJZ$Hv31RHr52lKV3xF",
        "type": "IfcWallStandardCase",
        "name": "Wall 2",
        "description: null
    }
]

GET /revision/product

Get the basic product information. If you don't know what revision the product belongs to, use the resource 'GET /project/product'.

Resource URL

https://api.bimsync.com/1.0/revision/product

Query Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return product for latest revision if omitted
object_id integer The ID of the product

Example

Request

GET https://api.bimsync.com/1.0/revision/product?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2&object_id=100

Response

{
    "objectId": 100,
    "parent": 10,
    "globalId": "1Rma6fot5Frw$WVC2x1sRd"
    "type": "IfcDoor",
    "name": "Door 1",
    "description": null,
}

POST /revision/product

Get product with attributes and assigned type and property set definitions. If you don't know what revision the product belongs to, use the resource 'GET /project/product'.

Resource URL

https://api.bimsync.com/1.0/revision/product

Query Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return product for latest revision if omitted
object_id integer The ID of the product

Optional Parameters

JSON encoded body using the "application/x-www-form-urlencoded" content type.

attributes boolean Return attributes - default is false
definedBy boolean Return assigned type and property set definitions - default is false

Example

Request

POST https://api.bimsync.com/1.0/revision/product?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2&object_id=100

{
    "attributes": true,
    "definedBy": true
}

Response

{
    "objectId": 100,
    "parent": 10,
    "globalId": "1Rma6fot5Frw$WVC2x1sRd"
    "type": "IfcDoor",
    "name": "Door 1",
    "description": null,
    "attributes": {
        "OverallHeight": {
            "type": "Double",
            "value": 2100.0
        },
        "OverallWidth": {
            "type": "Double",
            "value": 900.0
        },
        ...
    },
    "definedBy": [
        {
            "type": "Entity",
            "value": {
                "objectId": 300,
                "type": "IfcDoorStyle"
                "attributes": {
                    "Name": {
                        "type": "String",
                        "value": "Skyvedør"
                    },
                    "OperationType": {
                        "type": "IfcDoorStyleOperationEnum",
                        "value": "SLIDING_TO_LEFT"
                    },
                    "ParameterTakesPrecedence": {
                        "type": "Tristate",
                        "value": "FALSE"
                    },
                    "Sizeable": {
                        "type": "Tristate",
                        "value": "FALSE"
                    },
                    "ConstructionType": {
                        "type": "IfcDoorStyleConstructionEnum",
                        "value": "NOTDEFINED"
                    },
                    "HasPropertySets": {
                        "type": "List",
                        "value": [
                            {
                                "type": "Entity",
                                "value": {
                                    "objectId": 301,
                                    "type": "IfcDoorLiningProperties"
                                    "attributes": {
                                        "CasingDepth": {
                                            "type": "Double",
                                            "value": 0.0
                                        },
                                        "CasingThickness": {
                                            "type": "Double",
                                            "value": 0.0
                                        },
                                        ...
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        }
    ]
}

GET /revision/structure

Returns the spatial structure hierarchy of a revision. All attribute values are object IDs or sets of objectIDs. Root object has the value 0 (zero) for the parent attribute

Resource URL

https://api.bimsync.com/1.0/revision/structure

Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return structure for latest revision if omitted
page integer 1-based page number. Returns first page if omitted
per_page integer Number of items per page. Default is 100 and the maximum value is 1000.

Example

Request

GET https://api.bimsync.com/1.0/revision/structure?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2&page=1&per_page=100

Response

[
    {
        "objectId": 1,
        "parent": 0,
        "children": [ 2 ]

    },
    {
        "objectId": 2
        "parent": 1,
        "children": [ 3, 4 ]
    }
    {
        "objectId": 3
        "parent": 2,
        "children": [ ... ]
    }
    {
        "objectId": 4
        "parent": 2,
        "children": [ ... ]
    }
]

GET /revision/groups

Returns all groups (IfcGroup instances) of a revision. The value of the objects attribute is a set of object IDs. The value of the groups attribute is a set of child groups.

Resource URL

https://api.bimsync.com/1.0/revision/groups

Parameters

model_id string The ID of the model
revision_id *optional* integer The ID of the revision. Return systems for latest revision if omitted
page integer 1-based page number. Returns first page if omitted
per_page integer Number of items per page. Default is 100 and the maximum value is 1000.

Example

Request

GET https://api.bimsync.com/1.0/revision/groups?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e&revision_id=2&page=1&per_page=100

Response

[
    {
        "objectId": 8,
        "globalId": "0bPeKugVr2MxWTpmoCku9A",
        "type": "IfcSystem",
        "name": "Heat",
        "description": "Heat system",
        "objects": [ 10, 11, 12, ... ]
    },
    {
        "objectId": 9,
        "globalId": "35DSRJ4IH3pRn1JL4IwNSc",
        "type": "IfcSystem",
        "name": "Ventilation",
        "description": "Ventilation system",
        "objects": [ 13, 14, 15, ... ]
    },
    {
        "objectId": 10,
        "globalId": "425DSRJ4IH3pRn1JL4IwNSc",
        "type": "IfcZone",
        "name": "Complete",
        "description": null,
        "objects": [ 100, 101, 101, ... ],
        "groups": [
            {
                "objectId": 11,
                "globalId": "525DSRJ4IH3pRn1JL4IwNSc",
                "type": "IfcZone",
                ...
            }
        ]
    }
]

GET /revision/tree/{sort-type}

Returns object trees as HTML with different sort types. The returned HTML body will have the following structure:

<ul>
    <li data-id="1"> <!-- Object id, omitted on grouping nodes -->
      <a href="#">Label</a>
       <ul> <!-- Children -->
         ... 
       </ul>
  </li>
</ul>     

Available group types are:

Sort type Description
structure Sorted by spacial structure. Leaf nodes are grouped by component type.
component Sorted and grouped by component type.
type Sorted by type (IfcTypeObject). Leaf nodes are grouped by component type.
layer Sorted by layer (IfcPresentationLayer).

Example

Requests

GET https://api.bimsync.com/1.0/revision/tree/structure?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

GET https://api.bimsync.com/1.0/revision/tree/component?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

GET https://api.bimsync.com/1.0/revision/tree/type?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

GET https://api.bimsync.com/1.0/revision/tree/layer?model_id=ebad2a8ffc1d44ab86341a6d3d98e87e

POST /viewer/access

Note: Specificiation in progress. This resource might change.

Creates a viewer access token. The token will expire after 60 minutes.

Query Parameters

project_id string The ID of the project

Optional Parameters

JSON encoded body using the "application/x-www-form-urlencoded" content type.

models array Specific models to allow access to. Each instance of the array must be an object with the field model_id and optionally the field revision_id. If revision_id is not present, access is granted to the latest revision of the model.

Examples

Request

POST https://api.bimsync.com/1.0/viewer/access?project_id=dabc6dfce6e849bfada976d9fa9e294a

Response

{
    "token": "8975b4a3149a49ba8bcc40f4ababc0d0",
    "url": "https://api.bimsync.com/1.0/viewer/access?token=8975b4a3149a49ba8bcc40f4ababc0d0"
}

Request

POST https://api.bimsync.com/1.0/viewer/access?project_id=dabc6dfce6e849bfada976d9fa9e294a

[
  {
    "model_id": "ebad2a8ffc1d44ab86341a6d3d98e87e",
    "revision_id": 1
  },
  {
    "model_id": "a6f50dbacc504ad2ad16ce545904148d",
    "revision_id": 2
  }
]

Response

{
    "token": "8975b4a3149a49ba8bcc40f4ababc0d0",
    "url": "https://api.bimsync.com/1.0/viewer/access?token=8975b4a3149a49ba8bcc40f4ababc0d0"
}