Class GetObservationsV2Request

java.lang.Object
com.langfuse.client.resources.observationsv2.requests.GetObservationsV2Request

public final class GetObservationsV2Request extends Object
  • Method Details

    • getEnvironment

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

      public Optional<String> getFields()
      Returns:
      Comma-separated list of field groups to include in the response. Available groups: core, basic, time, io, metadata, model, usage, prompt, metrics. If not specified, core and basic field groups are returned. Example: "basic,usage,model"
    • getExpandMetadata

      public Optional<String> getExpandMetadata()
      Returns:
      Comma-separated list of metadata keys to return non-truncated. By default, metadata values over 200 characters are truncated. Use this parameter to retrieve full values for specific keys. Example: "key1,key2"
    • getLimit

      public Optional<Integer> getLimit()
      Returns:
      Number of items to return per page. Maximum 1000, default 50.
    • getCursor

      public Optional<String> getCursor()
      Returns:
      Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
    • getParseIoAsJson

      public Optional<Boolean> getParseIoAsJson()
      Returns:
      Deprecated. Setting this to true will return a 400 error. Input/output fields are always returned as raw strings. Remove this parameter or set it to false.
    • getName

      public Optional<String> getName()
    • getUserId

      public Optional<String> getUserId()
    • getType

      public Optional<String> getType()
      Returns:
      Filter by observation type (e.g., "GENERATION", "SPAN", "EVENT", "AGENT", "TOOL", "CHAIN", "RETRIEVER", "EVALUATOR", "EMBEDDING", "GUARDRAIL")
    • getTraceId

      public Optional<String> getTraceId()
    • getLevel

      public Optional<ObservationLevel> getLevel()
      Returns:
      Optional filter for observations with a specific level (e.g. "DEBUG", "DEFAULT", "WARNING", "ERROR").
    • getParentObservationId

      public Optional<String> getParentObservationId()
    • getFromStartTime

      public Optional<OffsetDateTime> getFromStartTime()
      Returns:
      Retrieve only observations with a start_time on or after this datetime (ISO 8601).
    • getToStartTime

      public Optional<OffsetDateTime> getToStartTime()
      Returns:
      Retrieve only observations with a start_time before this datetime (ISO 8601).
    • getVersion

      public Optional<String> getVersion()
      Returns:
      Optional filter to only include observations with a certain version.
    • getFilter

      public Optional<String> getFilter()
      Returns:
      JSON string containing an array of filter conditions. When provided, this takes precedence over query parameter filters (userId, name, type, level, environment, fromStartTime, ...).
    • 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 GetObservationsV2Request.Builder builder()