Class GetScoresRequest

java.lang.Object
com.langfuse.client.resources.scorev2.requests.GetScoresRequest

public final class GetScoresRequest extends Object
  • Method Details

    • getEnvironment

      public Optional<List<String>> getEnvironment()
      Returns:
      Optional filter for scores where the environment is one of the provided values.
    • getTraceTags

      public Optional<List<String>> getTraceTags()
      Returns:
      Only scores linked to traces that include all of these tags will be returned.
    • getPage

      public Optional<Integer> getPage()
      Returns:
      Page number, starts at 1.
    • getLimit

      public Optional<Integer> getLimit()
      Returns:
      Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit.
    • getUserId

      public Optional<String> getUserId()
      Returns:
      Retrieve only scores with this userId associated to the trace.
    • getName

      public Optional<String> getName()
      Returns:
      Retrieve only scores with this name.
    • getFromTimestamp

      public Optional<OffsetDateTime> getFromTimestamp()
      Returns:
      Optional filter to only include scores created on or after a certain datetime (ISO 8601)
    • getToTimestamp

      public Optional<OffsetDateTime> getToTimestamp()
      Returns:
      Optional filter to only include scores created before a certain datetime (ISO 8601)
    • getSource

      public Optional<ScoreSource> getSource()
      Returns:
      Retrieve only scores from a specific source.
    • getOperator

      public Optional<String> getOperator()
      Returns:
      Retrieve only scores with <operator> value.
    • getValue

      public Optional<Double> getValue()
      Returns:
      Retrieve only scores with <operator> value.
    • getScoreIds

      public Optional<String> getScoreIds()
      Returns:
      Comma-separated list of score IDs to limit the results to.
    • getConfigId

      public Optional<String> getConfigId()
      Returns:
      Retrieve only scores with a specific configId.
    • getSessionId

      public Optional<String> getSessionId()
      Returns:
      Retrieve only scores with a specific sessionId.
    • getDatasetRunId

      public Optional<String> getDatasetRunId()
      Returns:
      Retrieve only scores with a specific datasetRunId.
    • getTraceId

      public Optional<String> getTraceId()
      Returns:
      Retrieve only scores with a specific traceId.
    • getObservationId

      public Optional<String> getObservationId()
      Returns:
      Comma-separated list of observation IDs to filter scores by.
    • getQueueId

      public Optional<String> getQueueId()
      Returns:
      Retrieve only scores with a specific annotation queueId.
    • getDataType

      public Optional<ScoreDataType> getDataType()
      Returns:
      Retrieve only scores with a specific dataType.
    • getFields

      public Optional<String> getFields()
      Returns:
      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.
    • getFilter

      public Optional<String> getFilter()
      Returns:
      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.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static GetScoresRequest.Builder builder()