Query with Metadata
The metadata parameter can be used in the Get users/geofence/trips API to query on top of the metadata field.
Example :
curl --location --request GET 'https://api.roam.ai/v1/api/user/?start_date=2021-12-15&end_date=2021-12-20&metadata=name:nokia,external_id:bcy573b892' \
--header 'Api-key: xxxxxxxxxxx' \
--data-raw ''
You can query the trips and users via the API and use metadata values as filters to get the respective results.
You need to make sure the external_id or metadata values are not duplicated since this might end up in multiple results. So that's something that needs to be handled from your side.
get
/v1/api
/user
Get user list
curl --location --request GET 'https://api.roam.ai/v1/api/user/?start_date=2021-12-27&end_date=2021-12-29&metadata=name:new_test,external_id:02' \
--header 'Api-key: xxxxxxxxx'
get
/v1/api
/trips
Get Trip list
curl --location --request GET 'https://api.roam.ai/v1/api/trips/?metadata=delivery:fast_delivery,order_id:63g773832&start_date=2021-12-20&end_date=2021-12-21' \
--header 'Api-Key: xxxxxxxxxxxxxx'
get
/v1/api
/geofence
Get Geofence list
curl --location --request GET 'https://api.roam.ai/v1/api/geofence/?start_date=2021-12-27&end_date=2021-12-29&metadata=name:type_1,id:01' \
--header 'Api-Key: xxxxxxxxxxxxxx'
Last modified 4mo ago