Class: InfluxDB2::API::OrganizationsApi
- Inherits:
-
Object
- Object
- InfluxDB2::API::OrganizationsApi
- Defined in:
- apis/lib/influxdb2/apis/generated/api/organizations_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_orgs_id(org_id, opts = {}) ⇒ nil
Delete an organization.
-
#delete_orgs_id_members_id(user_id, org_id, opts = {}) ⇒ nil
Remove a member from an organization.
-
#delete_orgs_id_members_id_with_http_info(user_id, org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a member from an organization.
-
#delete_orgs_id_owners_id(user_id, org_id, opts = {}) ⇒ nil
Remove an owner from an organization.
-
#delete_orgs_id_owners_id_with_http_info(user_id, org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove an owner from an organization.
-
#delete_orgs_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an organization.
-
#get_orgs(opts = {}) ⇒ Organizations
List all organizations.
-
#get_orgs_id(org_id, opts = {}) ⇒ Organization
Retrieve an organization.
-
#get_orgs_id_members(org_id, opts = {}) ⇒ ResourceMembers
List all members of an organization.
-
#get_orgs_id_members_with_http_info(org_id, opts = {}) ⇒ Array<(ResourceMembers, Integer, Hash)>
List all members of an organization.
-
#get_orgs_id_owners(org_id, opts = {}) ⇒ ResourceOwners
List all owners of an organization.
-
#get_orgs_id_owners_with_http_info(org_id, opts = {}) ⇒ Array<(ResourceOwners, Integer, Hash)>
List all owners of an organization.
-
#get_orgs_id_with_http_info(org_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Retrieve an organization.
-
#get_orgs_with_http_info(opts = {}) ⇒ Array<(Organizations, Integer, Hash)>
List all organizations.
-
#initialize(api_client = ApiClient.default) ⇒ OrganizationsApi
constructor
A new instance of OrganizationsApi.
-
#patch_orgs_id(org_id, patch_organization_request, opts = {}) ⇒ Organization
Update an organization.
-
#patch_orgs_id_with_http_info(org_id, patch_organization_request, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Update an organization.
-
#post_orgs(post_organization_request, opts = {}) ⇒ Organization
Create an organization.
-
#post_orgs_id_members(org_id, add_resource_member_request_body, opts = {}) ⇒ ResourceMember
Add a member to an organization.
-
#post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, opts = {}) ⇒ Array<(ResourceMember, Integer, Hash)>
Add a member to an organization.
-
#post_orgs_id_owners(org_id, add_resource_member_request_body, opts = {}) ⇒ ResourceOwner
Add an owner to an organization.
-
#post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, opts = {}) ⇒ Array<(ResourceOwner, Integer, Hash)>
Add an owner to an organization.
-
#post_orgs_with_http_info(post_organization_request, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Create an organization.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ OrganizationsApi
Returns a new instance of OrganizationsApi.
18 19 20 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#delete_orgs_id(org_id, opts = {}) ⇒ nil
Delete an organization
26 27 28 29 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 26 def delete_orgs_id(org_id, opts = {}) delete_orgs_id_with_http_info(org_id, opts) nil end |
#delete_orgs_id_members_id(user_id, org_id, opts = {}) ⇒ nil
Remove a member from an organization
91 92 93 94 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 91 def delete_orgs_id_members_id(user_id, org_id, opts = {}) delete_orgs_id_members_id_with_http_info(user_id, org_id, opts) nil end |
#delete_orgs_id_members_id_with_http_info(user_id, org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a member from an organization
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 148 149 150 151 152 153 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 102 def delete_orgs_id_members_id_with_http_info(user_id, org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_orgs_id_members_id ...' 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 OrganizationsApi.delete_orgs_id_members_id" end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.delete_orgs_id_members_id" end # resource path local_var_path = '/orgs/{orgID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'orgID' + '}', CGI.escape(org_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']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.delete_orgs_id_members_id", :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: OrganizationsApi#delete_orgs_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_orgs_id_owners_id(user_id, org_id, opts = {}) ⇒ nil
Remove an owner from an organization
161 162 163 164 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 161 def delete_orgs_id_owners_id(user_id, org_id, opts = {}) delete_orgs_id_owners_id_with_http_info(user_id, org_id, opts) nil end |
#delete_orgs_id_owners_id_with_http_info(user_id, org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove an owner from an organization
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 220 221 222 223 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 172 def delete_orgs_id_owners_id_with_http_info(user_id, org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_orgs_id_owners_id ...' 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 OrganizationsApi.delete_orgs_id_owners_id" end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.delete_orgs_id_owners_id" end # resource path local_var_path = '/orgs/{orgID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'orgID' + '}', CGI.escape(org_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']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.delete_orgs_id_owners_id", :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: OrganizationsApi#delete_orgs_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_orgs_id_with_http_info(org_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an organization
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 82 83 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 36 def delete_orgs_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_orgs_id ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.delete_orgs_id" end # resource path local_var_path = '/orgs/{orgID}'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.delete_orgs_id", :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: OrganizationsApi#delete_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orgs(opts = {}) ⇒ Organizations
List all organizations
235 236 237 238 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 235 def get_orgs(opts = {}) data, _status_code, _headers = get_orgs_with_http_info(opts) data end |
#get_orgs_id(org_id, opts = {}) ⇒ Organization
Retrieve an organization
318 319 320 321 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 318 def get_orgs_id(org_id, opts = {}) data, _status_code, _headers = get_orgs_id_with_http_info(org_id, opts) data end |
#get_orgs_id_members(org_id, opts = {}) ⇒ ResourceMembers
List all members of an organization
382 383 384 385 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 382 def get_orgs_id_members(org_id, opts = {}) data, _status_code, _headers = get_orgs_id_members_with_http_info(org_id, opts) data end |
#get_orgs_id_members_with_http_info(org_id, opts = {}) ⇒ Array<(ResourceMembers, Integer, Hash)>
List all members of an organization
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 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 392 def get_orgs_id_members_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_orgs_id_members ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.get_orgs_id_members" end # resource path local_var_path = '/orgs/{orgID}/members'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ResourceMembers' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.get_orgs_id_members", :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: OrganizationsApi#get_orgs_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orgs_id_owners(org_id, opts = {}) ⇒ ResourceOwners
List all owners of an organization
446 447 448 449 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 446 def get_orgs_id_owners(org_id, opts = {}) data, _status_code, _headers = get_orgs_id_owners_with_http_info(org_id, opts) data end |
#get_orgs_id_owners_with_http_info(org_id, opts = {}) ⇒ Array<(ResourceOwners, Integer, Hash)>
List all owners of an organization
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 493 494 495 496 497 498 499 500 501 502 503 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 456 def get_orgs_id_owners_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_orgs_id_owners ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.get_orgs_id_owners" end # resource path local_var_path = '/orgs/{orgID}/owners'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ResourceOwners' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.get_orgs_id_owners", :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: OrganizationsApi#get_orgs_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orgs_id_with_http_info(org_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Retrieve an organization
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 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 328 def get_orgs_id_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_orgs_id ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.get_orgs_id" end # resource path local_var_path = '/orgs/{orgID}'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.get_orgs_id", :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: OrganizationsApi#get_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orgs_with_http_info(opts = {}) ⇒ Array<(Organizations, Integer, Hash)>
List all organizations
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 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 250 def get_orgs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_orgs ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling OrganizationsApi.get_orgs, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationsApi.get_orgs, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationsApi.get_orgs, must be greater than or equal to 1.' end # resource path local_var_path = '/orgs' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'descending'] = opts[:'descending'] if !opts[:'descending'].nil? query_params[:'org'] = opts[:'org'] if !opts[:'org'].nil? query_params[:'orgID'] = opts[:'org_id'] if !opts[:'org_id'].nil? query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Organizations' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.get_orgs", :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: OrganizationsApi#get_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_orgs_id(org_id, patch_organization_request, opts = {}) ⇒ Organization
Update an organization
511 512 513 514 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 511 def patch_orgs_id(org_id, patch_organization_request, opts = {}) data, _status_code, _headers = patch_orgs_id_with_http_info(org_id, patch_organization_request, opts) data end |
#patch_orgs_id_with_http_info(org_id, patch_organization_request, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Update an organization
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 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 522 def patch_orgs_id_with_http_info(org_id, patch_organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.patch_orgs_id ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.patch_orgs_id" end # verify the required parameter 'patch_organization_request' is set if @api_client.config.client_side_validation && patch_organization_request.nil? fail ArgumentError, "Missing the required parameter 'patch_organization_request' when calling OrganizationsApi.patch_orgs_id" end # resource path local_var_path = '/orgs/{orgID}'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_organization_request) # return_type return_type = opts[:debug_return_type] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.patch_orgs_id", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationsApi#patch_orgs_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_orgs(post_organization_request, opts = {}) ⇒ Organization
Create an organization
582 583 584 585 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 582 def post_orgs(post_organization_request, opts = {}) data, _status_code, _headers = post_orgs_with_http_info(post_organization_request, opts) data end |
#post_orgs_id_members(org_id, add_resource_member_request_body, opts = {}) ⇒ ResourceMember
Add a member to an organization
649 650 651 652 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 649 def post_orgs_id_members(org_id, add_resource_member_request_body, opts = {}) data, _status_code, _headers = post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, opts) data end |
#post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, opts = {}) ⇒ Array<(ResourceMember, Integer, Hash)>
Add a member to an organization
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 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 660 def post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.post_orgs_id_members ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.post_orgs_id_members" end # verify the required parameter 'add_resource_member_request_body' is set if @api_client.config.client_side_validation && add_resource_member_request_body.nil? fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling OrganizationsApi.post_orgs_id_members" end # resource path local_var_path = '/orgs/{orgID}/members'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body) # return_type return_type = opts[:debug_return_type] || 'ResourceMember' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.post_orgs_id_members", :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: OrganizationsApi#post_orgs_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_orgs_id_owners(org_id, add_resource_member_request_body, opts = {}) ⇒ ResourceOwner
Add an owner to an organization
721 722 723 724 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 721 def post_orgs_id_owners(org_id, add_resource_member_request_body, opts = {}) data, _status_code, _headers = post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, opts) data end |
#post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, opts = {}) ⇒ Array<(ResourceOwner, Integer, Hash)>
Add an owner to an organization
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 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 732 def post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.post_orgs_id_owners ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.post_orgs_id_owners" end # verify the required parameter 'add_resource_member_request_body' is set if @api_client.config.client_side_validation && add_resource_member_request_body.nil? fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling OrganizationsApi.post_orgs_id_owners" end # resource path local_var_path = '/orgs/{orgID}/owners'.sub('{' + 'orgID' + '}', CGI.escape(org_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body) # return_type return_type = opts[:debug_return_type] || 'ResourceOwner' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.post_orgs_id_owners", :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: OrganizationsApi#post_orgs_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_orgs_with_http_info(post_organization_request, opts = {}) ⇒ Array<(Organization, Integer, Hash)>
Create an organization
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 630 631 632 633 634 635 636 637 638 639 640 641 |
# File 'apis/lib/influxdb2/apis/generated/api/organizations_api.rb', line 592 def post_orgs_with_http_info(post_organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationsApi.post_orgs ...' end # verify the required parameter 'post_organization_request' is set if @api_client.config.client_side_validation && post_organization_request.nil? fail ArgumentError, "Missing the required parameter 'post_organization_request' when calling OrganizationsApi.post_orgs" end # resource path local_var_path = '/orgs' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_organization_request) # return_type return_type = opts[:debug_return_type] || 'Organization' # auth_names auth_names = opts[:debug_auth_names] || ['header'] = opts.merge( :operation => :"OrganizationsApi.post_orgs", :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: OrganizationsApi#post_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |