class Vellum::FolderEntitiesClient
def add_entity_to_folder(folder_id:, entity_id:, request_options: nil)
-
(Void)-
Parameters:
-
request_options(RequestOptions) -- -
entity_id(String) -- The ID of the entity you would like to move. -
folder_id(String) -- The ID of the folder to which the entity should be added. This can be a UUID of a folder, or the name of a root directory (e.g. "PROMPT_SANDBOX").
def add_entity_to_folder(folder_id:, entity_id:, request_options: nil) @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers["X_API_KEY"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact req.body = { **(request_options&.additional_body_parameters || {}), entity_id: entity_id }.compact req.url "#{@request_client.default_environment[:Default]}/v1/folders/#{folder_id}/add-entity" end end
def initialize(request_client:)
-
(FolderEntitiesClient)-
Parameters:
-
request_client(RequestClient) --
def initialize(request_client:) # @type [RequestClient] @request_client = request_client end