0

I'm now working with an API project, where I'm developing new API endpoints and the final result at the end of the life cycle is as follows: a client should receive updated data out of what it sent to API after UI actions in website. So there is API and UI, the client sends data to API then as a response gets custom URL to a specific website and then the client can do what is necessary in the UI. After doing so the client clicks 1 or another button (save/download) and it gets a document. But I need to send to the client updated document data (changes). So I'm thinking of creating a webhook server that would send this data to clients created webhook listener.

Now I know that it is quite easy to create something that would send this data to clients webhook listener. But I'm interested in how to do it in a perfect world.

So I'm thinking that client should setup its webhook listener URL in my developed API UI where it registered. But I'm not sure of how to do it properly.

E.g. Do I need to set up some verification of URL or something that would be as it should be with webhook servers.


I'm developing with Python, PostgreSQL, Flask and everything is deployed in Heroku. I have some experience in developing webhook listeners, but this is something totally new to me and I want to develop it as well as possible.

3
  • Welcome to the site. I want some clarifications: Is the url to a server under your control or third party? By "do what is necessary" do you mean edit a document returned by the url? If so, a client that modified the document would have the modifications, there would be no need to notify them to it. Which bring up these questions: are you considering concurrent modifications (collaborative real-time edits)? Do you need to notify third party servers? do you need to persist changes (done client side) on the server? Commented Jan 15, 2020 at 10:09
  • The URL to a server is under my control. Commented Jan 15, 2020 at 13:41
  • Imagine that I'm a A admin that has control over A.1 and A.2 servers. A.2 is API service and A.1 is the main application service. Then B client sends a request with payload to A.2 API service which returns URL pointing to A.1 service. The URL that B client receives is used by X customer. What I need to do is that when X customer does modifications for the document which is generated from payload sent from B client I need to track these modifications and on save/download action which was made by X customer I need to update B client with updated payload data. Commented Jan 15, 2020 at 13:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.