Class: Anthropic::Models::Beta::SessionListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/anthropic/models/beta/session_list_params.rb,
sig/anthropic/models/beta/session_list_params.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Sessions#list

Defined Under Namespace

Modules: Order, Status

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(agent_id: nil, agent_version: nil, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, deployment_id: nil, include_archived: nil, limit: nil, memory_store_id: nil, order: nil, page: nil, statuses: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ SessionListParams

Some parameter documentations has been truncated, see Anthropic::Models::Beta::SessionListParams for more details.

Parameters:

  • agent_id (String) (defaults to: nil) —

    Filter sessions created with this agent ID.

  • agent_version (Integer) (defaults to: nil) —

    Filter by agent version. Only applies when agent_id is also set.

  • created_at_gt (Time) (defaults to: nil) —

    Return sessions created after this time (exclusive).

  • created_at_gte (Time) (defaults to: nil) —

    Return sessions created at or after this time (inclusive).

  • created_at_lt (Time) (defaults to: nil) —

    Return sessions created before this time (exclusive).

  • created_at_lte (Time) (defaults to: nil) —

    Return sessions created at or before this time (inclusive).

  • deployment_id (String) (defaults to: nil) —

    Filter sessions created by this deployment ID.

  • include_archived (Boolean) (defaults to: nil) —

    When true, includes archived sessions. Default: false (exclude archived).

  • limit (Integer) (defaults to: nil) —

    Maximum number of results to return.

  • memory_store_id (String) (defaults to: nil) —

    Filter sessions whose resources contain a memory_store with this memory store

  • order (Symbol, Anthropic::Models::Beta::SessionListParams::Order) (defaults to: nil) —

    Sort direction for results, ordered by created_at. Defaults to desc (newest

  • page (String) (defaults to: nil) —

    Opaque pagination cursor from a previous response.

  • statuses (Array<Symbol, Anthropic::Models::Beta::SessionListParams::Status>) (defaults to: nil) —

    Filter by session status. Repeat the parameter to match any of multiple statuses

  • betas (Array<Symbol, String, Anthropic::Models::AnthropicBeta>) (defaults to: nil) —

    This endpoint is in beta: requests must send managed-agents-2026-04-01 in this

  • workspace_id (String) (defaults to: nil) —

    Optional header to select the Workspace for this request. The value is a Workspa

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})
  • agent_id: (String) (defaults to: nil)
  • agent_version: (Integer) (defaults to: nil)
  • created_at_gt: (Time) (defaults to: nil)
  • created_at_gte: (Time) (defaults to: nil)
  • created_at_lt: (Time) (defaults to: nil)
  • created_at_lte: (Time) (defaults to: nil)
  • deployment_id: (String) (defaults to: nil)
  • include_archived: (Boolean) (defaults to: nil)
  • limit: (Integer) (defaults to: nil)
  • memory_store_id: (String) (defaults to: nil)
  • order: (Anthropic::Models::Beta::SessionListParams::order) (defaults to: nil)
  • page: (String) (defaults to: nil)
  • statuses: (::Array[Anthropic::Models::Beta::SessionListParams::status]) (defaults to: nil)
  • betas: (::Array[Anthropic::Models::anthropic_beta]) (defaults to: nil)
  • workspace_id: (String) (defaults to: nil)
  • request_options: (Anthropic::request_opts) (defaults to: {})


# File 'lib/anthropic/models/beta/session_list_params.rb', line 111

Instance Attribute Details

#agent_id ⇒ String?

Filter sessions created with this agent ID.

Parameters:

  • (String)

Returns:

  • (String, nil)


15
# File 'lib/anthropic/models/beta/session_list_params.rb', line 15

optional :agent_id, String

#agent_version ⇒ Integer?

Filter by agent version. Only applies when agent_id is also set.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


21
# File 'lib/anthropic/models/beta/session_list_params.rb', line 21

optional :agent_version, Integer

#betas ⇒ Array<Symbol, String, Anthropic::Models::AnthropicBeta>?

This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.

Parameters:

  • (::Array[Anthropic::Models::anthropic_beta])

Returns:



98
# File 'lib/anthropic/models/beta/session_list_params.rb', line 98

optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }

#created_at_gt ⇒ Time?

Return sessions created after this time (exclusive).

Parameters:

  • (Time)

Returns:

  • (Time, nil)


27
# File 'lib/anthropic/models/beta/session_list_params.rb', line 27

optional :created_at_gt, Time

#created_at_gte ⇒ Time?

Return sessions created at or after this time (inclusive).

Parameters:

  • (Time)

Returns:

  • (Time, nil)


