Return Enum name and Enum display name using request headers - 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

All EnumEnums have both a Enum name and a Enum display name. If you want to return both the Enum name and the Enum display name, you can use the following request header with the groupby service call:

KEY = Prefer VALUE =odata.include-annotations="*"

If you use the request header with the groupby service call, you can return an extra results column that shows the Enum name and the Enum display name. Use the following GET example:

. . /api/v2/SDA/Tags?$apply=groupby((Criticality_Rating, Tag_Status),aggregate(Id with countdistinct as Count))

If you include the Prefer:odata.include-annotations="*" header, the following example GET would be:

. . /api/v2/SDA/$meta.data#Tags(Criticality_Rating,Criticality_Rating_EnumName,Tag_Status

The additional items are denoted by the suffix, EnumName. So the example show the Criticality_Rating_EnumName and Tag_Status_EnumName that represent each of the items added as a dynamic column item.