API * OData syntax

Hisinhan / Sep 07 2021

12 mins read • 8,000 views

OData common command

// Filter data eq, ne, lt, le, ge, gt
`$filter=ID eq '${ID}' and Description ne null`

// Contain
`$filter=contain(Name, 'Name to be found')`

// Select
`$select=Name,ID`

/**
Find near by location
fild, lat, lon, meter
**/
`$spatialFilter=nearby(StopPosition, 25.05463, 121.46584, 150)z


//Example
`${endpoint}?$select=Name,ID&$filter=contain(Name, 'Name to be found')&$format=json`