Class: Cadenya::Resources::Agents::WebhookDeliveries
- Inherits:
-
Object
- Object
- Cadenya::Resources::Agents::WebhookDeliveries
- Defined in:
- lib/cadenya/resources/agents/webhook_deliveries.rb
Overview
Manage AI agents within a workspace. Agents define AI behavior and tool access.
Instance Method Summary collapse
-
#initialize(client:) ⇒ WebhookDeliveries
constructor
private
A new instance of WebhookDeliveries.
-
#list(agent_id, workspace_id:, cursor: nil, event_type: nil, limit: nil, objective_id: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Agents::WebhookDelivery>
Lists all webhook deliveries for an agent.
Constructor Details
#initialize(client:) ⇒ WebhookDeliveries
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of WebhookDeliveries.
49 50 51 |
# File 'lib/cadenya/resources/agents/webhook_deliveries.rb', line 49 def initialize(client:) @client = client end |
Instance Method Details
#list(agent_id, workspace_id:, cursor: nil, event_type: nil, limit: nil, objective_id: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Agents::WebhookDelivery>
Lists all webhook deliveries for an agent
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cadenya/resources/agents/webhook_deliveries.rb', line 29 def list(agent_id, params) parsed, = Cadenya::Agents::WebhookDeliveryListParams.dump_request(params) query = Cadenya::Internal::Util.encode_query_params(parsed) workspace_id = parsed.delete(:workspace_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["v1/workspaces/%1$s/agents/%2$s/webhook_deliveries", workspace_id, agent_id], query: query.transform_keys(event_type: "eventType", objective_id: "objectiveId"), page: Cadenya::Internal::CursorPagination, model: Cadenya::Agents::WebhookDelivery, options: ) end |