RESTful API across multiple users
I am somewhat new to RESTful APIs.
I'm trying to implement a python system that will control various tasks across multiple computers, with one computer acting as the controller. I would like all these tasks to be divided amongst multiple users (ex. task foo runs as user foo, and task bar runs as user bar) while handling all requests with a central system. The central system should also act as a simple web server and be able to server basic pages for status purposes.
It it possible to have each user register a "page" with a central server for the API and have the server pass all requests t开发者_JAVA百科o the programs (probably written in Python)?
Sure, you just need the clients to POST their notifications URL to the server, so that the server can then POST them back with the requests. These are called Webhooks by some people.
Also see RESTful Webhooks.
Yes. Keep in mind that being RESTful is merely a way to organize your web application's URL's in a standard way. You can build your web application to do whatever you want.
精彩评论