Class: OpenApiOpenAIClient::ProjectsApi
- Inherits:
-
Object
- Object
- OpenApiOpenAIClient::ProjectsApi
- Defined in:
- lib/openapi_openai/api/projects_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#archive_project(project_id, opts = {}) ⇒ Project
Archives a project in the organization.
-
#archive_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Archives a project in the organization.
-
#create_project(project_create_request, opts = {}) ⇒ Project
Create a new project in the organization.
-
#create_project_service_account(project_id, project_service_account_create_request, opts = {}) ⇒ ProjectServiceAccountCreateResponse
Creates a new service account in the project.
-
#create_project_service_account_with_http_info(project_id, project_service_account_create_request, opts = {}) ⇒ Array<(ProjectServiceAccountCreateResponse, Integer, Hash)>
Creates a new service account in the project.
-
#create_project_user(project_id, project_user_create_request, opts = {}) ⇒ ProjectUser
Adds a user to the project.
-
#create_project_user_with_http_info(project_id, project_user_create_request, opts = {}) ⇒ Array<(ProjectUser, Integer, Hash)>
Adds a user to the project.
-
#create_project_with_http_info(project_create_request, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Create a new project in the organization.
-
#delete_project_api_key(project_id, key_id, opts = {}) ⇒ ProjectApiKeyDeleteResponse
Deletes an API key from the project.
-
#delete_project_api_key_with_http_info(project_id, key_id, opts = {}) ⇒ Array<(ProjectApiKeyDeleteResponse, Integer, Hash)>
Deletes an API key from the project.
-
#delete_project_service_account(project_id, service_account_id, opts = {}) ⇒ ProjectServiceAccountDeleteResponse
Deletes a service account from the project.
-
#delete_project_service_account_with_http_info(project_id, service_account_id, opts = {}) ⇒ Array<(ProjectServiceAccountDeleteResponse, Integer, Hash)>
Deletes a service account from the project.
-
#delete_project_user(project_id, user_id, opts = {}) ⇒ ProjectUserDeleteResponse
Deletes a user from the project.
-
#delete_project_user_with_http_info(project_id, user_id, opts = {}) ⇒ Array<(ProjectUserDeleteResponse, Integer, Hash)>
Deletes a user from the project.
-
#initialize(api_client = ApiClient.default) ⇒ ProjectsApi
constructor
A new instance of ProjectsApi.
-
#list_project_api_keys(project_id, opts = {}) ⇒ ProjectApiKeyListResponse
Returns a list of API keys in the project.
-
#list_project_api_keys_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectApiKeyListResponse, Integer, Hash)>
Returns a list of API keys in the project.
-
#list_project_rate_limits(project_id, opts = {}) ⇒ ProjectRateLimitListResponse
Returns the rate limits per model for a project.
-
#list_project_rate_limits_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectRateLimitListResponse, Integer, Hash)>
Returns the rate limits per model for a project.
-
#list_project_service_accounts(project_id, opts = {}) ⇒ ProjectServiceAccountListResponse
Returns a list of service accounts in the project.
-
#list_project_service_accounts_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectServiceAccountListResponse, Integer, Hash)>
Returns a list of service accounts in the project.
-
#list_project_users(project_id, opts = {}) ⇒ ProjectUserListResponse
Returns a list of users in the project.
-
#list_project_users_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectUserListResponse, Integer, Hash)>
Returns a list of users in the project.
-
#list_projects(opts = {}) ⇒ ProjectListResponse
Returns a list of projects.
-
#list_projects_with_http_info(opts = {}) ⇒ Array<(ProjectListResponse, Integer, Hash)>
Returns a list of projects.
-
#modify_project(project_id, project_update_request, opts = {}) ⇒ Project
Modifies a project in the organization.
-
#modify_project_user(project_id, user_id, project_user_update_request, opts = {}) ⇒ ProjectUser
Modifies a user’s role in the project.
-
#modify_project_user_with_http_info(project_id, user_id, project_user_update_request, opts = {}) ⇒ Array<(ProjectUser, Integer, Hash)>
Modifies a user's role in the project.
-
#modify_project_with_http_info(project_id, project_update_request, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Modifies a project in the organization.
-
#retrieve_project(project_id, opts = {}) ⇒ Project
Retrieves a project.
-
#retrieve_project_api_key(project_id, key_id, opts = {}) ⇒ ProjectApiKey
Retrieves an API key in the project.
-
#retrieve_project_api_key_with_http_info(project_id, key_id, opts = {}) ⇒ Array<(ProjectApiKey, Integer, Hash)>
Retrieves an API key in the project.
-
#retrieve_project_service_account(project_id, service_account_id, opts = {}) ⇒ ProjectServiceAccount
Retrieves a service account in the project.
-
#retrieve_project_service_account_with_http_info(project_id, service_account_id, opts = {}) ⇒ Array<(ProjectServiceAccount, Integer, Hash)>
Retrieves a service account in the project.
-
#retrieve_project_user(project_id, user_id, opts = {}) ⇒ ProjectUser
Retrieves a user in the project.
-
#retrieve_project_user_with_http_info(project_id, user_id, opts = {}) ⇒ Array<(ProjectUser, Integer, Hash)>
Retrieves a user in the project.
-
#retrieve_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Retrieves a project.
-
#update_project_rate_limits(project_id, rate_limit_id, project_rate_limit_update_request, opts = {}) ⇒ ProjectRateLimit
Updates a project rate limit.
-
#update_project_rate_limits_with_http_info(project_id, rate_limit_id, project_rate_limit_update_request, opts = {}) ⇒ Array<(ProjectRateLimit, Integer, Hash)>
Updates a project rate limit.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProjectsApi
Returns a new instance of ProjectsApi.
19 20 21 |
# File 'lib/openapi_openai/api/projects_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/openapi_openai/api/projects_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#archive_project(project_id, opts = {}) ⇒ Project
Archives a project in the organization. Archived projects cannot be used or updated.
26 27 28 29 |
# File 'lib/openapi_openai/api/projects_api.rb', line 26 def archive_project(project_id, opts = {}) data, _status_code, _headers = archive_project_with_http_info(project_id, opts) data end |
#archive_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Archives a project in the organization. Archived projects cannot be used or updated.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/openapi_openai/api/projects_api.rb', line 35 def archive_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.archive_project ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.archive_project" end # resource path local_var_path = '/organization/projects/{project_id}/archive'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Project' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.archive_project", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#archive_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_project(project_create_request, opts = {}) ⇒ Project
Create a new project in the organization. Projects can be created and archived, but cannot be deleted.
87 88 89 90 |
# File 'lib/openapi_openai/api/projects_api.rb', line 87 def create_project(project_create_request, opts = {}) data, _status_code, _headers = create_project_with_http_info(project_create_request, opts) data end |
#create_project_service_account(project_id, project_service_account_create_request, opts = {}) ⇒ ProjectServiceAccountCreateResponse
Creates a new service account in the project. This also returns an unredacted API key for the service account.
154 155 156 157 |
# File 'lib/openapi_openai/api/projects_api.rb', line 154 def create_project_service_account(project_id, project_service_account_create_request, opts = {}) data, _status_code, _headers = create_project_service_account_with_http_info(project_id, project_service_account_create_request, opts) data end |
#create_project_service_account_with_http_info(project_id, project_service_account_create_request, opts = {}) ⇒ Array<(ProjectServiceAccountCreateResponse, Integer, Hash)>
Creates a new service account in the project. This also returns an unredacted API key for the service account.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/openapi_openai/api/projects_api.rb', line 164 def create_project_service_account_with_http_info(project_id, project_service_account_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.create_project_service_account ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.create_project_service_account" end # verify the required parameter 'project_service_account_create_request' is set if @api_client.config.client_side_validation && project_service_account_create_request.nil? fail ArgumentError, "Missing the required parameter 'project_service_account_create_request' when calling ProjectsApi.create_project_service_account" end # resource path local_var_path = '/organization/projects/{project_id}/service_accounts'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_service_account_create_request) # return_type return_type = opts[:debug_return_type] || 'ProjectServiceAccountCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.create_project_service_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#create_project_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_project_user(project_id, project_user_create_request, opts = {}) ⇒ ProjectUser
Adds a user to the project. Users must already be members of the organization to be added to a project.
226 227 228 229 |
# File 'lib/openapi_openai/api/projects_api.rb', line 226 def create_project_user(project_id, project_user_create_request, opts = {}) data, _status_code, _headers = create_project_user_with_http_info(project_id, project_user_create_request, opts) data end |
#create_project_user_with_http_info(project_id, project_user_create_request, opts = {}) ⇒ Array<(ProjectUser, Integer, Hash)>
Adds a user to the project. Users must already be members of the organization to be added to a project.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/openapi_openai/api/projects_api.rb', line 236 def create_project_user_with_http_info(project_id, project_user_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.create_project_user ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.create_project_user" end # verify the required parameter 'project_user_create_request' is set if @api_client.config.client_side_validation && project_user_create_request.nil? fail ArgumentError, "Missing the required parameter 'project_user_create_request' when calling ProjectsApi.create_project_user" end # resource path local_var_path = '/organization/projects/{project_id}/users'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_user_create_request) # return_type return_type = opts[:debug_return_type] || 'ProjectUser' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.create_project_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#create_project_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_project_with_http_info(project_create_request, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Create a new project in the organization. Projects can be created and archived, but cannot be deleted.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/openapi_openai/api/projects_api.rb', line 96 def create_project_with_http_info(project_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.create_project ...' end # verify the required parameter 'project_create_request' is set if @api_client.config.client_side_validation && project_create_request.nil? fail ArgumentError, "Missing the required parameter 'project_create_request' when calling ProjectsApi.create_project" end # resource path local_var_path = '/organization/projects' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_create_request) # return_type return_type = opts[:debug_return_type] || 'Project' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.create_project", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_project_api_key(project_id, key_id, opts = {}) ⇒ ProjectApiKeyDeleteResponse
Deletes an API key from the project.
298 299 300 301 |
# File 'lib/openapi_openai/api/projects_api.rb', line 298 def delete_project_api_key(project_id, key_id, opts = {}) data, _status_code, _headers = delete_project_api_key_with_http_info(project_id, key_id, opts) data end |
#delete_project_api_key_with_http_info(project_id, key_id, opts = {}) ⇒ Array<(ProjectApiKeyDeleteResponse, Integer, Hash)>
Deletes an API key from the project.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/openapi_openai/api/projects_api.rb', line 308 def delete_project_api_key_with_http_info(project_id, key_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project_api_key ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.delete_project_api_key" end # verify the required parameter 'key_id' is set if @api_client.config.client_side_validation && key_id.nil? fail ArgumentError, "Missing the required parameter 'key_id' when calling ProjectsApi.delete_project_api_key" end # resource path local_var_path = '/organization/projects/{project_id}/api_keys/{key_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectApiKeyDeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.delete_project_api_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#delete_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_project_service_account(project_id, service_account_id, opts = {}) ⇒ ProjectServiceAccountDeleteResponse
Deletes a service account from the project.
365 366 367 368 |
# File 'lib/openapi_openai/api/projects_api.rb', line 365 def delete_project_service_account(project_id, service_account_id, opts = {}) data, _status_code, _headers = delete_project_service_account_with_http_info(project_id, service_account_id, opts) data end |
#delete_project_service_account_with_http_info(project_id, service_account_id, opts = {}) ⇒ Array<(ProjectServiceAccountDeleteResponse, Integer, Hash)>
Deletes a service account from the project.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/openapi_openai/api/projects_api.rb', line 375 def delete_project_service_account_with_http_info(project_id, service_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project_service_account ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.delete_project_service_account" end # verify the required parameter 'service_account_id' is set if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ProjectsApi.delete_project_service_account" end # resource path local_var_path = '/organization/projects/{project_id}/service_accounts/{service_account_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'service_account_id' + '}', CGI.escape(service_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectServiceAccountDeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.delete_project_service_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#delete_project_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_project_user(project_id, user_id, opts = {}) ⇒ ProjectUserDeleteResponse
Deletes a user from the project.
432 433 434 435 |
# File 'lib/openapi_openai/api/projects_api.rb', line 432 def delete_project_user(project_id, user_id, opts = {}) data, _status_code, _headers = delete_project_user_with_http_info(project_id, user_id, opts) data end |
#delete_project_user_with_http_info(project_id, user_id, opts = {}) ⇒ Array<(ProjectUserDeleteResponse, Integer, Hash)>
Deletes a user from the project.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
# File 'lib/openapi_openai/api/projects_api.rb', line 442 def delete_project_user_with_http_info(project_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project_user ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.delete_project_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling ProjectsApi.delete_project_user" end # resource path local_var_path = '/organization/projects/{project_id}/users/{user_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectUserDeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.delete_project_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#delete_project_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_project_api_keys(project_id, opts = {}) ⇒ ProjectApiKeyListResponse
Returns a list of API keys in the project.
500 501 502 503 |
# File 'lib/openapi_openai/api/projects_api.rb', line 500 def list_project_api_keys(project_id, opts = {}) data, _status_code, _headers = list_project_api_keys_with_http_info(project_id, opts) data end |
#list_project_api_keys_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectApiKeyListResponse, Integer, Hash)>
Returns a list of API keys in the project.
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/openapi_openai/api/projects_api.rb', line 511 def list_project_api_keys_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.list_project_api_keys ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.list_project_api_keys" end # resource path local_var_path = '/organization/projects/{project_id}/api_keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectApiKeyListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.list_project_api_keys", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#list_project_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_project_rate_limits(project_id, opts = {}) ⇒ ProjectRateLimitListResponse
Returns the rate limits per model for a project.
568 569 570 571 |
# File 'lib/openapi_openai/api/projects_api.rb', line 568 def list_project_rate_limits(project_id, opts = {}) data, _status_code, _headers = list_project_rate_limits_with_http_info(project_id, opts) data end |
#list_project_rate_limits_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectRateLimitListResponse, Integer, Hash)>
Returns the rate limits per model for a project.
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/openapi_openai/api/projects_api.rb', line 580 def list_project_rate_limits_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.list_project_rate_limits ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.list_project_rate_limits" end # resource path local_var_path = '/organization/projects/{project_id}/rate_limits'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectRateLimitListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.list_project_rate_limits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#list_project_rate_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_project_service_accounts(project_id, opts = {}) ⇒ ProjectServiceAccountListResponse
Returns a list of service accounts in the project.
637 638 639 640 |
# File 'lib/openapi_openai/api/projects_api.rb', line 637 def list_project_service_accounts(project_id, opts = {}) data, _status_code, _headers = list_project_service_accounts_with_http_info(project_id, opts) data end |
#list_project_service_accounts_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectServiceAccountListResponse, Integer, Hash)>
Returns a list of service accounts in the project.
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 |
# File 'lib/openapi_openai/api/projects_api.rb', line 648 def list_project_service_accounts_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.list_project_service_accounts ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.list_project_service_accounts" end # resource path local_var_path = '/organization/projects/{project_id}/service_accounts'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectServiceAccountListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.list_project_service_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#list_project_service_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_project_users(project_id, opts = {}) ⇒ ProjectUserListResponse
Returns a list of users in the project.
704 705 706 707 |
# File 'lib/openapi_openai/api/projects_api.rb', line 704 def list_project_users(project_id, opts = {}) data, _status_code, _headers = list_project_users_with_http_info(project_id, opts) data end |
#list_project_users_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectUserListResponse, Integer, Hash)>
Returns a list of users in the project.
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/openapi_openai/api/projects_api.rb', line 715 def list_project_users_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.list_project_users ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.list_project_users" end # resource path local_var_path = '/organization/projects/{project_id}/users'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectUserListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.list_project_users", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#list_project_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_projects(opts = {}) ⇒ ProjectListResponse
Returns a list of projects.
771 772 773 774 |
# File 'lib/openapi_openai/api/projects_api.rb', line 771 def list_projects(opts = {}) data, _status_code, _headers = list_projects_with_http_info(opts) data end |
#list_projects_with_http_info(opts = {}) ⇒ Array<(ProjectListResponse, Integer, Hash)>
Returns a list of projects.
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/openapi_openai/api/projects_api.rb', line 782 def list_projects_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.list_projects ...' end # resource path local_var_path = '/organization/projects' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'include_archived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.list_projects", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#modify_project(project_id, project_update_request, opts = {}) ⇒ Project
Modifies a project in the organization.
834 835 836 837 |
# File 'lib/openapi_openai/api/projects_api.rb', line 834 def modify_project(project_id, project_update_request, opts = {}) data, _status_code, _headers = modify_project_with_http_info(project_id, project_update_request, opts) data end |
#modify_project_user(project_id, user_id, project_user_update_request, opts = {}) ⇒ ProjectUser
Modifies a user’s role in the project.
907 908 909 910 |
# File 'lib/openapi_openai/api/projects_api.rb', line 907 def modify_project_user(project_id, user_id, project_user_update_request, opts = {}) data, _status_code, _headers = modify_project_user_with_http_info(project_id, user_id, project_user_update_request, opts) data end |
#modify_project_user_with_http_info(project_id, user_id, project_user_update_request, opts = {}) ⇒ Array<(ProjectUser, Integer, Hash)>
Modifies a user's role in the project.
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'lib/openapi_openai/api/projects_api.rb', line 918 def modify_project_user_with_http_info(project_id, user_id, project_user_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.modify_project_user ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.modify_project_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling ProjectsApi.modify_project_user" end # verify the required parameter 'project_user_update_request' is set if @api_client.config.client_side_validation && project_user_update_request.nil? fail ArgumentError, "Missing the required parameter 'project_user_update_request' when calling ProjectsApi.modify_project_user" end # resource path local_var_path = '/organization/projects/{project_id}/users/{user_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_user_update_request) # return_type return_type = opts[:debug_return_type] || 'ProjectUser' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.modify_project_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#modify_project_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#modify_project_with_http_info(project_id, project_update_request, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Modifies a project in the organization.
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/openapi_openai/api/projects_api.rb', line 844 def modify_project_with_http_info(project_id, project_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.modify_project ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.modify_project" end # verify the required parameter 'project_update_request' is set if @api_client.config.client_side_validation && project_update_request.nil? fail ArgumentError, "Missing the required parameter 'project_update_request' when calling ProjectsApi.modify_project" end # resource path local_var_path = '/organization/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_update_request) # return_type return_type = opts[:debug_return_type] || 'Project' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.modify_project", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#modify_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_project(project_id, opts = {}) ⇒ Project
Retrieves a project.
983 984 985 986 |
# File 'lib/openapi_openai/api/projects_api.rb', line 983 def retrieve_project(project_id, opts = {}) data, _status_code, _headers = retrieve_project_with_http_info(project_id, opts) data end |
#retrieve_project_api_key(project_id, key_id, opts = {}) ⇒ ProjectApiKey
Retrieves an API key in the project.
1045 1046 1047 1048 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1045 def retrieve_project_api_key(project_id, key_id, opts = {}) data, _status_code, _headers = retrieve_project_api_key_with_http_info(project_id, key_id, opts) data end |
#retrieve_project_api_key_with_http_info(project_id, key_id, opts = {}) ⇒ Array<(ProjectApiKey, Integer, Hash)>
Retrieves an API key in the project.
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1055 def retrieve_project_api_key_with_http_info(project_id, key_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.retrieve_project_api_key ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.retrieve_project_api_key" end # verify the required parameter 'key_id' is set if @api_client.config.client_side_validation && key_id.nil? fail ArgumentError, "Missing the required parameter 'key_id' when calling ProjectsApi.retrieve_project_api_key" end # resource path local_var_path = '/organization/projects/{project_id}/api_keys/{key_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectApiKey' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.retrieve_project_api_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#retrieve_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_project_service_account(project_id, service_account_id, opts = {}) ⇒ ProjectServiceAccount
Retrieves a service account in the project.
1112 1113 1114 1115 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1112 def retrieve_project_service_account(project_id, service_account_id, opts = {}) data, _status_code, _headers = retrieve_project_service_account_with_http_info(project_id, service_account_id, opts) data end |
#retrieve_project_service_account_with_http_info(project_id, service_account_id, opts = {}) ⇒ Array<(ProjectServiceAccount, Integer, Hash)>
Retrieves a service account in the project.
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1122 def retrieve_project_service_account_with_http_info(project_id, service_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.retrieve_project_service_account ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.retrieve_project_service_account" end # verify the required parameter 'service_account_id' is set if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ProjectsApi.retrieve_project_service_account" end # resource path local_var_path = '/organization/projects/{project_id}/service_accounts/{service_account_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'service_account_id' + '}', CGI.escape(service_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectServiceAccount' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.retrieve_project_service_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#retrieve_project_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_project_user(project_id, user_id, opts = {}) ⇒ ProjectUser
Retrieves a user in the project.
1179 1180 1181 1182 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1179 def retrieve_project_user(project_id, user_id, opts = {}) data, _status_code, _headers = retrieve_project_user_with_http_info(project_id, user_id, opts) data end |
#retrieve_project_user_with_http_info(project_id, user_id, opts = {}) ⇒ Array<(ProjectUser, Integer, Hash)>
Retrieves a user in the project.
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1189 def retrieve_project_user_with_http_info(project_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.retrieve_project_user ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.retrieve_project_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling ProjectsApi.retrieve_project_user" end # resource path local_var_path = '/organization/projects/{project_id}/users/{user_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectUser' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.retrieve_project_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#retrieve_project_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Retrieves a project.
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 |
# File 'lib/openapi_openai/api/projects_api.rb', line 992 def retrieve_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.retrieve_project ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.retrieve_project" end # resource path local_var_path = '/organization/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Project' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.retrieve_project", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#retrieve_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_project_rate_limits(project_id, rate_limit_id, project_rate_limit_update_request, opts = {}) ⇒ ProjectRateLimit
Updates a project rate limit.
1247 1248 1249 1250 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1247 def update_project_rate_limits(project_id, rate_limit_id, project_rate_limit_update_request, opts = {}) data, _status_code, _headers = update_project_rate_limits_with_http_info(project_id, rate_limit_id, project_rate_limit_update_request, opts) data end |
#update_project_rate_limits_with_http_info(project_id, rate_limit_id, project_rate_limit_update_request, opts = {}) ⇒ Array<(ProjectRateLimit, Integer, Hash)>
Updates a project rate limit.
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 |
# File 'lib/openapi_openai/api/projects_api.rb', line 1258 def update_project_rate_limits_with_http_info(project_id, rate_limit_id, project_rate_limit_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.update_project_rate_limits ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectsApi.update_project_rate_limits" end # verify the required parameter 'rate_limit_id' is set if @api_client.config.client_side_validation && rate_limit_id.nil? fail ArgumentError, "Missing the required parameter 'rate_limit_id' when calling ProjectsApi.update_project_rate_limits" end # verify the required parameter 'project_rate_limit_update_request' is set if @api_client.config.client_side_validation && project_rate_limit_update_request.nil? fail ArgumentError, "Missing the required parameter 'project_rate_limit_update_request' when calling ProjectsApi.update_project_rate_limits" end # resource path local_var_path = '/organization/projects/{project_id}/rate_limits/{rate_limit_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'rate_limit_id' + '}', CGI.escape(rate_limit_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_rate_limit_update_request) # return_type return_type = opts[:debug_return_type] || 'ProjectRateLimit' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ProjectsApi.update_project_rate_limits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectsApi#update_project_rate_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |