bSDD API list class properties

Question from a user:

I am trying to access and read a specific Property Set from bSDD. However, I am encountering some difficulties.

I am specifically interested in the following Property Set:

Code: EC004822

Identifier (URI): https://identifier.buildingsmart.org/uri/etim/etim/10.0/class/EC004822

Name: Medium voltage secondary switchgear

I am developing my solution in Python and need to extract the 21 associated properties, but I am unsure how to implement this.

Also when attempting to search for this specific class using the Swagger API Test Tool, it returns an empty list for ClassProperties.

Could you please provide guidance on:

  1. Whether it is possible to query these attributes using Python
  2. If so, what would be the recommended approach
  3. Any potential solutions to the empty list issue I’m experiencing in the Swagger API Test Tool

I would greatly appreciate any assistance or direction you could provide on this matter.

Thank you for your time and consideration.


You can list all properties of a class using: GET /api/Class/Properties/v1

For example:

curl -X ‘GET’
https://api.bsdd.buildingsmart.org/api/Class/Properties/v1?ClassUri=https%3A%2F%2Fidentifier.buildingsmart.org%2Furi%2Fetim%2Fetim%2F10.0%2Fclass%2FEC004822
-H ‘accept: text/plain’

In Python that would be:

import requests

url = “https://api.bsdd.buildingsmart.org/api/Class/Properties/v1
params = {“ClassUri”: “bSDD Search”}
headers = {“accept”: “text/plain”}

response = requests.get(url, headers=headers, params=params)
print(response.text)

Swagger API Test Tool? There is indeed a Test API, but there is no ETIM in the Test database. Just use the official (production environment) bSDD API: https://app.swaggerhub.com/apis-docs/buildingSMART/Dictionaries/v1

I have used the following params and headers settings in the request.

params = {
        'ClassUri': ifc_class_uri,
    }
headers = {
        'Accept': 'application/json',
    }

where ifc_class_uri is a parameter that holds class uri.

As you noted there are no classProperties returned in the list and totalCount is 0. I found that this happens when there are no properties under propertySet = “Attributes”.

For e.g.:

  • For IfcDistributionSystem, there are 5 properties under the propertySet Attributes. These are: Description,Global ID,Long Name,Name,Object Type. Therefore, we get a non-empty list and totalCount = 5 for the 5 properties returned.
    <Image 1: Unable to upload in a comment here>
    ifcDistributionSystem - Get Class Properties Results

  • For IfcAlignmentHorizontalSegment, there are no properties under propertySet Attributes. This seems to be the reason we get an empty list and totalCount=0.
    <Image 2: Unable to upload in a comment here>
    ifcAlignmentHorizontalSegment - Get Class Properties Results

But if check ifc43 docs for these classes, we see that there are 7 properties assigned to ifcAlignmentHorizontalSegment — StartPoint, StartDirection,.. Not sure why the API call is not returning these?
<Image 3: Unable to upload in a comment here>

Upon investigating the difference between the above classes is ifcAlignmentHorizontalSegment has no PropertySets mapped to it, and ifcDistributionSystem has several property sets mapped to it in the docs. So, I checked if the API is returning classProperties only when a property set is mapped to a class. I found that for all nearly 99% of the classes that have atleast one property set associated with them, API returns a non-empty classProperties list. But when no property sets are associated with a class in IFC Docs, the API does not return any “classProperties” (PS: I found that there are over 50 such classes)

CONCLUSION (so far… ): There seems to be a pattern to what Properties API returns for a class, but cannot explain this behavior. Need a more full proof way to ensure that the Properties API returns whats in the IFC Docs. It seems that the Get Class Properties API does not return return any properties for classes where there is no property set mapped to the class (as per the ifcdocs). Its wierd, but that seems to be the case. Furthermore, the properties returned include inherited properties from parent classes, but the returned list is inconsistent with the ifcDocs. For e.g., in case of ifcDistributionSystem, as shown in the table below, OwnerHistory and PredefinedType are not returned by the Properties API. May be Predefined Type is an Enum, so thats why? (as API does not return any class relationships (Sets, Enumerations)).

Class Properties (ifcDocs) Properties (API Returns)
Parent: ifcRoot GlobalID, OwnerHistory, Name, Description GlobalId, Name, Description
Parent: IfcObject ObjectType ObjectType
Self: ifcDistributionSystem LongName, PredefinedType LongName

NOTE: The get Properties API also returns Property Sets, but I found that all the property sets are not returned. For example, for ifcDistributionSystem, following PropertySets are mapped to the class in IFC DOCS, but the Properties API does not return PropertySets like Pset_DistributionSystemCommon, Pset_DistributionSystemTypeElectrical…
<Image 4: Unable to upload in a comment here>
IfcDocs - IFCDistributionSystem PropertySets
vs. Property Sets returned by Get Property Sets for Class (see above)