Skip to content
RudiThoeni edited this page Nov 14, 2024 · 1 revision

Most of the objects in the Open Data Hub Tourism Api have a Property where N Tags are assigneable.

Tags are stored as array withhin this Structure:

 "Tags": [
        {
            "Id": "ABCDFAB93F3741C7A81107B298D8FA2D",
            "Name": "Test",
            "Self": "https://api.tourism.testingmachine.eu/v1/Tag/ABCDFAB93F3741C7A81107B298D8FA2D",
            "Type": "eventcategory",
            "Source": "lts"
        },
        {
            "Id": "ABCD08DD4FB94E4789A6CA30C843049D",
            "Name": "IDM - Test",
            "Self": "https://api.tourism.testingmachine.eu/v1/Tag/ABCD08DD4FB94E4789A6CA30C843049D",
            "Type": "eventtag",
            "Source": "idm"
        },
        {
            "Id": "ABCD12B488FA14954BE91BBCFA47C0F06",
            "Name": "Event",
            "Self": "https://api.tourism.testingmachine.eu/v1/Tag/ABCD12B488FA14954BE91BBCFA47C0F06",
            "Type": "eventclassification",
            "Source": "noi"
        }
    ],

Id: Id of the Tag Name: Shortname of the Tag usually the Tag Name in language 'en' is taken Self: Complete Link to the Tag Endpoint Type: Tag Type (see below) Source: Provider of this Tag

Get all available Tags

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

Retrieve all Tags for a certain entity (Refers to _Meta.Type)

  • accommodation
  • odhactivitypoi
  • event
  • article
  • region ......

Example all Tags available for the entity '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

Retrieve all Tags from a source https://tourism.api.opendatahub.bz.it/v1/Tag?source=noi

Retrieve all Tags of a certain Type https://tourism.api.opendatahub.bz.it/v1/Tag?types=eventcategory

Example

Tag Types

Currently there are this Tag Types available

Use the Tag Ids to filter the Endpoints

Then use the Id of the Tags to filter with

Simply pass the Tag Id to the tagfilter
Example on the ODHActivityPoi Endpoint:
https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=bikeguides
Use more Tag Ids
https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi?tagfilter=bikeguides,brennereien
The filter allows only to filter on more Tagswith an OR conjunction

Clone this wiki locally