Suggest and validates units of measurements defined in Ontology of units of Measure (OM) [1] is used.
Suggest and validates units of measurements defined in Ontology of units of Measure (OM) [1] is used.
[1] https://github.com/HajoRijgersberg/OM
[1] https://github.com/HajoRijgersberg/OM
## `POST /api/units/suggest`
Autosuggests user typed in terms.
Example http request:
POST /api/units/suggest HTTP/1.1
Content-Type: application/json
Host: localhost:5010
Content-Length: 37
```JSON
{
"offset": 0,
"ustring": "met"
}
```
Response is a JSON object of the following form:
```JSON
[
{
"comment": "The metre is a unit of length defined as the length of the path travelled by light in vacuum during a time interval of 1/299 792 458 of a second.",
"name": "metre",
"symbol": "m"
},
{
"comment": "Candela per square metre is a unit of luminance defined as candela divided by square metre.",
"name": "candela per square metre",
"symbol": "cd/m"
},
{
"comment": "Cubic metre is a unit of volume defined as the volume of a cube whose sides measure exactly one metre.",
"name": "cubic metre",
"symbol": "m3"
},
]
```
## `POST /api/units/geturi`
Returns the uri of a certain units contained in the ontology OM.
Saves values in the entity 'mdb\_columns\_concepts', which realizes the relation between 'mdb\_columns' and 'mdb\_concepts'. Make sure the concept is contained in 'mdb\_concepts'.