Get the unit categories - HxGN SDx - Update 63 - Administration & Configuration - Hexagon

HxGN SDx API Services Configuration

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

The Unit Categories endpoint in API Services returns every UoMListType found in the database. A Unit Category contains units, which are UoMEnums related to the Unit Category by a Contains relationship. For example the Unit Category, MassUoM, contains the units gram and kilogram. The ID of a Unit Category is taken from the Unit Category UID in the database.

Each Unit Category also contains a base unit, which is what the other units are derived from. For example the MassUoM Unit Category has kilogram as the base unit.

You can return the Unit Categories from a query using the following example navigation GET:

. . /api/v1/UnitCategories

Units

The units of a Unit Category can be viewed either by expanding or navigating to the Units property:

. . /api/v1/UnitCategories?$expand=Units

. . /api/v1/UnitCategories('LengthUoM')/Units

You can return the units for length using the following example expansion GET:

. . /api/v1/UnitCategories('LengthUoM')?$expand=Units

Base units

Unit Categories have a base unit, which can be viewed by expanding or navigating to the BaseUnit or DefaultUnit, as follows:

. . /api/v1/UnitCategories?$expand=BaseUnit

. . /api/v1/UnitCategories?$expand=DefaultUnit

. . /api/v1/UnitCategories('LengthUoM')/BaseUnit

. . /api/v1/UnitCategories('LengthUoM')/DefaultUnit

You can return the base unit for length using the following example expansion GET:

. . /api/v1/UnitCategories('LengthUoM')?$expand=BaseUnit