The Units of Measure (UoM) Smart API is a public-facing API hosted in Azure: https://uom.intergraphsmartcloud.com/Measures/V1/.
Quick Facts
-
based on UoM data/values from the SmartPlant Foundation entity framework
-
distributed via the following CDN: https://uom-service-data.intergraphsmartcloud.com/uom-service-data/uom.json
URLs/usage
The UoM Smart API follows many standard Smart API conventions. The following URLs are useful:
-
https://uom.intergraphsmartcloud.com/Measures/V1/$metadata - review all data types, features, etc.
-
https://uom.intergraphsmartcloud.com/Measures/V1/doc - review the Open API specification
-
https://uom.intergraphsmartcloud.com/Measures/V1/doc/explorer - use the embedded explorer to exercise the API
The UoM API provides one OData action called Convert, which takes a single request parameter. The following example converts meters to feet.
POST https://uom.intergraphsmartcloud.com/Measures/V1/Convert/
You can pass report parameters in the body of your request with the following JSON body syntax:
{
"request": {
"Id": "Id-1",
"Items": [
{
"Id": "1",
"Category": "Length",
"From": "m",
"To": "ft",
"Values": [1.0, 1.5, 2.0],
"Precision": 5
}
]
}
}
The request parameter must be formatted as the Com.Ingr.Measures.V1.ConversionRequest type. The Precision value is optional if you want to control the number of digits after the decimal point.
The response:
{
"@odata.context": "https://uom.intergraphsmartcloud.com/Measures/V1/$metadata#Com.Ingr.Measures.V1.ConversionResponse",
"RequestId": "Id-1",
"Items": [
{
"Id": "1",
"Category": "Length",
"From": "m",
"To": "ft",
"Values": [
1.0,
1.5,
2.0
],
"ConvertedValues": [
3.28084,
4.92126,
6.56168
],
"Precision": 5
}
]
}