Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON API #344

Open
nikosdion opened this issue Nov 28, 2023 · 2 comments
Open

JSON API #344

nikosdion opened this issue Nov 28, 2023 · 2 comments
Assignees
Labels
contemplating Thinking about it
Milestone

Comments

@nikosdion
Copy link
Member

There was a good point made about how having an API which allows remotely managing sites in Panopticon might serve some automation use cases where, presumably, using the CLI through Ansible or similar is not convenient / practical.

Some preliminary thoughts below.

Authentication

For practical reasons, it makes sense to use a variation of the FOF / Joomla API authentication scheme. Instead of having a single token per user we can allow the user to create multiple tokens which can be enabled/disabled, reset, and can also have descriptions, and an expiration time (if desired).

Endpoint

It makes sense to have a separate /api application than trying to reuse the main Panopticon application.

Do note that we can still access the main Panopticon application's container by instantiating it. This allows us to use the main models in the API.

API features

The features which make sense to have are:

  • Sites
    • List sites (GET)
    • Get a site's configuration (GET)
    • Add a site (PUT)
    • Modify a site (POST)

At this stage it does not make sense managing users, tasks, and queues.

@nikosdion nikosdion added the contemplating Thinking about it label Nov 28, 2023
@nikosdion nikosdion self-assigned this Nov 28, 2023
@morphinestyle
Copy link
Contributor

If this would mean having APIs that can be used by an external application (another Joomla site for example) to get Panopticon data that would be AWESOME! For example, all the data relating to a site such as php version, Joomla! version, extensions to update, etc., would be really fantastic.

@nikosdion
Copy link
Member Author

@morphinestyle Yes, you could do that, eventually. At first, I want to make it possible to remotely create and remove sites in Panopticon. The use case I have in mind is the discussion I have already linked: someone creates a site with an automated tool, and they want to start monitoring it right away.

@nikosdion nikosdion added this to the 2.0 milestone Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contemplating Thinking about it
Projects
None yet
Development

No branches or pull requests

2 participants