Skip to content

Commit

Permalink
Change reading spans from GET to POST
Browse files Browse the repository at this point in the history
  • Loading branch information
anticorrelator committed Apr 12, 2024
1 parent 427d130 commit 5d8bd30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/phoenix/server/api/routers/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
Route("/v1/evaluations", evaluations.post_evaluation, methods=["POST"]),
Route("/v1/evaluations", evaluations.get_evaluations, methods=["GET"]),
Route("/v1/traces", traces.post_traces, methods=["POST"]),
Route("/v1/spans", spans.get_spans, methods=["GET"]),
Route("/v1/spans", spans.read_spans, methods=["POST"]),
]
4 changes: 2 additions & 2 deletions src/phoenix/server/api/routers/v1/spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@


# TODO: Add property details to SpanQuery schema
async def get_spans(request: Request) -> Response:
async def read_spans(request: Request) -> Response:
"""
summary: Get gets from Phoenix
operationId: getSpans
operationId: readSpans
tags:
- spans
parameters:
Expand Down
2 changes: 1 addition & 1 deletion src/phoenix/session/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def query_spans(
root_spans_only=root_spans_only,
project_name=project_name,
)
response = self._session.get(
response = self._session.post(
url=urljoin(self._base_url, "/v1/spans"),
params={"project_name": project_name},
json={
Expand Down

0 comments on commit 5d8bd30

Please sign in to comment.