summaryrefslogtreecommitdiff
path: root/web-server/opendc/api/v2/traces/endpoint.py
blob: 58cc61530c3046ede85342ce496ffdfbc96617b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from opendc.models_old.trace import Trace
from opendc.util.rest import Response


def GET(request):
    """Get all available Traces."""

    # Get the Traces

    traces = Trace.query()

    # Return the Traces

    return Response(200, 'Successfully retrieved Traces', [x.to_JSON() for x in traces])