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


def GET(request):
    """Get this Trace."""

    request.check_required_parameters(path={'traceId': 'string'})

    trace = Trace.from_id(request.params_path['traceId'])

    trace.check_exists()

    return Response(200, 'Successfully retrieved trace.', trace.obj)