shynet
shynet copied to clipboard
API Access
Is there a possibility an API could be added?
It’s something I’d like to have for v1.0, but I’m not sure exactly what it would look like right now. Feel free to spec out details or submit a draft PR if you have opinions either way. For now, though, it’s not an immediate priority.
I guess this one of the most important issues. Is there any ETA for this?
No clear ETA at the moment. It's a planned feature but a lot of important architectural decisions need to be made (specifically how to deal with authentication and authorization).
I think I could implement some basic API. Here is my vision:
- add api django app
- add ApiToken model with at least 3 fields (name, value, user)
- add ApiTokenAdmin to Django admin
- add api_token_required decorator and ApiTokenRequiredMixin (It will look for token in header and set user or return 401)
- add endpoint to return Service.get_core_stats()