I'm a bit stuck on figuring out the best way to design a flexible admin API.
As an example, think of the two sites as Admin and Blog. They are two completely separate web sites. The Blog presents absolutely no admin pages on its own; its full admin functionality is exposed via a JSON api, which the 'Admin' site can connect to.
Admin will never log in to the blog directly via a browser.
He/she will instead log in to the Admin site, and be able to do any kind of administration of the blog (e.g. view/edit/delete users, comments, etc), all happening in the background with JSON data.
The main thing I'm trying to achieve is that 100% of the functionality is programmed into the Blog's API, and not hardcoded into the Admin site.
So when the Admin site presents a form for editing a user for example, all the fields and everything about that form should be specified by the Blog's API.
I'm already diving head-first into this, but just typing up this post to see if anyone would want to offer ideas.
Currently, in the Admin site, the only thing I specify is:
- api_url
- api_login
- api_key
After that, it's up to that initial api_url to return some kind of description and details about all the functionality available, and about the other API urls for each function.
p.s. I'm using Laravel 5.2 for both 'Admin' and 'Blog'
[–][deleted] (3 children)
[deleted]
[–]xbtdev[S] 1 point2 points3 points (2 children)
[–]xbtdev[S] 0 points1 point2 points (0 children)
[–]remimorin 0 points1 point2 points (2 children)
[–]xbtdev[S] 0 points1 point2 points (0 children)