For data of restaurant licences on or before 28.5.2021
Step 1 - Identify the filename parameter of required data file. (The parameter in URL is encoded from the resource URL by any online URL encode tools)
Name of data:
Restaurant licences (English)
Resource URL:
http://www.fehd.gov.hk/english/licensing/license/text/LP_Restaurants_EN.XML
Parameter in URL:
http%3A%2F%2Fwww.fehd.gov.hk%2Fenglish%2Flicensing%2Flicense%2Ftext%2FLP_Restaurants_EN.XML
Step 2 – Specific the period (start and end date) and data files required and get the corresponding file version timestamp.
For example, we want to get data files of Restaurant licences (English) in the period from 27 May 2021 to 28 May 2021, then the URL to be run in browser
should be:
https://api.data.gov.hk/v1/historical-archive/list-file-versions?url=
http%3A%2F%2Fwww.fehd.gov.hk%2Fenglish%2Flicensing%2Flicense%2Ftext%2FLP_Restaurants_EN.XML&start=20210527&end=20210528
and below file version timestamp should be returned. The string highlighted in brown are the required file version timestamp.
{"version-count":
2, "total-size":
9194305, "timestamps": ["
20210527-0916", "
20210528-0937"], "data-dictionary-
dates": ["20210527", "20210528"], "schema-dates": ["20210527", "20210528"]}
Page 1
Step 3 - Download the historical files
Run below url in browser with file version timestamps "20210527-0916" and "20210528-0937" to get the files. The files can be open by text editor like
Notepad.
https://api.data.gov.hk/v1/historical-archive/get-file?url=
http%3A%2F%2Fwww.fehd.gov.hk%2Fenglish%2Flicensing%2Flicense%2Ftext%2FLP_Restaurants_EN.XML&time=20210527-0916
https://api.data.gov.hk/v1/historical-archive/get-file?url=
http%3A%2F%2Fwww.fehd.gov.hk%2Fenglish%2Flicensing%2Flicense%2Ftext%2FLP_Restaurants_EN.XML&time=20210528-0937
Page 2
For data of restaurant licences on or after 29.5.2021
Download the information from data.gov.hk at the links below and choose the date range:
https://data.gov.hk/en-data/dataset/hk-fehd-fehdlmis-restaurant-licences
Page 3