Create a function and create one or more HTTP triggers. In order to make it simple, I have created a function app and one HTTP trigger, which accepts Get methods only.
Note that at the time of writing, the API definition feature is supported only by the Azure Function runtime V1.0 and it's still in preview. It doesn't work with V2.o yet.
Ensure that the Azure function app is configured to point to runtime version 1, as shown in the Application Settings: