diff options
Diffstat (limited to 'opendc/api/v2/schedulers')
| -rw-r--r-- | opendc/api/v2/schedulers/__init__.py | 0 | ||||
| -rw-r--r-- | opendc/api/v2/schedulers/endpoint.py | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/opendc/api/v2/schedulers/__init__.py b/opendc/api/v2/schedulers/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/opendc/api/v2/schedulers/__init__.py diff --git a/opendc/api/v2/schedulers/endpoint.py b/opendc/api/v2/schedulers/endpoint.py new file mode 100644 index 00000000..36537764 --- /dev/null +++ b/opendc/api/v2/schedulers/endpoint.py @@ -0,0 +1,18 @@ +from opendc.models.scheduler import Scheduler +from opendc.util.rest import Response + + +def GET(request): + """Get all available Schedulers.""" + + # Get the Schedulers + + schedulers = Scheduler.query() + + # Return the Schedulers + + return Response( + 200, + 'Successfully retrieved Schedulers.', + [x.to_JSON() for x in schedulers] + ) |
