Filter ODHActivityPoi by Tags - noi-techpark/odh-docs GitHub Wiki

In addition to the (https://github.com/noi-techpark/odh-docs/wiki/ODHTags) filtering, the ODHActivityPoi Endpoint offers a more fine grained generic Tag filtering

ODHActivityPoi has an array where all Tags are stored:

"Tags": [
{
"Id": "bike guides",
"Self": "https://tourism.api.opendatahub.bz.it/v1/Tag/bike%20guides",
"Source": "lts"
},
{
"Id": "guides schools",
"Self": "https://tourism.api.opendatahub.bz.it/v1/Tag/guides%20schools",
"Source": "idm"
},
]

The Tag Id, Link to the Detail of the Tag is provided and the Source of the Tag.

It is possible to have the Tags assigned by different Sources. see in this example lts.hiking guides, idm.hiking guides, same Tag by 2 sources.
This is relevant because the Tag source can also be filtered on. At Example it could be that the hiking Tag is assigned by Source x but not from Source y and vice versa.

{
"Id": "winter",
"Self": "https://tourism.api.opendatahub.bz.it/v1/Tag/winter",
"Source": "idm"
},
{
"Id": "hiking guides",
"Self": "https://tourism.api.opendatahub.bz.it/v1/Tag/hiking%20guides",
"Source": "idm"
},
{
"Id": "hiking guides",
"Self": "https://tourism.api.opendatahub.bz.it/v1/Tag/hiking%20guides",
"Source": "lts"
},
{
"Id": "other guides clubs schools",
"Self": "https://tourism.api.opendatahub.bz.it/v1/Tag/other%20guides%20clubs%20schools",
"Source": "lts"
},

It is possible to filter on this Tags (also by source) with the tagfilter

Get all available Tags

Retrieve all Tags https://tourism.api.opendatahub.bz.it/v1/Tag

Retrieve all Tags for a certain datatype
(accommodation, activity, poi, odhactivitypoi, package, gastronomy, event, article, common .. etc..)
At the moment only ODHActivityPoi is supported.
Example all Tags available for the datatype ODHActivityPoi
https://tourism.api.opendatahub.bz.it/v1/Tag?validforentity=odhactivitypoi

It is also possible to use the fields filter to get only the information that is for interest
example:
If you want to only select what is for interest in this call use the fields filter (Here only the Id and the Tagname in de is retrieved)
https://tourism.api.opendatahub.bz.it/v1/Tag?validforentity=odhactivitypoi&fields=Id,TagName.de

Use the Tag Ids to filter the Endpoints

Then use the Id of the Tags to filter with

pass the Tag Id to the tagfilter Various Examples on the ODHActivityPoi Endpoint:

Filtering by one Tag:
https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=paragliding

Filtering by one Tag with Tagsource:
Simply use the Tagsource followed with . if you want only to filter on data that has this tag from the source xy assigned https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=idm.paragliding

Filtering by more Tags:
Specify Conjunction OR/AND
https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=or(paragliding,other)
https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=or(idm.other,lts.hiking)

https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=and(paragliding,other)
https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=and(idm.summer,lts.other%20hikes)

At the moment the combination of or/and is not supported.