-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Add Admin API #1137
Add Admin API #1137
Conversation
Updated with some notes additional todos: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @webb-ben, this is a great addition for administrators. However, I was wondering if this Admin API can be made optional for the implementers who want lean and clean OGC APIs without any extra stuff and so do not challenge with security requirements with the introduction of this.
It would be valuable to have this configurable in the config. |
@tomkralidis @francbartoli per our previous discussion on this in #756, it is a boolean in the server section: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@webb-ben are django_admin.py
and starlette_admin.py
files still missing?
@francbartoli The admin API has not been implemented for starlette or django - I am new to both of those frameworks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the benefit to introduce another json related dependency? (I'm asking because we discussed to eventually remove pydantic soon)
Also, since this admin functionality is designed to be optional I wouldn't keep it in the core dependencies. It's better to move it under a requirements-admin.txt
file
@francbartoli the dependency is for JSON merge patching on PUT/PATCH transactions. Having said this, +1 to move to |
- Create `admin.py` to serve as Admin API Core - Create `flask_admin.py` to create flask blueprint for admin API - Consolidate configuration getter - Add Pathlib serializing - Add docker example
- Amend admin example to allow writing to configuration. If FS is read only admin API does not work. Returns a 500 and logs `OSError: [Errno 30] Read-only file system: '/pygeoapi/local.config.yml' `
Update admin entrypoint to align with upstream pygeoapi implementation
Co-Authored-By: Tom Kralidis <[email protected]>
Co-Authored-By: Tom Kralidis <[email protected]>
- Add put and patch for root configuration - Add CI tests for PUT and PATCH of root
Replace tabs with spaces
Error from rebasing. Admin API tests are moved to their own job.
- Use debian supported packaging - Use custom merge function
- Fold flask_admin.py into flask_app.py Co-Authored-By: Tom Kralidis <[email protected]>
Move admin dependencies to requirements-admin.txt
Update expected test count for addt'l admin test data
Overview
This PR introduces an OGC API - Features - Part 4 inspired admin API around configuration of pygeoapi resource configurations. It has been implemented and tested for a couple of months as a part of the WMO wis2box OSS software developments efforts in wis2box-api.
@ksonda @tomkralidis Interested to hear what you think about the next steps
Tasks that I am aware still need to be completed:
Related Issue / Discussion
#756, #728
Additional Information
Demo deployment exists in the docker examples folder. To Hotload the changes from the API to the configuration, requires changes like that made in the examples entrypoint script.
Contributions and Licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)