From 55ae0272ab0dd0cff67e6166446a9a8af0125802 Mon Sep 17 00:00:00 2001 From: langfuse-bot Date: Wed, 11 Feb 2026 10:44:14 +0000 Subject: [PATCH] feat(api): update API spec from langfuse/langfuse 9b531c0 --- langfuse/api/reference.md | 8 ++++++++ langfuse/api/resources/score_v_2/client.py | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/langfuse/api/reference.md b/langfuse/api/reference.md index 8a8dad23c..da4698707 100644 --- a/langfuse/api/reference.md +++ b/langfuse/api/reference.md @@ -7207,6 +7207,14 @@ client.score_v_2.get()
+**filter:** `typing.Optional[str]` — A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/langfuse/api/resources/score_v_2/client.py b/langfuse/api/resources/score_v_2/client.py index 7372a7784..bce290023 100644 --- a/langfuse/api/resources/score_v_2/client.py +++ b/langfuse/api/resources/score_v_2/client.py @@ -48,6 +48,7 @@ def get( data_type: typing.Optional[ScoreDataType] = None, trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, fields: typing.Optional[str] = None, + filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetScoresResponse: """ @@ -115,6 +116,9 @@ def get( fields : typing.Optional[str] Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. + filter : typing.Optional[str] + A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -164,6 +168,7 @@ def get( "dataType": data_type, "traceTags": trace_tags, "fields": fields, + "filter": filter, }, request_options=request_options, ) @@ -286,6 +291,7 @@ async def get( data_type: typing.Optional[ScoreDataType] = None, trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, fields: typing.Optional[str] = None, + filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetScoresResponse: """ @@ -353,6 +359,9 @@ async def get( fields : typing.Optional[str] Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. + filter : typing.Optional[str] + A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -410,6 +419,7 @@ async def main() -> None: "dataType": data_type, "traceTags": trace_tags, "fields": fields, + "filter": filter, }, request_options=request_options, )