const units = await client.units.retrieve([{ externalId: 'temperature:deg_c' }, { externalId: 'pressure:bar' }]);{
"items": [
{
"externalId": "temperature:deg_c",
"name": "DEG_C",
"longName": "degree Celsius",
"symbol": "°C",
"aliasNames": [
"°C",
"C",
"deg C",
"degC",
"DegC"
],
"quantity": "Temperature",
"conversion": {
"multiplier": 1,
"offset": 273.15
},
"source": "qudt.org",
"sourceReference": "http://qudt.org/vocab/unit/DEG_C"
}
]
}Retrieves one or more units by external ID. The response returns the units in the same order as in the request.
const units = await client.units.retrieve([{ externalId: 'temperature:deg_c' }, { externalId: 'pressure:bar' }]);{
"items": [
{
"externalId": "temperature:deg_c",
"name": "DEG_C",
"longName": "degree Celsius",
"symbol": "°C",
"aliasNames": [
"°C",
"C",
"deg C",
"degC",
"DegC"
],
"quantity": "Temperature",
"conversion": {
"multiplier": 1,
"offset": 273.15
},
"source": "qudt.org",
"sourceReference": "http://qudt.org/vocab/unit/DEG_C"
}
]
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Response with a list of units
Show child attributes
Was this page helpful?