guan404ming commented on code in PR #49475: URL: https://github.com/apache/airflow/pull/49475#discussion_r2052392671
########## airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py: ########## @@ -151,3 +151,48 @@ def get_log( "Airflow-Continuation-Token": URLSafeSerializer(request.app.state.secret_key).dumps(metadata) } return Response(media_type="application/x-ndjson", content=logs, headers=headers) + + +@task_instances_log_router.get( + "/{task_id}/externalLogUrl/{try_number}", + responses={ + **create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]), + status.HTTP_200_OK: { + "description": "External log URL", + "content": { + "application/json": {"schema": {"type": "object", "properties": {"url": {"type": "string"}}}} + }, + }, + }, + dependencies=[Depends(requires_access_dag("GET", DagAccessEntity.TASK_INSTANCE))], + response_model=ExternalLogUrlResponse, +) +def get_external_log_url( + dag_id: str, + dag_run_id: str, + task_id: str, + try_number: PositiveInt, + session: SessionDep, + map_index: int = -1, +): Review Comment: I would keep this in mind, thanks for figuring out! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org