diff options
Diffstat (limited to 'opendc/api/v2/specifications/storages/endpoint.py')
| -rw-r--r-- | opendc/api/v2/specifications/storages/endpoint.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/opendc/api/v2/specifications/storages/endpoint.py b/opendc/api/v2/specifications/storages/endpoint.py new file mode 100644 index 00000000..28f33177 --- /dev/null +++ b/opendc/api/v2/specifications/storages/endpoint.py @@ -0,0 +1,18 @@ +from opendc.models.storage import Storage +from opendc.util.rest import Response + + +def GET(request): + """Get a list of the specifications of all Storages.""" + + # Get the Storages + + storages = Storage.query() + + # Return the Storages + + return Response( + 200, + 'Successfully retrieved Storages.', + [x.to_JSON() for x in storages] + ) |
