vectorize_client.api.workspaces_api
Vectorize API
API for Vectorize services (Beta)
The version of the OpenAPI document: 0.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
1# coding: utf-8 2 3""" 4 Vectorize API 5 6 API for Vectorize services (Beta) 7 8 The version of the OpenAPI document: 0.1.2 9 Generated by OpenAPI Generator (https://openapi-generator.tech) 10 11 Do not edit the class manually. 12""" # noqa: E501 13 14import warnings 15from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt 16from typing import Any, Dict, List, Optional, Tuple, Union 17from typing_extensions import Annotated 18 19from pydantic import Field, StrictStr 20from typing import Optional 21from typing_extensions import Annotated 22from vectorize_client.models.get_workspace_by_id_response import GetWorkspaceByIdResponse 23from vectorize_client.models.get_workspaces_response import GetWorkspacesResponse 24 25from vectorize_client.api_client import ApiClient, RequestSerialized 26from vectorize_client.api_response import ApiResponse 27from vectorize_client.rest import RESTResponseType 28 29 30class WorkspacesApi: 31 """NOTE: This class is auto generated by OpenAPI Generator 32 Ref: https://openapi-generator.tech 33 34 Do not edit the class manually. 35 """ 36 37 def __init__(self, api_client=None) -> None: 38 if api_client is None: 39 api_client = ApiClient.get_default() 40 self.api_client = api_client 41 42 43 @validate_call 44 def get_workspace_by_id( 45 self, 46 organization_id: StrictStr, 47 workspace_id: StrictStr, 48 _request_timeout: Union[ 49 None, 50 Annotated[StrictFloat, Field(gt=0)], 51 Tuple[ 52 Annotated[StrictFloat, Field(gt=0)], 53 Annotated[StrictFloat, Field(gt=0)] 54 ] 55 ] = None, 56 _request_auth: Optional[Dict[StrictStr, Any]] = None, 57 _content_type: Optional[StrictStr] = None, 58 _headers: Optional[Dict[StrictStr, Any]] = None, 59 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 60 ) -> GetWorkspaceByIdResponse: 61 """Get a specific workspace by ID 62 63 Returns details of a specific workspace within the organization 64 65 :param organization_id: (required) 66 :type organization_id: str 67 :param workspace_id: (required) 68 :type workspace_id: str 69 :param _request_timeout: timeout setting for this request. If one 70 number provided, it will be total request 71 timeout. It can also be a pair (tuple) of 72 (connection, read) timeouts. 73 :type _request_timeout: int, tuple(int, int), optional 74 :param _request_auth: set to override the auth_settings for an a single 75 request; this effectively ignores the 76 authentication in the spec for a single request. 77 :type _request_auth: dict, optional 78 :param _content_type: force content-type for the request. 79 :type _content_type: str, Optional 80 :param _headers: set to override the headers for a single 81 request; this effectively ignores the headers 82 in the spec for a single request. 83 :type _headers: dict, optional 84 :param _host_index: set to override the host_index for a single 85 request; this effectively ignores the host_index 86 in the spec for a single request. 87 :type _host_index: int, optional 88 :return: Returns the result object. 89 """ # noqa: E501 90 91 _param = self._get_workspace_by_id_serialize( 92 organization_id=organization_id, 93 workspace_id=workspace_id, 94 _request_auth=_request_auth, 95 _content_type=_content_type, 96 _headers=_headers, 97 _host_index=_host_index 98 ) 99 100 _response_types_map: Dict[str, Optional[str]] = { 101 '200': "GetWorkspaceByIdResponse", 102 '400': "GetWorkspaces400Response", 103 '401': "GetWorkspaces400Response", 104 '403': "GetWorkspaces400Response", 105 '404': "GetWorkspaces400Response", 106 '500': "GetWorkspaces400Response", 107 } 108 response_data = self.api_client.call_api( 109 *_param, 110 _request_timeout=_request_timeout 111 ) 112 response_data.read() 113 return self.api_client.response_deserialize( 114 response_data=response_data, 115 response_types_map=_response_types_map, 116 ).data 117 118 119 @validate_call 120 def get_workspace_by_id_with_http_info( 121 self, 122 organization_id: StrictStr, 123 workspace_id: StrictStr, 124 _request_timeout: Union[ 125 None, 126 Annotated[StrictFloat, Field(gt=0)], 127 Tuple[ 128 Annotated[StrictFloat, Field(gt=0)], 129 Annotated[StrictFloat, Field(gt=0)] 130 ] 131 ] = None, 132 _request_auth: Optional[Dict[StrictStr, Any]] = None, 133 _content_type: Optional[StrictStr] = None, 134 _headers: Optional[Dict[StrictStr, Any]] = None, 135 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 136 ) -> ApiResponse[GetWorkspaceByIdResponse]: 137 """Get a specific workspace by ID 138 139 Returns details of a specific workspace within the organization 140 141 :param organization_id: (required) 142 :type organization_id: str 143 :param workspace_id: (required) 144 :type workspace_id: str 145 :param _request_timeout: timeout setting for this request. If one 146 number provided, it will be total request 147 timeout. It can also be a pair (tuple) of 148 (connection, read) timeouts. 149 :type _request_timeout: int, tuple(int, int), optional 150 :param _request_auth: set to override the auth_settings for an a single 151 request; this effectively ignores the 152 authentication in the spec for a single request. 153 :type _request_auth: dict, optional 154 :param _content_type: force content-type for the request. 155 :type _content_type: str, Optional 156 :param _headers: set to override the headers for a single 157 request; this effectively ignores the headers 158 in the spec for a single request. 159 :type _headers: dict, optional 160 :param _host_index: set to override the host_index for a single 161 request; this effectively ignores the host_index 162 in the spec for a single request. 163 :type _host_index: int, optional 164 :return: Returns the result object. 165 """ # noqa: E501 166 167 _param = self._get_workspace_by_id_serialize( 168 organization_id=organization_id, 169 workspace_id=workspace_id, 170 _request_auth=_request_auth, 171 _content_type=_content_type, 172 _headers=_headers, 173 _host_index=_host_index 174 ) 175 176 _response_types_map: Dict[str, Optional[str]] = { 177 '200': "GetWorkspaceByIdResponse", 178 '400': "GetWorkspaces400Response", 179 '401': "GetWorkspaces400Response", 180 '403': "GetWorkspaces400Response", 181 '404': "GetWorkspaces400Response", 182 '500': "GetWorkspaces400Response", 183 } 184 response_data = self.api_client.call_api( 185 *_param, 186 _request_timeout=_request_timeout 187 ) 188 response_data.read() 189 return self.api_client.response_deserialize( 190 response_data=response_data, 191 response_types_map=_response_types_map, 192 ) 193 194 195 @validate_call 196 def get_workspace_by_id_without_preload_content( 197 self, 198 organization_id: StrictStr, 199 workspace_id: StrictStr, 200 _request_timeout: Union[ 201 None, 202 Annotated[StrictFloat, Field(gt=0)], 203 Tuple[ 204 Annotated[StrictFloat, Field(gt=0)], 205 Annotated[StrictFloat, Field(gt=0)] 206 ] 207 ] = None, 208 _request_auth: Optional[Dict[StrictStr, Any]] = None, 209 _content_type: Optional[StrictStr] = None, 210 _headers: Optional[Dict[StrictStr, Any]] = None, 211 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 212 ) -> RESTResponseType: 213 """Get a specific workspace by ID 214 215 Returns details of a specific workspace within the organization 216 217 :param organization_id: (required) 218 :type organization_id: str 219 :param workspace_id: (required) 220 :type workspace_id: str 221 :param _request_timeout: timeout setting for this request. If one 222 number provided, it will be total request 223 timeout. It can also be a pair (tuple) of 224 (connection, read) timeouts. 225 :type _request_timeout: int, tuple(int, int), optional 226 :param _request_auth: set to override the auth_settings for an a single 227 request; this effectively ignores the 228 authentication in the spec for a single request. 229 :type _request_auth: dict, optional 230 :param _content_type: force content-type for the request. 231 :type _content_type: str, Optional 232 :param _headers: set to override the headers for a single 233 request; this effectively ignores the headers 234 in the spec for a single request. 235 :type _headers: dict, optional 236 :param _host_index: set to override the host_index for a single 237 request; this effectively ignores the host_index 238 in the spec for a single request. 239 :type _host_index: int, optional 240 :return: Returns the result object. 241 """ # noqa: E501 242 243 _param = self._get_workspace_by_id_serialize( 244 organization_id=organization_id, 245 workspace_id=workspace_id, 246 _request_auth=_request_auth, 247 _content_type=_content_type, 248 _headers=_headers, 249 _host_index=_host_index 250 ) 251 252 _response_types_map: Dict[str, Optional[str]] = { 253 '200': "GetWorkspaceByIdResponse", 254 '400': "GetWorkspaces400Response", 255 '401': "GetWorkspaces400Response", 256 '403': "GetWorkspaces400Response", 257 '404': "GetWorkspaces400Response", 258 '500': "GetWorkspaces400Response", 259 } 260 response_data = self.api_client.call_api( 261 *_param, 262 _request_timeout=_request_timeout 263 ) 264 return response_data.response 265 266 267 def _get_workspace_by_id_serialize( 268 self, 269 organization_id, 270 workspace_id, 271 _request_auth, 272 _content_type, 273 _headers, 274 _host_index, 275 ) -> RequestSerialized: 276 277 _host = None 278 279 _collection_formats: Dict[str, str] = { 280 } 281 282 _path_params: Dict[str, str] = {} 283 _query_params: List[Tuple[str, str]] = [] 284 _header_params: Dict[str, Optional[str]] = _headers or {} 285 _form_params: List[Tuple[str, str]] = [] 286 _files: Dict[ 287 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 288 ] = {} 289 _body_params: Optional[bytes] = None 290 291 # process the path parameters 292 if organization_id is not None: 293 _path_params['organizationId'] = organization_id 294 if workspace_id is not None: 295 _path_params['workspaceId'] = workspace_id 296 # process the query parameters 297 # process the header parameters 298 # process the form parameters 299 # process the body parameter 300 301 302 # set the HTTP header `Accept` 303 if 'Accept' not in _header_params: 304 _header_params['Accept'] = self.api_client.select_header_accept( 305 [ 306 'application/json' 307 ] 308 ) 309 310 311 # authentication setting 312 _auth_settings: List[str] = [ 313 'bearerAuth' 314 ] 315 316 return self.api_client.param_serialize( 317 method='GET', 318 resource_path='/org/{organizationId}/workspaces/{workspaceId}', 319 path_params=_path_params, 320 query_params=_query_params, 321 header_params=_header_params, 322 body=_body_params, 323 post_params=_form_params, 324 files=_files, 325 auth_settings=_auth_settings, 326 collection_formats=_collection_formats, 327 _host=_host, 328 _request_auth=_request_auth 329 ) 330 331 332 333 334 @validate_call 335 def get_workspaces( 336 self, 337 organization_id: StrictStr, 338 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 339 next_token: Optional[StrictStr] = None, 340 _request_timeout: Union[ 341 None, 342 Annotated[StrictFloat, Field(gt=0)], 343 Tuple[ 344 Annotated[StrictFloat, Field(gt=0)], 345 Annotated[StrictFloat, Field(gt=0)] 346 ] 347 ] = None, 348 _request_auth: Optional[Dict[StrictStr, Any]] = None, 349 _content_type: Optional[StrictStr] = None, 350 _headers: Optional[Dict[StrictStr, Any]] = None, 351 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 352 ) -> GetWorkspacesResponse: 353 """Get all workspaces in an organization 354 355 Returns all workspaces that belong to the specified organization with pagination support 356 357 :param organization_id: (required) 358 :type organization_id: str 359 :param limit: 360 :type limit: int 361 :param next_token: 362 :type next_token: str 363 :param _request_timeout: timeout setting for this request. If one 364 number provided, it will be total request 365 timeout. It can also be a pair (tuple) of 366 (connection, read) timeouts. 367 :type _request_timeout: int, tuple(int, int), optional 368 :param _request_auth: set to override the auth_settings for an a single 369 request; this effectively ignores the 370 authentication in the spec for a single request. 371 :type _request_auth: dict, optional 372 :param _content_type: force content-type for the request. 373 :type _content_type: str, Optional 374 :param _headers: set to override the headers for a single 375 request; this effectively ignores the headers 376 in the spec for a single request. 377 :type _headers: dict, optional 378 :param _host_index: set to override the host_index for a single 379 request; this effectively ignores the host_index 380 in the spec for a single request. 381 :type _host_index: int, optional 382 :return: Returns the result object. 383 """ # noqa: E501 384 385 _param = self._get_workspaces_serialize( 386 organization_id=organization_id, 387 limit=limit, 388 next_token=next_token, 389 _request_auth=_request_auth, 390 _content_type=_content_type, 391 _headers=_headers, 392 _host_index=_host_index 393 ) 394 395 _response_types_map: Dict[str, Optional[str]] = { 396 '200': "GetWorkspacesResponse", 397 '400': "GetWorkspaces400Response", 398 '401': "GetWorkspaces400Response", 399 '403': "GetWorkspaces400Response", 400 '404': "GetWorkspaces400Response", 401 '500': "GetWorkspaces400Response", 402 } 403 response_data = self.api_client.call_api( 404 *_param, 405 _request_timeout=_request_timeout 406 ) 407 response_data.read() 408 return self.api_client.response_deserialize( 409 response_data=response_data, 410 response_types_map=_response_types_map, 411 ).data 412 413 414 @validate_call 415 def get_workspaces_with_http_info( 416 self, 417 organization_id: StrictStr, 418 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 419 next_token: Optional[StrictStr] = None, 420 _request_timeout: Union[ 421 None, 422 Annotated[StrictFloat, Field(gt=0)], 423 Tuple[ 424 Annotated[StrictFloat, Field(gt=0)], 425 Annotated[StrictFloat, Field(gt=0)] 426 ] 427 ] = None, 428 _request_auth: Optional[Dict[StrictStr, Any]] = None, 429 _content_type: Optional[StrictStr] = None, 430 _headers: Optional[Dict[StrictStr, Any]] = None, 431 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 432 ) -> ApiResponse[GetWorkspacesResponse]: 433 """Get all workspaces in an organization 434 435 Returns all workspaces that belong to the specified organization with pagination support 436 437 :param organization_id: (required) 438 :type organization_id: str 439 :param limit: 440 :type limit: int 441 :param next_token: 442 :type next_token: str 443 :param _request_timeout: timeout setting for this request. If one 444 number provided, it will be total request 445 timeout. It can also be a pair (tuple) of 446 (connection, read) timeouts. 447 :type _request_timeout: int, tuple(int, int), optional 448 :param _request_auth: set to override the auth_settings for an a single 449 request; this effectively ignores the 450 authentication in the spec for a single request. 451 :type _request_auth: dict, optional 452 :param _content_type: force content-type for the request. 453 :type _content_type: str, Optional 454 :param _headers: set to override the headers for a single 455 request; this effectively ignores the headers 456 in the spec for a single request. 457 :type _headers: dict, optional 458 :param _host_index: set to override the host_index for a single 459 request; this effectively ignores the host_index 460 in the spec for a single request. 461 :type _host_index: int, optional 462 :return: Returns the result object. 463 """ # noqa: E501 464 465 _param = self._get_workspaces_serialize( 466 organization_id=organization_id, 467 limit=limit, 468 next_token=next_token, 469 _request_auth=_request_auth, 470 _content_type=_content_type, 471 _headers=_headers, 472 _host_index=_host_index 473 ) 474 475 _response_types_map: Dict[str, Optional[str]] = { 476 '200': "GetWorkspacesResponse", 477 '400': "GetWorkspaces400Response", 478 '401': "GetWorkspaces400Response", 479 '403': "GetWorkspaces400Response", 480 '404': "GetWorkspaces400Response", 481 '500': "GetWorkspaces400Response", 482 } 483 response_data = self.api_client.call_api( 484 *_param, 485 _request_timeout=_request_timeout 486 ) 487 response_data.read() 488 return self.api_client.response_deserialize( 489 response_data=response_data, 490 response_types_map=_response_types_map, 491 ) 492 493 494 @validate_call 495 def get_workspaces_without_preload_content( 496 self, 497 organization_id: StrictStr, 498 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 499 next_token: Optional[StrictStr] = None, 500 _request_timeout: Union[ 501 None, 502 Annotated[StrictFloat, Field(gt=0)], 503 Tuple[ 504 Annotated[StrictFloat, Field(gt=0)], 505 Annotated[StrictFloat, Field(gt=0)] 506 ] 507 ] = None, 508 _request_auth: Optional[Dict[StrictStr, Any]] = None, 509 _content_type: Optional[StrictStr] = None, 510 _headers: Optional[Dict[StrictStr, Any]] = None, 511 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 512 ) -> RESTResponseType: 513 """Get all workspaces in an organization 514 515 Returns all workspaces that belong to the specified organization with pagination support 516 517 :param organization_id: (required) 518 :type organization_id: str 519 :param limit: 520 :type limit: int 521 :param next_token: 522 :type next_token: str 523 :param _request_timeout: timeout setting for this request. If one 524 number provided, it will be total request 525 timeout. It can also be a pair (tuple) of 526 (connection, read) timeouts. 527 :type _request_timeout: int, tuple(int, int), optional 528 :param _request_auth: set to override the auth_settings for an a single 529 request; this effectively ignores the 530 authentication in the spec for a single request. 531 :type _request_auth: dict, optional 532 :param _content_type: force content-type for the request. 533 :type _content_type: str, Optional 534 :param _headers: set to override the headers for a single 535 request; this effectively ignores the headers 536 in the spec for a single request. 537 :type _headers: dict, optional 538 :param _host_index: set to override the host_index for a single 539 request; this effectively ignores the host_index 540 in the spec for a single request. 541 :type _host_index: int, optional 542 :return: Returns the result object. 543 """ # noqa: E501 544 545 _param = self._get_workspaces_serialize( 546 organization_id=organization_id, 547 limit=limit, 548 next_token=next_token, 549 _request_auth=_request_auth, 550 _content_type=_content_type, 551 _headers=_headers, 552 _host_index=_host_index 553 ) 554 555 _response_types_map: Dict[str, Optional[str]] = { 556 '200': "GetWorkspacesResponse", 557 '400': "GetWorkspaces400Response", 558 '401': "GetWorkspaces400Response", 559 '403': "GetWorkspaces400Response", 560 '404': "GetWorkspaces400Response", 561 '500': "GetWorkspaces400Response", 562 } 563 response_data = self.api_client.call_api( 564 *_param, 565 _request_timeout=_request_timeout 566 ) 567 return response_data.response 568 569 570 def _get_workspaces_serialize( 571 self, 572 organization_id, 573 limit, 574 next_token, 575 _request_auth, 576 _content_type, 577 _headers, 578 _host_index, 579 ) -> RequestSerialized: 580 581 _host = None 582 583 _collection_formats: Dict[str, str] = { 584 } 585 586 _path_params: Dict[str, str] = {} 587 _query_params: List[Tuple[str, str]] = [] 588 _header_params: Dict[str, Optional[str]] = _headers or {} 589 _form_params: List[Tuple[str, str]] = [] 590 _files: Dict[ 591 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 592 ] = {} 593 _body_params: Optional[bytes] = None 594 595 # process the path parameters 596 if organization_id is not None: 597 _path_params['organizationId'] = organization_id 598 # process the query parameters 599 if limit is not None: 600 601 _query_params.append(('limit', limit)) 602 603 if next_token is not None: 604 605 _query_params.append(('nextToken', next_token)) 606 607 # process the header parameters 608 # process the form parameters 609 # process the body parameter 610 611 612 # set the HTTP header `Accept` 613 if 'Accept' not in _header_params: 614 _header_params['Accept'] = self.api_client.select_header_accept( 615 [ 616 'application/json' 617 ] 618 ) 619 620 621 # authentication setting 622 _auth_settings: List[str] = [ 623 'bearerAuth' 624 ] 625 626 return self.api_client.param_serialize( 627 method='GET', 628 resource_path='/org/{organizationId}/workspaces', 629 path_params=_path_params, 630 query_params=_query_params, 631 header_params=_header_params, 632 body=_body_params, 633 post_params=_form_params, 634 files=_files, 635 auth_settings=_auth_settings, 636 collection_formats=_collection_formats, 637 _host=_host, 638 _request_auth=_request_auth 639 )
31class WorkspacesApi: 32 """NOTE: This class is auto generated by OpenAPI Generator 33 Ref: https://openapi-generator.tech 34 35 Do not edit the class manually. 36 """ 37 38 def __init__(self, api_client=None) -> None: 39 if api_client is None: 40 api_client = ApiClient.get_default() 41 self.api_client = api_client 42 43 44 @validate_call 45 def get_workspace_by_id( 46 self, 47 organization_id: StrictStr, 48 workspace_id: StrictStr, 49 _request_timeout: Union[ 50 None, 51 Annotated[StrictFloat, Field(gt=0)], 52 Tuple[ 53 Annotated[StrictFloat, Field(gt=0)], 54 Annotated[StrictFloat, Field(gt=0)] 55 ] 56 ] = None, 57 _request_auth: Optional[Dict[StrictStr, Any]] = None, 58 _content_type: Optional[StrictStr] = None, 59 _headers: Optional[Dict[StrictStr, Any]] = None, 60 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 61 ) -> GetWorkspaceByIdResponse: 62 """Get a specific workspace by ID 63 64 Returns details of a specific workspace within the organization 65 66 :param organization_id: (required) 67 :type organization_id: str 68 :param workspace_id: (required) 69 :type workspace_id: str 70 :param _request_timeout: timeout setting for this request. If one 71 number provided, it will be total request 72 timeout. It can also be a pair (tuple) of 73 (connection, read) timeouts. 74 :type _request_timeout: int, tuple(int, int), optional 75 :param _request_auth: set to override the auth_settings for an a single 76 request; this effectively ignores the 77 authentication in the spec for a single request. 78 :type _request_auth: dict, optional 79 :param _content_type: force content-type for the request. 80 :type _content_type: str, Optional 81 :param _headers: set to override the headers for a single 82 request; this effectively ignores the headers 83 in the spec for a single request. 84 :type _headers: dict, optional 85 :param _host_index: set to override the host_index for a single 86 request; this effectively ignores the host_index 87 in the spec for a single request. 88 :type _host_index: int, optional 89 :return: Returns the result object. 90 """ # noqa: E501 91 92 _param = self._get_workspace_by_id_serialize( 93 organization_id=organization_id, 94 workspace_id=workspace_id, 95 _request_auth=_request_auth, 96 _content_type=_content_type, 97 _headers=_headers, 98 _host_index=_host_index 99 ) 100 101 _response_types_map: Dict[str, Optional[str]] = { 102 '200': "GetWorkspaceByIdResponse", 103 '400': "GetWorkspaces400Response", 104 '401': "GetWorkspaces400Response", 105 '403': "GetWorkspaces400Response", 106 '404': "GetWorkspaces400Response", 107 '500': "GetWorkspaces400Response", 108 } 109 response_data = self.api_client.call_api( 110 *_param, 111 _request_timeout=_request_timeout 112 ) 113 response_data.read() 114 return self.api_client.response_deserialize( 115 response_data=response_data, 116 response_types_map=_response_types_map, 117 ).data 118 119 120 @validate_call 121 def get_workspace_by_id_with_http_info( 122 self, 123 organization_id: StrictStr, 124 workspace_id: StrictStr, 125 _request_timeout: Union[ 126 None, 127 Annotated[StrictFloat, Field(gt=0)], 128 Tuple[ 129 Annotated[StrictFloat, Field(gt=0)], 130 Annotated[StrictFloat, Field(gt=0)] 131 ] 132 ] = None, 133 _request_auth: Optional[Dict[StrictStr, Any]] = None, 134 _content_type: Optional[StrictStr] = None, 135 _headers: Optional[Dict[StrictStr, Any]] = None, 136 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 137 ) -> ApiResponse[GetWorkspaceByIdResponse]: 138 """Get a specific workspace by ID 139 140 Returns details of a specific workspace within the organization 141 142 :param organization_id: (required) 143 :type organization_id: str 144 :param workspace_id: (required) 145 :type workspace_id: str 146 :param _request_timeout: timeout setting for this request. If one 147 number provided, it will be total request 148 timeout. It can also be a pair (tuple) of 149 (connection, read) timeouts. 150 :type _request_timeout: int, tuple(int, int), optional 151 :param _request_auth: set to override the auth_settings for an a single 152 request; this effectively ignores the 153 authentication in the spec for a single request. 154 :type _request_auth: dict, optional 155 :param _content_type: force content-type for the request. 156 :type _content_type: str, Optional 157 :param _headers: set to override the headers for a single 158 request; this effectively ignores the headers 159 in the spec for a single request. 160 :type _headers: dict, optional 161 :param _host_index: set to override the host_index for a single 162 request; this effectively ignores the host_index 163 in the spec for a single request. 164 :type _host_index: int, optional 165 :return: Returns the result object. 166 """ # noqa: E501 167 168 _param = self._get_workspace_by_id_serialize( 169 organization_id=organization_id, 170 workspace_id=workspace_id, 171 _request_auth=_request_auth, 172 _content_type=_content_type, 173 _headers=_headers, 174 _host_index=_host_index 175 ) 176 177 _response_types_map: Dict[str, Optional[str]] = { 178 '200': "GetWorkspaceByIdResponse", 179 '400': "GetWorkspaces400Response", 180 '401': "GetWorkspaces400Response", 181 '403': "GetWorkspaces400Response", 182 '404': "GetWorkspaces400Response", 183 '500': "GetWorkspaces400Response", 184 } 185 response_data = self.api_client.call_api( 186 *_param, 187 _request_timeout=_request_timeout 188 ) 189 response_data.read() 190 return self.api_client.response_deserialize( 191 response_data=response_data, 192 response_types_map=_response_types_map, 193 ) 194 195 196 @validate_call 197 def get_workspace_by_id_without_preload_content( 198 self, 199 organization_id: StrictStr, 200 workspace_id: StrictStr, 201 _request_timeout: Union[ 202 None, 203 Annotated[StrictFloat, Field(gt=0)], 204 Tuple[ 205 Annotated[StrictFloat, Field(gt=0)], 206 Annotated[StrictFloat, Field(gt=0)] 207 ] 208 ] = None, 209 _request_auth: Optional[Dict[StrictStr, Any]] = None, 210 _content_type: Optional[StrictStr] = None, 211 _headers: Optional[Dict[StrictStr, Any]] = None, 212 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 213 ) -> RESTResponseType: 214 """Get a specific workspace by ID 215 216 Returns details of a specific workspace within the organization 217 218 :param organization_id: (required) 219 :type organization_id: str 220 :param workspace_id: (required) 221 :type workspace_id: str 222 :param _request_timeout: timeout setting for this request. If one 223 number provided, it will be total request 224 timeout. It can also be a pair (tuple) of 225 (connection, read) timeouts. 226 :type _request_timeout: int, tuple(int, int), optional 227 :param _request_auth: set to override the auth_settings for an a single 228 request; this effectively ignores the 229 authentication in the spec for a single request. 230 :type _request_auth: dict, optional 231 :param _content_type: force content-type for the request. 232 :type _content_type: str, Optional 233 :param _headers: set to override the headers for a single 234 request; this effectively ignores the headers 235 in the spec for a single request. 236 :type _headers: dict, optional 237 :param _host_index: set to override the host_index for a single 238 request; this effectively ignores the host_index 239 in the spec for a single request. 240 :type _host_index: int, optional 241 :return: Returns the result object. 242 """ # noqa: E501 243 244 _param = self._get_workspace_by_id_serialize( 245 organization_id=organization_id, 246 workspace_id=workspace_id, 247 _request_auth=_request_auth, 248 _content_type=_content_type, 249 _headers=_headers, 250 _host_index=_host_index 251 ) 252 253 _response_types_map: Dict[str, Optional[str]] = { 254 '200': "GetWorkspaceByIdResponse", 255 '400': "GetWorkspaces400Response", 256 '401': "GetWorkspaces400Response", 257 '403': "GetWorkspaces400Response", 258 '404': "GetWorkspaces400Response", 259 '500': "GetWorkspaces400Response", 260 } 261 response_data = self.api_client.call_api( 262 *_param, 263 _request_timeout=_request_timeout 264 ) 265 return response_data.response 266 267 268 def _get_workspace_by_id_serialize( 269 self, 270 organization_id, 271 workspace_id, 272 _request_auth, 273 _content_type, 274 _headers, 275 _host_index, 276 ) -> RequestSerialized: 277 278 _host = None 279 280 _collection_formats: Dict[str, str] = { 281 } 282 283 _path_params: Dict[str, str] = {} 284 _query_params: List[Tuple[str, str]] = [] 285 _header_params: Dict[str, Optional[str]] = _headers or {} 286 _form_params: List[Tuple[str, str]] = [] 287 _files: Dict[ 288 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 289 ] = {} 290 _body_params: Optional[bytes] = None 291 292 # process the path parameters 293 if organization_id is not None: 294 _path_params['organizationId'] = organization_id 295 if workspace_id is not None: 296 _path_params['workspaceId'] = workspace_id 297 # process the query parameters 298 # process the header parameters 299 # process the form parameters 300 # process the body parameter 301 302 303 # set the HTTP header `Accept` 304 if 'Accept' not in _header_params: 305 _header_params['Accept'] = self.api_client.select_header_accept( 306 [ 307 'application/json' 308 ] 309 ) 310 311 312 # authentication setting 313 _auth_settings: List[str] = [ 314 'bearerAuth' 315 ] 316 317 return self.api_client.param_serialize( 318 method='GET', 319 resource_path='/org/{organizationId}/workspaces/{workspaceId}', 320 path_params=_path_params, 321 query_params=_query_params, 322 header_params=_header_params, 323 body=_body_params, 324 post_params=_form_params, 325 files=_files, 326 auth_settings=_auth_settings, 327 collection_formats=_collection_formats, 328 _host=_host, 329 _request_auth=_request_auth 330 ) 331 332 333 334 335 @validate_call 336 def get_workspaces( 337 self, 338 organization_id: StrictStr, 339 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 340 next_token: Optional[StrictStr] = None, 341 _request_timeout: Union[ 342 None, 343 Annotated[StrictFloat, Field(gt=0)], 344 Tuple[ 345 Annotated[StrictFloat, Field(gt=0)], 346 Annotated[StrictFloat, Field(gt=0)] 347 ] 348 ] = None, 349 _request_auth: Optional[Dict[StrictStr, Any]] = None, 350 _content_type: Optional[StrictStr] = None, 351 _headers: Optional[Dict[StrictStr, Any]] = None, 352 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 353 ) -> GetWorkspacesResponse: 354 """Get all workspaces in an organization 355 356 Returns all workspaces that belong to the specified organization with pagination support 357 358 :param organization_id: (required) 359 :type organization_id: str 360 :param limit: 361 :type limit: int 362 :param next_token: 363 :type next_token: str 364 :param _request_timeout: timeout setting for this request. If one 365 number provided, it will be total request 366 timeout. It can also be a pair (tuple) of 367 (connection, read) timeouts. 368 :type _request_timeout: int, tuple(int, int), optional 369 :param _request_auth: set to override the auth_settings for an a single 370 request; this effectively ignores the 371 authentication in the spec for a single request. 372 :type _request_auth: dict, optional 373 :param _content_type: force content-type for the request. 374 :type _content_type: str, Optional 375 :param _headers: set to override the headers for a single 376 request; this effectively ignores the headers 377 in the spec for a single request. 378 :type _headers: dict, optional 379 :param _host_index: set to override the host_index for a single 380 request; this effectively ignores the host_index 381 in the spec for a single request. 382 :type _host_index: int, optional 383 :return: Returns the result object. 384 """ # noqa: E501 385 386 _param = self._get_workspaces_serialize( 387 organization_id=organization_id, 388 limit=limit, 389 next_token=next_token, 390 _request_auth=_request_auth, 391 _content_type=_content_type, 392 _headers=_headers, 393 _host_index=_host_index 394 ) 395 396 _response_types_map: Dict[str, Optional[str]] = { 397 '200': "GetWorkspacesResponse", 398 '400': "GetWorkspaces400Response", 399 '401': "GetWorkspaces400Response", 400 '403': "GetWorkspaces400Response", 401 '404': "GetWorkspaces400Response", 402 '500': "GetWorkspaces400Response", 403 } 404 response_data = self.api_client.call_api( 405 *_param, 406 _request_timeout=_request_timeout 407 ) 408 response_data.read() 409 return self.api_client.response_deserialize( 410 response_data=response_data, 411 response_types_map=_response_types_map, 412 ).data 413 414 415 @validate_call 416 def get_workspaces_with_http_info( 417 self, 418 organization_id: StrictStr, 419 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 420 next_token: Optional[StrictStr] = None, 421 _request_timeout: Union[ 422 None, 423 Annotated[StrictFloat, Field(gt=0)], 424 Tuple[ 425 Annotated[StrictFloat, Field(gt=0)], 426 Annotated[StrictFloat, Field(gt=0)] 427 ] 428 ] = None, 429 _request_auth: Optional[Dict[StrictStr, Any]] = None, 430 _content_type: Optional[StrictStr] = None, 431 _headers: Optional[Dict[StrictStr, Any]] = None, 432 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 433 ) -> ApiResponse[GetWorkspacesResponse]: 434 """Get all workspaces in an organization 435 436 Returns all workspaces that belong to the specified organization with pagination support 437 438 :param organization_id: (required) 439 :type organization_id: str 440 :param limit: 441 :type limit: int 442 :param next_token: 443 :type next_token: str 444 :param _request_timeout: timeout setting for this request. If one 445 number provided, it will be total request 446 timeout. It can also be a pair (tuple) of 447 (connection, read) timeouts. 448 :type _request_timeout: int, tuple(int, int), optional 449 :param _request_auth: set to override the auth_settings for an a single 450 request; this effectively ignores the 451 authentication in the spec for a single request. 452 :type _request_auth: dict, optional 453 :param _content_type: force content-type for the request. 454 :type _content_type: str, Optional 455 :param _headers: set to override the headers for a single 456 request; this effectively ignores the headers 457 in the spec for a single request. 458 :type _headers: dict, optional 459 :param _host_index: set to override the host_index for a single 460 request; this effectively ignores the host_index 461 in the spec for a single request. 462 :type _host_index: int, optional 463 :return: Returns the result object. 464 """ # noqa: E501 465 466 _param = self._get_workspaces_serialize( 467 organization_id=organization_id, 468 limit=limit, 469 next_token=next_token, 470 _request_auth=_request_auth, 471 _content_type=_content_type, 472 _headers=_headers, 473 _host_index=_host_index 474 ) 475 476 _response_types_map: Dict[str, Optional[str]] = { 477 '200': "GetWorkspacesResponse", 478 '400': "GetWorkspaces400Response", 479 '401': "GetWorkspaces400Response", 480 '403': "GetWorkspaces400Response", 481 '404': "GetWorkspaces400Response", 482 '500': "GetWorkspaces400Response", 483 } 484 response_data = self.api_client.call_api( 485 *_param, 486 _request_timeout=_request_timeout 487 ) 488 response_data.read() 489 return self.api_client.response_deserialize( 490 response_data=response_data, 491 response_types_map=_response_types_map, 492 ) 493 494 495 @validate_call 496 def get_workspaces_without_preload_content( 497 self, 498 organization_id: StrictStr, 499 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 500 next_token: Optional[StrictStr] = None, 501 _request_timeout: Union[ 502 None, 503 Annotated[StrictFloat, Field(gt=0)], 504 Tuple[ 505 Annotated[StrictFloat, Field(gt=0)], 506 Annotated[StrictFloat, Field(gt=0)] 507 ] 508 ] = None, 509 _request_auth: Optional[Dict[StrictStr, Any]] = None, 510 _content_type: Optional[StrictStr] = None, 511 _headers: Optional[Dict[StrictStr, Any]] = None, 512 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 513 ) -> RESTResponseType: 514 """Get all workspaces in an organization 515 516 Returns all workspaces that belong to the specified organization with pagination support 517 518 :param organization_id: (required) 519 :type organization_id: str 520 :param limit: 521 :type limit: int 522 :param next_token: 523 :type next_token: str 524 :param _request_timeout: timeout setting for this request. If one 525 number provided, it will be total request 526 timeout. It can also be a pair (tuple) of 527 (connection, read) timeouts. 528 :type _request_timeout: int, tuple(int, int), optional 529 :param _request_auth: set to override the auth_settings for an a single 530 request; this effectively ignores the 531 authentication in the spec for a single request. 532 :type _request_auth: dict, optional 533 :param _content_type: force content-type for the request. 534 :type _content_type: str, Optional 535 :param _headers: set to override the headers for a single 536 request; this effectively ignores the headers 537 in the spec for a single request. 538 :type _headers: dict, optional 539 :param _host_index: set to override the host_index for a single 540 request; this effectively ignores the host_index 541 in the spec for a single request. 542 :type _host_index: int, optional 543 :return: Returns the result object. 544 """ # noqa: E501 545 546 _param = self._get_workspaces_serialize( 547 organization_id=organization_id, 548 limit=limit, 549 next_token=next_token, 550 _request_auth=_request_auth, 551 _content_type=_content_type, 552 _headers=_headers, 553 _host_index=_host_index 554 ) 555 556 _response_types_map: Dict[str, Optional[str]] = { 557 '200': "GetWorkspacesResponse", 558 '400': "GetWorkspaces400Response", 559 '401': "GetWorkspaces400Response", 560 '403': "GetWorkspaces400Response", 561 '404': "GetWorkspaces400Response", 562 '500': "GetWorkspaces400Response", 563 } 564 response_data = self.api_client.call_api( 565 *_param, 566 _request_timeout=_request_timeout 567 ) 568 return response_data.response 569 570 571 def _get_workspaces_serialize( 572 self, 573 organization_id, 574 limit, 575 next_token, 576 _request_auth, 577 _content_type, 578 _headers, 579 _host_index, 580 ) -> RequestSerialized: 581 582 _host = None 583 584 _collection_formats: Dict[str, str] = { 585 } 586 587 _path_params: Dict[str, str] = {} 588 _query_params: List[Tuple[str, str]] = [] 589 _header_params: Dict[str, Optional[str]] = _headers or {} 590 _form_params: List[Tuple[str, str]] = [] 591 _files: Dict[ 592 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 593 ] = {} 594 _body_params: Optional[bytes] = None 595 596 # process the path parameters 597 if organization_id is not None: 598 _path_params['organizationId'] = organization_id 599 # process the query parameters 600 if limit is not None: 601 602 _query_params.append(('limit', limit)) 603 604 if next_token is not None: 605 606 _query_params.append(('nextToken', next_token)) 607 608 # process the header parameters 609 # process the form parameters 610 # process the body parameter 611 612 613 # set the HTTP header `Accept` 614 if 'Accept' not in _header_params: 615 _header_params['Accept'] = self.api_client.select_header_accept( 616 [ 617 'application/json' 618 ] 619 ) 620 621 622 # authentication setting 623 _auth_settings: List[str] = [ 624 'bearerAuth' 625 ] 626 627 return self.api_client.param_serialize( 628 method='GET', 629 resource_path='/org/{organizationId}/workspaces', 630 path_params=_path_params, 631 query_params=_query_params, 632 header_params=_header_params, 633 body=_body_params, 634 post_params=_form_params, 635 files=_files, 636 auth_settings=_auth_settings, 637 collection_formats=_collection_formats, 638 _host=_host, 639 _request_auth=_request_auth 640 )
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
44 @validate_call 45 def get_workspace_by_id( 46 self, 47 organization_id: StrictStr, 48 workspace_id: StrictStr, 49 _request_timeout: Union[ 50 None, 51 Annotated[StrictFloat, Field(gt=0)], 52 Tuple[ 53 Annotated[StrictFloat, Field(gt=0)], 54 Annotated[StrictFloat, Field(gt=0)] 55 ] 56 ] = None, 57 _request_auth: Optional[Dict[StrictStr, Any]] = None, 58 _content_type: Optional[StrictStr] = None, 59 _headers: Optional[Dict[StrictStr, Any]] = None, 60 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 61 ) -> GetWorkspaceByIdResponse: 62 """Get a specific workspace by ID 63 64 Returns details of a specific workspace within the organization 65 66 :param organization_id: (required) 67 :type organization_id: str 68 :param workspace_id: (required) 69 :type workspace_id: str 70 :param _request_timeout: timeout setting for this request. If one 71 number provided, it will be total request 72 timeout. It can also be a pair (tuple) of 73 (connection, read) timeouts. 74 :type _request_timeout: int, tuple(int, int), optional 75 :param _request_auth: set to override the auth_settings for an a single 76 request; this effectively ignores the 77 authentication in the spec for a single request. 78 :type _request_auth: dict, optional 79 :param _content_type: force content-type for the request. 80 :type _content_type: str, Optional 81 :param _headers: set to override the headers for a single 82 request; this effectively ignores the headers 83 in the spec for a single request. 84 :type _headers: dict, optional 85 :param _host_index: set to override the host_index for a single 86 request; this effectively ignores the host_index 87 in the spec for a single request. 88 :type _host_index: int, optional 89 :return: Returns the result object. 90 """ # noqa: E501 91 92 _param = self._get_workspace_by_id_serialize( 93 organization_id=organization_id, 94 workspace_id=workspace_id, 95 _request_auth=_request_auth, 96 _content_type=_content_type, 97 _headers=_headers, 98 _host_index=_host_index 99 ) 100 101 _response_types_map: Dict[str, Optional[str]] = { 102 '200': "GetWorkspaceByIdResponse", 103 '400': "GetWorkspaces400Response", 104 '401': "GetWorkspaces400Response", 105 '403': "GetWorkspaces400Response", 106 '404': "GetWorkspaces400Response", 107 '500': "GetWorkspaces400Response", 108 } 109 response_data = self.api_client.call_api( 110 *_param, 111 _request_timeout=_request_timeout 112 ) 113 response_data.read() 114 return self.api_client.response_deserialize( 115 response_data=response_data, 116 response_types_map=_response_types_map, 117 ).data
Get a specific workspace by ID
Returns details of a specific workspace within the organization
Parameters
- organization_id: (required)
- workspace_id: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
120 @validate_call 121 def get_workspace_by_id_with_http_info( 122 self, 123 organization_id: StrictStr, 124 workspace_id: StrictStr, 125 _request_timeout: Union[ 126 None, 127 Annotated[StrictFloat, Field(gt=0)], 128 Tuple[ 129 Annotated[StrictFloat, Field(gt=0)], 130 Annotated[StrictFloat, Field(gt=0)] 131 ] 132 ] = None, 133 _request_auth: Optional[Dict[StrictStr, Any]] = None, 134 _content_type: Optional[StrictStr] = None, 135 _headers: Optional[Dict[StrictStr, Any]] = None, 136 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 137 ) -> ApiResponse[GetWorkspaceByIdResponse]: 138 """Get a specific workspace by ID 139 140 Returns details of a specific workspace within the organization 141 142 :param organization_id: (required) 143 :type organization_id: str 144 :param workspace_id: (required) 145 :type workspace_id: str 146 :param _request_timeout: timeout setting for this request. If one 147 number provided, it will be total request 148 timeout. It can also be a pair (tuple) of 149 (connection, read) timeouts. 150 :type _request_timeout: int, tuple(int, int), optional 151 :param _request_auth: set to override the auth_settings for an a single 152 request; this effectively ignores the 153 authentication in the spec for a single request. 154 :type _request_auth: dict, optional 155 :param _content_type: force content-type for the request. 156 :type _content_type: str, Optional 157 :param _headers: set to override the headers for a single 158 request; this effectively ignores the headers 159 in the spec for a single request. 160 :type _headers: dict, optional 161 :param _host_index: set to override the host_index for a single 162 request; this effectively ignores the host_index 163 in the spec for a single request. 164 :type _host_index: int, optional 165 :return: Returns the result object. 166 """ # noqa: E501 167 168 _param = self._get_workspace_by_id_serialize( 169 organization_id=organization_id, 170 workspace_id=workspace_id, 171 _request_auth=_request_auth, 172 _content_type=_content_type, 173 _headers=_headers, 174 _host_index=_host_index 175 ) 176 177 _response_types_map: Dict[str, Optional[str]] = { 178 '200': "GetWorkspaceByIdResponse", 179 '400': "GetWorkspaces400Response", 180 '401': "GetWorkspaces400Response", 181 '403': "GetWorkspaces400Response", 182 '404': "GetWorkspaces400Response", 183 '500': "GetWorkspaces400Response", 184 } 185 response_data = self.api_client.call_api( 186 *_param, 187 _request_timeout=_request_timeout 188 ) 189 response_data.read() 190 return self.api_client.response_deserialize( 191 response_data=response_data, 192 response_types_map=_response_types_map, 193 )
Get a specific workspace by ID
Returns details of a specific workspace within the organization
Parameters
- organization_id: (required)
- workspace_id: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
196 @validate_call 197 def get_workspace_by_id_without_preload_content( 198 self, 199 organization_id: StrictStr, 200 workspace_id: StrictStr, 201 _request_timeout: Union[ 202 None, 203 Annotated[StrictFloat, Field(gt=0)], 204 Tuple[ 205 Annotated[StrictFloat, Field(gt=0)], 206 Annotated[StrictFloat, Field(gt=0)] 207 ] 208 ] = None, 209 _request_auth: Optional[Dict[StrictStr, Any]] = None, 210 _content_type: Optional[StrictStr] = None, 211 _headers: Optional[Dict[StrictStr, Any]] = None, 212 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 213 ) -> RESTResponseType: 214 """Get a specific workspace by ID 215 216 Returns details of a specific workspace within the organization 217 218 :param organization_id: (required) 219 :type organization_id: str 220 :param workspace_id: (required) 221 :type workspace_id: str 222 :param _request_timeout: timeout setting for this request. If one 223 number provided, it will be total request 224 timeout. It can also be a pair (tuple) of 225 (connection, read) timeouts. 226 :type _request_timeout: int, tuple(int, int), optional 227 :param _request_auth: set to override the auth_settings for an a single 228 request; this effectively ignores the 229 authentication in the spec for a single request. 230 :type _request_auth: dict, optional 231 :param _content_type: force content-type for the request. 232 :type _content_type: str, Optional 233 :param _headers: set to override the headers for a single 234 request; this effectively ignores the headers 235 in the spec for a single request. 236 :type _headers: dict, optional 237 :param _host_index: set to override the host_index for a single 238 request; this effectively ignores the host_index 239 in the spec for a single request. 240 :type _host_index: int, optional 241 :return: Returns the result object. 242 """ # noqa: E501 243 244 _param = self._get_workspace_by_id_serialize( 245 organization_id=organization_id, 246 workspace_id=workspace_id, 247 _request_auth=_request_auth, 248 _content_type=_content_type, 249 _headers=_headers, 250 _host_index=_host_index 251 ) 252 253 _response_types_map: Dict[str, Optional[str]] = { 254 '200': "GetWorkspaceByIdResponse", 255 '400': "GetWorkspaces400Response", 256 '401': "GetWorkspaces400Response", 257 '403': "GetWorkspaces400Response", 258 '404': "GetWorkspaces400Response", 259 '500': "GetWorkspaces400Response", 260 } 261 response_data = self.api_client.call_api( 262 *_param, 263 _request_timeout=_request_timeout 264 ) 265 return response_data.response
Get a specific workspace by ID
Returns details of a specific workspace within the organization
Parameters
- organization_id: (required)
- workspace_id: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
335 @validate_call 336 def get_workspaces( 337 self, 338 organization_id: StrictStr, 339 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 340 next_token: Optional[StrictStr] = None, 341 _request_timeout: Union[ 342 None, 343 Annotated[StrictFloat, Field(gt=0)], 344 Tuple[ 345 Annotated[StrictFloat, Field(gt=0)], 346 Annotated[StrictFloat, Field(gt=0)] 347 ] 348 ] = None, 349 _request_auth: Optional[Dict[StrictStr, Any]] = None, 350 _content_type: Optional[StrictStr] = None, 351 _headers: Optional[Dict[StrictStr, Any]] = None, 352 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 353 ) -> GetWorkspacesResponse: 354 """Get all workspaces in an organization 355 356 Returns all workspaces that belong to the specified organization with pagination support 357 358 :param organization_id: (required) 359 :type organization_id: str 360 :param limit: 361 :type limit: int 362 :param next_token: 363 :type next_token: str 364 :param _request_timeout: timeout setting for this request. If one 365 number provided, it will be total request 366 timeout. It can also be a pair (tuple) of 367 (connection, read) timeouts. 368 :type _request_timeout: int, tuple(int, int), optional 369 :param _request_auth: set to override the auth_settings for an a single 370 request; this effectively ignores the 371 authentication in the spec for a single request. 372 :type _request_auth: dict, optional 373 :param _content_type: force content-type for the request. 374 :type _content_type: str, Optional 375 :param _headers: set to override the headers for a single 376 request; this effectively ignores the headers 377 in the spec for a single request. 378 :type _headers: dict, optional 379 :param _host_index: set to override the host_index for a single 380 request; this effectively ignores the host_index 381 in the spec for a single request. 382 :type _host_index: int, optional 383 :return: Returns the result object. 384 """ # noqa: E501 385 386 _param = self._get_workspaces_serialize( 387 organization_id=organization_id, 388 limit=limit, 389 next_token=next_token, 390 _request_auth=_request_auth, 391 _content_type=_content_type, 392 _headers=_headers, 393 _host_index=_host_index 394 ) 395 396 _response_types_map: Dict[str, Optional[str]] = { 397 '200': "GetWorkspacesResponse", 398 '400': "GetWorkspaces400Response", 399 '401': "GetWorkspaces400Response", 400 '403': "GetWorkspaces400Response", 401 '404': "GetWorkspaces400Response", 402 '500': "GetWorkspaces400Response", 403 } 404 response_data = self.api_client.call_api( 405 *_param, 406 _request_timeout=_request_timeout 407 ) 408 response_data.read() 409 return self.api_client.response_deserialize( 410 response_data=response_data, 411 response_types_map=_response_types_map, 412 ).data
Get all workspaces in an organization
Returns all workspaces that belong to the specified organization with pagination support
Parameters
- organization_id: (required)
- limit:
- next_token:
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
415 @validate_call 416 def get_workspaces_with_http_info( 417 self, 418 organization_id: StrictStr, 419 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 420 next_token: Optional[StrictStr] = None, 421 _request_timeout: Union[ 422 None, 423 Annotated[StrictFloat, Field(gt=0)], 424 Tuple[ 425 Annotated[StrictFloat, Field(gt=0)], 426 Annotated[StrictFloat, Field(gt=0)] 427 ] 428 ] = None, 429 _request_auth: Optional[Dict[StrictStr, Any]] = None, 430 _content_type: Optional[StrictStr] = None, 431 _headers: Optional[Dict[StrictStr, Any]] = None, 432 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 433 ) -> ApiResponse[GetWorkspacesResponse]: 434 """Get all workspaces in an organization 435 436 Returns all workspaces that belong to the specified organization with pagination support 437 438 :param organization_id: (required) 439 :type organization_id: str 440 :param limit: 441 :type limit: int 442 :param next_token: 443 :type next_token: str 444 :param _request_timeout: timeout setting for this request. If one 445 number provided, it will be total request 446 timeout. It can also be a pair (tuple) of 447 (connection, read) timeouts. 448 :type _request_timeout: int, tuple(int, int), optional 449 :param _request_auth: set to override the auth_settings for an a single 450 request; this effectively ignores the 451 authentication in the spec for a single request. 452 :type _request_auth: dict, optional 453 :param _content_type: force content-type for the request. 454 :type _content_type: str, Optional 455 :param _headers: set to override the headers for a single 456 request; this effectively ignores the headers 457 in the spec for a single request. 458 :type _headers: dict, optional 459 :param _host_index: set to override the host_index for a single 460 request; this effectively ignores the host_index 461 in the spec for a single request. 462 :type _host_index: int, optional 463 :return: Returns the result object. 464 """ # noqa: E501 465 466 _param = self._get_workspaces_serialize( 467 organization_id=organization_id, 468 limit=limit, 469 next_token=next_token, 470 _request_auth=_request_auth, 471 _content_type=_content_type, 472 _headers=_headers, 473 _host_index=_host_index 474 ) 475 476 _response_types_map: Dict[str, Optional[str]] = { 477 '200': "GetWorkspacesResponse", 478 '400': "GetWorkspaces400Response", 479 '401': "GetWorkspaces400Response", 480 '403': "GetWorkspaces400Response", 481 '404': "GetWorkspaces400Response", 482 '500': "GetWorkspaces400Response", 483 } 484 response_data = self.api_client.call_api( 485 *_param, 486 _request_timeout=_request_timeout 487 ) 488 response_data.read() 489 return self.api_client.response_deserialize( 490 response_data=response_data, 491 response_types_map=_response_types_map, 492 )
Get all workspaces in an organization
Returns all workspaces that belong to the specified organization with pagination support
Parameters
- organization_id: (required)
- limit:
- next_token:
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
495 @validate_call 496 def get_workspaces_without_preload_content( 497 self, 498 organization_id: StrictStr, 499 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 500 next_token: Optional[StrictStr] = None, 501 _request_timeout: Union[ 502 None, 503 Annotated[StrictFloat, Field(gt=0)], 504 Tuple[ 505 Annotated[StrictFloat, Field(gt=0)], 506 Annotated[StrictFloat, Field(gt=0)] 507 ] 508 ] = None, 509 _request_auth: Optional[Dict[StrictStr, Any]] = None, 510 _content_type: Optional[StrictStr] = None, 511 _headers: Optional[Dict[StrictStr, Any]] = None, 512 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 513 ) -> RESTResponseType: 514 """Get all workspaces in an organization 515 516 Returns all workspaces that belong to the specified organization with pagination support 517 518 :param organization_id: (required) 519 :type organization_id: str 520 :param limit: 521 :type limit: int 522 :param next_token: 523 :type next_token: str 524 :param _request_timeout: timeout setting for this request. If one 525 number provided, it will be total request 526 timeout. It can also be a pair (tuple) of 527 (connection, read) timeouts. 528 :type _request_timeout: int, tuple(int, int), optional 529 :param _request_auth: set to override the auth_settings for an a single 530 request; this effectively ignores the 531 authentication in the spec for a single request. 532 :type _request_auth: dict, optional 533 :param _content_type: force content-type for the request. 534 :type _content_type: str, Optional 535 :param _headers: set to override the headers for a single 536 request; this effectively ignores the headers 537 in the spec for a single request. 538 :type _headers: dict, optional 539 :param _host_index: set to override the host_index for a single 540 request; this effectively ignores the host_index 541 in the spec for a single request. 542 :type _host_index: int, optional 543 :return: Returns the result object. 544 """ # noqa: E501 545 546 _param = self._get_workspaces_serialize( 547 organization_id=organization_id, 548 limit=limit, 549 next_token=next_token, 550 _request_auth=_request_auth, 551 _content_type=_content_type, 552 _headers=_headers, 553 _host_index=_host_index 554 ) 555 556 _response_types_map: Dict[str, Optional[str]] = { 557 '200': "GetWorkspacesResponse", 558 '400': "GetWorkspaces400Response", 559 '401': "GetWorkspaces400Response", 560 '403': "GetWorkspaces400Response", 561 '404': "GetWorkspaces400Response", 562 '500': "GetWorkspaces400Response", 563 } 564 response_data = self.api_client.call_api( 565 *_param, 566 _request_timeout=_request_timeout 567 ) 568 return response_data.response
Get all workspaces in an organization
Returns all workspaces that belong to the specified organization with pagination support
Parameters
- organization_id: (required)
- limit:
- next_token:
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.