33
# File 'lib/anthropic/models/beta/session_list_params.rb', line 33

optional :created_at_gte, Time

#created_at_lt ⇒ Time?

Return sessions created before this time (exclusive).

Parameters:

  • (Time)

Returns:

  • (Time, nil)


39
# File 'lib/anthropic/models/beta/session_list_params.rb', line 39

optional :created_at_lt, Time

#created_at_lte ⇒ Time?

Return sessions created at or before this time (inclusive).

Parameters:

  • (Time)

Returns:

  • (Time, nil)


45
# File 'lib/anthropic/models/beta/session_list_params.rb', line 45

optional :created_at_lte, Time

#deployment_id ⇒ String?

Filter sessions created by this deployment ID.

Parameters:

  • (String)

Returns:

  • (String, nil)


51
# File 'lib/anthropic/models/beta/session_list_params.rb', line 51

optional :deployment_id, String

#include_archived ⇒ Boolean?

When true, includes archived sessions. Default: false (exclude archived).

Parameters:

Returns:



57
# File 'lib/anthropic/models/beta/session_list_params.rb', line 57

optional :include_archived, Anthropic::Internal::Type::Boolean

#limit ⇒ Integer?

Maximum number of results to return.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


63
# File 'lib/anthropic/models/beta/session_list_params.rb', line 63

optional :limit, Integer

#memory_store_id ⇒ String?

Filter sessions whose resources contain a memory_store with this memory store ID.

Parameters:

  • (String)

Returns:

  • (String, nil)


70
# File 'lib/anthropic/models/beta/session_list_params.rb', line 70

optional :memory_store_id, String

#order ⇒ Symbol, ...

Sort direction for results, ordered by created_at. Defaults to desc (newest first).

Parameters:

  • (Anthropic::Models::Beta::SessionListParams::order)

Returns:



77
# File 'lib/anthropic/models/beta/session_list_params.rb', line 77

optional :order, enum: -> { Anthropic::Beta::SessionListParams::Order }

#page ⇒ String?

Opaque pagination cursor from a previous response.

Parameters:

  • (String)

Returns:

  • (String, nil)


83
# File 'lib/anthropic/models/beta/session_list_params.rb', line 83

optional :page, String

#statuses ⇒ Array<Symbol, Anthropic::Models::Beta::SessionListParams::Status>?

Filter by session status. Repeat the parameter to match any of multiple statuses.

Parameters:

  • (::Array[Anthropic::Models::Beta::SessionListParams::status])

Returns:



90
91
# File 'lib/anthropic/models/beta/session_list_params.rb', line 90

optional :statuses,
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::SessionListParams::Status] }

#workspace_id ⇒ String?

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Parameters:

  • (String)

Returns:

  • (String, nil)


109
# File 'lib/anthropic/models/beta/session_list_params.rb', line 109

optional :workspace_id, String

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/session_list_params.rb', line 155

Instance Method Details

#to_hash ⇒ { agent_id: String, agent_version: Integer, created_at_gt: Time, created_at_gte: Time, created_at_lt: Time, created_at_lte: Time, deployment_id: String, include_archived: bool, limit: Integer, memory_store_id: String, order: Anthropic::Models::Beta::SessionListParams::order, page: String, statuses: ::Array[Anthropic::Models::Beta::SessionListParams::status], betas: ::Array[Anthropic::Models::anthropic_beta], workspace_id: String, request_options: Anthropic::RequestOptions }

Returns:

  • ({ agent_id: String, agent_version: Integer, created_at_gt: Time, created_at_gte: Time, created_at_lt: Time, created_at_lte: Time, deployment_id: String, include_archived: bool, limit: Integer, memory_store_id: String, order: Anthropic::Models::Beta::SessionListParams::order, page: String, statuses: ::Array[Anthropic::Models::Beta::SessionListParams::status], betas: ::Array[Anthropic::Models::anthropic_beta], workspace_id: String, request_options: Anthropic::RequestOptions })


113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'sig/anthropic/models/beta/session_list_params.rbs', line 113

def to_hash: -> {
  agent_id: String,
  agent_version: Integer,
  created_at_gt: Time,
  created_at_gte: Time,
  created_at_lt: Time,
  created_at_lte: Time,
  deployment_id: String,
  include_archived: bool,
  limit: Integer,
  memory_store_id: String,
  order: Anthropic::Models::Beta::SessionListParams::order,
  page: String,
  statuses: ::Array[Anthropic::Models::Beta::SessionListParams::status],
  betas: ::Array[Anthropic::Models::anthropic_beta],
  workspace_id: String,
  request_options: Anthropic::RequestOptions
}