fetch_hive 0.2.5 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -5
- data/lib/fetch_hive/client.rb +139 -13
- data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +97 -0
- data/lib/fetch_hive/generated/api/agent_chats_api.rb +413 -0
- data/lib/fetch_hive/generated/api/agents_api.rb +359 -4
- data/lib/fetch_hive/generated/api/assets_api.rb +153 -0
- data/lib/fetch_hive/generated/api/hive_agents_api.rb +90 -0
- data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +482 -0
- data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +457 -0
- data/lib/fetch_hive/generated/api/models_api.rb +79 -0
- data/lib/fetch_hive/generated/api/prompts_api.rb +3 -3
- data/lib/fetch_hive/generated/api/requests_api.rb +85 -0
- data/lib/fetch_hive/generated/api/search_services_api.rb +147 -0
- data/lib/fetch_hive/generated/api/workflows_api.rb +2 -2
- data/lib/fetch_hive/generated/api_client.rb +2 -2
- data/lib/fetch_hive/generated/api_error.rb +2 -2
- data/lib/fetch_hive/generated/api_model_base.rb +2 -2
- data/lib/fetch_hive/generated/configuration.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_attachment.rb +104 -0
- data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +191 -0
- data/lib/fetch_hive/generated/models/agent_message.rb +11 -11
- data/lib/fetch_hive/generated/models/asset_object.rb +350 -0
- data/lib/fetch_hive/generated/models/asset_object_transcription.rb +212 -0
- data/lib/fetch_hive/generated/models/async_config.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/error_response.rb +23 -17
- data/lib/fetch_hive/generated/models/generated_artifact.rb +236 -0
- data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +474 -0
- data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +319 -0
- data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +294 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +216 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +175 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +276 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +294 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +192 -0
- data/lib/fetch_hive/generated/models/hive_agent_sources.rb +187 -0
- data/lib/fetch_hive/generated/models/invoke_agent_request.rb +92 -11
- data/lib/fetch_hive/generated/models/invoke_agent_response.rb +18 -6
- data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +239 -0
- data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +213 -0
- data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +2 -2
- data/lib/fetch_hive/generated/models/knowledge_base_object.rb +470 -0
- data/lib/fetch_hive/generated/models/metadata_value.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +164 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +147 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +164 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +304 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +164 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +265 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +147 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +217 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +305 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +175 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +252 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +216 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +158 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +322 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +234 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +302 -0
- data/lib/fetch_hive/generated/models/sse_chunk.rb +13 -4
- data/lib/fetch_hive/generated/models/token_usage.rb +2 -2
- data/lib/fetch_hive/generated/models/tool_invocation.rb +2 -2
- data/lib/fetch_hive/generated/version.rb +2 -2
- metadata +83 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
3
|
|
|
4
|
-
#The Fetch Hive public API lets you invoke prompts, workflows, and
|
|
4
|
+
#The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.2.
|
|
6
|
+
The version of the OpenAPI document: 0.2.8
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -19,8 +19,209 @@ module FetchHive::Generated
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Delete an agent
|
|
23
|
+
# Destroys the agent record.
|
|
24
|
+
# @param workspace_id [String] Workspace UUID
|
|
25
|
+
# @param id [String] Agent UUID
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [DeletePublicWorkspacesAgents200Response]
|
|
28
|
+
def delete_public_workspaces_agents(workspace_id, id, opts = {})
|
|
29
|
+
data, _status_code, _headers = delete_public_workspaces_agents_with_http_info(workspace_id, id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Delete an agent
|
|
34
|
+
# Destroys the agent record.
|
|
35
|
+
# @param workspace_id [String] Workspace UUID
|
|
36
|
+
# @param id [String] Agent UUID
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(DeletePublicWorkspacesAgents200Response, Integer, Hash)>] DeletePublicWorkspacesAgents200Response data, response status code and response headers
|
|
39
|
+
def delete_public_workspaces_agents_with_http_info(workspace_id, id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.delete_public_workspaces_agents ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'workspace_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.delete_public_workspaces_agents"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.delete_public_workspaces_agents"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:debug_body]
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || 'DeletePublicWorkspacesAgents200Response'
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"AgentsApi.delete_public_workspaces_agents",
|
|
76
|
+
:header_params => header_params,
|
|
77
|
+
:query_params => query_params,
|
|
78
|
+
:form_params => form_params,
|
|
79
|
+
:body => post_body,
|
|
80
|
+
:auth_names => auth_names,
|
|
81
|
+
:return_type => return_type
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
85
|
+
if @api_client.config.debugging
|
|
86
|
+
@api_client.config.logger.debug "API called: AgentsApi#delete_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Get an agent
|
|
92
|
+
# Returns a single active agent belonging to the requested workspace.
|
|
93
|
+
# @param workspace_id [String] Workspace UUID
|
|
94
|
+
# @param id [String] Agent UUID
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [GetPublicWorkspacesAgents200Response]
|
|
97
|
+
def get_public_workspaces_agents(workspace_id, id, opts = {})
|
|
98
|
+
data, _status_code, _headers = get_public_workspaces_agents_with_http_info(workspace_id, id, opts)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Get an agent
|
|
103
|
+
# Returns a single active agent belonging to the requested workspace.
|
|
104
|
+
# @param workspace_id [String] Workspace UUID
|
|
105
|
+
# @param id [String] Agent UUID
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @return [Array<(GetPublicWorkspacesAgents200Response, Integer, Hash)>] GetPublicWorkspacesAgents200Response data, response status code and response headers
|
|
108
|
+
def get_public_workspaces_agents_with_http_info(workspace_id, id, opts = {})
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_public_workspaces_agents ...'
|
|
111
|
+
end
|
|
112
|
+
# verify the required parameter 'workspace_id' is set
|
|
113
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
114
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.get_public_workspaces_agents"
|
|
115
|
+
end
|
|
116
|
+
# verify the required parameter 'id' is set
|
|
117
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_public_workspaces_agents"
|
|
119
|
+
end
|
|
120
|
+
# resource path
|
|
121
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
122
|
+
|
|
123
|
+
# query parameters
|
|
124
|
+
query_params = opts[:query_params] || {}
|
|
125
|
+
|
|
126
|
+
# header parameters
|
|
127
|
+
header_params = opts[:header_params] || {}
|
|
128
|
+
# HTTP header 'Accept' (if needed)
|
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
130
|
+
|
|
131
|
+
# form parameters
|
|
132
|
+
form_params = opts[:form_params] || {}
|
|
133
|
+
|
|
134
|
+
# http body (model)
|
|
135
|
+
post_body = opts[:debug_body]
|
|
136
|
+
|
|
137
|
+
# return_type
|
|
138
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesAgents200Response'
|
|
139
|
+
|
|
140
|
+
# auth_names
|
|
141
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
142
|
+
|
|
143
|
+
new_options = opts.merge(
|
|
144
|
+
:operation => :"AgentsApi.get_public_workspaces_agents",
|
|
145
|
+
:header_params => header_params,
|
|
146
|
+
:query_params => query_params,
|
|
147
|
+
:form_params => form_params,
|
|
148
|
+
:body => post_body,
|
|
149
|
+
:auth_names => auth_names,
|
|
150
|
+
:return_type => return_type
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
154
|
+
if @api_client.config.debugging
|
|
155
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
156
|
+
end
|
|
157
|
+
return data, status_code, headers
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# List public workspace agents
|
|
161
|
+
# Returns standalone agents scoped to the requested public API workspace.
|
|
162
|
+
# @param workspace_id [String] Workspace UUID
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @return [GetPublicWorkspacesAgents2200Response]
|
|
165
|
+
def get_public_workspaces_agents2(workspace_id, opts = {})
|
|
166
|
+
data, _status_code, _headers = get_public_workspaces_agents2_with_http_info(workspace_id, opts)
|
|
167
|
+
data
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# List public workspace agents
|
|
171
|
+
# Returns standalone agents scoped to the requested public API workspace.
|
|
172
|
+
# @param workspace_id [String] Workspace UUID
|
|
173
|
+
# @param [Hash] opts the optional parameters
|
|
174
|
+
# @return [Array<(GetPublicWorkspacesAgents2200Response, Integer, Hash)>] GetPublicWorkspacesAgents2200Response data, response status code and response headers
|
|
175
|
+
def get_public_workspaces_agents2_with_http_info(workspace_id, opts = {})
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_public_workspaces_agents2 ...'
|
|
178
|
+
end
|
|
179
|
+
# verify the required parameter 'workspace_id' is set
|
|
180
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.get_public_workspaces_agents2"
|
|
182
|
+
end
|
|
183
|
+
# resource path
|
|
184
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
185
|
+
|
|
186
|
+
# query parameters
|
|
187
|
+
query_params = opts[:query_params] || {}
|
|
188
|
+
|
|
189
|
+
# header parameters
|
|
190
|
+
header_params = opts[:header_params] || {}
|
|
191
|
+
# HTTP header 'Accept' (if needed)
|
|
192
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
193
|
+
|
|
194
|
+
# form parameters
|
|
195
|
+
form_params = opts[:form_params] || {}
|
|
196
|
+
|
|
197
|
+
# http body (model)
|
|
198
|
+
post_body = opts[:debug_body]
|
|
199
|
+
|
|
200
|
+
# return_type
|
|
201
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesAgents2200Response'
|
|
202
|
+
|
|
203
|
+
# auth_names
|
|
204
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
205
|
+
|
|
206
|
+
new_options = opts.merge(
|
|
207
|
+
:operation => :"AgentsApi.get_public_workspaces_agents2",
|
|
208
|
+
:header_params => header_params,
|
|
209
|
+
:query_params => query_params,
|
|
210
|
+
:form_params => form_params,
|
|
211
|
+
:body => post_body,
|
|
212
|
+
:auth_names => auth_names,
|
|
213
|
+
:return_type => return_type
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_public_workspaces_agents2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
22
223
|
# Invoke an agent
|
|
23
|
-
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`.
|
|
224
|
+
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`. Documents and image URLs can be supplied in `attachments`. Existing account Assets can be discovered through `known_artifact_refs` and explicitly selected through `artifact_refs`.
|
|
24
225
|
# @param invoke_agent_request [InvokeAgentRequest]
|
|
25
226
|
# @param [Hash] opts the optional parameters
|
|
26
227
|
# @return [InvokeAgentResponse]
|
|
@@ -30,7 +231,7 @@ module FetchHive::Generated
|
|
|
30
231
|
end
|
|
31
232
|
|
|
32
233
|
# Invoke an agent
|
|
33
|
-
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`.
|
|
234
|
+
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`. Documents and image URLs can be supplied in `attachments`. Existing account Assets can be discovered through `known_artifact_refs` and explicitly selected through `artifact_refs`.
|
|
34
235
|
# @param invoke_agent_request [InvokeAgentRequest]
|
|
35
236
|
# @param [Hash] opts the optional parameters
|
|
36
237
|
# @return [Array<(InvokeAgentResponse, Integer, Hash)>] InvokeAgentResponse data, response status code and response headers
|
|
@@ -86,5 +287,159 @@ module FetchHive::Generated
|
|
|
86
287
|
end
|
|
87
288
|
return data, status_code, headers
|
|
88
289
|
end
|
|
290
|
+
|
|
291
|
+
# Update an agent
|
|
292
|
+
# Updates an existing agent in the requested workspace.
|
|
293
|
+
# @param workspace_id [String] Workspace UUID
|
|
294
|
+
# @param id [String] Agent UUID
|
|
295
|
+
# @param patch_public_workspaces_agents_request [PatchPublicWorkspacesAgentsRequest]
|
|
296
|
+
# @param [Hash] opts the optional parameters
|
|
297
|
+
# @return [PatchPublicWorkspacesAgents200Response]
|
|
298
|
+
def patch_public_workspaces_agents(workspace_id, id, patch_public_workspaces_agents_request, opts = {})
|
|
299
|
+
data, _status_code, _headers = patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts)
|
|
300
|
+
data
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Update an agent
|
|
304
|
+
# Updates an existing agent in the requested workspace.
|
|
305
|
+
# @param workspace_id [String] Workspace UUID
|
|
306
|
+
# @param id [String] Agent UUID
|
|
307
|
+
# @param patch_public_workspaces_agents_request [PatchPublicWorkspacesAgentsRequest]
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @return [Array<(PatchPublicWorkspacesAgents200Response, Integer, Hash)>] PatchPublicWorkspacesAgents200Response data, response status code and response headers
|
|
310
|
+
def patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.patch_public_workspaces_agents ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'workspace_id' is set
|
|
315
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.patch_public_workspaces_agents"
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'id' is set
|
|
319
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.patch_public_workspaces_agents"
|
|
321
|
+
end
|
|
322
|
+
# verify the required parameter 'patch_public_workspaces_agents_request' is set
|
|
323
|
+
if @api_client.config.client_side_validation && patch_public_workspaces_agents_request.nil?
|
|
324
|
+
fail ArgumentError, "Missing the required parameter 'patch_public_workspaces_agents_request' when calling AgentsApi.patch_public_workspaces_agents"
|
|
325
|
+
end
|
|
326
|
+
# resource path
|
|
327
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
328
|
+
|
|
329
|
+
# query parameters
|
|
330
|
+
query_params = opts[:query_params] || {}
|
|
331
|
+
|
|
332
|
+
# header parameters
|
|
333
|
+
header_params = opts[:header_params] || {}
|
|
334
|
+
# HTTP header 'Accept' (if needed)
|
|
335
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
336
|
+
# HTTP header 'Content-Type'
|
|
337
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
338
|
+
if !content_type.nil?
|
|
339
|
+
header_params['Content-Type'] = content_type
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# form parameters
|
|
343
|
+
form_params = opts[:form_params] || {}
|
|
344
|
+
|
|
345
|
+
# http body (model)
|
|
346
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_public_workspaces_agents_request)
|
|
347
|
+
|
|
348
|
+
# return_type
|
|
349
|
+
return_type = opts[:debug_return_type] || 'PatchPublicWorkspacesAgents200Response'
|
|
350
|
+
|
|
351
|
+
# auth_names
|
|
352
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
353
|
+
|
|
354
|
+
new_options = opts.merge(
|
|
355
|
+
:operation => :"AgentsApi.patch_public_workspaces_agents",
|
|
356
|
+
:header_params => header_params,
|
|
357
|
+
:query_params => query_params,
|
|
358
|
+
:form_params => form_params,
|
|
359
|
+
:body => post_body,
|
|
360
|
+
:auth_names => auth_names,
|
|
361
|
+
:return_type => return_type
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
365
|
+
if @api_client.config.debugging
|
|
366
|
+
@api_client.config.logger.debug "API called: AgentsApi#patch_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
367
|
+
end
|
|
368
|
+
return data, status_code, headers
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Create an agent
|
|
372
|
+
# Creates a new agent in the requested workspace.
|
|
373
|
+
# @param workspace_id [String] Workspace UUID
|
|
374
|
+
# @param post_public_workspaces_agents_request [PostPublicWorkspacesAgentsRequest]
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @return [PostPublicWorkspacesAgents200Response]
|
|
377
|
+
def post_public_workspaces_agents(workspace_id, post_public_workspaces_agents_request, opts = {})
|
|
378
|
+
data, _status_code, _headers = post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts)
|
|
379
|
+
data
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Create an agent
|
|
383
|
+
# Creates a new agent in the requested workspace.
|
|
384
|
+
# @param workspace_id [String] Workspace UUID
|
|
385
|
+
# @param post_public_workspaces_agents_request [PostPublicWorkspacesAgentsRequest]
|
|
386
|
+
# @param [Hash] opts the optional parameters
|
|
387
|
+
# @return [Array<(PostPublicWorkspacesAgents200Response, Integer, Hash)>] PostPublicWorkspacesAgents200Response data, response status code and response headers
|
|
388
|
+
def post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts = {})
|
|
389
|
+
if @api_client.config.debugging
|
|
390
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.post_public_workspaces_agents ...'
|
|
391
|
+
end
|
|
392
|
+
# verify the required parameter 'workspace_id' is set
|
|
393
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
394
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.post_public_workspaces_agents"
|
|
395
|
+
end
|
|
396
|
+
# verify the required parameter 'post_public_workspaces_agents_request' is set
|
|
397
|
+
if @api_client.config.client_side_validation && post_public_workspaces_agents_request.nil?
|
|
398
|
+
fail ArgumentError, "Missing the required parameter 'post_public_workspaces_agents_request' when calling AgentsApi.post_public_workspaces_agents"
|
|
399
|
+
end
|
|
400
|
+
# resource path
|
|
401
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
402
|
+
|
|
403
|
+
# query parameters
|
|
404
|
+
query_params = opts[:query_params] || {}
|
|
405
|
+
|
|
406
|
+
# header parameters
|
|
407
|
+
header_params = opts[:header_params] || {}
|
|
408
|
+
# HTTP header 'Accept' (if needed)
|
|
409
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
410
|
+
# HTTP header 'Content-Type'
|
|
411
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
412
|
+
if !content_type.nil?
|
|
413
|
+
header_params['Content-Type'] = content_type
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# form parameters
|
|
417
|
+
form_params = opts[:form_params] || {}
|
|
418
|
+
|
|
419
|
+
# http body (model)
|
|
420
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_public_workspaces_agents_request)
|
|
421
|
+
|
|
422
|
+
# return_type
|
|
423
|
+
return_type = opts[:debug_return_type] || 'PostPublicWorkspacesAgents200Response'
|
|
424
|
+
|
|
425
|
+
# auth_names
|
|
426
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
427
|
+
|
|
428
|
+
new_options = opts.merge(
|
|
429
|
+
:operation => :"AgentsApi.post_public_workspaces_agents",
|
|
430
|
+
:header_params => header_params,
|
|
431
|
+
:query_params => query_params,
|
|
432
|
+
:form_params => form_params,
|
|
433
|
+
:body => post_body,
|
|
434
|
+
:auth_names => auth_names,
|
|
435
|
+
:return_type => return_type
|
|
436
|
+
)
|
|
437
|
+
|
|
438
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
439
|
+
if @api_client.config.debugging
|
|
440
|
+
@api_client.config.logger.debug "API called: AgentsApi#post_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
441
|
+
end
|
|
442
|
+
return data, status_code, headers
|
|
443
|
+
end
|
|
89
444
|
end
|
|
90
445
|
end
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fetch Hive Public API
|
|
3
|
+
|
|
4
|
+
#The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.2.8
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module FetchHive::Generated
|
|
16
|
+
class AssetsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List public workspace assets
|
|
23
|
+
# Returns assets scoped to the workspace attached to the public API key.
|
|
24
|
+
# @param workspace_id [String] Workspace UUID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [GetPublicWorkspacesAssets200Response]
|
|
27
|
+
def get_public_workspaces_assets(workspace_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = get_public_workspaces_assets_with_http_info(workspace_id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# List public workspace assets
|
|
33
|
+
# Returns assets scoped to the workspace attached to the public API key.
|
|
34
|
+
# @param workspace_id [String] Workspace UUID
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(GetPublicWorkspacesAssets200Response, Integer, Hash)>] GetPublicWorkspacesAssets200Response data, response status code and response headers
|
|
37
|
+
def get_public_workspaces_assets_with_http_info(workspace_id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_public_workspaces_assets ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'workspace_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AssetsApi.get_public_workspaces_assets"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/public/workspaces/{workspace_id}/assets'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
|
|
56
|
+
# form parameters
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesAssets200Response'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"AssetsApi.get_public_workspaces_assets",
|
|
70
|
+
:header_params => header_params,
|
|
71
|
+
:query_params => query_params,
|
|
72
|
+
:form_params => form_params,
|
|
73
|
+
:body => post_body,
|
|
74
|
+
:auth_names => auth_names,
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_public_workspaces_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Upload a public workspace asset
|
|
86
|
+
# Uploads a file and creates a workspace-scoped Asset that can be used as a Hive Agent source.
|
|
87
|
+
# @param workspace_id [String] Workspace UUID
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [PostPublicWorkspacesAssets200Response]
|
|
90
|
+
def post_public_workspaces_assets(workspace_id, opts = {})
|
|
91
|
+
data, _status_code, _headers = post_public_workspaces_assets_with_http_info(workspace_id, opts)
|
|
92
|
+
data
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Upload a public workspace asset
|
|
96
|
+
# Uploads a file and creates a workspace-scoped Asset that can be used as a Hive Agent source.
|
|
97
|
+
# @param workspace_id [String] Workspace UUID
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [Array<(PostPublicWorkspacesAssets200Response, Integer, Hash)>] PostPublicWorkspacesAssets200Response data, response status code and response headers
|
|
100
|
+
def post_public_workspaces_assets_with_http_info(workspace_id, opts = {})
|
|
101
|
+
if @api_client.config.debugging
|
|
102
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.post_public_workspaces_assets ...'
|
|
103
|
+
end
|
|
104
|
+
# verify the required parameter 'workspace_id' is set
|
|
105
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AssetsApi.post_public_workspaces_assets"
|
|
107
|
+
end
|
|
108
|
+
# resource path
|
|
109
|
+
local_var_path = '/public/workspaces/{workspace_id}/assets'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
110
|
+
|
|
111
|
+
# query parameters
|
|
112
|
+
query_params = opts[:query_params] || {}
|
|
113
|
+
|
|
114
|
+
# header parameters
|
|
115
|
+
header_params = opts[:header_params] || {}
|
|
116
|
+
# HTTP header 'Accept' (if needed)
|
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
118
|
+
# HTTP header 'Content-Type'
|
|
119
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
120
|
+
if !content_type.nil?
|
|
121
|
+
header_params['Content-Type'] = content_type
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# form parameters
|
|
125
|
+
form_params = opts[:form_params] || {}
|
|
126
|
+
|
|
127
|
+
# http body (model)
|
|
128
|
+
post_body = opts[:debug_body]
|
|
129
|
+
|
|
130
|
+
# return_type
|
|
131
|
+
return_type = opts[:debug_return_type] || 'PostPublicWorkspacesAssets200Response'
|
|
132
|
+
|
|
133
|
+
# auth_names
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
135
|
+
|
|
136
|
+
new_options = opts.merge(
|
|
137
|
+
:operation => :"AssetsApi.post_public_workspaces_assets",
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: AssetsApi#post_public_workspaces_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
return data, status_code, headers
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fetch Hive Public API
|
|
3
|
+
|
|
4
|
+
#The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.2.8
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module FetchHive::Generated
|
|
16
|
+
class HiveAgentsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Invoke a Hive Agent
|
|
23
|
+
# Starts a Hive Agent run asynchronously and returns identifiers immediately. Hive Agent invocation does not stream and does not wait for the final answer in the HTTP response. A signed callback is sent to `async.callback_url` when the run completes, fails, or is cancelled. `async.enabled` must be `true` and `async.callback_url` is required.
|
|
24
|
+
# @param invoke_hive_agent_request [InvokeHiveAgentRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [InvokeHiveAgentResponse]
|
|
27
|
+
def invoke_hive_agent(invoke_hive_agent_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = invoke_hive_agent_with_http_info(invoke_hive_agent_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Invoke a Hive Agent
|
|
33
|
+
# Starts a Hive Agent run asynchronously and returns identifiers immediately. Hive Agent invocation does not stream and does not wait for the final answer in the HTTP response. A signed callback is sent to `async.callback_url` when the run completes, fails, or is cancelled. `async.enabled` must be `true` and `async.callback_url` is required.
|
|
34
|
+
# @param invoke_hive_agent_request [InvokeHiveAgentRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(InvokeHiveAgentResponse, Integer, Hash)>] InvokeHiveAgentResponse data, response status code and response headers
|
|
37
|
+
def invoke_hive_agent_with_http_info(invoke_hive_agent_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: HiveAgentsApi.invoke_hive_agent ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'invoke_hive_agent_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && invoke_hive_agent_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'invoke_hive_agent_request' when calling HiveAgentsApi.invoke_hive_agent"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/hive-agent/invoke'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(invoke_hive_agent_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'InvokeHiveAgentResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"HiveAgentsApi.invoke_hive_agent",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: HiveAgentsApi#invoke_hive_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|