I just want to write something like send a push notification using firebase push notifications API when I publish a post on Ghost.
something like posting the URL on facebook, twitter whenever a post published on Ghost. (I know we can use Zapier, but this is just to do the same using Webhook, since we already have the functionality within Ghost.)
I want to create a restful service to deal with Ghost Webhook.
What are the requirements to be called by a webhook function?
What are the arguments we have to define in the rest calls?
I’m afraid I’m not really following what you mean by these questions. There are no requirements for your service to be called by Ghost’s webhooks other than a publicly available URL. Calls are made from Ghost to your service, I’m not sure which arguments you are trying to define and which REST calls you are referring to?
If you want to look at what Ghost sends out, then you can view that yourself by using something like https://webhook.site and putting the URL that it gives you into your webhook config inside Ghost’s admin area. It will then show you what Ghost has sent to that URL any time the webhook is triggered by Ghost.