Class: OryClient::WorkspaceApi
- Inherits:
-
Object
- Object
- OryClient::WorkspaceApi
- Defined in:
- lib/ory-client/api/workspace_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_workspace(opts = {}) ⇒ Workspace
Create a new workspace.
-
#create_workspace_api_key(workspace, opts = {}) ⇒ WorkspaceApiKey
Create workspace API key Create an API key for a workspace.
-
#create_workspace_api_key_with_http_info(workspace, opts = {}) ⇒ Array<(WorkspaceApiKey, Integer, Hash)>
Create workspace API key Create an API key for a workspace.
-
#create_workspace_with_http_info(opts = {}) ⇒ Array<(Workspace, Integer, Hash)>
Create a new workspace.
-
#delete_workspace_api_key(workspace, token_id, opts = {}) ⇒ nil
Delete workspace API token Deletes an API token and immediately removes it.
-
#delete_workspace_api_key_with_http_info(workspace, token_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete workspace API token Deletes an API token and immediately removes it.
-
#get_workspace(workspace, opts = {}) ⇒ Workspace
Get a workspace Any workspace member can access this endpoint.
-
#get_workspace_with_http_info(workspace, opts = {}) ⇒ Array<(Workspace, Integer, Hash)>
Get a workspace Any workspace member can access this endpoint.
-
#initialize(api_client = ApiClient.default) ⇒ WorkspaceApi
constructor
A new instance of WorkspaceApi.
-
#list_workspace_api_keys(workspace, opts = {}) ⇒ Array<WorkspaceApiKey>
List a workspace’s API Tokens A list of all the workspace’s API tokens.
-
#list_workspace_api_keys_with_http_info(workspace, opts = {}) ⇒ Array<(Array<WorkspaceApiKey>, Integer, Hash)>
List a workspace's API Tokens A list of all the workspace's API tokens.
-
#list_workspace_projects(workspace, opts = {}) ⇒ ListWorkspaceProjects
List all projects of a workspace Any workspace member can access this endpoint.
-
#list_workspace_projects_with_http_info(workspace, opts = {}) ⇒ Array<(ListWorkspaceProjects, Integer, Hash)>
List all projects of a workspace Any workspace member can access this endpoint.
-
#list_workspaces(opts = {}) ⇒ ListWorkspaces
List workspaces the user is a member of.
-
#list_workspaces_with_http_info(opts = {}) ⇒ Array<(ListWorkspaces, Integer, Hash)>
List workspaces the user is a member of.
-
#update_workspace(workspace, opts = {}) ⇒ Workspace
Update an workspace Workspace members with the role ‘OWNER` can access this endpoint.
-
#update_workspace_with_http_info(workspace, opts = {}) ⇒ Array<(Workspace, Integer, Hash)>
Update an workspace Workspace members with the role `OWNER` can access this endpoint.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WorkspaceApi
Returns a new instance of WorkspaceApi.
19 20 21 |
# File 'lib/ory-client/api/workspace_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/ory-client/api/workspace_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_workspace(opts = {}) ⇒ Workspace
Create a new workspace
26 27 28 29 |
# File 'lib/ory-client/api/workspace_api.rb', line 26 def create_workspace(opts = {}) data, _status_code, _headers = create_workspace_with_http_info(opts) data end |
#create_workspace_api_key(workspace, opts = {}) ⇒ WorkspaceApiKey
Create workspace API key Create an API key for a workspace.
90 91 92 93 |
# File 'lib/ory-client/api/workspace_api.rb', line 90 def create_workspace_api_key(workspace, opts = {}) data, _status_code, _headers = create_workspace_api_key_with_http_info(workspace, opts) data end |
#create_workspace_api_key_with_http_info(workspace, opts = {}) ⇒ Array<(WorkspaceApiKey, Integer, Hash)>
Create workspace API key Create an API key for a workspace.
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 148 149 150 151 152 |
# File 'lib/ory-client/api/workspace_api.rb', line 101 def create_workspace_api_key_with_http_info(workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.create_workspace_api_key ...' end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling WorkspaceApi.create_workspace_api_key" end # resource path local_var_path = '/workspaces/{workspace}/tokens'.sub('{' + 'workspace' + '}', CGI.escape(workspace.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' 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(opts[:'create_workspace_api_key_body']) # return_type return_type = opts[:debug_return_type] || 'WorkspaceApiKey' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.create_workspace_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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkspaceApi#create_workspace_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_workspace_with_http_info(opts = {}) ⇒ Array<(Workspace, Integer, Hash)>
Create a new workspace
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 82 |
# File 'lib/ory-client/api/workspace_api.rb', line 35 def create_workspace_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.create_workspace ...' end # resource path local_var_path = '/workspaces' # 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' 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(opts[:'create_workspace_body']) # return_type return_type = opts[:debug_return_type] || 'Workspace' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.create_workspace", :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: WorkspaceApi#create_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_workspace_api_key(workspace, token_id, opts = {}) ⇒ nil
Delete workspace API token Deletes an API token and immediately removes it.
160 161 162 163 |
# File 'lib/ory-client/api/workspace_api.rb', line 160 def delete_workspace_api_key(workspace, token_id, opts = {}) delete_workspace_api_key_with_http_info(workspace, token_id, opts) nil end |
#delete_workspace_api_key_with_http_info(workspace, token_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete workspace API token Deletes an API token and immediately removes it.
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 220 221 |
# File 'lib/ory-client/api/workspace_api.rb', line 171 def delete_workspace_api_key_with_http_info(workspace, token_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.delete_workspace_api_key ...' end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling WorkspaceApi.delete_workspace_api_key" end # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling WorkspaceApi.delete_workspace_api_key" end # resource path local_var_path = '/workspaces/{workspace}/tokens/{token_id}'.sub('{' + 'workspace' + '}', CGI.escape(workspace.to_s)).sub('{' + 'token_id' + '}', CGI.escape(token_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']) # 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] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.delete_workspace_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: WorkspaceApi#delete_workspace_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workspace(workspace, opts = {}) ⇒ Workspace
Get a workspace Any workspace member can access this endpoint.
228 229 230 231 |
# File 'lib/ory-client/api/workspace_api.rb', line 228 def get_workspace(workspace, opts = {}) data, _status_code, _headers = get_workspace_with_http_info(workspace, opts) data end |
#get_workspace_with_http_info(workspace, opts = {}) ⇒ Array<(Workspace, Integer, Hash)>
Get a workspace Any workspace member can access this endpoint.
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 |
# File 'lib/ory-client/api/workspace_api.rb', line 238 def get_workspace_with_http_info(workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.get_workspace ...' end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling WorkspaceApi.get_workspace" end # resource path local_var_path = '/workspaces/{workspace}'.sub('{' + 'workspace' + '}', CGI.escape(workspace.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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Workspace' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.get_workspace", :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: WorkspaceApi#get_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_workspace_api_keys(workspace, opts = {}) ⇒ Array<WorkspaceApiKey>
List a workspace’s API Tokens A list of all the workspace’s API tokens.
291 292 293 294 |
# File 'lib/ory-client/api/workspace_api.rb', line 291 def list_workspace_api_keys(workspace, opts = {}) data, _status_code, _headers = list_workspace_api_keys_with_http_info(workspace, opts) data end |
#list_workspace_api_keys_with_http_info(workspace, opts = {}) ⇒ Array<(Array<WorkspaceApiKey>, Integer, Hash)>
List a workspace's API Tokens A list of all the workspace's API tokens.
301 302 303 304 305 306 307 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 |
# File 'lib/ory-client/api/workspace_api.rb', line 301 def list_workspace_api_keys_with_http_info(workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.list_workspace_api_keys ...' end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling WorkspaceApi.list_workspace_api_keys" end # resource path local_var_path = '/workspaces/{workspace}/tokens'.sub('{' + 'workspace' + '}', CGI.escape(workspace.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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<WorkspaceApiKey>' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.list_workspace_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: WorkspaceApi#list_workspace_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_workspace_projects(workspace, opts = {}) ⇒ ListWorkspaceProjects
List all projects of a workspace Any workspace member can access this endpoint.
354 355 356 357 |
# File 'lib/ory-client/api/workspace_api.rb', line 354 def list_workspace_projects(workspace, opts = {}) data, _status_code, _headers = list_workspace_projects_with_http_info(workspace, opts) data end |
#list_workspace_projects_with_http_info(workspace, opts = {}) ⇒ Array<(ListWorkspaceProjects, Integer, Hash)>
List all projects of a workspace Any workspace member can access this endpoint.
364 365 366 367 368 369 370 371 372 373 374 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 |
# File 'lib/ory-client/api/workspace_api.rb', line 364 def list_workspace_projects_with_http_info(workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.list_workspace_projects ...' end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling WorkspaceApi.list_workspace_projects" end # resource path local_var_path = '/workspaces/{workspace}/projects'.sub('{' + 'workspace' + '}', CGI.escape(workspace.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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWorkspaceProjects' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.list_workspace_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: WorkspaceApi#list_workspace_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_workspaces(opts = {}) ⇒ ListWorkspaces
List workspaces the user is a member of
417 418 419 420 |
# File 'lib/ory-client/api/workspace_api.rb', line 417 def list_workspaces(opts = {}) data, _status_code, _headers = list_workspaces_with_http_info(opts) data end |
#list_workspaces_with_http_info(opts = {}) ⇒ Array<(ListWorkspaces, Integer, Hash)>
List workspaces the user is a member of
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 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 |
# File 'lib/ory-client/api/workspace_api.rb', line 427 def list_workspaces_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.list_workspaces ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling WorkspaceApi.list_workspaces, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling WorkspaceApi.list_workspaces, must be greater than or equal to 1.' end # resource path local_var_path = '/workspaces' # query parameters query_params = opts[:query_params] || {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWorkspaces' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.list_workspaces", :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: WorkspaceApi#list_workspaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_workspace(workspace, opts = {}) ⇒ Workspace
Update an workspace Workspace members with the role ‘OWNER` can access this endpoint.
487 488 489 490 |
# File 'lib/ory-client/api/workspace_api.rb', line 487 def update_workspace(workspace, opts = {}) data, _status_code, _headers = update_workspace_with_http_info(workspace, opts) data end |
#update_workspace_with_http_info(workspace, opts = {}) ⇒ Array<(Workspace, Integer, Hash)>
Update an workspace Workspace members with the role `OWNER` can access this endpoint.
498 499 500 501 502 503 504 505 506 507 508 509 510 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 |
# File 'lib/ory-client/api/workspace_api.rb', line 498 def update_workspace_with_http_info(workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkspaceApi.update_workspace ...' end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling WorkspaceApi.update_workspace" end # resource path local_var_path = '/workspaces/{workspace}'.sub('{' + 'workspace' + '}', CGI.escape(workspace.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' 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(opts[:'update_workspace_body']) # return_type return_type = opts[:debug_return_type] || 'Workspace' # auth_names auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey'] = opts.merge( :operation => :"WorkspaceApi.update_workspace", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkspaceApi#update_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |