docusign_esign.apis.workspaces_api
Docusign eSignature REST API
The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501
OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git
1# coding: utf-8 2 3""" 4 Docusign eSignature REST API 5 6 The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501 7 8 OpenAPI spec version: v2.1 9 Contact: devcenter@docusign.com 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13 14from __future__ import absolute_import 15 16import sys 17import os 18import re 19 20# python 2 and python 3 compatibility library 21from six import iteritems 22 23from ..client.configuration import Configuration 24from ..client.api_client import ApiClient 25 26 27class WorkspacesApi(object): 28 """ 29 NOTE: This class is auto generated by the swagger code generator program. 30 Do not edit the class manually. 31 Ref: https://github.com/swagger-api/swagger-codegen 32 """ 33 34 def __init__(self, api_client=None): 35 config = Configuration() 36 if api_client: 37 self.api_client = api_client 38 else: 39 if not config.api_client: 40 config.api_client = ApiClient() 41 self.api_client = config.api_client 42 43 def create_workspace(self, account_id, **kwargs): 44 """ 45 Create a Workspace 46 Creates a new workspace. 47 This method makes a synchronous HTTP request by default. To make an 48 asynchronous HTTP request, please define a `callback` function 49 to be invoked when receiving the response. 50 >>> def callback_function(response): 51 >>> pprint(response) 52 >>> 53 >>> thread = api.create_workspace(account_id, callback=callback_function) 54 55 :param callback function: The callback function 56 for asynchronous request. (optional) 57 :param str account_id: The external account number (int) or account ID Guid. (required) 58 :param Workspace workspace: 59 :return: Workspace 60 If the method is called asynchronously, 61 returns the request thread. 62 """ 63 kwargs['_return_http_data_only'] = True 64 if kwargs.get('callback'): 65 return self.create_workspace_with_http_info(account_id, **kwargs) 66 else: 67 (data) = self.create_workspace_with_http_info(account_id, **kwargs) 68 return data 69 70 def create_workspace_with_http_info(self, account_id, **kwargs): 71 """ 72 Create a Workspace 73 Creates a new workspace. 74 This method makes a synchronous HTTP request by default. To make an 75 asynchronous HTTP request, please define a `callback` function 76 to be invoked when receiving the response. 77 >>> def callback_function(response): 78 >>> pprint(response) 79 >>> 80 >>> thread = api.create_workspace_with_http_info(account_id, callback=callback_function) 81 82 :param callback function: The callback function 83 for asynchronous request. (optional) 84 :param str account_id: The external account number (int) or account ID Guid. (required) 85 :param Workspace workspace: 86 :return: Workspace 87 If the method is called asynchronously, 88 returns the request thread. 89 """ 90 91 all_params = ['account_id', 'workspace'] 92 all_params.append('callback') 93 all_params.append('_return_http_data_only') 94 all_params.append('_preload_content') 95 all_params.append('_request_timeout') 96 97 params = locals() 98 for key, val in iteritems(params['kwargs']): 99 if key not in all_params: 100 raise TypeError( 101 "Got an unexpected keyword argument '%s'" 102 " to method create_workspace" % key 103 ) 104 params[key] = val 105 del params['kwargs'] 106 # verify the required parameter 'account_id' is set 107 if ('account_id' not in params) or (params['account_id'] is None): 108 raise ValueError("Missing the required parameter `account_id` when calling `create_workspace`") 109 110 111 collection_formats = {} 112 113 resource_path = '/v2.1/accounts/{accountId}/workspaces'.replace('{format}', 'json') 114 path_params = {} 115 if 'account_id' in params: 116 path_params['accountId'] = params['account_id'] 117 118 query_params = {} 119 120 header_params = {} 121 122 form_params = [] 123 local_var_files = {} 124 125 body_params = None 126 if 'workspace' in params: 127 body_params = params['workspace'] 128 # HTTP header `Accept` 129 header_params['Accept'] = self.api_client.\ 130 select_header_accept(['application/json']) 131 132 # Authentication setting 133 auth_settings = [] 134 135 return self.api_client.call_api(resource_path, 'POST', 136 path_params, 137 query_params, 138 header_params, 139 body=body_params, 140 post_params=form_params, 141 files=local_var_files, 142 response_type='Workspace', 143 auth_settings=auth_settings, 144 callback=params.get('callback'), 145 _return_http_data_only=params.get('_return_http_data_only'), 146 _preload_content=params.get('_preload_content', True), 147 _request_timeout=params.get('_request_timeout'), 148 collection_formats=collection_formats) 149 150 def create_workspace_file(self, account_id, folder_id, workspace_id, **kwargs): 151 """ 152 Creates a workspace file. 153 This method adds a file to a workspace. 154 This method makes a synchronous HTTP request by default. To make an 155 asynchronous HTTP request, please define a `callback` function 156 to be invoked when receiving the response. 157 >>> def callback_function(response): 158 >>> pprint(response) 159 >>> 160 >>> thread = api.create_workspace_file(account_id, folder_id, workspace_id, callback=callback_function) 161 162 :param callback function: The callback function 163 for asynchronous request. (optional) 164 :param str account_id: The external account number (int) or account ID Guid. (required) 165 :param str folder_id: The ID of the folder being accessed. (required) 166 :param str workspace_id: Specifies the workspace ID GUID. (required) 167 :return: WorkspaceItem 168 If the method is called asynchronously, 169 returns the request thread. 170 """ 171 kwargs['_return_http_data_only'] = True 172 if kwargs.get('callback'): 173 return self.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, **kwargs) 174 else: 175 (data) = self.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, **kwargs) 176 return data 177 178 def create_workspace_file_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 179 """ 180 Creates a workspace file. 181 This method adds a file to a workspace. 182 This method makes a synchronous HTTP request by default. To make an 183 asynchronous HTTP request, please define a `callback` function 184 to be invoked when receiving the response. 185 >>> def callback_function(response): 186 >>> pprint(response) 187 >>> 188 >>> thread = api.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 189 190 :param callback function: The callback function 191 for asynchronous request. (optional) 192 :param str account_id: The external account number (int) or account ID Guid. (required) 193 :param str folder_id: The ID of the folder being accessed. (required) 194 :param str workspace_id: Specifies the workspace ID GUID. (required) 195 :return: WorkspaceItem 196 If the method is called asynchronously, 197 returns the request thread. 198 """ 199 200 all_params = ['account_id', 'folder_id', 'workspace_id'] 201 all_params.append('callback') 202 all_params.append('_return_http_data_only') 203 all_params.append('_preload_content') 204 all_params.append('_request_timeout') 205 206 params = locals() 207 for key, val in iteritems(params['kwargs']): 208 if key not in all_params: 209 raise TypeError( 210 "Got an unexpected keyword argument '%s'" 211 " to method create_workspace_file" % key 212 ) 213 params[key] = val 214 del params['kwargs'] 215 # verify the required parameter 'account_id' is set 216 if ('account_id' not in params) or (params['account_id'] is None): 217 raise ValueError("Missing the required parameter `account_id` when calling `create_workspace_file`") 218 # verify the required parameter 'folder_id' is set 219 if ('folder_id' not in params) or (params['folder_id'] is None): 220 raise ValueError("Missing the required parameter `folder_id` when calling `create_workspace_file`") 221 # verify the required parameter 'workspace_id' is set 222 if ('workspace_id' not in params) or (params['workspace_id'] is None): 223 raise ValueError("Missing the required parameter `workspace_id` when calling `create_workspace_file`") 224 225 226 collection_formats = {} 227 228 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files'.replace('{format}', 'json') 229 path_params = {} 230 if 'account_id' in params: 231 path_params['accountId'] = params['account_id'] 232 if 'folder_id' in params: 233 path_params['folderId'] = params['folder_id'] 234 if 'workspace_id' in params: 235 path_params['workspaceId'] = params['workspace_id'] 236 237 query_params = {} 238 239 header_params = {} 240 241 form_params = [] 242 local_var_files = {} 243 244 body_params = None 245 # HTTP header `Accept` 246 header_params['Accept'] = self.api_client.\ 247 select_header_accept(['application/json']) 248 249 # Authentication setting 250 auth_settings = [] 251 252 return self.api_client.call_api(resource_path, 'POST', 253 path_params, 254 query_params, 255 header_params, 256 body=body_params, 257 post_params=form_params, 258 files=local_var_files, 259 response_type='WorkspaceItem', 260 auth_settings=auth_settings, 261 callback=params.get('callback'), 262 _return_http_data_only=params.get('_return_http_data_only'), 263 _preload_content=params.get('_preload_content', True), 264 _request_timeout=params.get('_request_timeout'), 265 collection_formats=collection_formats) 266 267 def delete_workspace(self, account_id, workspace_id, **kwargs): 268 """ 269 Delete Workspace 270 Deletes an existing workspace (logically). 271 This method makes a synchronous HTTP request by default. To make an 272 asynchronous HTTP request, please define a `callback` function 273 to be invoked when receiving the response. 274 >>> def callback_function(response): 275 >>> pprint(response) 276 >>> 277 >>> thread = api.delete_workspace(account_id, workspace_id, callback=callback_function) 278 279 :param callback function: The callback function 280 for asynchronous request. (optional) 281 :param str account_id: The external account number (int) or account ID Guid. (required) 282 :param str workspace_id: Specifies the workspace ID GUID. (required) 283 :return: Workspace 284 If the method is called asynchronously, 285 returns the request thread. 286 """ 287 kwargs['_return_http_data_only'] = True 288 if kwargs.get('callback'): 289 return self.delete_workspace_with_http_info(account_id, workspace_id, **kwargs) 290 else: 291 (data) = self.delete_workspace_with_http_info(account_id, workspace_id, **kwargs) 292 return data 293 294 def delete_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 295 """ 296 Delete Workspace 297 Deletes an existing workspace (logically). 298 This method makes a synchronous HTTP request by default. To make an 299 asynchronous HTTP request, please define a `callback` function 300 to be invoked when receiving the response. 301 >>> def callback_function(response): 302 >>> pprint(response) 303 >>> 304 >>> thread = api.delete_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 305 306 :param callback function: The callback function 307 for asynchronous request. (optional) 308 :param str account_id: The external account number (int) or account ID Guid. (required) 309 :param str workspace_id: Specifies the workspace ID GUID. (required) 310 :return: Workspace 311 If the method is called asynchronously, 312 returns the request thread. 313 """ 314 315 all_params = ['account_id', 'workspace_id'] 316 all_params.append('callback') 317 all_params.append('_return_http_data_only') 318 all_params.append('_preload_content') 319 all_params.append('_request_timeout') 320 321 params = locals() 322 for key, val in iteritems(params['kwargs']): 323 if key not in all_params: 324 raise TypeError( 325 "Got an unexpected keyword argument '%s'" 326 " to method delete_workspace" % key 327 ) 328 params[key] = val 329 del params['kwargs'] 330 # verify the required parameter 'account_id' is set 331 if ('account_id' not in params) or (params['account_id'] is None): 332 raise ValueError("Missing the required parameter `account_id` when calling `delete_workspace`") 333 # verify the required parameter 'workspace_id' is set 334 if ('workspace_id' not in params) or (params['workspace_id'] is None): 335 raise ValueError("Missing the required parameter `workspace_id` when calling `delete_workspace`") 336 337 338 collection_formats = {} 339 340 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 341 path_params = {} 342 if 'account_id' in params: 343 path_params['accountId'] = params['account_id'] 344 if 'workspace_id' in params: 345 path_params['workspaceId'] = params['workspace_id'] 346 347 query_params = {} 348 349 header_params = {} 350 351 form_params = [] 352 local_var_files = {} 353 354 body_params = None 355 # HTTP header `Accept` 356 header_params['Accept'] = self.api_client.\ 357 select_header_accept(['application/json']) 358 359 # Authentication setting 360 auth_settings = [] 361 362 return self.api_client.call_api(resource_path, 'DELETE', 363 path_params, 364 query_params, 365 header_params, 366 body=body_params, 367 post_params=form_params, 368 files=local_var_files, 369 response_type='Workspace', 370 auth_settings=auth_settings, 371 callback=params.get('callback'), 372 _return_http_data_only=params.get('_return_http_data_only'), 373 _preload_content=params.get('_preload_content', True), 374 _request_timeout=params.get('_request_timeout'), 375 collection_formats=collection_formats) 376 377 def delete_workspace_folder_items(self, account_id, folder_id, workspace_id, **kwargs): 378 """ 379 Deletes workspace one or more specific files/folders from the given folder or root. 380 This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the `status` of the workspace must be `active`. 381 This method makes a synchronous HTTP request by default. To make an 382 asynchronous HTTP request, please define a `callback` function 383 to be invoked when receiving the response. 384 >>> def callback_function(response): 385 >>> pprint(response) 386 >>> 387 >>> thread = api.delete_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function) 388 389 :param callback function: The callback function 390 for asynchronous request. (optional) 391 :param str account_id: The external account number (int) or account ID Guid. (required) 392 :param str folder_id: The ID of the folder being accessed. (required) 393 :param str workspace_id: Specifies the workspace ID GUID. (required) 394 :param WorkspaceItemList workspace_item_list: 395 :return: None 396 If the method is called asynchronously, 397 returns the request thread. 398 """ 399 kwargs['_return_http_data_only'] = True 400 if kwargs.get('callback'): 401 return self.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 402 else: 403 (data) = self.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 404 return data 405 406 def delete_workspace_folder_items_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 407 """ 408 Deletes workspace one or more specific files/folders from the given folder or root. 409 This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the `status` of the workspace must be `active`. 410 This method makes a synchronous HTTP request by default. To make an 411 asynchronous HTTP request, please define a `callback` function 412 to be invoked when receiving the response. 413 >>> def callback_function(response): 414 >>> pprint(response) 415 >>> 416 >>> thread = api.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 417 418 :param callback function: The callback function 419 for asynchronous request. (optional) 420 :param str account_id: The external account number (int) or account ID Guid. (required) 421 :param str folder_id: The ID of the folder being accessed. (required) 422 :param str workspace_id: Specifies the workspace ID GUID. (required) 423 :param WorkspaceItemList workspace_item_list: 424 :return: None 425 If the method is called asynchronously, 426 returns the request thread. 427 """ 428 429 all_params = ['account_id', 'folder_id', 'workspace_id', 'workspace_item_list'] 430 all_params.append('callback') 431 all_params.append('_return_http_data_only') 432 all_params.append('_preload_content') 433 all_params.append('_request_timeout') 434 435 params = locals() 436 for key, val in iteritems(params['kwargs']): 437 if key not in all_params: 438 raise TypeError( 439 "Got an unexpected keyword argument '%s'" 440 " to method delete_workspace_folder_items" % key 441 ) 442 params[key] = val 443 del params['kwargs'] 444 # verify the required parameter 'account_id' is set 445 if ('account_id' not in params) or (params['account_id'] is None): 446 raise ValueError("Missing the required parameter `account_id` when calling `delete_workspace_folder_items`") 447 # verify the required parameter 'folder_id' is set 448 if ('folder_id' not in params) or (params['folder_id'] is None): 449 raise ValueError("Missing the required parameter `folder_id` when calling `delete_workspace_folder_items`") 450 # verify the required parameter 'workspace_id' is set 451 if ('workspace_id' not in params) or (params['workspace_id'] is None): 452 raise ValueError("Missing the required parameter `workspace_id` when calling `delete_workspace_folder_items`") 453 454 455 collection_formats = {} 456 457 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}'.replace('{format}', 'json') 458 path_params = {} 459 if 'account_id' in params: 460 path_params['accountId'] = params['account_id'] 461 if 'folder_id' in params: 462 path_params['folderId'] = params['folder_id'] 463 if 'workspace_id' in params: 464 path_params['workspaceId'] = params['workspace_id'] 465 466 query_params = {} 467 468 header_params = {} 469 470 form_params = [] 471 local_var_files = {} 472 473 body_params = None 474 if 'workspace_item_list' in params: 475 body_params = params['workspace_item_list'] 476 # HTTP header `Accept` 477 header_params['Accept'] = self.api_client.\ 478 select_header_accept(['application/json']) 479 480 # Authentication setting 481 auth_settings = [] 482 483 return self.api_client.call_api(resource_path, 'DELETE', 484 path_params, 485 query_params, 486 header_params, 487 body=body_params, 488 post_params=form_params, 489 files=local_var_files, 490 response_type=None, 491 auth_settings=auth_settings, 492 callback=params.get('callback'), 493 _return_http_data_only=params.get('_return_http_data_only'), 494 _preload_content=params.get('_preload_content', True), 495 _request_timeout=params.get('_request_timeout'), 496 collection_formats=collection_formats) 497 498 def get_workspace(self, account_id, workspace_id, **kwargs): 499 """ 500 Get Workspace 501 Retrives properties about a workspace given a unique workspaceId. 502 This method makes a synchronous HTTP request by default. To make an 503 asynchronous HTTP request, please define a `callback` function 504 to be invoked when receiving the response. 505 >>> def callback_function(response): 506 >>> pprint(response) 507 >>> 508 >>> thread = api.get_workspace(account_id, workspace_id, callback=callback_function) 509 510 :param callback function: The callback function 511 for asynchronous request. (optional) 512 :param str account_id: The external account number (int) or account ID Guid. (required) 513 :param str workspace_id: Specifies the workspace ID GUID. (required) 514 :return: Workspace 515 If the method is called asynchronously, 516 returns the request thread. 517 """ 518 kwargs['_return_http_data_only'] = True 519 if kwargs.get('callback'): 520 return self.get_workspace_with_http_info(account_id, workspace_id, **kwargs) 521 else: 522 (data) = self.get_workspace_with_http_info(account_id, workspace_id, **kwargs) 523 return data 524 525 def get_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 526 """ 527 Get Workspace 528 Retrives properties about a workspace given a unique workspaceId. 529 This method makes a synchronous HTTP request by default. To make an 530 asynchronous HTTP request, please define a `callback` function 531 to be invoked when receiving the response. 532 >>> def callback_function(response): 533 >>> pprint(response) 534 >>> 535 >>> thread = api.get_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 536 537 :param callback function: The callback function 538 for asynchronous request. (optional) 539 :param str account_id: The external account number (int) or account ID Guid. (required) 540 :param str workspace_id: Specifies the workspace ID GUID. (required) 541 :return: Workspace 542 If the method is called asynchronously, 543 returns the request thread. 544 """ 545 546 all_params = ['account_id', 'workspace_id'] 547 all_params.append('callback') 548 all_params.append('_return_http_data_only') 549 all_params.append('_preload_content') 550 all_params.append('_request_timeout') 551 552 params = locals() 553 for key, val in iteritems(params['kwargs']): 554 if key not in all_params: 555 raise TypeError( 556 "Got an unexpected keyword argument '%s'" 557 " to method get_workspace" % key 558 ) 559 params[key] = val 560 del params['kwargs'] 561 # verify the required parameter 'account_id' is set 562 if ('account_id' not in params) or (params['account_id'] is None): 563 raise ValueError("Missing the required parameter `account_id` when calling `get_workspace`") 564 # verify the required parameter 'workspace_id' is set 565 if ('workspace_id' not in params) or (params['workspace_id'] is None): 566 raise ValueError("Missing the required parameter `workspace_id` when calling `get_workspace`") 567 568 569 collection_formats = {} 570 571 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 572 path_params = {} 573 if 'account_id' in params: 574 path_params['accountId'] = params['account_id'] 575 if 'workspace_id' in params: 576 path_params['workspaceId'] = params['workspace_id'] 577 578 query_params = {} 579 580 header_params = {} 581 582 form_params = [] 583 local_var_files = {} 584 585 body_params = None 586 # HTTP header `Accept` 587 header_params['Accept'] = self.api_client.\ 588 select_header_accept(['application/json']) 589 590 # Authentication setting 591 auth_settings = [] 592 593 return self.api_client.call_api(resource_path, 'GET', 594 path_params, 595 query_params, 596 header_params, 597 body=body_params, 598 post_params=form_params, 599 files=local_var_files, 600 response_type='Workspace', 601 auth_settings=auth_settings, 602 callback=params.get('callback'), 603 _return_http_data_only=params.get('_return_http_data_only'), 604 _preload_content=params.get('_preload_content', True), 605 _request_timeout=params.get('_request_timeout'), 606 collection_formats=collection_formats) 607 608 def get_workspace_file(self, account_id, file_id, folder_id, workspace_id, **kwargs): 609 """ 610 Get Workspace File 611 Retrieves a workspace file (the binary). 612 This method makes a synchronous HTTP request by default. To make an 613 asynchronous HTTP request, please define a `callback` function 614 to be invoked when receiving the response. 615 >>> def callback_function(response): 616 >>> pprint(response) 617 >>> 618 >>> thread = api.get_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function) 619 620 :param callback function: The callback function 621 for asynchronous request. (optional) 622 :param str account_id: The external account number (int) or account ID Guid. (required) 623 :param str file_id: Specifies the room file ID GUID. (required) 624 :param str folder_id: The ID of the folder being accessed. (required) 625 :param str workspace_id: Specifies the workspace ID GUID. (required) 626 :param str is_download: When set to **true**, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is **false**. 627 :param str pdf_version: When set to **true** the file returned as a PDF. 628 :return: None 629 If the method is called asynchronously, 630 returns the request thread. 631 """ 632 kwargs['_return_http_data_only'] = True 633 if kwargs.get('callback'): 634 return self.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 635 else: 636 (data) = self.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 637 return data 638 639 def get_workspace_file_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 640 """ 641 Get Workspace File 642 Retrieves a workspace file (the binary). 643 This method makes a synchronous HTTP request by default. To make an 644 asynchronous HTTP request, please define a `callback` function 645 to be invoked when receiving the response. 646 >>> def callback_function(response): 647 >>> pprint(response) 648 >>> 649 >>> thread = api.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 650 651 :param callback function: The callback function 652 for asynchronous request. (optional) 653 :param str account_id: The external account number (int) or account ID Guid. (required) 654 :param str file_id: Specifies the room file ID GUID. (required) 655 :param str folder_id: The ID of the folder being accessed. (required) 656 :param str workspace_id: Specifies the workspace ID GUID. (required) 657 :param str is_download: When set to **true**, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is **false**. 658 :param str pdf_version: When set to **true** the file returned as a PDF. 659 :return: None 660 If the method is called asynchronously, 661 returns the request thread. 662 """ 663 664 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id', 'is_download', 'pdf_version'] 665 all_params.append('callback') 666 all_params.append('_return_http_data_only') 667 all_params.append('_preload_content') 668 all_params.append('_request_timeout') 669 670 params = locals() 671 for key, val in iteritems(params['kwargs']): 672 if key not in all_params: 673 raise TypeError( 674 "Got an unexpected keyword argument '%s'" 675 " to method get_workspace_file" % key 676 ) 677 params[key] = val 678 del params['kwargs'] 679 # verify the required parameter 'account_id' is set 680 if ('account_id' not in params) or (params['account_id'] is None): 681 raise ValueError("Missing the required parameter `account_id` when calling `get_workspace_file`") 682 # verify the required parameter 'file_id' is set 683 if ('file_id' not in params) or (params['file_id'] is None): 684 raise ValueError("Missing the required parameter `file_id` when calling `get_workspace_file`") 685 # verify the required parameter 'folder_id' is set 686 if ('folder_id' not in params) or (params['folder_id'] is None): 687 raise ValueError("Missing the required parameter `folder_id` when calling `get_workspace_file`") 688 # verify the required parameter 'workspace_id' is set 689 if ('workspace_id' not in params) or (params['workspace_id'] is None): 690 raise ValueError("Missing the required parameter `workspace_id` when calling `get_workspace_file`") 691 692 693 collection_formats = {} 694 695 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}'.replace('{format}', 'json') 696 path_params = {} 697 if 'account_id' in params: 698 path_params['accountId'] = params['account_id'] 699 if 'file_id' in params: 700 path_params['fileId'] = params['file_id'] 701 if 'folder_id' in params: 702 path_params['folderId'] = params['folder_id'] 703 if 'workspace_id' in params: 704 path_params['workspaceId'] = params['workspace_id'] 705 706 query_params = {} 707 if 'is_download' in params: 708 query_params['is_download'] = params['is_download'] 709 if 'pdf_version' in params: 710 query_params['pdf_version'] = params['pdf_version'] 711 712 header_params = {} 713 714 form_params = [] 715 local_var_files = {} 716 717 body_params = None 718 # HTTP header `Accept` 719 header_params['Accept'] = self.api_client.\ 720 select_header_accept(['application/json']) 721 722 # Authentication setting 723 auth_settings = [] 724 725 return self.api_client.call_api(resource_path, 'GET', 726 path_params, 727 query_params, 728 header_params, 729 body=body_params, 730 post_params=form_params, 731 files=local_var_files, 732 response_type=None, 733 auth_settings=auth_settings, 734 callback=params.get('callback'), 735 _return_http_data_only=params.get('_return_http_data_only'), 736 _preload_content=params.get('_preload_content', True), 737 _request_timeout=params.get('_request_timeout'), 738 collection_formats=collection_formats) 739 740 def list_workspace_file_pages(self, account_id, file_id, folder_id, workspace_id, **kwargs): 741 """ 742 List File Pages 743 Retrieves a workspace file as rasterized pages. 744 This method makes a synchronous HTTP request by default. To make an 745 asynchronous HTTP request, please define a `callback` function 746 to be invoked when receiving the response. 747 >>> def callback_function(response): 748 >>> pprint(response) 749 >>> 750 >>> thread = api.list_workspace_file_pages(account_id, file_id, folder_id, workspace_id, callback=callback_function) 751 752 :param callback function: The callback function 753 for asynchronous request. (optional) 754 :param str account_id: The external account number (int) or account ID Guid. (required) 755 :param str file_id: Specifies the room file ID GUID. (required) 756 :param str folder_id: The ID of the folder being accessed. (required) 757 :param str workspace_id: Specifies the workspace ID GUID. (required) 758 :param str count: The maximum number of results to be returned by this request. 759 :param str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310. 760 :param str max_height: Sets the maximum height (in pixels) of the returned image. 761 :param str max_width: Sets the maximum width (in pixels) of the returned image. 762 :param str start_position: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image. 763 :return: PageImages 764 If the method is called asynchronously, 765 returns the request thread. 766 """ 767 kwargs['_return_http_data_only'] = True 768 if kwargs.get('callback'): 769 return self.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 770 else: 771 (data) = self.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 772 return data 773 774 def list_workspace_file_pages_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 775 """ 776 List File Pages 777 Retrieves a workspace file as rasterized pages. 778 This method makes a synchronous HTTP request by default. To make an 779 asynchronous HTTP request, please define a `callback` function 780 to be invoked when receiving the response. 781 >>> def callback_function(response): 782 >>> pprint(response) 783 >>> 784 >>> thread = api.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 785 786 :param callback function: The callback function 787 for asynchronous request. (optional) 788 :param str account_id: The external account number (int) or account ID Guid. (required) 789 :param str file_id: Specifies the room file ID GUID. (required) 790 :param str folder_id: The ID of the folder being accessed. (required) 791 :param str workspace_id: Specifies the workspace ID GUID. (required) 792 :param str count: The maximum number of results to be returned by this request. 793 :param str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310. 794 :param str max_height: Sets the maximum height (in pixels) of the returned image. 795 :param str max_width: Sets the maximum width (in pixels) of the returned image. 796 :param str start_position: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image. 797 :return: PageImages 798 If the method is called asynchronously, 799 returns the request thread. 800 """ 801 802 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id', 'count', 'dpi', 'max_height', 'max_width', 'start_position'] 803 all_params.append('callback') 804 all_params.append('_return_http_data_only') 805 all_params.append('_preload_content') 806 all_params.append('_request_timeout') 807 808 params = locals() 809 for key, val in iteritems(params['kwargs']): 810 if key not in all_params: 811 raise TypeError( 812 "Got an unexpected keyword argument '%s'" 813 " to method list_workspace_file_pages" % key 814 ) 815 params[key] = val 816 del params['kwargs'] 817 # verify the required parameter 'account_id' is set 818 if ('account_id' not in params) or (params['account_id'] is None): 819 raise ValueError("Missing the required parameter `account_id` when calling `list_workspace_file_pages`") 820 # verify the required parameter 'file_id' is set 821 if ('file_id' not in params) or (params['file_id'] is None): 822 raise ValueError("Missing the required parameter `file_id` when calling `list_workspace_file_pages`") 823 # verify the required parameter 'folder_id' is set 824 if ('folder_id' not in params) or (params['folder_id'] is None): 825 raise ValueError("Missing the required parameter `folder_id` when calling `list_workspace_file_pages`") 826 # verify the required parameter 'workspace_id' is set 827 if ('workspace_id' not in params) or (params['workspace_id'] is None): 828 raise ValueError("Missing the required parameter `workspace_id` when calling `list_workspace_file_pages`") 829 830 831 collection_formats = {} 832 833 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}/pages'.replace('{format}', 'json') 834 path_params = {} 835 if 'account_id' in params: 836 path_params['accountId'] = params['account_id'] 837 if 'file_id' in params: 838 path_params['fileId'] = params['file_id'] 839 if 'folder_id' in params: 840 path_params['folderId'] = params['folder_id'] 841 if 'workspace_id' in params: 842 path_params['workspaceId'] = params['workspace_id'] 843 844 query_params = {} 845 if 'count' in params: 846 query_params['count'] = params['count'] 847 if 'dpi' in params: 848 query_params['dpi'] = params['dpi'] 849 if 'max_height' in params: 850 query_params['max_height'] = params['max_height'] 851 if 'max_width' in params: 852 query_params['max_width'] = params['max_width'] 853 if 'start_position' in params: 854 query_params['start_position'] = params['start_position'] 855 856 header_params = {} 857 858 form_params = [] 859 local_var_files = {} 860 861 body_params = None 862 # HTTP header `Accept` 863 header_params['Accept'] = self.api_client.\ 864 select_header_accept(['application/json']) 865 866 # Authentication setting 867 auth_settings = [] 868 869 return self.api_client.call_api(resource_path, 'GET', 870 path_params, 871 query_params, 872 header_params, 873 body=body_params, 874 post_params=form_params, 875 files=local_var_files, 876 response_type='PageImages', 877 auth_settings=auth_settings, 878 callback=params.get('callback'), 879 _return_http_data_only=params.get('_return_http_data_only'), 880 _preload_content=params.get('_preload_content', True), 881 _request_timeout=params.get('_request_timeout'), 882 collection_formats=collection_formats) 883 884 def list_workspace_folder_items(self, account_id, folder_id, workspace_id, **kwargs): 885 """ 886 List Workspace Folder Contents 887 Retrieves workspace folder contents, which can include sub folders and files. 888 This method makes a synchronous HTTP request by default. To make an 889 asynchronous HTTP request, please define a `callback` function 890 to be invoked when receiving the response. 891 >>> def callback_function(response): 892 >>> pprint(response) 893 >>> 894 >>> thread = api.list_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function) 895 896 :param callback function: The callback function 897 for asynchronous request. (optional) 898 :param str account_id: The external account number (int) or account ID Guid. (required) 899 :param str folder_id: The ID of the folder being accessed. (required) 900 :param str workspace_id: Specifies the workspace ID GUID. (required) 901 :param str count: The maximum number of results to be returned by this request. 902 :param str include_files: When set to **true**, file information is returned in the response along with folder information. The default is **false**. 903 :param str include_sub_folders: When set to **true**, information about the sub-folders of the current folder is returned. The default is **false**. 904 :param str include_thumbnails: When set to **true**, thumbnails are returned as part of the response. The default is **false**. 905 :param str include_user_detail: Set to **true** to return extended details about the user. The default is **false**. 906 :param str start_position: The position within the total result set from which to start returning values. 907 :param str workspace_user_id: If set, then the results are filtered to those associated with the specified userId. 908 :return: WorkspaceFolderContents 909 If the method is called asynchronously, 910 returns the request thread. 911 """ 912 kwargs['_return_http_data_only'] = True 913 if kwargs.get('callback'): 914 return self.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 915 else: 916 (data) = self.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 917 return data 918 919 def list_workspace_folder_items_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 920 """ 921 List Workspace Folder Contents 922 Retrieves workspace folder contents, which can include sub folders and files. 923 This method makes a synchronous HTTP request by default. To make an 924 asynchronous HTTP request, please define a `callback` function 925 to be invoked when receiving the response. 926 >>> def callback_function(response): 927 >>> pprint(response) 928 >>> 929 >>> thread = api.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 930 931 :param callback function: The callback function 932 for asynchronous request. (optional) 933 :param str account_id: The external account number (int) or account ID Guid. (required) 934 :param str folder_id: The ID of the folder being accessed. (required) 935 :param str workspace_id: Specifies the workspace ID GUID. (required) 936 :param str count: The maximum number of results to be returned by this request. 937 :param str include_files: When set to **true**, file information is returned in the response along with folder information. The default is **false**. 938 :param str include_sub_folders: When set to **true**, information about the sub-folders of the current folder is returned. The default is **false**. 939 :param str include_thumbnails: When set to **true**, thumbnails are returned as part of the response. The default is **false**. 940 :param str include_user_detail: Set to **true** to return extended details about the user. The default is **false**. 941 :param str start_position: The position within the total result set from which to start returning values. 942 :param str workspace_user_id: If set, then the results are filtered to those associated with the specified userId. 943 :return: WorkspaceFolderContents 944 If the method is called asynchronously, 945 returns the request thread. 946 """ 947 948 all_params = ['account_id', 'folder_id', 'workspace_id', 'count', 'include_files', 'include_sub_folders', 'include_thumbnails', 'include_user_detail', 'start_position', 'workspace_user_id'] 949 all_params.append('callback') 950 all_params.append('_return_http_data_only') 951 all_params.append('_preload_content') 952 all_params.append('_request_timeout') 953 954 params = locals() 955 for key, val in iteritems(params['kwargs']): 956 if key not in all_params: 957 raise TypeError( 958 "Got an unexpected keyword argument '%s'" 959 " to method list_workspace_folder_items" % key 960 ) 961 params[key] = val 962 del params['kwargs'] 963 # verify the required parameter 'account_id' is set 964 if ('account_id' not in params) or (params['account_id'] is None): 965 raise ValueError("Missing the required parameter `account_id` when calling `list_workspace_folder_items`") 966 # verify the required parameter 'folder_id' is set 967 if ('folder_id' not in params) or (params['folder_id'] is None): 968 raise ValueError("Missing the required parameter `folder_id` when calling `list_workspace_folder_items`") 969 # verify the required parameter 'workspace_id' is set 970 if ('workspace_id' not in params) or (params['workspace_id'] is None): 971 raise ValueError("Missing the required parameter `workspace_id` when calling `list_workspace_folder_items`") 972 973 974 collection_formats = {} 975 976 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}'.replace('{format}', 'json') 977 path_params = {} 978 if 'account_id' in params: 979 path_params['accountId'] = params['account_id'] 980 if 'folder_id' in params: 981 path_params['folderId'] = params['folder_id'] 982 if 'workspace_id' in params: 983 path_params['workspaceId'] = params['workspace_id'] 984 985 query_params = {} 986 if 'count' in params: 987 query_params['count'] = params['count'] 988 if 'include_files' in params: 989 query_params['include_files'] = params['include_files'] 990 if 'include_sub_folders' in params: 991 query_params['include_sub_folders'] = params['include_sub_folders'] 992 if 'include_thumbnails' in params: 993 query_params['include_thumbnails'] = params['include_thumbnails'] 994 if 'include_user_detail' in params: 995 query_params['include_user_detail'] = params['include_user_detail'] 996 if 'start_position' in params: 997 query_params['start_position'] = params['start_position'] 998 if 'workspace_user_id' in params: 999 query_params['workspace_user_id'] = params['workspace_user_id'] 1000 1001 header_params = {} 1002 1003 form_params = [] 1004 local_var_files = {} 1005 1006 body_params = None 1007 # HTTP header `Accept` 1008 header_params['Accept'] = self.api_client.\ 1009 select_header_accept(['application/json']) 1010 1011 # Authentication setting 1012 auth_settings = [] 1013 1014 return self.api_client.call_api(resource_path, 'GET', 1015 path_params, 1016 query_params, 1017 header_params, 1018 body=body_params, 1019 post_params=form_params, 1020 files=local_var_files, 1021 response_type='WorkspaceFolderContents', 1022 auth_settings=auth_settings, 1023 callback=params.get('callback'), 1024 _return_http_data_only=params.get('_return_http_data_only'), 1025 _preload_content=params.get('_preload_content', True), 1026 _request_timeout=params.get('_request_timeout'), 1027 collection_formats=collection_formats) 1028 1029 def list_workspaces(self, account_id, **kwargs): 1030 """ 1031 List Workspaces 1032 Gets information about the Workspaces that have been created. 1033 This method makes a synchronous HTTP request by default. To make an 1034 asynchronous HTTP request, please define a `callback` function 1035 to be invoked when receiving the response. 1036 >>> def callback_function(response): 1037 >>> pprint(response) 1038 >>> 1039 >>> thread = api.list_workspaces(account_id, callback=callback_function) 1040 1041 :param callback function: The callback function 1042 for asynchronous request. (optional) 1043 :param str account_id: The external account number (int) or account ID Guid. (required) 1044 :return: WorkspaceList 1045 If the method is called asynchronously, 1046 returns the request thread. 1047 """ 1048 kwargs['_return_http_data_only'] = True 1049 if kwargs.get('callback'): 1050 return self.list_workspaces_with_http_info(account_id, **kwargs) 1051 else: 1052 (data) = self.list_workspaces_with_http_info(account_id, **kwargs) 1053 return data 1054 1055 def list_workspaces_with_http_info(self, account_id, **kwargs): 1056 """ 1057 List Workspaces 1058 Gets information about the Workspaces that have been created. 1059 This method makes a synchronous HTTP request by default. To make an 1060 asynchronous HTTP request, please define a `callback` function 1061 to be invoked when receiving the response. 1062 >>> def callback_function(response): 1063 >>> pprint(response) 1064 >>> 1065 >>> thread = api.list_workspaces_with_http_info(account_id, callback=callback_function) 1066 1067 :param callback function: The callback function 1068 for asynchronous request. (optional) 1069 :param str account_id: The external account number (int) or account ID Guid. (required) 1070 :return: WorkspaceList 1071 If the method is called asynchronously, 1072 returns the request thread. 1073 """ 1074 1075 all_params = ['account_id'] 1076 all_params.append('callback') 1077 all_params.append('_return_http_data_only') 1078 all_params.append('_preload_content') 1079 all_params.append('_request_timeout') 1080 1081 params = locals() 1082 for key, val in iteritems(params['kwargs']): 1083 if key not in all_params: 1084 raise TypeError( 1085 "Got an unexpected keyword argument '%s'" 1086 " to method list_workspaces" % key 1087 ) 1088 params[key] = val 1089 del params['kwargs'] 1090 # verify the required parameter 'account_id' is set 1091 if ('account_id' not in params) or (params['account_id'] is None): 1092 raise ValueError("Missing the required parameter `account_id` when calling `list_workspaces`") 1093 1094 1095 collection_formats = {} 1096 1097 resource_path = '/v2.1/accounts/{accountId}/workspaces'.replace('{format}', 'json') 1098 path_params = {} 1099 if 'account_id' in params: 1100 path_params['accountId'] = params['account_id'] 1101 1102 query_params = {} 1103 1104 header_params = {} 1105 1106 form_params = [] 1107 local_var_files = {} 1108 1109 body_params = None 1110 # HTTP header `Accept` 1111 header_params['Accept'] = self.api_client.\ 1112 select_header_accept(['application/json']) 1113 1114 # Authentication setting 1115 auth_settings = [] 1116 1117 return self.api_client.call_api(resource_path, 'GET', 1118 path_params, 1119 query_params, 1120 header_params, 1121 body=body_params, 1122 post_params=form_params, 1123 files=local_var_files, 1124 response_type='WorkspaceList', 1125 auth_settings=auth_settings, 1126 callback=params.get('callback'), 1127 _return_http_data_only=params.get('_return_http_data_only'), 1128 _preload_content=params.get('_preload_content', True), 1129 _request_timeout=params.get('_request_timeout'), 1130 collection_formats=collection_formats) 1131 1132 def update_workspace(self, account_id, workspace_id, **kwargs): 1133 """ 1134 Update Workspace 1135 Updates information about a specific workspace. 1136 This method makes a synchronous HTTP request by default. To make an 1137 asynchronous HTTP request, please define a `callback` function 1138 to be invoked when receiving the response. 1139 >>> def callback_function(response): 1140 >>> pprint(response) 1141 >>> 1142 >>> thread = api.update_workspace(account_id, workspace_id, callback=callback_function) 1143 1144 :param callback function: The callback function 1145 for asynchronous request. (optional) 1146 :param str account_id: The external account number (int) or account ID Guid. (required) 1147 :param str workspace_id: Specifies the workspace ID GUID. (required) 1148 :param Workspace workspace: 1149 :return: Workspace 1150 If the method is called asynchronously, 1151 returns the request thread. 1152 """ 1153 kwargs['_return_http_data_only'] = True 1154 if kwargs.get('callback'): 1155 return self.update_workspace_with_http_info(account_id, workspace_id, **kwargs) 1156 else: 1157 (data) = self.update_workspace_with_http_info(account_id, workspace_id, **kwargs) 1158 return data 1159 1160 def update_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 1161 """ 1162 Update Workspace 1163 Updates information about a specific workspace. 1164 This method makes a synchronous HTTP request by default. To make an 1165 asynchronous HTTP request, please define a `callback` function 1166 to be invoked when receiving the response. 1167 >>> def callback_function(response): 1168 >>> pprint(response) 1169 >>> 1170 >>> thread = api.update_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 1171 1172 :param callback function: The callback function 1173 for asynchronous request. (optional) 1174 :param str account_id: The external account number (int) or account ID Guid. (required) 1175 :param str workspace_id: Specifies the workspace ID GUID. (required) 1176 :param Workspace workspace: 1177 :return: Workspace 1178 If the method is called asynchronously, 1179 returns the request thread. 1180 """ 1181 1182 all_params = ['account_id', 'workspace_id', 'workspace'] 1183 all_params.append('callback') 1184 all_params.append('_return_http_data_only') 1185 all_params.append('_preload_content') 1186 all_params.append('_request_timeout') 1187 1188 params = locals() 1189 for key, val in iteritems(params['kwargs']): 1190 if key not in all_params: 1191 raise TypeError( 1192 "Got an unexpected keyword argument '%s'" 1193 " to method update_workspace" % key 1194 ) 1195 params[key] = val 1196 del params['kwargs'] 1197 # verify the required parameter 'account_id' is set 1198 if ('account_id' not in params) or (params['account_id'] is None): 1199 raise ValueError("Missing the required parameter `account_id` when calling `update_workspace`") 1200 # verify the required parameter 'workspace_id' is set 1201 if ('workspace_id' not in params) or (params['workspace_id'] is None): 1202 raise ValueError("Missing the required parameter `workspace_id` when calling `update_workspace`") 1203 1204 1205 collection_formats = {} 1206 1207 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 1208 path_params = {} 1209 if 'account_id' in params: 1210 path_params['accountId'] = params['account_id'] 1211 if 'workspace_id' in params: 1212 path_params['workspaceId'] = params['workspace_id'] 1213 1214 query_params = {} 1215 1216 header_params = {} 1217 1218 form_params = [] 1219 local_var_files = {} 1220 1221 body_params = None 1222 if 'workspace' in params: 1223 body_params = params['workspace'] 1224 # HTTP header `Accept` 1225 header_params['Accept'] = self.api_client.\ 1226 select_header_accept(['application/json']) 1227 1228 # Authentication setting 1229 auth_settings = [] 1230 1231 return self.api_client.call_api(resource_path, 'PUT', 1232 path_params, 1233 query_params, 1234 header_params, 1235 body=body_params, 1236 post_params=form_params, 1237 files=local_var_files, 1238 response_type='Workspace', 1239 auth_settings=auth_settings, 1240 callback=params.get('callback'), 1241 _return_http_data_only=params.get('_return_http_data_only'), 1242 _preload_content=params.get('_preload_content', True), 1243 _request_timeout=params.get('_request_timeout'), 1244 collection_formats=collection_formats) 1245 1246 def update_workspace_file(self, account_id, file_id, folder_id, workspace_id, **kwargs): 1247 """ 1248 Update Workspace File Metadata 1249 Updates workspace item metadata for one or more specific files/folders. 1250 This method makes a synchronous HTTP request by default. To make an 1251 asynchronous HTTP request, please define a `callback` function 1252 to be invoked when receiving the response. 1253 >>> def callback_function(response): 1254 >>> pprint(response) 1255 >>> 1256 >>> thread = api.update_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function) 1257 1258 :param callback function: The callback function 1259 for asynchronous request. (optional) 1260 :param str account_id: The external account number (int) or account ID Guid. (required) 1261 :param str file_id: Specifies the room file ID GUID. (required) 1262 :param str folder_id: The ID of the folder being accessed. (required) 1263 :param str workspace_id: Specifies the workspace ID GUID. (required) 1264 :return: WorkspaceItem 1265 If the method is called asynchronously, 1266 returns the request thread. 1267 """ 1268 kwargs['_return_http_data_only'] = True 1269 if kwargs.get('callback'): 1270 return self.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 1271 else: 1272 (data) = self.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 1273 return data 1274 1275 def update_workspace_file_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 1276 """ 1277 Update Workspace File Metadata 1278 Updates workspace item metadata for one or more specific files/folders. 1279 This method makes a synchronous HTTP request by default. To make an 1280 asynchronous HTTP request, please define a `callback` function 1281 to be invoked when receiving the response. 1282 >>> def callback_function(response): 1283 >>> pprint(response) 1284 >>> 1285 >>> thread = api.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 1286 1287 :param callback function: The callback function 1288 for asynchronous request. (optional) 1289 :param str account_id: The external account number (int) or account ID Guid. (required) 1290 :param str file_id: Specifies the room file ID GUID. (required) 1291 :param str folder_id: The ID of the folder being accessed. (required) 1292 :param str workspace_id: Specifies the workspace ID GUID. (required) 1293 :return: WorkspaceItem 1294 If the method is called asynchronously, 1295 returns the request thread. 1296 """ 1297 1298 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id'] 1299 all_params.append('callback') 1300 all_params.append('_return_http_data_only') 1301 all_params.append('_preload_content') 1302 all_params.append('_request_timeout') 1303 1304 params = locals() 1305 for key, val in iteritems(params['kwargs']): 1306 if key not in all_params: 1307 raise TypeError( 1308 "Got an unexpected keyword argument '%s'" 1309 " to method update_workspace_file" % key 1310 ) 1311 params[key] = val 1312 del params['kwargs'] 1313 # verify the required parameter 'account_id' is set 1314 if ('account_id' not in params) or (params['account_id'] is None): 1315 raise ValueError("Missing the required parameter `account_id` when calling `update_workspace_file`") 1316 # verify the required parameter 'file_id' is set 1317 if ('file_id' not in params) or (params['file_id'] is None): 1318 raise ValueError("Missing the required parameter `file_id` when calling `update_workspace_file`") 1319 # verify the required parameter 'folder_id' is set 1320 if ('folder_id' not in params) or (params['folder_id'] is None): 1321 raise ValueError("Missing the required parameter `folder_id` when calling `update_workspace_file`") 1322 # verify the required parameter 'workspace_id' is set 1323 if ('workspace_id' not in params) or (params['workspace_id'] is None): 1324 raise ValueError("Missing the required parameter `workspace_id` when calling `update_workspace_file`") 1325 1326 1327 collection_formats = {} 1328 1329 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}'.replace('{format}', 'json') 1330 path_params = {} 1331 if 'account_id' in params: 1332 path_params['accountId'] = params['account_id'] 1333 if 'file_id' in params: 1334 path_params['fileId'] = params['file_id'] 1335 if 'folder_id' in params: 1336 path_params['folderId'] = params['folder_id'] 1337 if 'workspace_id' in params: 1338 path_params['workspaceId'] = params['workspace_id'] 1339 1340 query_params = {} 1341 1342 header_params = {} 1343 1344 form_params = [] 1345 local_var_files = {} 1346 1347 body_params = None 1348 # HTTP header `Accept` 1349 header_params['Accept'] = self.api_client.\ 1350 select_header_accept(['application/json']) 1351 1352 # Authentication setting 1353 auth_settings = [] 1354 1355 return self.api_client.call_api(resource_path, 'PUT', 1356 path_params, 1357 query_params, 1358 header_params, 1359 body=body_params, 1360 post_params=form_params, 1361 files=local_var_files, 1362 response_type='WorkspaceItem', 1363 auth_settings=auth_settings, 1364 callback=params.get('callback'), 1365 _return_http_data_only=params.get('_return_http_data_only'), 1366 _preload_content=params.get('_preload_content', True), 1367 _request_timeout=params.get('_request_timeout'), 1368 collection_formats=collection_formats)
28class WorkspacesApi(object): 29 """ 30 NOTE: This class is auto generated by the swagger code generator program. 31 Do not edit the class manually. 32 Ref: https://github.com/swagger-api/swagger-codegen 33 """ 34 35 def __init__(self, api_client=None): 36 config = Configuration() 37 if api_client: 38 self.api_client = api_client 39 else: 40 if not config.api_client: 41 config.api_client = ApiClient() 42 self.api_client = config.api_client 43 44 def create_workspace(self, account_id, **kwargs): 45 """ 46 Create a Workspace 47 Creates a new workspace. 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create_workspace(account_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param Workspace workspace: 60 :return: Workspace 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_workspace_with_http_info(account_id, **kwargs) 67 else: 68 (data) = self.create_workspace_with_http_info(account_id, **kwargs) 69 return data 70 71 def create_workspace_with_http_info(self, account_id, **kwargs): 72 """ 73 Create a Workspace 74 Creates a new workspace. 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_workspace_with_http_info(account_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param Workspace workspace: 87 :return: Workspace 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['account_id', 'workspace'] 93 all_params.append('callback') 94 all_params.append('_return_http_data_only') 95 all_params.append('_preload_content') 96 all_params.append('_request_timeout') 97 98 params = locals() 99 for key, val in iteritems(params['kwargs']): 100 if key not in all_params: 101 raise TypeError( 102 "Got an unexpected keyword argument '%s'" 103 " to method create_workspace" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'account_id' is set 108 if ('account_id' not in params) or (params['account_id'] is None): 109 raise ValueError("Missing the required parameter `account_id` when calling `create_workspace`") 110 111 112 collection_formats = {} 113 114 resource_path = '/v2.1/accounts/{accountId}/workspaces'.replace('{format}', 'json') 115 path_params = {} 116 if 'account_id' in params: 117 path_params['accountId'] = params['account_id'] 118 119 query_params = {} 120 121 header_params = {} 122 123 form_params = [] 124 local_var_files = {} 125 126 body_params = None 127 if 'workspace' in params: 128 body_params = params['workspace'] 129 # HTTP header `Accept` 130 header_params['Accept'] = self.api_client.\ 131 select_header_accept(['application/json']) 132 133 # Authentication setting 134 auth_settings = [] 135 136 return self.api_client.call_api(resource_path, 'POST', 137 path_params, 138 query_params, 139 header_params, 140 body=body_params, 141 post_params=form_params, 142 files=local_var_files, 143 response_type='Workspace', 144 auth_settings=auth_settings, 145 callback=params.get('callback'), 146 _return_http_data_only=params.get('_return_http_data_only'), 147 _preload_content=params.get('_preload_content', True), 148 _request_timeout=params.get('_request_timeout'), 149 collection_formats=collection_formats) 150 151 def create_workspace_file(self, account_id, folder_id, workspace_id, **kwargs): 152 """ 153 Creates a workspace file. 154 This method adds a file to a workspace. 155 This method makes a synchronous HTTP request by default. To make an 156 asynchronous HTTP request, please define a `callback` function 157 to be invoked when receiving the response. 158 >>> def callback_function(response): 159 >>> pprint(response) 160 >>> 161 >>> thread = api.create_workspace_file(account_id, folder_id, workspace_id, callback=callback_function) 162 163 :param callback function: The callback function 164 for asynchronous request. (optional) 165 :param str account_id: The external account number (int) or account ID Guid. (required) 166 :param str folder_id: The ID of the folder being accessed. (required) 167 :param str workspace_id: Specifies the workspace ID GUID. (required) 168 :return: WorkspaceItem 169 If the method is called asynchronously, 170 returns the request thread. 171 """ 172 kwargs['_return_http_data_only'] = True 173 if kwargs.get('callback'): 174 return self.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, **kwargs) 175 else: 176 (data) = self.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, **kwargs) 177 return data 178 179 def create_workspace_file_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 180 """ 181 Creates a workspace file. 182 This method adds a file to a workspace. 183 This method makes a synchronous HTTP request by default. To make an 184 asynchronous HTTP request, please define a `callback` function 185 to be invoked when receiving the response. 186 >>> def callback_function(response): 187 >>> pprint(response) 188 >>> 189 >>> thread = api.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 190 191 :param callback function: The callback function 192 for asynchronous request. (optional) 193 :param str account_id: The external account number (int) or account ID Guid. (required) 194 :param str folder_id: The ID of the folder being accessed. (required) 195 :param str workspace_id: Specifies the workspace ID GUID. (required) 196 :return: WorkspaceItem 197 If the method is called asynchronously, 198 returns the request thread. 199 """ 200 201 all_params = ['account_id', 'folder_id', 'workspace_id'] 202 all_params.append('callback') 203 all_params.append('_return_http_data_only') 204 all_params.append('_preload_content') 205 all_params.append('_request_timeout') 206 207 params = locals() 208 for key, val in iteritems(params['kwargs']): 209 if key not in all_params: 210 raise TypeError( 211 "Got an unexpected keyword argument '%s'" 212 " to method create_workspace_file" % key 213 ) 214 params[key] = val 215 del params['kwargs'] 216 # verify the required parameter 'account_id' is set 217 if ('account_id' not in params) or (params['account_id'] is None): 218 raise ValueError("Missing the required parameter `account_id` when calling `create_workspace_file`") 219 # verify the required parameter 'folder_id' is set 220 if ('folder_id' not in params) or (params['folder_id'] is None): 221 raise ValueError("Missing the required parameter `folder_id` when calling `create_workspace_file`") 222 # verify the required parameter 'workspace_id' is set 223 if ('workspace_id' not in params) or (params['workspace_id'] is None): 224 raise ValueError("Missing the required parameter `workspace_id` when calling `create_workspace_file`") 225 226 227 collection_formats = {} 228 229 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files'.replace('{format}', 'json') 230 path_params = {} 231 if 'account_id' in params: 232 path_params['accountId'] = params['account_id'] 233 if 'folder_id' in params: 234 path_params['folderId'] = params['folder_id'] 235 if 'workspace_id' in params: 236 path_params['workspaceId'] = params['workspace_id'] 237 238 query_params = {} 239 240 header_params = {} 241 242 form_params = [] 243 local_var_files = {} 244 245 body_params = None 246 # HTTP header `Accept` 247 header_params['Accept'] = self.api_client.\ 248 select_header_accept(['application/json']) 249 250 # Authentication setting 251 auth_settings = [] 252 253 return self.api_client.call_api(resource_path, 'POST', 254 path_params, 255 query_params, 256 header_params, 257 body=body_params, 258 post_params=form_params, 259 files=local_var_files, 260 response_type='WorkspaceItem', 261 auth_settings=auth_settings, 262 callback=params.get('callback'), 263 _return_http_data_only=params.get('_return_http_data_only'), 264 _preload_content=params.get('_preload_content', True), 265 _request_timeout=params.get('_request_timeout'), 266 collection_formats=collection_formats) 267 268 def delete_workspace(self, account_id, workspace_id, **kwargs): 269 """ 270 Delete Workspace 271 Deletes an existing workspace (logically). 272 This method makes a synchronous HTTP request by default. To make an 273 asynchronous HTTP request, please define a `callback` function 274 to be invoked when receiving the response. 275 >>> def callback_function(response): 276 >>> pprint(response) 277 >>> 278 >>> thread = api.delete_workspace(account_id, workspace_id, callback=callback_function) 279 280 :param callback function: The callback function 281 for asynchronous request. (optional) 282 :param str account_id: The external account number (int) or account ID Guid. (required) 283 :param str workspace_id: Specifies the workspace ID GUID. (required) 284 :return: Workspace 285 If the method is called asynchronously, 286 returns the request thread. 287 """ 288 kwargs['_return_http_data_only'] = True 289 if kwargs.get('callback'): 290 return self.delete_workspace_with_http_info(account_id, workspace_id, **kwargs) 291 else: 292 (data) = self.delete_workspace_with_http_info(account_id, workspace_id, **kwargs) 293 return data 294 295 def delete_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 296 """ 297 Delete Workspace 298 Deletes an existing workspace (logically). 299 This method makes a synchronous HTTP request by default. To make an 300 asynchronous HTTP request, please define a `callback` function 301 to be invoked when receiving the response. 302 >>> def callback_function(response): 303 >>> pprint(response) 304 >>> 305 >>> thread = api.delete_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 306 307 :param callback function: The callback function 308 for asynchronous request. (optional) 309 :param str account_id: The external account number (int) or account ID Guid. (required) 310 :param str workspace_id: Specifies the workspace ID GUID. (required) 311 :return: Workspace 312 If the method is called asynchronously, 313 returns the request thread. 314 """ 315 316 all_params = ['account_id', 'workspace_id'] 317 all_params.append('callback') 318 all_params.append('_return_http_data_only') 319 all_params.append('_preload_content') 320 all_params.append('_request_timeout') 321 322 params = locals() 323 for key, val in iteritems(params['kwargs']): 324 if key not in all_params: 325 raise TypeError( 326 "Got an unexpected keyword argument '%s'" 327 " to method delete_workspace" % key 328 ) 329 params[key] = val 330 del params['kwargs'] 331 # verify the required parameter 'account_id' is set 332 if ('account_id' not in params) or (params['account_id'] is None): 333 raise ValueError("Missing the required parameter `account_id` when calling `delete_workspace`") 334 # verify the required parameter 'workspace_id' is set 335 if ('workspace_id' not in params) or (params['workspace_id'] is None): 336 raise ValueError("Missing the required parameter `workspace_id` when calling `delete_workspace`") 337 338 339 collection_formats = {} 340 341 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 342 path_params = {} 343 if 'account_id' in params: 344 path_params['accountId'] = params['account_id'] 345 if 'workspace_id' in params: 346 path_params['workspaceId'] = params['workspace_id'] 347 348 query_params = {} 349 350 header_params = {} 351 352 form_params = [] 353 local_var_files = {} 354 355 body_params = None 356 # HTTP header `Accept` 357 header_params['Accept'] = self.api_client.\ 358 select_header_accept(['application/json']) 359 360 # Authentication setting 361 auth_settings = [] 362 363 return self.api_client.call_api(resource_path, 'DELETE', 364 path_params, 365 query_params, 366 header_params, 367 body=body_params, 368 post_params=form_params, 369 files=local_var_files, 370 response_type='Workspace', 371 auth_settings=auth_settings, 372 callback=params.get('callback'), 373 _return_http_data_only=params.get('_return_http_data_only'), 374 _preload_content=params.get('_preload_content', True), 375 _request_timeout=params.get('_request_timeout'), 376 collection_formats=collection_formats) 377 378 def delete_workspace_folder_items(self, account_id, folder_id, workspace_id, **kwargs): 379 """ 380 Deletes workspace one or more specific files/folders from the given folder or root. 381 This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the `status` of the workspace must be `active`. 382 This method makes a synchronous HTTP request by default. To make an 383 asynchronous HTTP request, please define a `callback` function 384 to be invoked when receiving the response. 385 >>> def callback_function(response): 386 >>> pprint(response) 387 >>> 388 >>> thread = api.delete_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function) 389 390 :param callback function: The callback function 391 for asynchronous request. (optional) 392 :param str account_id: The external account number (int) or account ID Guid. (required) 393 :param str folder_id: The ID of the folder being accessed. (required) 394 :param str workspace_id: Specifies the workspace ID GUID. (required) 395 :param WorkspaceItemList workspace_item_list: 396 :return: None 397 If the method is called asynchronously, 398 returns the request thread. 399 """ 400 kwargs['_return_http_data_only'] = True 401 if kwargs.get('callback'): 402 return self.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 403 else: 404 (data) = self.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 405 return data 406 407 def delete_workspace_folder_items_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 408 """ 409 Deletes workspace one or more specific files/folders from the given folder or root. 410 This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the `status` of the workspace must be `active`. 411 This method makes a synchronous HTTP request by default. To make an 412 asynchronous HTTP request, please define a `callback` function 413 to be invoked when receiving the response. 414 >>> def callback_function(response): 415 >>> pprint(response) 416 >>> 417 >>> thread = api.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 418 419 :param callback function: The callback function 420 for asynchronous request. (optional) 421 :param str account_id: The external account number (int) or account ID Guid. (required) 422 :param str folder_id: The ID of the folder being accessed. (required) 423 :param str workspace_id: Specifies the workspace ID GUID. (required) 424 :param WorkspaceItemList workspace_item_list: 425 :return: None 426 If the method is called asynchronously, 427 returns the request thread. 428 """ 429 430 all_params = ['account_id', 'folder_id', 'workspace_id', 'workspace_item_list'] 431 all_params.append('callback') 432 all_params.append('_return_http_data_only') 433 all_params.append('_preload_content') 434 all_params.append('_request_timeout') 435 436 params = locals() 437 for key, val in iteritems(params['kwargs']): 438 if key not in all_params: 439 raise TypeError( 440 "Got an unexpected keyword argument '%s'" 441 " to method delete_workspace_folder_items" % key 442 ) 443 params[key] = val 444 del params['kwargs'] 445 # verify the required parameter 'account_id' is set 446 if ('account_id' not in params) or (params['account_id'] is None): 447 raise ValueError("Missing the required parameter `account_id` when calling `delete_workspace_folder_items`") 448 # verify the required parameter 'folder_id' is set 449 if ('folder_id' not in params) or (params['folder_id'] is None): 450 raise ValueError("Missing the required parameter `folder_id` when calling `delete_workspace_folder_items`") 451 # verify the required parameter 'workspace_id' is set 452 if ('workspace_id' not in params) or (params['workspace_id'] is None): 453 raise ValueError("Missing the required parameter `workspace_id` when calling `delete_workspace_folder_items`") 454 455 456 collection_formats = {} 457 458 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}'.replace('{format}', 'json') 459 path_params = {} 460 if 'account_id' in params: 461 path_params['accountId'] = params['account_id'] 462 if 'folder_id' in params: 463 path_params['folderId'] = params['folder_id'] 464 if 'workspace_id' in params: 465 path_params['workspaceId'] = params['workspace_id'] 466 467 query_params = {} 468 469 header_params = {} 470 471 form_params = [] 472 local_var_files = {} 473 474 body_params = None 475 if 'workspace_item_list' in params: 476 body_params = params['workspace_item_list'] 477 # HTTP header `Accept` 478 header_params['Accept'] = self.api_client.\ 479 select_header_accept(['application/json']) 480 481 # Authentication setting 482 auth_settings = [] 483 484 return self.api_client.call_api(resource_path, 'DELETE', 485 path_params, 486 query_params, 487 header_params, 488 body=body_params, 489 post_params=form_params, 490 files=local_var_files, 491 response_type=None, 492 auth_settings=auth_settings, 493 callback=params.get('callback'), 494 _return_http_data_only=params.get('_return_http_data_only'), 495 _preload_content=params.get('_preload_content', True), 496 _request_timeout=params.get('_request_timeout'), 497 collection_formats=collection_formats) 498 499 def get_workspace(self, account_id, workspace_id, **kwargs): 500 """ 501 Get Workspace 502 Retrives properties about a workspace given a unique workspaceId. 503 This method makes a synchronous HTTP request by default. To make an 504 asynchronous HTTP request, please define a `callback` function 505 to be invoked when receiving the response. 506 >>> def callback_function(response): 507 >>> pprint(response) 508 >>> 509 >>> thread = api.get_workspace(account_id, workspace_id, callback=callback_function) 510 511 :param callback function: The callback function 512 for asynchronous request. (optional) 513 :param str account_id: The external account number (int) or account ID Guid. (required) 514 :param str workspace_id: Specifies the workspace ID GUID. (required) 515 :return: Workspace 516 If the method is called asynchronously, 517 returns the request thread. 518 """ 519 kwargs['_return_http_data_only'] = True 520 if kwargs.get('callback'): 521 return self.get_workspace_with_http_info(account_id, workspace_id, **kwargs) 522 else: 523 (data) = self.get_workspace_with_http_info(account_id, workspace_id, **kwargs) 524 return data 525 526 def get_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 527 """ 528 Get Workspace 529 Retrives properties about a workspace given a unique workspaceId. 530 This method makes a synchronous HTTP request by default. To make an 531 asynchronous HTTP request, please define a `callback` function 532 to be invoked when receiving the response. 533 >>> def callback_function(response): 534 >>> pprint(response) 535 >>> 536 >>> thread = api.get_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 537 538 :param callback function: The callback function 539 for asynchronous request. (optional) 540 :param str account_id: The external account number (int) or account ID Guid. (required) 541 :param str workspace_id: Specifies the workspace ID GUID. (required) 542 :return: Workspace 543 If the method is called asynchronously, 544 returns the request thread. 545 """ 546 547 all_params = ['account_id', 'workspace_id'] 548 all_params.append('callback') 549 all_params.append('_return_http_data_only') 550 all_params.append('_preload_content') 551 all_params.append('_request_timeout') 552 553 params = locals() 554 for key, val in iteritems(params['kwargs']): 555 if key not in all_params: 556 raise TypeError( 557 "Got an unexpected keyword argument '%s'" 558 " to method get_workspace" % key 559 ) 560 params[key] = val 561 del params['kwargs'] 562 # verify the required parameter 'account_id' is set 563 if ('account_id' not in params) or (params['account_id'] is None): 564 raise ValueError("Missing the required parameter `account_id` when calling `get_workspace`") 565 # verify the required parameter 'workspace_id' is set 566 if ('workspace_id' not in params) or (params['workspace_id'] is None): 567 raise ValueError("Missing the required parameter `workspace_id` when calling `get_workspace`") 568 569 570 collection_formats = {} 571 572 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 573 path_params = {} 574 if 'account_id' in params: 575 path_params['accountId'] = params['account_id'] 576 if 'workspace_id' in params: 577 path_params['workspaceId'] = params['workspace_id'] 578 579 query_params = {} 580 581 header_params = {} 582 583 form_params = [] 584 local_var_files = {} 585 586 body_params = None 587 # HTTP header `Accept` 588 header_params['Accept'] = self.api_client.\ 589 select_header_accept(['application/json']) 590 591 # Authentication setting 592 auth_settings = [] 593 594 return self.api_client.call_api(resource_path, 'GET', 595 path_params, 596 query_params, 597 header_params, 598 body=body_params, 599 post_params=form_params, 600 files=local_var_files, 601 response_type='Workspace', 602 auth_settings=auth_settings, 603 callback=params.get('callback'), 604 _return_http_data_only=params.get('_return_http_data_only'), 605 _preload_content=params.get('_preload_content', True), 606 _request_timeout=params.get('_request_timeout'), 607 collection_formats=collection_formats) 608 609 def get_workspace_file(self, account_id, file_id, folder_id, workspace_id, **kwargs): 610 """ 611 Get Workspace File 612 Retrieves a workspace file (the binary). 613 This method makes a synchronous HTTP request by default. To make an 614 asynchronous HTTP request, please define a `callback` function 615 to be invoked when receiving the response. 616 >>> def callback_function(response): 617 >>> pprint(response) 618 >>> 619 >>> thread = api.get_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function) 620 621 :param callback function: The callback function 622 for asynchronous request. (optional) 623 :param str account_id: The external account number (int) or account ID Guid. (required) 624 :param str file_id: Specifies the room file ID GUID. (required) 625 :param str folder_id: The ID of the folder being accessed. (required) 626 :param str workspace_id: Specifies the workspace ID GUID. (required) 627 :param str is_download: When set to **true**, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is **false**. 628 :param str pdf_version: When set to **true** the file returned as a PDF. 629 :return: None 630 If the method is called asynchronously, 631 returns the request thread. 632 """ 633 kwargs['_return_http_data_only'] = True 634 if kwargs.get('callback'): 635 return self.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 636 else: 637 (data) = self.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 638 return data 639 640 def get_workspace_file_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 641 """ 642 Get Workspace File 643 Retrieves a workspace file (the binary). 644 This method makes a synchronous HTTP request by default. To make an 645 asynchronous HTTP request, please define a `callback` function 646 to be invoked when receiving the response. 647 >>> def callback_function(response): 648 >>> pprint(response) 649 >>> 650 >>> thread = api.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 651 652 :param callback function: The callback function 653 for asynchronous request. (optional) 654 :param str account_id: The external account number (int) or account ID Guid. (required) 655 :param str file_id: Specifies the room file ID GUID. (required) 656 :param str folder_id: The ID of the folder being accessed. (required) 657 :param str workspace_id: Specifies the workspace ID GUID. (required) 658 :param str is_download: When set to **true**, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is **false**. 659 :param str pdf_version: When set to **true** the file returned as a PDF. 660 :return: None 661 If the method is called asynchronously, 662 returns the request thread. 663 """ 664 665 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id', 'is_download', 'pdf_version'] 666 all_params.append('callback') 667 all_params.append('_return_http_data_only') 668 all_params.append('_preload_content') 669 all_params.append('_request_timeout') 670 671 params = locals() 672 for key, val in iteritems(params['kwargs']): 673 if key not in all_params: 674 raise TypeError( 675 "Got an unexpected keyword argument '%s'" 676 " to method get_workspace_file" % key 677 ) 678 params[key] = val 679 del params['kwargs'] 680 # verify the required parameter 'account_id' is set 681 if ('account_id' not in params) or (params['account_id'] is None): 682 raise ValueError("Missing the required parameter `account_id` when calling `get_workspace_file`") 683 # verify the required parameter 'file_id' is set 684 if ('file_id' not in params) or (params['file_id'] is None): 685 raise ValueError("Missing the required parameter `file_id` when calling `get_workspace_file`") 686 # verify the required parameter 'folder_id' is set 687 if ('folder_id' not in params) or (params['folder_id'] is None): 688 raise ValueError("Missing the required parameter `folder_id` when calling `get_workspace_file`") 689 # verify the required parameter 'workspace_id' is set 690 if ('workspace_id' not in params) or (params['workspace_id'] is None): 691 raise ValueError("Missing the required parameter `workspace_id` when calling `get_workspace_file`") 692 693 694 collection_formats = {} 695 696 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}'.replace('{format}', 'json') 697 path_params = {} 698 if 'account_id' in params: 699 path_params['accountId'] = params['account_id'] 700 if 'file_id' in params: 701 path_params['fileId'] = params['file_id'] 702 if 'folder_id' in params: 703 path_params['folderId'] = params['folder_id'] 704 if 'workspace_id' in params: 705 path_params['workspaceId'] = params['workspace_id'] 706 707 query_params = {} 708 if 'is_download' in params: 709 query_params['is_download'] = params['is_download'] 710 if 'pdf_version' in params: 711 query_params['pdf_version'] = params['pdf_version'] 712 713 header_params = {} 714 715 form_params = [] 716 local_var_files = {} 717 718 body_params = None 719 # HTTP header `Accept` 720 header_params['Accept'] = self.api_client.\ 721 select_header_accept(['application/json']) 722 723 # Authentication setting 724 auth_settings = [] 725 726 return self.api_client.call_api(resource_path, 'GET', 727 path_params, 728 query_params, 729 header_params, 730 body=body_params, 731 post_params=form_params, 732 files=local_var_files, 733 response_type=None, 734 auth_settings=auth_settings, 735 callback=params.get('callback'), 736 _return_http_data_only=params.get('_return_http_data_only'), 737 _preload_content=params.get('_preload_content', True), 738 _request_timeout=params.get('_request_timeout'), 739 collection_formats=collection_formats) 740 741 def list_workspace_file_pages(self, account_id, file_id, folder_id, workspace_id, **kwargs): 742 """ 743 List File Pages 744 Retrieves a workspace file as rasterized pages. 745 This method makes a synchronous HTTP request by default. To make an 746 asynchronous HTTP request, please define a `callback` function 747 to be invoked when receiving the response. 748 >>> def callback_function(response): 749 >>> pprint(response) 750 >>> 751 >>> thread = api.list_workspace_file_pages(account_id, file_id, folder_id, workspace_id, callback=callback_function) 752 753 :param callback function: The callback function 754 for asynchronous request. (optional) 755 :param str account_id: The external account number (int) or account ID Guid. (required) 756 :param str file_id: Specifies the room file ID GUID. (required) 757 :param str folder_id: The ID of the folder being accessed. (required) 758 :param str workspace_id: Specifies the workspace ID GUID. (required) 759 :param str count: The maximum number of results to be returned by this request. 760 :param str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310. 761 :param str max_height: Sets the maximum height (in pixels) of the returned image. 762 :param str max_width: Sets the maximum width (in pixels) of the returned image. 763 :param str start_position: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image. 764 :return: PageImages 765 If the method is called asynchronously, 766 returns the request thread. 767 """ 768 kwargs['_return_http_data_only'] = True 769 if kwargs.get('callback'): 770 return self.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 771 else: 772 (data) = self.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 773 return data 774 775 def list_workspace_file_pages_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 776 """ 777 List File Pages 778 Retrieves a workspace file as rasterized pages. 779 This method makes a synchronous HTTP request by default. To make an 780 asynchronous HTTP request, please define a `callback` function 781 to be invoked when receiving the response. 782 >>> def callback_function(response): 783 >>> pprint(response) 784 >>> 785 >>> thread = api.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 786 787 :param callback function: The callback function 788 for asynchronous request. (optional) 789 :param str account_id: The external account number (int) or account ID Guid. (required) 790 :param str file_id: Specifies the room file ID GUID. (required) 791 :param str folder_id: The ID of the folder being accessed. (required) 792 :param str workspace_id: Specifies the workspace ID GUID. (required) 793 :param str count: The maximum number of results to be returned by this request. 794 :param str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310. 795 :param str max_height: Sets the maximum height (in pixels) of the returned image. 796 :param str max_width: Sets the maximum width (in pixels) of the returned image. 797 :param str start_position: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image. 798 :return: PageImages 799 If the method is called asynchronously, 800 returns the request thread. 801 """ 802 803 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id', 'count', 'dpi', 'max_height', 'max_width', 'start_position'] 804 all_params.append('callback') 805 all_params.append('_return_http_data_only') 806 all_params.append('_preload_content') 807 all_params.append('_request_timeout') 808 809 params = locals() 810 for key, val in iteritems(params['kwargs']): 811 if key not in all_params: 812 raise TypeError( 813 "Got an unexpected keyword argument '%s'" 814 " to method list_workspace_file_pages" % key 815 ) 816 params[key] = val 817 del params['kwargs'] 818 # verify the required parameter 'account_id' is set 819 if ('account_id' not in params) or (params['account_id'] is None): 820 raise ValueError("Missing the required parameter `account_id` when calling `list_workspace_file_pages`") 821 # verify the required parameter 'file_id' is set 822 if ('file_id' not in params) or (params['file_id'] is None): 823 raise ValueError("Missing the required parameter `file_id` when calling `list_workspace_file_pages`") 824 # verify the required parameter 'folder_id' is set 825 if ('folder_id' not in params) or (params['folder_id'] is None): 826 raise ValueError("Missing the required parameter `folder_id` when calling `list_workspace_file_pages`") 827 # verify the required parameter 'workspace_id' is set 828 if ('workspace_id' not in params) or (params['workspace_id'] is None): 829 raise ValueError("Missing the required parameter `workspace_id` when calling `list_workspace_file_pages`") 830 831 832 collection_formats = {} 833 834 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}/pages'.replace('{format}', 'json') 835 path_params = {} 836 if 'account_id' in params: 837 path_params['accountId'] = params['account_id'] 838 if 'file_id' in params: 839 path_params['fileId'] = params['file_id'] 840 if 'folder_id' in params: 841 path_params['folderId'] = params['folder_id'] 842 if 'workspace_id' in params: 843 path_params['workspaceId'] = params['workspace_id'] 844 845 query_params = {} 846 if 'count' in params: 847 query_params['count'] = params['count'] 848 if 'dpi' in params: 849 query_params['dpi'] = params['dpi'] 850 if 'max_height' in params: 851 query_params['max_height'] = params['max_height'] 852 if 'max_width' in params: 853 query_params['max_width'] = params['max_width'] 854 if 'start_position' in params: 855 query_params['start_position'] = params['start_position'] 856 857 header_params = {} 858 859 form_params = [] 860 local_var_files = {} 861 862 body_params = None 863 # HTTP header `Accept` 864 header_params['Accept'] = self.api_client.\ 865 select_header_accept(['application/json']) 866 867 # Authentication setting 868 auth_settings = [] 869 870 return self.api_client.call_api(resource_path, 'GET', 871 path_params, 872 query_params, 873 header_params, 874 body=body_params, 875 post_params=form_params, 876 files=local_var_files, 877 response_type='PageImages', 878 auth_settings=auth_settings, 879 callback=params.get('callback'), 880 _return_http_data_only=params.get('_return_http_data_only'), 881 _preload_content=params.get('_preload_content', True), 882 _request_timeout=params.get('_request_timeout'), 883 collection_formats=collection_formats) 884 885 def list_workspace_folder_items(self, account_id, folder_id, workspace_id, **kwargs): 886 """ 887 List Workspace Folder Contents 888 Retrieves workspace folder contents, which can include sub folders and files. 889 This method makes a synchronous HTTP request by default. To make an 890 asynchronous HTTP request, please define a `callback` function 891 to be invoked when receiving the response. 892 >>> def callback_function(response): 893 >>> pprint(response) 894 >>> 895 >>> thread = api.list_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function) 896 897 :param callback function: The callback function 898 for asynchronous request. (optional) 899 :param str account_id: The external account number (int) or account ID Guid. (required) 900 :param str folder_id: The ID of the folder being accessed. (required) 901 :param str workspace_id: Specifies the workspace ID GUID. (required) 902 :param str count: The maximum number of results to be returned by this request. 903 :param str include_files: When set to **true**, file information is returned in the response along with folder information. The default is **false**. 904 :param str include_sub_folders: When set to **true**, information about the sub-folders of the current folder is returned. The default is **false**. 905 :param str include_thumbnails: When set to **true**, thumbnails are returned as part of the response. The default is **false**. 906 :param str include_user_detail: Set to **true** to return extended details about the user. The default is **false**. 907 :param str start_position: The position within the total result set from which to start returning values. 908 :param str workspace_user_id: If set, then the results are filtered to those associated with the specified userId. 909 :return: WorkspaceFolderContents 910 If the method is called asynchronously, 911 returns the request thread. 912 """ 913 kwargs['_return_http_data_only'] = True 914 if kwargs.get('callback'): 915 return self.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 916 else: 917 (data) = self.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 918 return data 919 920 def list_workspace_folder_items_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 921 """ 922 List Workspace Folder Contents 923 Retrieves workspace folder contents, which can include sub folders and files. 924 This method makes a synchronous HTTP request by default. To make an 925 asynchronous HTTP request, please define a `callback` function 926 to be invoked when receiving the response. 927 >>> def callback_function(response): 928 >>> pprint(response) 929 >>> 930 >>> thread = api.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 931 932 :param callback function: The callback function 933 for asynchronous request. (optional) 934 :param str account_id: The external account number (int) or account ID Guid. (required) 935 :param str folder_id: The ID of the folder being accessed. (required) 936 :param str workspace_id: Specifies the workspace ID GUID. (required) 937 :param str count: The maximum number of results to be returned by this request. 938 :param str include_files: When set to **true**, file information is returned in the response along with folder information. The default is **false**. 939 :param str include_sub_folders: When set to **true**, information about the sub-folders of the current folder is returned. The default is **false**. 940 :param str include_thumbnails: When set to **true**, thumbnails are returned as part of the response. The default is **false**. 941 :param str include_user_detail: Set to **true** to return extended details about the user. The default is **false**. 942 :param str start_position: The position within the total result set from which to start returning values. 943 :param str workspace_user_id: If set, then the results are filtered to those associated with the specified userId. 944 :return: WorkspaceFolderContents 945 If the method is called asynchronously, 946 returns the request thread. 947 """ 948 949 all_params = ['account_id', 'folder_id', 'workspace_id', 'count', 'include_files', 'include_sub_folders', 'include_thumbnails', 'include_user_detail', 'start_position', 'workspace_user_id'] 950 all_params.append('callback') 951 all_params.append('_return_http_data_only') 952 all_params.append('_preload_content') 953 all_params.append('_request_timeout') 954 955 params = locals() 956 for key, val in iteritems(params['kwargs']): 957 if key not in all_params: 958 raise TypeError( 959 "Got an unexpected keyword argument '%s'" 960 " to method list_workspace_folder_items" % key 961 ) 962 params[key] = val 963 del params['kwargs'] 964 # verify the required parameter 'account_id' is set 965 if ('account_id' not in params) or (params['account_id'] is None): 966 raise ValueError("Missing the required parameter `account_id` when calling `list_workspace_folder_items`") 967 # verify the required parameter 'folder_id' is set 968 if ('folder_id' not in params) or (params['folder_id'] is None): 969 raise ValueError("Missing the required parameter `folder_id` when calling `list_workspace_folder_items`") 970 # verify the required parameter 'workspace_id' is set 971 if ('workspace_id' not in params) or (params['workspace_id'] is None): 972 raise ValueError("Missing the required parameter `workspace_id` when calling `list_workspace_folder_items`") 973 974 975 collection_formats = {} 976 977 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}'.replace('{format}', 'json') 978 path_params = {} 979 if 'account_id' in params: 980 path_params['accountId'] = params['account_id'] 981 if 'folder_id' in params: 982 path_params['folderId'] = params['folder_id'] 983 if 'workspace_id' in params: 984 path_params['workspaceId'] = params['workspace_id'] 985 986 query_params = {} 987 if 'count' in params: 988 query_params['count'] = params['count'] 989 if 'include_files' in params: 990 query_params['include_files'] = params['include_files'] 991 if 'include_sub_folders' in params: 992 query_params['include_sub_folders'] = params['include_sub_folders'] 993 if 'include_thumbnails' in params: 994 query_params['include_thumbnails'] = params['include_thumbnails'] 995 if 'include_user_detail' in params: 996 query_params['include_user_detail'] = params['include_user_detail'] 997 if 'start_position' in params: 998 query_params['start_position'] = params['start_position'] 999 if 'workspace_user_id' in params: 1000 query_params['workspace_user_id'] = params['workspace_user_id'] 1001 1002 header_params = {} 1003 1004 form_params = [] 1005 local_var_files = {} 1006 1007 body_params = None 1008 # HTTP header `Accept` 1009 header_params['Accept'] = self.api_client.\ 1010 select_header_accept(['application/json']) 1011 1012 # Authentication setting 1013 auth_settings = [] 1014 1015 return self.api_client.call_api(resource_path, 'GET', 1016 path_params, 1017 query_params, 1018 header_params, 1019 body=body_params, 1020 post_params=form_params, 1021 files=local_var_files, 1022 response_type='WorkspaceFolderContents', 1023 auth_settings=auth_settings, 1024 callback=params.get('callback'), 1025 _return_http_data_only=params.get('_return_http_data_only'), 1026 _preload_content=params.get('_preload_content', True), 1027 _request_timeout=params.get('_request_timeout'), 1028 collection_formats=collection_formats) 1029 1030 def list_workspaces(self, account_id, **kwargs): 1031 """ 1032 List Workspaces 1033 Gets information about the Workspaces that have been created. 1034 This method makes a synchronous HTTP request by default. To make an 1035 asynchronous HTTP request, please define a `callback` function 1036 to be invoked when receiving the response. 1037 >>> def callback_function(response): 1038 >>> pprint(response) 1039 >>> 1040 >>> thread = api.list_workspaces(account_id, callback=callback_function) 1041 1042 :param callback function: The callback function 1043 for asynchronous request. (optional) 1044 :param str account_id: The external account number (int) or account ID Guid. (required) 1045 :return: WorkspaceList 1046 If the method is called asynchronously, 1047 returns the request thread. 1048 """ 1049 kwargs['_return_http_data_only'] = True 1050 if kwargs.get('callback'): 1051 return self.list_workspaces_with_http_info(account_id, **kwargs) 1052 else: 1053 (data) = self.list_workspaces_with_http_info(account_id, **kwargs) 1054 return data 1055 1056 def list_workspaces_with_http_info(self, account_id, **kwargs): 1057 """ 1058 List Workspaces 1059 Gets information about the Workspaces that have been created. 1060 This method makes a synchronous HTTP request by default. To make an 1061 asynchronous HTTP request, please define a `callback` function 1062 to be invoked when receiving the response. 1063 >>> def callback_function(response): 1064 >>> pprint(response) 1065 >>> 1066 >>> thread = api.list_workspaces_with_http_info(account_id, callback=callback_function) 1067 1068 :param callback function: The callback function 1069 for asynchronous request. (optional) 1070 :param str account_id: The external account number (int) or account ID Guid. (required) 1071 :return: WorkspaceList 1072 If the method is called asynchronously, 1073 returns the request thread. 1074 """ 1075 1076 all_params = ['account_id'] 1077 all_params.append('callback') 1078 all_params.append('_return_http_data_only') 1079 all_params.append('_preload_content') 1080 all_params.append('_request_timeout') 1081 1082 params = locals() 1083 for key, val in iteritems(params['kwargs']): 1084 if key not in all_params: 1085 raise TypeError( 1086 "Got an unexpected keyword argument '%s'" 1087 " to method list_workspaces" % key 1088 ) 1089 params[key] = val 1090 del params['kwargs'] 1091 # verify the required parameter 'account_id' is set 1092 if ('account_id' not in params) or (params['account_id'] is None): 1093 raise ValueError("Missing the required parameter `account_id` when calling `list_workspaces`") 1094 1095 1096 collection_formats = {} 1097 1098 resource_path = '/v2.1/accounts/{accountId}/workspaces'.replace('{format}', 'json') 1099 path_params = {} 1100 if 'account_id' in params: 1101 path_params['accountId'] = params['account_id'] 1102 1103 query_params = {} 1104 1105 header_params = {} 1106 1107 form_params = [] 1108 local_var_files = {} 1109 1110 body_params = None 1111 # HTTP header `Accept` 1112 header_params['Accept'] = self.api_client.\ 1113 select_header_accept(['application/json']) 1114 1115 # Authentication setting 1116 auth_settings = [] 1117 1118 return self.api_client.call_api(resource_path, 'GET', 1119 path_params, 1120 query_params, 1121 header_params, 1122 body=body_params, 1123 post_params=form_params, 1124 files=local_var_files, 1125 response_type='WorkspaceList', 1126 auth_settings=auth_settings, 1127 callback=params.get('callback'), 1128 _return_http_data_only=params.get('_return_http_data_only'), 1129 _preload_content=params.get('_preload_content', True), 1130 _request_timeout=params.get('_request_timeout'), 1131 collection_formats=collection_formats) 1132 1133 def update_workspace(self, account_id, workspace_id, **kwargs): 1134 """ 1135 Update Workspace 1136 Updates information about a specific workspace. 1137 This method makes a synchronous HTTP request by default. To make an 1138 asynchronous HTTP request, please define a `callback` function 1139 to be invoked when receiving the response. 1140 >>> def callback_function(response): 1141 >>> pprint(response) 1142 >>> 1143 >>> thread = api.update_workspace(account_id, workspace_id, callback=callback_function) 1144 1145 :param callback function: The callback function 1146 for asynchronous request. (optional) 1147 :param str account_id: The external account number (int) or account ID Guid. (required) 1148 :param str workspace_id: Specifies the workspace ID GUID. (required) 1149 :param Workspace workspace: 1150 :return: Workspace 1151 If the method is called asynchronously, 1152 returns the request thread. 1153 """ 1154 kwargs['_return_http_data_only'] = True 1155 if kwargs.get('callback'): 1156 return self.update_workspace_with_http_info(account_id, workspace_id, **kwargs) 1157 else: 1158 (data) = self.update_workspace_with_http_info(account_id, workspace_id, **kwargs) 1159 return data 1160 1161 def update_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 1162 """ 1163 Update Workspace 1164 Updates information about a specific workspace. 1165 This method makes a synchronous HTTP request by default. To make an 1166 asynchronous HTTP request, please define a `callback` function 1167 to be invoked when receiving the response. 1168 >>> def callback_function(response): 1169 >>> pprint(response) 1170 >>> 1171 >>> thread = api.update_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 1172 1173 :param callback function: The callback function 1174 for asynchronous request. (optional) 1175 :param str account_id: The external account number (int) or account ID Guid. (required) 1176 :param str workspace_id: Specifies the workspace ID GUID. (required) 1177 :param Workspace workspace: 1178 :return: Workspace 1179 If the method is called asynchronously, 1180 returns the request thread. 1181 """ 1182 1183 all_params = ['account_id', 'workspace_id', 'workspace'] 1184 all_params.append('callback') 1185 all_params.append('_return_http_data_only') 1186 all_params.append('_preload_content') 1187 all_params.append('_request_timeout') 1188 1189 params = locals() 1190 for key, val in iteritems(params['kwargs']): 1191 if key not in all_params: 1192 raise TypeError( 1193 "Got an unexpected keyword argument '%s'" 1194 " to method update_workspace" % key 1195 ) 1196 params[key] = val 1197 del params['kwargs'] 1198 # verify the required parameter 'account_id' is set 1199 if ('account_id' not in params) or (params['account_id'] is None): 1200 raise ValueError("Missing the required parameter `account_id` when calling `update_workspace`") 1201 # verify the required parameter 'workspace_id' is set 1202 if ('workspace_id' not in params) or (params['workspace_id'] is None): 1203 raise ValueError("Missing the required parameter `workspace_id` when calling `update_workspace`") 1204 1205 1206 collection_formats = {} 1207 1208 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 1209 path_params = {} 1210 if 'account_id' in params: 1211 path_params['accountId'] = params['account_id'] 1212 if 'workspace_id' in params: 1213 path_params['workspaceId'] = params['workspace_id'] 1214 1215 query_params = {} 1216 1217 header_params = {} 1218 1219 form_params = [] 1220 local_var_files = {} 1221 1222 body_params = None 1223 if 'workspace' in params: 1224 body_params = params['workspace'] 1225 # HTTP header `Accept` 1226 header_params['Accept'] = self.api_client.\ 1227 select_header_accept(['application/json']) 1228 1229 # Authentication setting 1230 auth_settings = [] 1231 1232 return self.api_client.call_api(resource_path, 'PUT', 1233 path_params, 1234 query_params, 1235 header_params, 1236 body=body_params, 1237 post_params=form_params, 1238 files=local_var_files, 1239 response_type='Workspace', 1240 auth_settings=auth_settings, 1241 callback=params.get('callback'), 1242 _return_http_data_only=params.get('_return_http_data_only'), 1243 _preload_content=params.get('_preload_content', True), 1244 _request_timeout=params.get('_request_timeout'), 1245 collection_formats=collection_formats) 1246 1247 def update_workspace_file(self, account_id, file_id, folder_id, workspace_id, **kwargs): 1248 """ 1249 Update Workspace File Metadata 1250 Updates workspace item metadata for one or more specific files/folders. 1251 This method makes a synchronous HTTP request by default. To make an 1252 asynchronous HTTP request, please define a `callback` function 1253 to be invoked when receiving the response. 1254 >>> def callback_function(response): 1255 >>> pprint(response) 1256 >>> 1257 >>> thread = api.update_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function) 1258 1259 :param callback function: The callback function 1260 for asynchronous request. (optional) 1261 :param str account_id: The external account number (int) or account ID Guid. (required) 1262 :param str file_id: Specifies the room file ID GUID. (required) 1263 :param str folder_id: The ID of the folder being accessed. (required) 1264 :param str workspace_id: Specifies the workspace ID GUID. (required) 1265 :return: WorkspaceItem 1266 If the method is called asynchronously, 1267 returns the request thread. 1268 """ 1269 kwargs['_return_http_data_only'] = True 1270 if kwargs.get('callback'): 1271 return self.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 1272 else: 1273 (data) = self.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 1274 return data 1275 1276 def update_workspace_file_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 1277 """ 1278 Update Workspace File Metadata 1279 Updates workspace item metadata for one or more specific files/folders. 1280 This method makes a synchronous HTTP request by default. To make an 1281 asynchronous HTTP request, please define a `callback` function 1282 to be invoked when receiving the response. 1283 >>> def callback_function(response): 1284 >>> pprint(response) 1285 >>> 1286 >>> thread = api.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 1287 1288 :param callback function: The callback function 1289 for asynchronous request. (optional) 1290 :param str account_id: The external account number (int) or account ID Guid. (required) 1291 :param str file_id: Specifies the room file ID GUID. (required) 1292 :param str folder_id: The ID of the folder being accessed. (required) 1293 :param str workspace_id: Specifies the workspace ID GUID. (required) 1294 :return: WorkspaceItem 1295 If the method is called asynchronously, 1296 returns the request thread. 1297 """ 1298 1299 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id'] 1300 all_params.append('callback') 1301 all_params.append('_return_http_data_only') 1302 all_params.append('_preload_content') 1303 all_params.append('_request_timeout') 1304 1305 params = locals() 1306 for key, val in iteritems(params['kwargs']): 1307 if key not in all_params: 1308 raise TypeError( 1309 "Got an unexpected keyword argument '%s'" 1310 " to method update_workspace_file" % key 1311 ) 1312 params[key] = val 1313 del params['kwargs'] 1314 # verify the required parameter 'account_id' is set 1315 if ('account_id' not in params) or (params['account_id'] is None): 1316 raise ValueError("Missing the required parameter `account_id` when calling `update_workspace_file`") 1317 # verify the required parameter 'file_id' is set 1318 if ('file_id' not in params) or (params['file_id'] is None): 1319 raise ValueError("Missing the required parameter `file_id` when calling `update_workspace_file`") 1320 # verify the required parameter 'folder_id' is set 1321 if ('folder_id' not in params) or (params['folder_id'] is None): 1322 raise ValueError("Missing the required parameter `folder_id` when calling `update_workspace_file`") 1323 # verify the required parameter 'workspace_id' is set 1324 if ('workspace_id' not in params) or (params['workspace_id'] is None): 1325 raise ValueError("Missing the required parameter `workspace_id` when calling `update_workspace_file`") 1326 1327 1328 collection_formats = {} 1329 1330 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}'.replace('{format}', 'json') 1331 path_params = {} 1332 if 'account_id' in params: 1333 path_params['accountId'] = params['account_id'] 1334 if 'file_id' in params: 1335 path_params['fileId'] = params['file_id'] 1336 if 'folder_id' in params: 1337 path_params['folderId'] = params['folder_id'] 1338 if 'workspace_id' in params: 1339 path_params['workspaceId'] = params['workspace_id'] 1340 1341 query_params = {} 1342 1343 header_params = {} 1344 1345 form_params = [] 1346 local_var_files = {} 1347 1348 body_params = None 1349 # HTTP header `Accept` 1350 header_params['Accept'] = self.api_client.\ 1351 select_header_accept(['application/json']) 1352 1353 # Authentication setting 1354 auth_settings = [] 1355 1356 return self.api_client.call_api(resource_path, 'PUT', 1357 path_params, 1358 query_params, 1359 header_params, 1360 body=body_params, 1361 post_params=form_params, 1362 files=local_var_files, 1363 response_type='WorkspaceItem', 1364 auth_settings=auth_settings, 1365 callback=params.get('callback'), 1366 _return_http_data_only=params.get('_return_http_data_only'), 1367 _preload_content=params.get('_preload_content', True), 1368 _request_timeout=params.get('_request_timeout'), 1369 collection_formats=collection_formats)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
44 def create_workspace(self, account_id, **kwargs): 45 """ 46 Create a Workspace 47 Creates a new workspace. 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create_workspace(account_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param Workspace workspace: 60 :return: Workspace 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_workspace_with_http_info(account_id, **kwargs) 67 else: 68 (data) = self.create_workspace_with_http_info(account_id, **kwargs) 69 return data
Create a Workspace
Creates a new workspace.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_workspace(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- Workspace workspace:
Returns
Workspace If the method is called asynchronously, returns the request thread.
71 def create_workspace_with_http_info(self, account_id, **kwargs): 72 """ 73 Create a Workspace 74 Creates a new workspace. 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_workspace_with_http_info(account_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param Workspace workspace: 87 :return: Workspace 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['account_id', 'workspace'] 93 all_params.append('callback') 94 all_params.append('_return_http_data_only') 95 all_params.append('_preload_content') 96 all_params.append('_request_timeout') 97 98 params = locals() 99 for key, val in iteritems(params['kwargs']): 100 if key not in all_params: 101 raise TypeError( 102 "Got an unexpected keyword argument '%s'" 103 " to method create_workspace" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'account_id' is set 108 if ('account_id' not in params) or (params['account_id'] is None): 109 raise ValueError("Missing the required parameter `account_id` when calling `create_workspace`") 110 111 112 collection_formats = {} 113 114 resource_path = '/v2.1/accounts/{accountId}/workspaces'.replace('{format}', 'json') 115 path_params = {} 116 if 'account_id' in params: 117 path_params['accountId'] = params['account_id'] 118 119 query_params = {} 120 121 header_params = {} 122 123 form_params = [] 124 local_var_files = {} 125 126 body_params = None 127 if 'workspace' in params: 128 body_params = params['workspace'] 129 # HTTP header `Accept` 130 header_params['Accept'] = self.api_client.\ 131 select_header_accept(['application/json']) 132 133 # Authentication setting 134 auth_settings = [] 135 136 return self.api_client.call_api(resource_path, 'POST', 137 path_params, 138 query_params, 139 header_params, 140 body=body_params, 141 post_params=form_params, 142 files=local_var_files, 143 response_type='Workspace', 144 auth_settings=auth_settings, 145 callback=params.get('callback'), 146 _return_http_data_only=params.get('_return_http_data_only'), 147 _preload_content=params.get('_preload_content', True), 148 _request_timeout=params.get('_request_timeout'), 149 collection_formats=collection_formats)
Create a Workspace
Creates a new workspace.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_workspace_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- Workspace workspace:
Returns
Workspace If the method is called asynchronously, returns the request thread.
151 def create_workspace_file(self, account_id, folder_id, workspace_id, **kwargs): 152 """ 153 Creates a workspace file. 154 This method adds a file to a workspace. 155 This method makes a synchronous HTTP request by default. To make an 156 asynchronous HTTP request, please define a `callback` function 157 to be invoked when receiving the response. 158 >>> def callback_function(response): 159 >>> pprint(response) 160 >>> 161 >>> thread = api.create_workspace_file(account_id, folder_id, workspace_id, callback=callback_function) 162 163 :param callback function: The callback function 164 for asynchronous request. (optional) 165 :param str account_id: The external account number (int) or account ID Guid. (required) 166 :param str folder_id: The ID of the folder being accessed. (required) 167 :param str workspace_id: Specifies the workspace ID GUID. (required) 168 :return: WorkspaceItem 169 If the method is called asynchronously, 170 returns the request thread. 171 """ 172 kwargs['_return_http_data_only'] = True 173 if kwargs.get('callback'): 174 return self.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, **kwargs) 175 else: 176 (data) = self.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, **kwargs) 177 return data
Creates a workspace file.
This method adds a file to a workspace.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_workspace_file(account_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
WorkspaceItem If the method is called asynchronously, returns the request thread.
179 def create_workspace_file_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 180 """ 181 Creates a workspace file. 182 This method adds a file to a workspace. 183 This method makes a synchronous HTTP request by default. To make an 184 asynchronous HTTP request, please define a `callback` function 185 to be invoked when receiving the response. 186 >>> def callback_function(response): 187 >>> pprint(response) 188 >>> 189 >>> thread = api.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 190 191 :param callback function: The callback function 192 for asynchronous request. (optional) 193 :param str account_id: The external account number (int) or account ID Guid. (required) 194 :param str folder_id: The ID of the folder being accessed. (required) 195 :param str workspace_id: Specifies the workspace ID GUID. (required) 196 :return: WorkspaceItem 197 If the method is called asynchronously, 198 returns the request thread. 199 """ 200 201 all_params = ['account_id', 'folder_id', 'workspace_id'] 202 all_params.append('callback') 203 all_params.append('_return_http_data_only') 204 all_params.append('_preload_content') 205 all_params.append('_request_timeout') 206 207 params = locals() 208 for key, val in iteritems(params['kwargs']): 209 if key not in all_params: 210 raise TypeError( 211 "Got an unexpected keyword argument '%s'" 212 " to method create_workspace_file" % key 213 ) 214 params[key] = val 215 del params['kwargs'] 216 # verify the required parameter 'account_id' is set 217 if ('account_id' not in params) or (params['account_id'] is None): 218 raise ValueError("Missing the required parameter `account_id` when calling `create_workspace_file`") 219 # verify the required parameter 'folder_id' is set 220 if ('folder_id' not in params) or (params['folder_id'] is None): 221 raise ValueError("Missing the required parameter `folder_id` when calling `create_workspace_file`") 222 # verify the required parameter 'workspace_id' is set 223 if ('workspace_id' not in params) or (params['workspace_id'] is None): 224 raise ValueError("Missing the required parameter `workspace_id` when calling `create_workspace_file`") 225 226 227 collection_formats = {} 228 229 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files'.replace('{format}', 'json') 230 path_params = {} 231 if 'account_id' in params: 232 path_params['accountId'] = params['account_id'] 233 if 'folder_id' in params: 234 path_params['folderId'] = params['folder_id'] 235 if 'workspace_id' in params: 236 path_params['workspaceId'] = params['workspace_id'] 237 238 query_params = {} 239 240 header_params = {} 241 242 form_params = [] 243 local_var_files = {} 244 245 body_params = None 246 # HTTP header `Accept` 247 header_params['Accept'] = self.api_client.\ 248 select_header_accept(['application/json']) 249 250 # Authentication setting 251 auth_settings = [] 252 253 return self.api_client.call_api(resource_path, 'POST', 254 path_params, 255 query_params, 256 header_params, 257 body=body_params, 258 post_params=form_params, 259 files=local_var_files, 260 response_type='WorkspaceItem', 261 auth_settings=auth_settings, 262 callback=params.get('callback'), 263 _return_http_data_only=params.get('_return_http_data_only'), 264 _preload_content=params.get('_preload_content', True), 265 _request_timeout=params.get('_request_timeout'), 266 collection_formats=collection_formats)
Creates a workspace file.
This method adds a file to a workspace.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_workspace_file_with_http_info(account_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
WorkspaceItem If the method is called asynchronously, returns the request thread.
268 def delete_workspace(self, account_id, workspace_id, **kwargs): 269 """ 270 Delete Workspace 271 Deletes an existing workspace (logically). 272 This method makes a synchronous HTTP request by default. To make an 273 asynchronous HTTP request, please define a `callback` function 274 to be invoked when receiving the response. 275 >>> def callback_function(response): 276 >>> pprint(response) 277 >>> 278 >>> thread = api.delete_workspace(account_id, workspace_id, callback=callback_function) 279 280 :param callback function: The callback function 281 for asynchronous request. (optional) 282 :param str account_id: The external account number (int) or account ID Guid. (required) 283 :param str workspace_id: Specifies the workspace ID GUID. (required) 284 :return: Workspace 285 If the method is called asynchronously, 286 returns the request thread. 287 """ 288 kwargs['_return_http_data_only'] = True 289 if kwargs.get('callback'): 290 return self.delete_workspace_with_http_info(account_id, workspace_id, **kwargs) 291 else: 292 (data) = self.delete_workspace_with_http_info(account_id, workspace_id, **kwargs) 293 return data
Delete Workspace
Deletes an existing workspace (logically).
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_workspace(account_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
Workspace If the method is called asynchronously, returns the request thread.
295 def delete_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 296 """ 297 Delete Workspace 298 Deletes an existing workspace (logically). 299 This method makes a synchronous HTTP request by default. To make an 300 asynchronous HTTP request, please define a `callback` function 301 to be invoked when receiving the response. 302 >>> def callback_function(response): 303 >>> pprint(response) 304 >>> 305 >>> thread = api.delete_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 306 307 :param callback function: The callback function 308 for asynchronous request. (optional) 309 :param str account_id: The external account number (int) or account ID Guid. (required) 310 :param str workspace_id: Specifies the workspace ID GUID. (required) 311 :return: Workspace 312 If the method is called asynchronously, 313 returns the request thread. 314 """ 315 316 all_params = ['account_id', 'workspace_id'] 317 all_params.append('callback') 318 all_params.append('_return_http_data_only') 319 all_params.append('_preload_content') 320 all_params.append('_request_timeout') 321 322 params = locals() 323 for key, val in iteritems(params['kwargs']): 324 if key not in all_params: 325 raise TypeError( 326 "Got an unexpected keyword argument '%s'" 327 " to method delete_workspace" % key 328 ) 329 params[key] = val 330 del params['kwargs'] 331 # verify the required parameter 'account_id' is set 332 if ('account_id' not in params) or (params['account_id'] is None): 333 raise ValueError("Missing the required parameter `account_id` when calling `delete_workspace`") 334 # verify the required parameter 'workspace_id' is set 335 if ('workspace_id' not in params) or (params['workspace_id'] is None): 336 raise ValueError("Missing the required parameter `workspace_id` when calling `delete_workspace`") 337 338 339 collection_formats = {} 340 341 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 342 path_params = {} 343 if 'account_id' in params: 344 path_params['accountId'] = params['account_id'] 345 if 'workspace_id' in params: 346 path_params['workspaceId'] = params['workspace_id'] 347 348 query_params = {} 349 350 header_params = {} 351 352 form_params = [] 353 local_var_files = {} 354 355 body_params = None 356 # HTTP header `Accept` 357 header_params['Accept'] = self.api_client.\ 358 select_header_accept(['application/json']) 359 360 # Authentication setting 361 auth_settings = [] 362 363 return self.api_client.call_api(resource_path, 'DELETE', 364 path_params, 365 query_params, 366 header_params, 367 body=body_params, 368 post_params=form_params, 369 files=local_var_files, 370 response_type='Workspace', 371 auth_settings=auth_settings, 372 callback=params.get('callback'), 373 _return_http_data_only=params.get('_return_http_data_only'), 374 _preload_content=params.get('_preload_content', True), 375 _request_timeout=params.get('_request_timeout'), 376 collection_formats=collection_formats)
Delete Workspace
Deletes an existing workspace (logically).
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_workspace_with_http_info(account_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
Workspace If the method is called asynchronously, returns the request thread.
378 def delete_workspace_folder_items(self, account_id, folder_id, workspace_id, **kwargs): 379 """ 380 Deletes workspace one or more specific files/folders from the given folder or root. 381 This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the `status` of the workspace must be `active`. 382 This method makes a synchronous HTTP request by default. To make an 383 asynchronous HTTP request, please define a `callback` function 384 to be invoked when receiving the response. 385 >>> def callback_function(response): 386 >>> pprint(response) 387 >>> 388 >>> thread = api.delete_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function) 389 390 :param callback function: The callback function 391 for asynchronous request. (optional) 392 :param str account_id: The external account number (int) or account ID Guid. (required) 393 :param str folder_id: The ID of the folder being accessed. (required) 394 :param str workspace_id: Specifies the workspace ID GUID. (required) 395 :param WorkspaceItemList workspace_item_list: 396 :return: None 397 If the method is called asynchronously, 398 returns the request thread. 399 """ 400 kwargs['_return_http_data_only'] = True 401 if kwargs.get('callback'): 402 return self.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 403 else: 404 (data) = self.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 405 return data
Deletes workspace one or more specific files/folders from the given folder or root.
This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the status
of the workspace must be active
.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- WorkspaceItemList workspace_item_list:
Returns
None If the method is called asynchronously, returns the request thread.
407 def delete_workspace_folder_items_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 408 """ 409 Deletes workspace one or more specific files/folders from the given folder or root. 410 This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the `status` of the workspace must be `active`. 411 This method makes a synchronous HTTP request by default. To make an 412 asynchronous HTTP request, please define a `callback` function 413 to be invoked when receiving the response. 414 >>> def callback_function(response): 415 >>> pprint(response) 416 >>> 417 >>> thread = api.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 418 419 :param callback function: The callback function 420 for asynchronous request. (optional) 421 :param str account_id: The external account number (int) or account ID Guid. (required) 422 :param str folder_id: The ID of the folder being accessed. (required) 423 :param str workspace_id: Specifies the workspace ID GUID. (required) 424 :param WorkspaceItemList workspace_item_list: 425 :return: None 426 If the method is called asynchronously, 427 returns the request thread. 428 """ 429 430 all_params = ['account_id', 'folder_id', 'workspace_id', 'workspace_item_list'] 431 all_params.append('callback') 432 all_params.append('_return_http_data_only') 433 all_params.append('_preload_content') 434 all_params.append('_request_timeout') 435 436 params = locals() 437 for key, val in iteritems(params['kwargs']): 438 if key not in all_params: 439 raise TypeError( 440 "Got an unexpected keyword argument '%s'" 441 " to method delete_workspace_folder_items" % key 442 ) 443 params[key] = val 444 del params['kwargs'] 445 # verify the required parameter 'account_id' is set 446 if ('account_id' not in params) or (params['account_id'] is None): 447 raise ValueError("Missing the required parameter `account_id` when calling `delete_workspace_folder_items`") 448 # verify the required parameter 'folder_id' is set 449 if ('folder_id' not in params) or (params['folder_id'] is None): 450 raise ValueError("Missing the required parameter `folder_id` when calling `delete_workspace_folder_items`") 451 # verify the required parameter 'workspace_id' is set 452 if ('workspace_id' not in params) or (params['workspace_id'] is None): 453 raise ValueError("Missing the required parameter `workspace_id` when calling `delete_workspace_folder_items`") 454 455 456 collection_formats = {} 457 458 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}'.replace('{format}', 'json') 459 path_params = {} 460 if 'account_id' in params: 461 path_params['accountId'] = params['account_id'] 462 if 'folder_id' in params: 463 path_params['folderId'] = params['folder_id'] 464 if 'workspace_id' in params: 465 path_params['workspaceId'] = params['workspace_id'] 466 467 query_params = {} 468 469 header_params = {} 470 471 form_params = [] 472 local_var_files = {} 473 474 body_params = None 475 if 'workspace_item_list' in params: 476 body_params = params['workspace_item_list'] 477 # HTTP header `Accept` 478 header_params['Accept'] = self.api_client.\ 479 select_header_accept(['application/json']) 480 481 # Authentication setting 482 auth_settings = [] 483 484 return self.api_client.call_api(resource_path, 'DELETE', 485 path_params, 486 query_params, 487 header_params, 488 body=body_params, 489 post_params=form_params, 490 files=local_var_files, 491 response_type=None, 492 auth_settings=auth_settings, 493 callback=params.get('callback'), 494 _return_http_data_only=params.get('_return_http_data_only'), 495 _preload_content=params.get('_preload_content', True), 496 _request_timeout=params.get('_request_timeout'), 497 collection_formats=collection_formats)
Deletes workspace one or more specific files/folders from the given folder or root.
This method deletes one or more files or sub-folders from a workspace folder or root. Note: To delete items from a workspace, the status
of the workspace must be active
.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- WorkspaceItemList workspace_item_list:
Returns
None If the method is called asynchronously, returns the request thread.
499 def get_workspace(self, account_id, workspace_id, **kwargs): 500 """ 501 Get Workspace 502 Retrives properties about a workspace given a unique workspaceId. 503 This method makes a synchronous HTTP request by default. To make an 504 asynchronous HTTP request, please define a `callback` function 505 to be invoked when receiving the response. 506 >>> def callback_function(response): 507 >>> pprint(response) 508 >>> 509 >>> thread = api.get_workspace(account_id, workspace_id, callback=callback_function) 510 511 :param callback function: The callback function 512 for asynchronous request. (optional) 513 :param str account_id: The external account number (int) or account ID Guid. (required) 514 :param str workspace_id: Specifies the workspace ID GUID. (required) 515 :return: Workspace 516 If the method is called asynchronously, 517 returns the request thread. 518 """ 519 kwargs['_return_http_data_only'] = True 520 if kwargs.get('callback'): 521 return self.get_workspace_with_http_info(account_id, workspace_id, **kwargs) 522 else: 523 (data) = self.get_workspace_with_http_info(account_id, workspace_id, **kwargs) 524 return data
Get Workspace
Retrives properties about a workspace given a unique workspaceId.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_workspace(account_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
Workspace If the method is called asynchronously, returns the request thread.
526 def get_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 527 """ 528 Get Workspace 529 Retrives properties about a workspace given a unique workspaceId. 530 This method makes a synchronous HTTP request by default. To make an 531 asynchronous HTTP request, please define a `callback` function 532 to be invoked when receiving the response. 533 >>> def callback_function(response): 534 >>> pprint(response) 535 >>> 536 >>> thread = api.get_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 537 538 :param callback function: The callback function 539 for asynchronous request. (optional) 540 :param str account_id: The external account number (int) or account ID Guid. (required) 541 :param str workspace_id: Specifies the workspace ID GUID. (required) 542 :return: Workspace 543 If the method is called asynchronously, 544 returns the request thread. 545 """ 546 547 all_params = ['account_id', 'workspace_id'] 548 all_params.append('callback') 549 all_params.append('_return_http_data_only') 550 all_params.append('_preload_content') 551 all_params.append('_request_timeout') 552 553 params = locals() 554 for key, val in iteritems(params['kwargs']): 555 if key not in all_params: 556 raise TypeError( 557 "Got an unexpected keyword argument '%s'" 558 " to method get_workspace" % key 559 ) 560 params[key] = val 561 del params['kwargs'] 562 # verify the required parameter 'account_id' is set 563 if ('account_id' not in params) or (params['account_id'] is None): 564 raise ValueError("Missing the required parameter `account_id` when calling `get_workspace`") 565 # verify the required parameter 'workspace_id' is set 566 if ('workspace_id' not in params) or (params['workspace_id'] is None): 567 raise ValueError("Missing the required parameter `workspace_id` when calling `get_workspace`") 568 569 570 collection_formats = {} 571 572 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 573 path_params = {} 574 if 'account_id' in params: 575 path_params['accountId'] = params['account_id'] 576 if 'workspace_id' in params: 577 path_params['workspaceId'] = params['workspace_id'] 578 579 query_params = {} 580 581 header_params = {} 582 583 form_params = [] 584 local_var_files = {} 585 586 body_params = None 587 # HTTP header `Accept` 588 header_params['Accept'] = self.api_client.\ 589 select_header_accept(['application/json']) 590 591 # Authentication setting 592 auth_settings = [] 593 594 return self.api_client.call_api(resource_path, 'GET', 595 path_params, 596 query_params, 597 header_params, 598 body=body_params, 599 post_params=form_params, 600 files=local_var_files, 601 response_type='Workspace', 602 auth_settings=auth_settings, 603 callback=params.get('callback'), 604 _return_http_data_only=params.get('_return_http_data_only'), 605 _preload_content=params.get('_preload_content', True), 606 _request_timeout=params.get('_request_timeout'), 607 collection_formats=collection_formats)
Get Workspace
Retrives properties about a workspace given a unique workspaceId.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_workspace_with_http_info(account_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
Workspace If the method is called asynchronously, returns the request thread.
609 def get_workspace_file(self, account_id, file_id, folder_id, workspace_id, **kwargs): 610 """ 611 Get Workspace File 612 Retrieves a workspace file (the binary). 613 This method makes a synchronous HTTP request by default. To make an 614 asynchronous HTTP request, please define a `callback` function 615 to be invoked when receiving the response. 616 >>> def callback_function(response): 617 >>> pprint(response) 618 >>> 619 >>> thread = api.get_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function) 620 621 :param callback function: The callback function 622 for asynchronous request. (optional) 623 :param str account_id: The external account number (int) or account ID Guid. (required) 624 :param str file_id: Specifies the room file ID GUID. (required) 625 :param str folder_id: The ID of the folder being accessed. (required) 626 :param str workspace_id: Specifies the workspace ID GUID. (required) 627 :param str is_download: When set to **true**, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is **false**. 628 :param str pdf_version: When set to **true** the file returned as a PDF. 629 :return: None 630 If the method is called asynchronously, 631 returns the request thread. 632 """ 633 kwargs['_return_http_data_only'] = True 634 if kwargs.get('callback'): 635 return self.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 636 else: 637 (data) = self.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 638 return data
Get Workspace File
Retrieves a workspace file (the binary).
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str file_id: Specifies the room file ID GUID. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- str is_download: When set to true, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is false.
- str pdf_version: When set to true the file returned as a PDF.
Returns
None If the method is called asynchronously, returns the request thread.
640 def get_workspace_file_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 641 """ 642 Get Workspace File 643 Retrieves a workspace file (the binary). 644 This method makes a synchronous HTTP request by default. To make an 645 asynchronous HTTP request, please define a `callback` function 646 to be invoked when receiving the response. 647 >>> def callback_function(response): 648 >>> pprint(response) 649 >>> 650 >>> thread = api.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 651 652 :param callback function: The callback function 653 for asynchronous request. (optional) 654 :param str account_id: The external account number (int) or account ID Guid. (required) 655 :param str file_id: Specifies the room file ID GUID. (required) 656 :param str folder_id: The ID of the folder being accessed. (required) 657 :param str workspace_id: Specifies the workspace ID GUID. (required) 658 :param str is_download: When set to **true**, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is **false**. 659 :param str pdf_version: When set to **true** the file returned as a PDF. 660 :return: None 661 If the method is called asynchronously, 662 returns the request thread. 663 """ 664 665 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id', 'is_download', 'pdf_version'] 666 all_params.append('callback') 667 all_params.append('_return_http_data_only') 668 all_params.append('_preload_content') 669 all_params.append('_request_timeout') 670 671 params = locals() 672 for key, val in iteritems(params['kwargs']): 673 if key not in all_params: 674 raise TypeError( 675 "Got an unexpected keyword argument '%s'" 676 " to method get_workspace_file" % key 677 ) 678 params[key] = val 679 del params['kwargs'] 680 # verify the required parameter 'account_id' is set 681 if ('account_id' not in params) or (params['account_id'] is None): 682 raise ValueError("Missing the required parameter `account_id` when calling `get_workspace_file`") 683 # verify the required parameter 'file_id' is set 684 if ('file_id' not in params) or (params['file_id'] is None): 685 raise ValueError("Missing the required parameter `file_id` when calling `get_workspace_file`") 686 # verify the required parameter 'folder_id' is set 687 if ('folder_id' not in params) or (params['folder_id'] is None): 688 raise ValueError("Missing the required parameter `folder_id` when calling `get_workspace_file`") 689 # verify the required parameter 'workspace_id' is set 690 if ('workspace_id' not in params) or (params['workspace_id'] is None): 691 raise ValueError("Missing the required parameter `workspace_id` when calling `get_workspace_file`") 692 693 694 collection_formats = {} 695 696 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}'.replace('{format}', 'json') 697 path_params = {} 698 if 'account_id' in params: 699 path_params['accountId'] = params['account_id'] 700 if 'file_id' in params: 701 path_params['fileId'] = params['file_id'] 702 if 'folder_id' in params: 703 path_params['folderId'] = params['folder_id'] 704 if 'workspace_id' in params: 705 path_params['workspaceId'] = params['workspace_id'] 706 707 query_params = {} 708 if 'is_download' in params: 709 query_params['is_download'] = params['is_download'] 710 if 'pdf_version' in params: 711 query_params['pdf_version'] = params['pdf_version'] 712 713 header_params = {} 714 715 form_params = [] 716 local_var_files = {} 717 718 body_params = None 719 # HTTP header `Accept` 720 header_params['Accept'] = self.api_client.\ 721 select_header_accept(['application/json']) 722 723 # Authentication setting 724 auth_settings = [] 725 726 return self.api_client.call_api(resource_path, 'GET', 727 path_params, 728 query_params, 729 header_params, 730 body=body_params, 731 post_params=form_params, 732 files=local_var_files, 733 response_type=None, 734 auth_settings=auth_settings, 735 callback=params.get('callback'), 736 _return_http_data_only=params.get('_return_http_data_only'), 737 _preload_content=params.get('_preload_content', True), 738 _request_timeout=params.get('_request_timeout'), 739 collection_formats=collection_formats)
Get Workspace File
Retrieves a workspace file (the binary).
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str file_id: Specifies the room file ID GUID. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- str is_download: When set to true, the Content-Disposition header is set in the response. The value of the header provides the filename of the file. Default is false.
- str pdf_version: When set to true the file returned as a PDF.
Returns
None If the method is called asynchronously, returns the request thread.
741 def list_workspace_file_pages(self, account_id, file_id, folder_id, workspace_id, **kwargs): 742 """ 743 List File Pages 744 Retrieves a workspace file as rasterized pages. 745 This method makes a synchronous HTTP request by default. To make an 746 asynchronous HTTP request, please define a `callback` function 747 to be invoked when receiving the response. 748 >>> def callback_function(response): 749 >>> pprint(response) 750 >>> 751 >>> thread = api.list_workspace_file_pages(account_id, file_id, folder_id, workspace_id, callback=callback_function) 752 753 :param callback function: The callback function 754 for asynchronous request. (optional) 755 :param str account_id: The external account number (int) or account ID Guid. (required) 756 :param str file_id: Specifies the room file ID GUID. (required) 757 :param str folder_id: The ID of the folder being accessed. (required) 758 :param str workspace_id: Specifies the workspace ID GUID. (required) 759 :param str count: The maximum number of results to be returned by this request. 760 :param str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310. 761 :param str max_height: Sets the maximum height (in pixels) of the returned image. 762 :param str max_width: Sets the maximum width (in pixels) of the returned image. 763 :param str start_position: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image. 764 :return: PageImages 765 If the method is called asynchronously, 766 returns the request thread. 767 """ 768 kwargs['_return_http_data_only'] = True 769 if kwargs.get('callback'): 770 return self.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 771 else: 772 (data) = self.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 773 return data
List File Pages
Retrieves a workspace file as rasterized pages.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_workspace_file_pages(account_id, file_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str file_id: Specifies the room file ID GUID. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- str count: The maximum number of results to be returned by this request.
- str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310.
- str max_height: Sets the maximum height (in pixels) of the returned image.
- str max_width: Sets the maximum width (in pixels) of the returned image.
- str start_position: The position within the total result set from which to start returning values. The value thumbnail may be used to return the page image.
Returns
PageImages If the method is called asynchronously, returns the request thread.
775 def list_workspace_file_pages_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 776 """ 777 List File Pages 778 Retrieves a workspace file as rasterized pages. 779 This method makes a synchronous HTTP request by default. To make an 780 asynchronous HTTP request, please define a `callback` function 781 to be invoked when receiving the response. 782 >>> def callback_function(response): 783 >>> pprint(response) 784 >>> 785 >>> thread = api.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 786 787 :param callback function: The callback function 788 for asynchronous request. (optional) 789 :param str account_id: The external account number (int) or account ID Guid. (required) 790 :param str file_id: Specifies the room file ID GUID. (required) 791 :param str folder_id: The ID of the folder being accessed. (required) 792 :param str workspace_id: Specifies the workspace ID GUID. (required) 793 :param str count: The maximum number of results to be returned by this request. 794 :param str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310. 795 :param str max_height: Sets the maximum height (in pixels) of the returned image. 796 :param str max_width: Sets the maximum width (in pixels) of the returned image. 797 :param str start_position: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image. 798 :return: PageImages 799 If the method is called asynchronously, 800 returns the request thread. 801 """ 802 803 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id', 'count', 'dpi', 'max_height', 'max_width', 'start_position'] 804 all_params.append('callback') 805 all_params.append('_return_http_data_only') 806 all_params.append('_preload_content') 807 all_params.append('_request_timeout') 808 809 params = locals() 810 for key, val in iteritems(params['kwargs']): 811 if key not in all_params: 812 raise TypeError( 813 "Got an unexpected keyword argument '%s'" 814 " to method list_workspace_file_pages" % key 815 ) 816 params[key] = val 817 del params['kwargs'] 818 # verify the required parameter 'account_id' is set 819 if ('account_id' not in params) or (params['account_id'] is None): 820 raise ValueError("Missing the required parameter `account_id` when calling `list_workspace_file_pages`") 821 # verify the required parameter 'file_id' is set 822 if ('file_id' not in params) or (params['file_id'] is None): 823 raise ValueError("Missing the required parameter `file_id` when calling `list_workspace_file_pages`") 824 # verify the required parameter 'folder_id' is set 825 if ('folder_id' not in params) or (params['folder_id'] is None): 826 raise ValueError("Missing the required parameter `folder_id` when calling `list_workspace_file_pages`") 827 # verify the required parameter 'workspace_id' is set 828 if ('workspace_id' not in params) or (params['workspace_id'] is None): 829 raise ValueError("Missing the required parameter `workspace_id` when calling `list_workspace_file_pages`") 830 831 832 collection_formats = {} 833 834 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}/pages'.replace('{format}', 'json') 835 path_params = {} 836 if 'account_id' in params: 837 path_params['accountId'] = params['account_id'] 838 if 'file_id' in params: 839 path_params['fileId'] = params['file_id'] 840 if 'folder_id' in params: 841 path_params['folderId'] = params['folder_id'] 842 if 'workspace_id' in params: 843 path_params['workspaceId'] = params['workspace_id'] 844 845 query_params = {} 846 if 'count' in params: 847 query_params['count'] = params['count'] 848 if 'dpi' in params: 849 query_params['dpi'] = params['dpi'] 850 if 'max_height' in params: 851 query_params['max_height'] = params['max_height'] 852 if 'max_width' in params: 853 query_params['max_width'] = params['max_width'] 854 if 'start_position' in params: 855 query_params['start_position'] = params['start_position'] 856 857 header_params = {} 858 859 form_params = [] 860 local_var_files = {} 861 862 body_params = None 863 # HTTP header `Accept` 864 header_params['Accept'] = self.api_client.\ 865 select_header_accept(['application/json']) 866 867 # Authentication setting 868 auth_settings = [] 869 870 return self.api_client.call_api(resource_path, 'GET', 871 path_params, 872 query_params, 873 header_params, 874 body=body_params, 875 post_params=form_params, 876 files=local_var_files, 877 response_type='PageImages', 878 auth_settings=auth_settings, 879 callback=params.get('callback'), 880 _return_http_data_only=params.get('_return_http_data_only'), 881 _preload_content=params.get('_preload_content', True), 882 _request_timeout=params.get('_request_timeout'), 883 collection_formats=collection_formats)
List File Pages
Retrieves a workspace file as rasterized pages.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str file_id: Specifies the room file ID GUID. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- str count: The maximum number of results to be returned by this request.
- str dpi: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310.
- str max_height: Sets the maximum height (in pixels) of the returned image.
- str max_width: Sets the maximum width (in pixels) of the returned image.
- str start_position: The position within the total result set from which to start returning values. The value thumbnail may be used to return the page image.
Returns
PageImages If the method is called asynchronously, returns the request thread.
885 def list_workspace_folder_items(self, account_id, folder_id, workspace_id, **kwargs): 886 """ 887 List Workspace Folder Contents 888 Retrieves workspace folder contents, which can include sub folders and files. 889 This method makes a synchronous HTTP request by default. To make an 890 asynchronous HTTP request, please define a `callback` function 891 to be invoked when receiving the response. 892 >>> def callback_function(response): 893 >>> pprint(response) 894 >>> 895 >>> thread = api.list_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function) 896 897 :param callback function: The callback function 898 for asynchronous request. (optional) 899 :param str account_id: The external account number (int) or account ID Guid. (required) 900 :param str folder_id: The ID of the folder being accessed. (required) 901 :param str workspace_id: Specifies the workspace ID GUID. (required) 902 :param str count: The maximum number of results to be returned by this request. 903 :param str include_files: When set to **true**, file information is returned in the response along with folder information. The default is **false**. 904 :param str include_sub_folders: When set to **true**, information about the sub-folders of the current folder is returned. The default is **false**. 905 :param str include_thumbnails: When set to **true**, thumbnails are returned as part of the response. The default is **false**. 906 :param str include_user_detail: Set to **true** to return extended details about the user. The default is **false**. 907 :param str start_position: The position within the total result set from which to start returning values. 908 :param str workspace_user_id: If set, then the results are filtered to those associated with the specified userId. 909 :return: WorkspaceFolderContents 910 If the method is called asynchronously, 911 returns the request thread. 912 """ 913 kwargs['_return_http_data_only'] = True 914 if kwargs.get('callback'): 915 return self.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 916 else: 917 (data) = self.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, **kwargs) 918 return data
List Workspace Folder Contents
Retrieves workspace folder contents, which can include sub folders and files.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_workspace_folder_items(account_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- str count: The maximum number of results to be returned by this request.
- str include_files: When set to true, file information is returned in the response along with folder information. The default is false.
- str include_sub_folders: When set to true, information about the sub-folders of the current folder is returned. The default is false.
- str include_thumbnails: When set to true, thumbnails are returned as part of the response. The default is false.
- str include_user_detail: Set to true to return extended details about the user. The default is false.
- str start_position: The position within the total result set from which to start returning values.
- str workspace_user_id: If set, then the results are filtered to those associated with the specified userId.
Returns
WorkspaceFolderContents If the method is called asynchronously, returns the request thread.
920 def list_workspace_folder_items_with_http_info(self, account_id, folder_id, workspace_id, **kwargs): 921 """ 922 List Workspace Folder Contents 923 Retrieves workspace folder contents, which can include sub folders and files. 924 This method makes a synchronous HTTP request by default. To make an 925 asynchronous HTTP request, please define a `callback` function 926 to be invoked when receiving the response. 927 >>> def callback_function(response): 928 >>> pprint(response) 929 >>> 930 >>> thread = api.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function) 931 932 :param callback function: The callback function 933 for asynchronous request. (optional) 934 :param str account_id: The external account number (int) or account ID Guid. (required) 935 :param str folder_id: The ID of the folder being accessed. (required) 936 :param str workspace_id: Specifies the workspace ID GUID. (required) 937 :param str count: The maximum number of results to be returned by this request. 938 :param str include_files: When set to **true**, file information is returned in the response along with folder information. The default is **false**. 939 :param str include_sub_folders: When set to **true**, information about the sub-folders of the current folder is returned. The default is **false**. 940 :param str include_thumbnails: When set to **true**, thumbnails are returned as part of the response. The default is **false**. 941 :param str include_user_detail: Set to **true** to return extended details about the user. The default is **false**. 942 :param str start_position: The position within the total result set from which to start returning values. 943 :param str workspace_user_id: If set, then the results are filtered to those associated with the specified userId. 944 :return: WorkspaceFolderContents 945 If the method is called asynchronously, 946 returns the request thread. 947 """ 948 949 all_params = ['account_id', 'folder_id', 'workspace_id', 'count', 'include_files', 'include_sub_folders', 'include_thumbnails', 'include_user_detail', 'start_position', 'workspace_user_id'] 950 all_params.append('callback') 951 all_params.append('_return_http_data_only') 952 all_params.append('_preload_content') 953 all_params.append('_request_timeout') 954 955 params = locals() 956 for key, val in iteritems(params['kwargs']): 957 if key not in all_params: 958 raise TypeError( 959 "Got an unexpected keyword argument '%s'" 960 " to method list_workspace_folder_items" % key 961 ) 962 params[key] = val 963 del params['kwargs'] 964 # verify the required parameter 'account_id' is set 965 if ('account_id' not in params) or (params['account_id'] is None): 966 raise ValueError("Missing the required parameter `account_id` when calling `list_workspace_folder_items`") 967 # verify the required parameter 'folder_id' is set 968 if ('folder_id' not in params) or (params['folder_id'] is None): 969 raise ValueError("Missing the required parameter `folder_id` when calling `list_workspace_folder_items`") 970 # verify the required parameter 'workspace_id' is set 971 if ('workspace_id' not in params) or (params['workspace_id'] is None): 972 raise ValueError("Missing the required parameter `workspace_id` when calling `list_workspace_folder_items`") 973 974 975 collection_formats = {} 976 977 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}'.replace('{format}', 'json') 978 path_params = {} 979 if 'account_id' in params: 980 path_params['accountId'] = params['account_id'] 981 if 'folder_id' in params: 982 path_params['folderId'] = params['folder_id'] 983 if 'workspace_id' in params: 984 path_params['workspaceId'] = params['workspace_id'] 985 986 query_params = {} 987 if 'count' in params: 988 query_params['count'] = params['count'] 989 if 'include_files' in params: 990 query_params['include_files'] = params['include_files'] 991 if 'include_sub_folders' in params: 992 query_params['include_sub_folders'] = params['include_sub_folders'] 993 if 'include_thumbnails' in params: 994 query_params['include_thumbnails'] = params['include_thumbnails'] 995 if 'include_user_detail' in params: 996 query_params['include_user_detail'] = params['include_user_detail'] 997 if 'start_position' in params: 998 query_params['start_position'] = params['start_position'] 999 if 'workspace_user_id' in params: 1000 query_params['workspace_user_id'] = params['workspace_user_id'] 1001 1002 header_params = {} 1003 1004 form_params = [] 1005 local_var_files = {} 1006 1007 body_params = None 1008 # HTTP header `Accept` 1009 header_params['Accept'] = self.api_client.\ 1010 select_header_accept(['application/json']) 1011 1012 # Authentication setting 1013 auth_settings = [] 1014 1015 return self.api_client.call_api(resource_path, 'GET', 1016 path_params, 1017 query_params, 1018 header_params, 1019 body=body_params, 1020 post_params=form_params, 1021 files=local_var_files, 1022 response_type='WorkspaceFolderContents', 1023 auth_settings=auth_settings, 1024 callback=params.get('callback'), 1025 _return_http_data_only=params.get('_return_http_data_only'), 1026 _preload_content=params.get('_preload_content', True), 1027 _request_timeout=params.get('_request_timeout'), 1028 collection_formats=collection_formats)
List Workspace Folder Contents
Retrieves workspace folder contents, which can include sub folders and files.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- str count: The maximum number of results to be returned by this request.
- str include_files: When set to true, file information is returned in the response along with folder information. The default is false.
- str include_sub_folders: When set to true, information about the sub-folders of the current folder is returned. The default is false.
- str include_thumbnails: When set to true, thumbnails are returned as part of the response. The default is false.
- str include_user_detail: Set to true to return extended details about the user. The default is false.
- str start_position: The position within the total result set from which to start returning values.
- str workspace_user_id: If set, then the results are filtered to those associated with the specified userId.
Returns
WorkspaceFolderContents If the method is called asynchronously, returns the request thread.
1030 def list_workspaces(self, account_id, **kwargs): 1031 """ 1032 List Workspaces 1033 Gets information about the Workspaces that have been created. 1034 This method makes a synchronous HTTP request by default. To make an 1035 asynchronous HTTP request, please define a `callback` function 1036 to be invoked when receiving the response. 1037 >>> def callback_function(response): 1038 >>> pprint(response) 1039 >>> 1040 >>> thread = api.list_workspaces(account_id, callback=callback_function) 1041 1042 :param callback function: The callback function 1043 for asynchronous request. (optional) 1044 :param str account_id: The external account number (int) or account ID Guid. (required) 1045 :return: WorkspaceList 1046 If the method is called asynchronously, 1047 returns the request thread. 1048 """ 1049 kwargs['_return_http_data_only'] = True 1050 if kwargs.get('callback'): 1051 return self.list_workspaces_with_http_info(account_id, **kwargs) 1052 else: 1053 (data) = self.list_workspaces_with_http_info(account_id, **kwargs) 1054 return data
List Workspaces
Gets information about the Workspaces that have been created.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_workspaces(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
Returns
WorkspaceList If the method is called asynchronously, returns the request thread.
1056 def list_workspaces_with_http_info(self, account_id, **kwargs): 1057 """ 1058 List Workspaces 1059 Gets information about the Workspaces that have been created. 1060 This method makes a synchronous HTTP request by default. To make an 1061 asynchronous HTTP request, please define a `callback` function 1062 to be invoked when receiving the response. 1063 >>> def callback_function(response): 1064 >>> pprint(response) 1065 >>> 1066 >>> thread = api.list_workspaces_with_http_info(account_id, callback=callback_function) 1067 1068 :param callback function: The callback function 1069 for asynchronous request. (optional) 1070 :param str account_id: The external account number (int) or account ID Guid. (required) 1071 :return: WorkspaceList 1072 If the method is called asynchronously, 1073 returns the request thread. 1074 """ 1075 1076 all_params = ['account_id'] 1077 all_params.append('callback') 1078 all_params.append('_return_http_data_only') 1079 all_params.append('_preload_content') 1080 all_params.append('_request_timeout') 1081 1082 params = locals() 1083 for key, val in iteritems(params['kwargs']): 1084 if key not in all_params: 1085 raise TypeError( 1086 "Got an unexpected keyword argument '%s'" 1087 " to method list_workspaces" % key 1088 ) 1089 params[key] = val 1090 del params['kwargs'] 1091 # verify the required parameter 'account_id' is set 1092 if ('account_id' not in params) or (params['account_id'] is None): 1093 raise ValueError("Missing the required parameter `account_id` when calling `list_workspaces`") 1094 1095 1096 collection_formats = {} 1097 1098 resource_path = '/v2.1/accounts/{accountId}/workspaces'.replace('{format}', 'json') 1099 path_params = {} 1100 if 'account_id' in params: 1101 path_params['accountId'] = params['account_id'] 1102 1103 query_params = {} 1104 1105 header_params = {} 1106 1107 form_params = [] 1108 local_var_files = {} 1109 1110 body_params = None 1111 # HTTP header `Accept` 1112 header_params['Accept'] = self.api_client.\ 1113 select_header_accept(['application/json']) 1114 1115 # Authentication setting 1116 auth_settings = [] 1117 1118 return self.api_client.call_api(resource_path, 'GET', 1119 path_params, 1120 query_params, 1121 header_params, 1122 body=body_params, 1123 post_params=form_params, 1124 files=local_var_files, 1125 response_type='WorkspaceList', 1126 auth_settings=auth_settings, 1127 callback=params.get('callback'), 1128 _return_http_data_only=params.get('_return_http_data_only'), 1129 _preload_content=params.get('_preload_content', True), 1130 _request_timeout=params.get('_request_timeout'), 1131 collection_formats=collection_formats)
List Workspaces
Gets information about the Workspaces that have been created.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_workspaces_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
Returns
WorkspaceList If the method is called asynchronously, returns the request thread.
1133 def update_workspace(self, account_id, workspace_id, **kwargs): 1134 """ 1135 Update Workspace 1136 Updates information about a specific workspace. 1137 This method makes a synchronous HTTP request by default. To make an 1138 asynchronous HTTP request, please define a `callback` function 1139 to be invoked when receiving the response. 1140 >>> def callback_function(response): 1141 >>> pprint(response) 1142 >>> 1143 >>> thread = api.update_workspace(account_id, workspace_id, callback=callback_function) 1144 1145 :param callback function: The callback function 1146 for asynchronous request. (optional) 1147 :param str account_id: The external account number (int) or account ID Guid. (required) 1148 :param str workspace_id: Specifies the workspace ID GUID. (required) 1149 :param Workspace workspace: 1150 :return: Workspace 1151 If the method is called asynchronously, 1152 returns the request thread. 1153 """ 1154 kwargs['_return_http_data_only'] = True 1155 if kwargs.get('callback'): 1156 return self.update_workspace_with_http_info(account_id, workspace_id, **kwargs) 1157 else: 1158 (data) = self.update_workspace_with_http_info(account_id, workspace_id, **kwargs) 1159 return data
Update Workspace
Updates information about a specific workspace.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_workspace(account_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- Workspace workspace:
Returns
Workspace If the method is called asynchronously, returns the request thread.
1161 def update_workspace_with_http_info(self, account_id, workspace_id, **kwargs): 1162 """ 1163 Update Workspace 1164 Updates information about a specific workspace. 1165 This method makes a synchronous HTTP request by default. To make an 1166 asynchronous HTTP request, please define a `callback` function 1167 to be invoked when receiving the response. 1168 >>> def callback_function(response): 1169 >>> pprint(response) 1170 >>> 1171 >>> thread = api.update_workspace_with_http_info(account_id, workspace_id, callback=callback_function) 1172 1173 :param callback function: The callback function 1174 for asynchronous request. (optional) 1175 :param str account_id: The external account number (int) or account ID Guid. (required) 1176 :param str workspace_id: Specifies the workspace ID GUID. (required) 1177 :param Workspace workspace: 1178 :return: Workspace 1179 If the method is called asynchronously, 1180 returns the request thread. 1181 """ 1182 1183 all_params = ['account_id', 'workspace_id', 'workspace'] 1184 all_params.append('callback') 1185 all_params.append('_return_http_data_only') 1186 all_params.append('_preload_content') 1187 all_params.append('_request_timeout') 1188 1189 params = locals() 1190 for key, val in iteritems(params['kwargs']): 1191 if key not in all_params: 1192 raise TypeError( 1193 "Got an unexpected keyword argument '%s'" 1194 " to method update_workspace" % key 1195 ) 1196 params[key] = val 1197 del params['kwargs'] 1198 # verify the required parameter 'account_id' is set 1199 if ('account_id' not in params) or (params['account_id'] is None): 1200 raise ValueError("Missing the required parameter `account_id` when calling `update_workspace`") 1201 # verify the required parameter 'workspace_id' is set 1202 if ('workspace_id' not in params) or (params['workspace_id'] is None): 1203 raise ValueError("Missing the required parameter `workspace_id` when calling `update_workspace`") 1204 1205 1206 collection_formats = {} 1207 1208 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}'.replace('{format}', 'json') 1209 path_params = {} 1210 if 'account_id' in params: 1211 path_params['accountId'] = params['account_id'] 1212 if 'workspace_id' in params: 1213 path_params['workspaceId'] = params['workspace_id'] 1214 1215 query_params = {} 1216 1217 header_params = {} 1218 1219 form_params = [] 1220 local_var_files = {} 1221 1222 body_params = None 1223 if 'workspace' in params: 1224 body_params = params['workspace'] 1225 # HTTP header `Accept` 1226 header_params['Accept'] = self.api_client.\ 1227 select_header_accept(['application/json']) 1228 1229 # Authentication setting 1230 auth_settings = [] 1231 1232 return self.api_client.call_api(resource_path, 'PUT', 1233 path_params, 1234 query_params, 1235 header_params, 1236 body=body_params, 1237 post_params=form_params, 1238 files=local_var_files, 1239 response_type='Workspace', 1240 auth_settings=auth_settings, 1241 callback=params.get('callback'), 1242 _return_http_data_only=params.get('_return_http_data_only'), 1243 _preload_content=params.get('_preload_content', True), 1244 _request_timeout=params.get('_request_timeout'), 1245 collection_formats=collection_formats)
Update Workspace
Updates information about a specific workspace.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_workspace_with_http_info(account_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
- Workspace workspace:
Returns
Workspace If the method is called asynchronously, returns the request thread.
1247 def update_workspace_file(self, account_id, file_id, folder_id, workspace_id, **kwargs): 1248 """ 1249 Update Workspace File Metadata 1250 Updates workspace item metadata for one or more specific files/folders. 1251 This method makes a synchronous HTTP request by default. To make an 1252 asynchronous HTTP request, please define a `callback` function 1253 to be invoked when receiving the response. 1254 >>> def callback_function(response): 1255 >>> pprint(response) 1256 >>> 1257 >>> thread = api.update_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function) 1258 1259 :param callback function: The callback function 1260 for asynchronous request. (optional) 1261 :param str account_id: The external account number (int) or account ID Guid. (required) 1262 :param str file_id: Specifies the room file ID GUID. (required) 1263 :param str folder_id: The ID of the folder being accessed. (required) 1264 :param str workspace_id: Specifies the workspace ID GUID. (required) 1265 :return: WorkspaceItem 1266 If the method is called asynchronously, 1267 returns the request thread. 1268 """ 1269 kwargs['_return_http_data_only'] = True 1270 if kwargs.get('callback'): 1271 return self.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 1272 else: 1273 (data) = self.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, **kwargs) 1274 return data
Update Workspace File Metadata
Updates workspace item metadata for one or more specific files/folders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_workspace_file(account_id, file_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str file_id: Specifies the room file ID GUID. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
WorkspaceItem If the method is called asynchronously, returns the request thread.
1276 def update_workspace_file_with_http_info(self, account_id, file_id, folder_id, workspace_id, **kwargs): 1277 """ 1278 Update Workspace File Metadata 1279 Updates workspace item metadata for one or more specific files/folders. 1280 This method makes a synchronous HTTP request by default. To make an 1281 asynchronous HTTP request, please define a `callback` function 1282 to be invoked when receiving the response. 1283 >>> def callback_function(response): 1284 >>> pprint(response) 1285 >>> 1286 >>> thread = api.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function) 1287 1288 :param callback function: The callback function 1289 for asynchronous request. (optional) 1290 :param str account_id: The external account number (int) or account ID Guid. (required) 1291 :param str file_id: Specifies the room file ID GUID. (required) 1292 :param str folder_id: The ID of the folder being accessed. (required) 1293 :param str workspace_id: Specifies the workspace ID GUID. (required) 1294 :return: WorkspaceItem 1295 If the method is called asynchronously, 1296 returns the request thread. 1297 """ 1298 1299 all_params = ['account_id', 'file_id', 'folder_id', 'workspace_id'] 1300 all_params.append('callback') 1301 all_params.append('_return_http_data_only') 1302 all_params.append('_preload_content') 1303 all_params.append('_request_timeout') 1304 1305 params = locals() 1306 for key, val in iteritems(params['kwargs']): 1307 if key not in all_params: 1308 raise TypeError( 1309 "Got an unexpected keyword argument '%s'" 1310 " to method update_workspace_file" % key 1311 ) 1312 params[key] = val 1313 del params['kwargs'] 1314 # verify the required parameter 'account_id' is set 1315 if ('account_id' not in params) or (params['account_id'] is None): 1316 raise ValueError("Missing the required parameter `account_id` when calling `update_workspace_file`") 1317 # verify the required parameter 'file_id' is set 1318 if ('file_id' not in params) or (params['file_id'] is None): 1319 raise ValueError("Missing the required parameter `file_id` when calling `update_workspace_file`") 1320 # verify the required parameter 'folder_id' is set 1321 if ('folder_id' not in params) or (params['folder_id'] is None): 1322 raise ValueError("Missing the required parameter `folder_id` when calling `update_workspace_file`") 1323 # verify the required parameter 'workspace_id' is set 1324 if ('workspace_id' not in params) or (params['workspace_id'] is None): 1325 raise ValueError("Missing the required parameter `workspace_id` when calling `update_workspace_file`") 1326 1327 1328 collection_formats = {} 1329 1330 resource_path = '/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}'.replace('{format}', 'json') 1331 path_params = {} 1332 if 'account_id' in params: 1333 path_params['accountId'] = params['account_id'] 1334 if 'file_id' in params: 1335 path_params['fileId'] = params['file_id'] 1336 if 'folder_id' in params: 1337 path_params['folderId'] = params['folder_id'] 1338 if 'workspace_id' in params: 1339 path_params['workspaceId'] = params['workspace_id'] 1340 1341 query_params = {} 1342 1343 header_params = {} 1344 1345 form_params = [] 1346 local_var_files = {} 1347 1348 body_params = None 1349 # HTTP header `Accept` 1350 header_params['Accept'] = self.api_client.\ 1351 select_header_accept(['application/json']) 1352 1353 # Authentication setting 1354 auth_settings = [] 1355 1356 return self.api_client.call_api(resource_path, 'PUT', 1357 path_params, 1358 query_params, 1359 header_params, 1360 body=body_params, 1361 post_params=form_params, 1362 files=local_var_files, 1363 response_type='WorkspaceItem', 1364 auth_settings=auth_settings, 1365 callback=params.get('callback'), 1366 _return_http_data_only=params.get('_return_http_data_only'), 1367 _preload_content=params.get('_preload_content', True), 1368 _request_timeout=params.get('_request_timeout'), 1369 collection_formats=collection_formats)
Update Workspace File Metadata
Updates workspace item metadata for one or more specific files/folders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str file_id: Specifies the room file ID GUID. (required)
- str folder_id: The ID of the folder being accessed. (required)
- str workspace_id: Specifies the workspace ID GUID. (required)
Returns
WorkspaceItem If the method is called asynchronously, returns the request thread.