miro_api.api
Miro Developer Platform
### Miro Developer Platform concepts - New to the Miro Developer Platform? Interested in learning more about platform concepts?? Read our introduction page and familiarize yourself with the Miro Developer Platform capabilities in a few minutes. ### Getting started with the Miro REST API - Quickstart (video): try the REST API in less than 3 minutes. - Quickstart (article): get started and try the REST API in less than 3 minutes. ### Miro REST API tutorials Check out our how-to articles with step-by-step instructions and code examples so you can: - Get started with OAuth 2.0 and Miro ### Miro App Examples Clone our Miro App Examples repository to get inspiration, customize, and explore apps built on top of Miro's Developer Platform 2.0.
The version of the OpenAPI document: v2.0 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
1""" 2Miro Developer Platform 3 4<img src=\"https://content.pstmn.io/47449ea6-0ef7-4af2-bac1-e58a70e61c58/aW1hZ2UucG5n\" width=\"1685\" height=\"593\"> ### Miro Developer Platform concepts - New to the Miro Developer Platform? Interested in learning more about platform concepts?? [Read our introduction page](https://beta.developers.miro.com/docs/introduction) and familiarize yourself with the Miro Developer Platform capabilities in a few minutes. ### Getting started with the Miro REST API - [Quickstart (video):](https://beta.developers.miro.com/docs/try-out-the-rest-api-in-less-than-3-minutes) try the REST API in less than 3 minutes. - [Quickstart (article):](https://beta.developers.miro.com/docs/build-your-first-hello-world-app-1) get started and try the REST API in less than 3 minutes. ### Miro REST API tutorials Check out our how-to articles with step-by-step instructions and code examples so you can: - [Get started with OAuth 2.0 and Miro](https://beta.developers.miro.com/docs/getting-started-with-oauth) ### Miro App Examples Clone our [Miro App Examples repository](https://github.com/miroapp/app-examples) to get inspiration, customize, and explore apps built on top of Miro's Developer Platform 2.0. 5 6The version of the OpenAPI document: v2.0 7Generated by OpenAPI Generator (https://openapi-generator.tech) 8 9Do not edit the class manually. 10""" # noqa: E501 11 12import warnings 13from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt 14from typing import Any, Dict, List, Optional, Tuple, Union 15from typing_extensions import Annotated 16 17 18from datetime import date 19from pydantic import Field, StrictStr, field_validator 20from typing import Optional 21from miro_api.models.get_metrics200_response_inner import GetMetrics200ResponseInner 22from miro_api.models.get_metrics_total200_response import GetMetricsTotal200Response 23 24from pydantic import Field, StrictInt, StrictStr, field_validator 25from miro_api.models.audit_page import AuditPage 26 27from datetime import datetime 28from typing import List, Optional 29from miro_api.models.get_board_item_content_logs_response import GetBoardItemContentLogsResponse 30 31from pydantic import Field, StrictInt, StrictStr 32from miro_api.models.board_export_job_id import BoardExportJobId 33from miro_api.models.board_export_job_status import BoardExportJobStatus 34from miro_api.models.board_export_job_tasks_list import BoardExportJobTasksList 35from miro_api.models.board_export_jobs_list import BoardExportJobsList 36from miro_api.models.board_export_result import BoardExportResult 37from miro_api.models.board_export_task_export_link import BoardExportTaskExportLink 38from miro_api.models.create_board_export_request import CreateBoardExportRequest 39from miro_api.models.enterprise_update_board_export_job200_response import EnterpriseUpdateBoardExportJob200Response 40from miro_api.models.enterprise_update_board_export_job_request import EnterpriseUpdateBoardExportJobRequest 41 42from pydantic import Field, StrictStr 43from miro_api.models.board_data_classification_label import BoardDataClassificationLabel 44from miro_api.models.data_classification_label_id import DataClassificationLabelId 45 46from miro_api.models.data_classification_organization_settings import DataClassificationOrganizationSettings 47 48from miro_api.models.data_classification_team_settings import DataClassificationTeamSettings 49from miro_api.models.update_boards_data_classification_label import UpdateBoardsDataClassificationLabel 50from miro_api.models.update_boards_data_classification_label_request import UpdateBoardsDataClassificationLabelRequest 51from miro_api.models.update_team_settings_request import UpdateTeamSettingsRequest 52 53from pydantic import Field, StrictBytes, StrictStr 54from typing import List, Union 55from miro_api.models.item_create import ItemCreate 56from miro_api.models.items import Items 57 58from miro_api.models.resource_type import ResourceType 59from miro_api.models.resource_type_list_response import ResourceTypeListResponse 60from miro_api.models.schema_list_response import SchemaListResponse 61from miro_api.models.schema_resource import SchemaResource 62from miro_api.models.service_provider_config_response import ServiceProviderConfigResponse 63 64from miro_api.models.generic_item import GenericItem 65from miro_api.models.generic_item_cursor_paged import GenericItemCursorPaged 66from miro_api.models.shape_create_request import ShapeCreateRequest 67from miro_api.models.shape_item import ShapeItem 68from miro_api.models.shape_update_request import ShapeUpdateRequest 69 70from miro_api.models.group_list_response import GroupListResponse 71from miro_api.models.group_resource import GroupResource 72from miro_api.models.patch_group_resource import PatchGroupResource 73 74from miro_api.models.case_request import CaseRequest 75from miro_api.models.case_response import CaseResponse 76from miro_api.models.legal_hold_request import LegalHoldRequest 77from miro_api.models.legal_hold_response import LegalHoldResponse 78from miro_api.models.paginated_case_export_jobs_response import PaginatedCaseExportJobsResponse 79from miro_api.models.paginated_case_response import PaginatedCaseResponse 80from miro_api.models.paginated_legal_hold_content_items_response import PaginatedLegalHoldContentItemsResponse 81from miro_api.models.paginated_legal_hold_response import PaginatedLegalHoldResponse 82 83from miro_api.models.mindmap_create_request import MindmapCreateRequest 84from miro_api.models.mindmap_cursor_paged import MindmapCursorPaged 85from miro_api.models.mindmap_item import MindmapItem 86 87from miro_api.models.revoke_token_request import RevokeTokenRequest 88 89from pydantic import Field, StrictBool, StrictStr, field_validator 90from miro_api.models.enterprise_get_organization_members200_response import EnterpriseGetOrganizationMembers200Response 91from miro_api.models.organization_member import OrganizationMember 92 93from miro_api.models.organization import Organization 94 95from miro_api.models.add_project_member_request import AddProjectMemberRequest 96from miro_api.models.project_member import ProjectMember 97from miro_api.models.project_member_page import ProjectMemberPage 98from miro_api.models.update_project_member_request import UpdateProjectMemberRequest 99 100from miro_api.models.project_settings import ProjectSettings 101from miro_api.models.update_project_settings_request import UpdateProjectSettingsRequest 102 103from miro_api.models.create_project_request import CreateProjectRequest 104from miro_api.models.project import Project 105from miro_api.models.project_page import ProjectPage 106from miro_api.models.update_project_request import UpdateProjectRequest 107 108 109from miro_api.models.board_user_group import BoardUserGroup 110from miro_api.models.board_user_groups_page import BoardUserGroupsPage 111from miro_api.models.create_board_user_groups_request import CreateBoardUserGroupsRequest 112 113from miro_api.models.create_project_user_groups_request import CreateProjectUserGroupsRequest 114from miro_api.models.project_user_group import ProjectUserGroup 115from miro_api.models.project_user_groups_page import ProjectUserGroupsPage 116 117from miro_api.models.team_member import TeamMember 118from miro_api.models.team_member_changes import TeamMemberChanges 119from miro_api.models.team_member_invite import TeamMemberInvite 120from miro_api.models.team_members_page import TeamMembersPage 121 122from miro_api.models.team_settings import TeamSettings 123from miro_api.models.team_settings_changes import TeamSettingsChanges 124 125from miro_api.models.create_team_group_request import CreateTeamGroupRequest 126from miro_api.models.team_group import TeamGroup 127from miro_api.models.team_groups_page import TeamGroupsPage 128 129from miro_api.models.create_team_request import CreateTeamRequest 130from miro_api.models.team import Team 131from miro_api.models.team_changes import TeamChanges 132from miro_api.models.teams_page import TeamsPage 133 134from miro_api.models.create_user_resource import CreateUserResource 135from miro_api.models.patch_user_resource import PatchUserResource 136from miro_api.models.user_list_response import UserListResponse 137from miro_api.models.user_resource import UserResource 138 139from miro_api.models.create_group_member_request import CreateGroupMemberRequest 140from miro_api.models.group_member import GroupMember 141from miro_api.models.group_members_page import GroupMembersPage 142from miro_api.models.update_user_group_members_request import UpdateUserGroupMembersRequest 143from miro_api.models.update_user_group_members_result_inner import UpdateUserGroupMembersResultInner 144 145from miro_api.models.group_team import GroupTeam 146from miro_api.models.group_teams_page import GroupTeamsPage 147 148from miro_api.models.create_group_request import CreateGroupRequest 149from miro_api.models.group import Group 150from miro_api.models.groups_page import GroupsPage 151from miro_api.models.update_group_request import UpdateGroupRequest 152 153from miro_api.models.app_card_create_request import AppCardCreateRequest 154from miro_api.models.app_card_item import AppCardItem 155from miro_api.models.app_card_update_request import AppCardUpdateRequest 156 157from miro_api.models.board_member_changes import BoardMemberChanges 158from miro_api.models.board_member_with_links import BoardMemberWithLinks 159from miro_api.models.board_members_invite import BoardMembersInvite 160from miro_api.models.board_members_paged_response import BoardMembersPagedResponse 161from miro_api.models.invitation_result import InvitationResult 162 163from miro_api.models.board_changes import BoardChanges 164from miro_api.models.board_with_links import BoardWithLinks 165from miro_api.models.board_with_links_and_last_opened import BoardWithLinksAndLastOpened 166from miro_api.models.board_with_links_and_without_project import BoardWithLinksAndWithoutProject 167from miro_api.models.boards_paged_response import BoardsPagedResponse 168from miro_api.models.copy_board_changes import CopyBoardChanges 169 170from miro_api.models.card_create_request import CardCreateRequest 171from miro_api.models.card_item import CardItem 172from miro_api.models.card_update_request import CardUpdateRequest 173 174from miro_api.models.connector_changes_data import ConnectorChangesData 175from miro_api.models.connector_creation_data import ConnectorCreationData 176from miro_api.models.connector_with_links import ConnectorWithLinks 177from miro_api.models.connectors_cursor_paged import ConnectorsCursorPaged 178 179from miro_api.models.doc_format_create_request import DocFormatCreateRequest 180from miro_api.models.doc_format_item import DocFormatItem 181 182from typing import Optional, Union 183from miro_api.models.create_document_item_using_file_from_device_request_data import ( 184 CreateDocumentItemUsingFileFromDeviceRequestData, 185) 186from miro_api.models.document_create_request import DocumentCreateRequest 187from miro_api.models.document_item import DocumentItem 188from miro_api.models.document_update_request import DocumentUpdateRequest 189from miro_api.models.upload_file_from_device_data import UploadFileFromDeviceData 190 191from miro_api.models.embed_create_request import EmbedCreateRequest 192from miro_api.models.embed_item import EmbedItem 193from miro_api.models.embed_update_request import EmbedUpdateRequest 194 195from miro_api.models.frame_create_request import FrameCreateRequest 196from miro_api.models.frame_item import FrameItem 197from miro_api.models.frame_update_request import FrameUpdateRequest 198 199from pydantic import Field, StrictBool, StrictStr 200from miro_api.models.get_all_groups200_response import GetAllGroups200Response 201from miro_api.models.get_items_by_group_id200_response import GetItemsByGroupId200Response 202from miro_api.models.group_response_short import GroupResponseShort 203 204from miro_api.models.image_create_request import ImageCreateRequest 205from miro_api.models.image_item import ImageItem 206from miro_api.models.image_update_request import ImageUpdateRequest 207 208from miro_api.models.generic_item_update import GenericItemUpdate 209 210 211from miro_api.models.sticky_note_create_request import StickyNoteCreateRequest 212from miro_api.models.sticky_note_item import StickyNoteItem 213from miro_api.models.sticky_note_update_request import StickyNoteUpdateRequest 214 215from miro_api.models.get_tags_response import GetTagsResponse 216from miro_api.models.item_paged_response import ItemPagedResponse 217from miro_api.models.tag_create_request import TagCreateRequest 218from miro_api.models.tag_update_request import TagUpdateRequest 219from miro_api.models.tag_with_links import TagWithLinks 220from miro_api.models.tags_paged_response import TagsPagedResponse 221 222from miro_api.models.text_create_request import TextCreateRequest 223from miro_api.models.text_item import TextItem 224from miro_api.models.text_update_request import TextUpdateRequest 225 226from miro_api.models.token_information import TokenInformation 227 228 229from miro_api.api_client import ApiClient, RequestSerialized 230from miro_api.api_response import ApiResponse 231from miro_api.rest import RESTResponseType 232 233 234class MiroApiEndpoints: 235 """NOTE: This class is auto generated by OpenAPI Generator 236 Ref: https://openapi-generator.tech 237 238 Do not edit the class manually. 239 """ 240 241 def __init__(self, api_client=None) -> None: 242 if api_client is None: 243 api_client = ApiClient.get_default() 244 self.api_client = api_client 245 246 @validate_call 247 def get_metrics( 248 self, 249 app_id: Annotated[StrictStr, Field(description="ID of the app to get metrics for.")], 250 start_date: Annotated[ 251 date, Field(description="Start date of the period in UTC format. For example, 2024-12-31.") 252 ], 253 end_date: Annotated[date, Field(description="End date of the period in UTC format. For example, 2024-12-31.")], 254 period: Annotated[Optional[StrictStr], Field(description="Group data by this time period.")] = None, 255 _request_timeout: Union[ 256 None, 257 Annotated[StrictFloat, Field(gt=0)], 258 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 259 ] = None, 260 _request_auth: Optional[Dict[StrictStr, Any]] = None, 261 _content_type: Optional[StrictStr] = None, 262 _headers: Optional[Dict[StrictStr, Any]] = None, 263 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 264 ) -> List[GetMetrics200ResponseInner]: 265 """Get app metrics 266 267 Returns a list of usage metrics for a specific app for a given time range, grouped by requested time period. This endpoint requires an app management API token. It can be generated in the <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">Your Apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 268 269 :param app_id: ID of the app to get metrics for. (required) 270 :type app_id: str 271 :param start_date: Start date of the period in UTC format. For example, 2024-12-31. (required) 272 :type start_date: date 273 :param end_date: End date of the period in UTC format. For example, 2024-12-31. (required) 274 :type end_date: date 275 :param period: Group data by this time period. 276 :type period: str 277 :param _request_timeout: timeout setting for this request. If one 278 number provided, it will be total request 279 timeout. It can also be a pair (tuple) of 280 (connection, read) timeouts. 281 :type _request_timeout: int, tuple(int, int), optional 282 :param _request_auth: set to override the auth_settings for an a single 283 request; this effectively ignores the 284 authentication in the spec for a single request. 285 :type _request_auth: dict, optional 286 :param _content_type: force content-type for the request. 287 :type _content_type: str, Optional 288 :param _headers: set to override the headers for a single 289 request; this effectively ignores the headers 290 in the spec for a single request. 291 :type _headers: dict, optional 292 :param _host_index: set to override the host_index for a single 293 request; this effectively ignores the host_index 294 in the spec for a single request. 295 :type _host_index: int, optional 296 :return: Returns the result object. 297 """ # noqa: E501 298 299 _param = self._get_metrics_serialize( 300 app_id=app_id, 301 start_date=start_date, 302 end_date=end_date, 303 period=period, 304 _request_auth=_request_auth, 305 _content_type=_content_type, 306 _headers=_headers, 307 _host_index=_host_index, 308 ) 309 310 _response_types_map: Dict[str, Optional[str]] = { 311 "200": "List[GetMetrics200ResponseInner]", 312 "404": "GetMetrics404Response", 313 } 314 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 315 response_data.read() 316 return self.api_client.response_deserialize( 317 response_data=response_data, 318 response_types_map=_response_types_map, 319 ).data 320 321 def _get_metrics_serialize( 322 self, 323 app_id, 324 start_date, 325 end_date, 326 period, 327 _request_auth, 328 _content_type, 329 _headers, 330 _host_index, 331 ) -> RequestSerialized: 332 333 _host = None 334 335 _collection_formats: Dict[str, str] = {} 336 337 _path_params: Dict[str, str] = {} 338 _query_params: List[Tuple[str, str]] = [] 339 _header_params: Dict[str, Optional[str]] = _headers or {} 340 _form_params: List[Tuple[str, str]] = [] 341 _files: Dict[str, str] = {} 342 _body_params: Optional[bytes] = None 343 344 # process the path parameters 345 if app_id is not None: 346 _path_params["app_id"] = app_id 347 # process the query parameters 348 if start_date is not None: 349 if isinstance(start_date, date): 350 _query_params.append(("startDate", start_date.strftime(self.api_client.configuration.date_format))) 351 else: 352 _query_params.append(("startDate", start_date)) 353 354 if end_date is not None: 355 if isinstance(end_date, date): 356 _query_params.append(("endDate", end_date.strftime(self.api_client.configuration.date_format))) 357 else: 358 _query_params.append(("endDate", end_date)) 359 360 if period is not None: 361 362 _query_params.append(("period", period)) 363 364 # process the header parameters 365 # process the form parameters 366 # process the body parameter 367 368 # set the HTTP header `Accept` 369 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 370 371 # authentication setting 372 _auth_settings: List[str] = [] 373 374 return self.api_client.param_serialize( 375 method="GET", 376 resource_path="/v2-experimental/apps/{app_id}/metrics", 377 path_params=_path_params, 378 query_params=_query_params, 379 header_params=_header_params, 380 body=_body_params, 381 post_params=_form_params, 382 files=_files, 383 auth_settings=_auth_settings, 384 collection_formats=_collection_formats, 385 _host=_host, 386 _request_auth=_request_auth, 387 ) 388 389 @validate_call 390 def get_metrics_total( 391 self, 392 app_id: Annotated[StrictStr, Field(description="ID of the app to get total metrics for.")], 393 _request_timeout: Union[ 394 None, 395 Annotated[StrictFloat, Field(gt=0)], 396 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 397 ] = None, 398 _request_auth: Optional[Dict[StrictStr, Any]] = None, 399 _content_type: Optional[StrictStr] = None, 400 _headers: Optional[Dict[StrictStr, Any]] = None, 401 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 402 ) -> GetMetricsTotal200Response: 403 """Get total app metrics 404 405 Returns total usage metrics for a specific app since the app was created. This endpoint requires an app management API token. It can be generated in <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">your apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 406 407 :param app_id: ID of the app to get total metrics for. (required) 408 :type app_id: str 409 :param _request_timeout: timeout setting for this request. If one 410 number provided, it will be total request 411 timeout. It can also be a pair (tuple) of 412 (connection, read) timeouts. 413 :type _request_timeout: int, tuple(int, int), optional 414 :param _request_auth: set to override the auth_settings for an a single 415 request; this effectively ignores the 416 authentication in the spec for a single request. 417 :type _request_auth: dict, optional 418 :param _content_type: force content-type for the request. 419 :type _content_type: str, Optional 420 :param _headers: set to override the headers for a single 421 request; this effectively ignores the headers 422 in the spec for a single request. 423 :type _headers: dict, optional 424 :param _host_index: set to override the host_index for a single 425 request; this effectively ignores the host_index 426 in the spec for a single request. 427 :type _host_index: int, optional 428 :return: Returns the result object. 429 """ # noqa: E501 430 431 _param = self._get_metrics_total_serialize( 432 app_id=app_id, 433 _request_auth=_request_auth, 434 _content_type=_content_type, 435 _headers=_headers, 436 _host_index=_host_index, 437 ) 438 439 _response_types_map: Dict[str, Optional[str]] = { 440 "200": "GetMetricsTotal200Response", 441 "404": "GetMetricsTotal404Response", 442 } 443 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 444 response_data.read() 445 return self.api_client.response_deserialize( 446 response_data=response_data, 447 response_types_map=_response_types_map, 448 ).data 449 450 def _get_metrics_total_serialize( 451 self, 452 app_id, 453 _request_auth, 454 _content_type, 455 _headers, 456 _host_index, 457 ) -> RequestSerialized: 458 459 _host = None 460 461 _collection_formats: Dict[str, str] = {} 462 463 _path_params: Dict[str, str] = {} 464 _query_params: List[Tuple[str, str]] = [] 465 _header_params: Dict[str, Optional[str]] = _headers or {} 466 _form_params: List[Tuple[str, str]] = [] 467 _files: Dict[str, str] = {} 468 _body_params: Optional[bytes] = None 469 470 # process the path parameters 471 if app_id is not None: 472 _path_params["app_id"] = app_id 473 # process the query parameters 474 # process the header parameters 475 # process the form parameters 476 # process the body parameter 477 478 # set the HTTP header `Accept` 479 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 480 481 # authentication setting 482 _auth_settings: List[str] = [] 483 484 return self.api_client.param_serialize( 485 method="GET", 486 resource_path="/v2-experimental/apps/{app_id}/metrics-total", 487 path_params=_path_params, 488 query_params=_query_params, 489 header_params=_header_params, 490 body=_body_params, 491 post_params=_form_params, 492 files=_files, 493 auth_settings=_auth_settings, 494 collection_formats=_collection_formats, 495 _host=_host, 496 _request_auth=_request_auth, 497 ) 498 499 @validate_call 500 def enterprise_get_audit_logs( 501 self, 502 created_after: Annotated[ 503 StrictStr, 504 Field( 505 description='Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-03-30T17:26:50.000Z` as the value for the `createdAfter` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC))." ' 506 ), 507 ], 508 created_before: Annotated[ 509 StrictStr, 510 Field( 511 description="Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-04-30T17:26:50.000Z` as the value for the `createdBefore` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 512 ), 513 ], 514 cursor: Annotated[ 515 Optional[StrictStr], 516 Field( 517 description="A cursor-paginated method returns a portion of the total set of results based on the `limit` specified and a `cursor` that points to the next portion of the results. To retrieve the next set of results of the collection, set the `cursor` parameter in your next request to the appropriate cursor value returned in the response." 518 ), 519 ] = None, 520 limit: Annotated[ 521 Optional[StrictInt], 522 Field( 523 description="Maximum number of results returned based on the `limit` specified in the request. For example, if there are `30` results, the request has no `cursor` value, and the `limit` is set to `20`,the `size` of the results will be `20`. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the `cursor` parameter value that you obtained from the response.<br>Default: `100` " 524 ), 525 ] = None, 526 sorting: Annotated[ 527 Optional[StrictStr], 528 Field( 529 description="Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log `createdAt` parameter).<br>Default: `ASC` " 530 ), 531 ] = None, 532 _request_timeout: Union[ 533 None, 534 Annotated[StrictFloat, Field(gt=0)], 535 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 536 ] = None, 537 _request_auth: Optional[Dict[StrictStr, Any]] = None, 538 _content_type: Optional[StrictStr] = None, 539 _headers: Optional[Dict[StrictStr, Any]] = None, 540 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 541 ) -> AuditPage: 542 """Get audit logs 543 544 Retrieves a page of audit events from the last 90 days. If you want to retrieve data that is older than 90 days, you can use the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/360017571434-Audit-logs#h_01J7EY4E0F67EFTRQ7BT688HW0\">CSV export feature</a>.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>auditlogs:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> 545 546 :param created_after: Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-03-30T17:26:50.000Z` as the value for the `createdAfter` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).\" (required) 547 :type created_after: str 548 :param created_before: Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-04-30T17:26:50.000Z` as the value for the `createdBefore` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 549 :type created_before: str 550 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the `limit` specified and a `cursor` that points to the next portion of the results. To retrieve the next set of results of the collection, set the `cursor` parameter in your next request to the appropriate cursor value returned in the response. 551 :type cursor: str 552 :param limit: Maximum number of results returned based on the `limit` specified in the request. For example, if there are `30` results, the request has no `cursor` value, and the `limit` is set to `20`,the `size` of the results will be `20`. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the `cursor` parameter value that you obtained from the response.<br>Default: `100` 553 :type limit: int 554 :param sorting: Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log `createdAt` parameter).<br>Default: `ASC` 555 :type sorting: str 556 :param _request_timeout: timeout setting for this request. If one 557 number provided, it will be total request 558 timeout. It can also be a pair (tuple) of 559 (connection, read) timeouts. 560 :type _request_timeout: int, tuple(int, int), optional 561 :param _request_auth: set to override the auth_settings for an a single 562 request; this effectively ignores the 563 authentication in the spec for a single request. 564 :type _request_auth: dict, optional 565 :param _content_type: force content-type for the request. 566 :type _content_type: str, Optional 567 :param _headers: set to override the headers for a single 568 request; this effectively ignores the headers 569 in the spec for a single request. 570 :type _headers: dict, optional 571 :param _host_index: set to override the host_index for a single 572 request; this effectively ignores the host_index 573 in the spec for a single request. 574 :type _host_index: int, optional 575 :return: Returns the result object. 576 """ # noqa: E501 577 578 _param = self._enterprise_get_audit_logs_serialize( 579 created_after=created_after, 580 created_before=created_before, 581 cursor=cursor, 582 limit=limit, 583 sorting=sorting, 584 _request_auth=_request_auth, 585 _content_type=_content_type, 586 _headers=_headers, 587 _host_index=_host_index, 588 ) 589 590 _response_types_map: Dict[str, Optional[str]] = { 591 "200": "AuditPage", 592 "400": None, 593 "401": None, 594 "403": None, 595 "404": None, 596 "409": None, 597 "429": None, 598 } 599 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 600 response_data.read() 601 return self.api_client.response_deserialize( 602 response_data=response_data, 603 response_types_map=_response_types_map, 604 ).data 605 606 def _enterprise_get_audit_logs_serialize( 607 self, 608 created_after, 609 created_before, 610 cursor, 611 limit, 612 sorting, 613 _request_auth, 614 _content_type, 615 _headers, 616 _host_index, 617 ) -> RequestSerialized: 618 619 _host = None 620 621 _collection_formats: Dict[str, str] = {} 622 623 _path_params: Dict[str, str] = {} 624 _query_params: List[Tuple[str, str]] = [] 625 _header_params: Dict[str, Optional[str]] = _headers or {} 626 _form_params: List[Tuple[str, str]] = [] 627 _files: Dict[str, str] = {} 628 _body_params: Optional[bytes] = None 629 630 # process the path parameters 631 # process the query parameters 632 if created_after is not None: 633 634 _query_params.append(("createdAfter", created_after)) 635 636 if created_before is not None: 637 638 _query_params.append(("createdBefore", created_before)) 639 640 if cursor is not None: 641 642 _query_params.append(("cursor", cursor)) 643 644 if limit is not None: 645 646 _query_params.append(("limit", limit)) 647 648 if sorting is not None: 649 650 _query_params.append(("sorting", sorting)) 651 652 # process the header parameters 653 # process the form parameters 654 # process the body parameter 655 656 # set the HTTP header `Accept` 657 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 658 659 # authentication setting 660 _auth_settings: List[str] = [] 661 662 return self.api_client.param_serialize( 663 method="GET", 664 resource_path="/v2/audit/logs", 665 path_params=_path_params, 666 query_params=_query_params, 667 header_params=_header_params, 668 body=_body_params, 669 post_params=_form_params, 670 files=_files, 671 auth_settings=_auth_settings, 672 collection_formats=_collection_formats, 673 _host=_host, 674 _request_auth=_request_auth, 675 ) 676 677 @validate_call 678 def enterprise_board_content_item_logs_fetch( 679 self, 680 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 681 var_from: Annotated[ 682 datetime, 683 Field( 684 description="Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 685 ), 686 ], 687 to: Annotated[ 688 datetime, 689 Field( 690 description="Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 691 ), 692 ], 693 board_ids: Annotated[ 694 Optional[Annotated[List[StrictStr], Field(max_length=15)]], 695 Field(description="List of board IDs for which you want to retrieve the content logs."), 696 ] = None, 697 emails: Annotated[ 698 Optional[Annotated[List[StrictStr], Field(max_length=15)]], 699 Field( 700 description="Filter content logs based on the list of emails of users who created, modified, or deleted the board item." 701 ), 702 ] = None, 703 cursor: Annotated[ 704 Optional[StrictStr], 705 Field( 706 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 707 ), 708 ] = None, 709 limit: Annotated[ 710 Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], 711 Field( 712 description="The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 713 ), 714 ] = None, 715 sorting: Annotated[ 716 Optional[StrictStr], 717 Field( 718 description="Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify `asc`. To sort by a descending modified date, specify `desc`. " 719 ), 720 ] = None, 721 _request_timeout: Union[ 722 None, 723 Annotated[StrictFloat, Field(gt=0)], 724 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 725 ] = None, 726 _request_auth: Optional[Dict[StrictStr, Any]] = None, 727 _content_type: Optional[StrictStr] = None, 728 _headers: Optional[Dict[StrictStr, Any]] = None, 729 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 730 ) -> GetBoardItemContentLogsResponse: 731 """Retrieve content change logs of board items 732 733 Retrieves content changes for board items within your organization. Content changes are actions that users can perform on board items, such as updating a sticky note's text. You can retrieve results for a specific time period. You can also filter results based on the board IDs and the emails of users who created, modified, or deleted a board item. Additionally, results can be paginated for easier viewing and processing. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>contentlogs:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin.</p> 734 735 :param org_id: Unique identifier of the organization. (required) 736 :type org_id: str 737 :param var_from: Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 738 :type var_from: datetime 739 :param to: Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 740 :type to: datetime 741 :param board_ids: List of board IDs for which you want to retrieve the content logs. 742 :type board_ids: List[str] 743 :param emails: Filter content logs based on the list of emails of users who created, modified, or deleted the board item. 744 :type emails: List[str] 745 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 746 :type cursor: str 747 :param limit: The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value. 748 :type limit: int 749 :param sorting: Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify `asc`. To sort by a descending modified date, specify `desc`. 750 :type sorting: str 751 :param _request_timeout: timeout setting for this request. If one 752 number provided, it will be total request 753 timeout. It can also be a pair (tuple) of 754 (connection, read) timeouts. 755 :type _request_timeout: int, tuple(int, int), optional 756 :param _request_auth: set to override the auth_settings for an a single 757 request; this effectively ignores the 758 authentication in the spec for a single request. 759 :type _request_auth: dict, optional 760 :param _content_type: force content-type for the request. 761 :type _content_type: str, Optional 762 :param _headers: set to override the headers for a single 763 request; this effectively ignores the headers 764 in the spec for a single request. 765 :type _headers: dict, optional 766 :param _host_index: set to override the host_index for a single 767 request; this effectively ignores the host_index 768 in the spec for a single request. 769 :type _host_index: int, optional 770 :return: Returns the result object. 771 """ # noqa: E501 772 773 _param = self._enterprise_board_content_item_logs_fetch_serialize( 774 org_id=org_id, 775 var_from=var_from, 776 to=to, 777 board_ids=board_ids, 778 emails=emails, 779 cursor=cursor, 780 limit=limit, 781 sorting=sorting, 782 _request_auth=_request_auth, 783 _content_type=_content_type, 784 _headers=_headers, 785 _host_index=_host_index, 786 ) 787 788 _response_types_map: Dict[str, Optional[str]] = { 789 "200": "GetBoardItemContentLogsResponse", 790 "400": None, 791 "401": None, 792 "403": None, 793 "404": None, 794 "429": None, 795 } 796 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 797 response_data.read() 798 return self.api_client.response_deserialize( 799 response_data=response_data, 800 response_types_map=_response_types_map, 801 ).data 802 803 def _enterprise_board_content_item_logs_fetch_serialize( 804 self, 805 org_id, 806 var_from, 807 to, 808 board_ids, 809 emails, 810 cursor, 811 limit, 812 sorting, 813 _request_auth, 814 _content_type, 815 _headers, 816 _host_index, 817 ) -> RequestSerialized: 818 819 _host = None 820 821 _collection_formats: Dict[str, str] = { 822 "board_ids": "multi", 823 "emails": "multi", 824 } 825 826 _path_params: Dict[str, str] = {} 827 _query_params: List[Tuple[str, str]] = [] 828 _header_params: Dict[str, Optional[str]] = _headers or {} 829 _form_params: List[Tuple[str, str]] = [] 830 _files: Dict[str, str] = {} 831 _body_params: Optional[bytes] = None 832 833 # process the path parameters 834 if org_id is not None: 835 _path_params["org_id"] = org_id 836 # process the query parameters 837 if board_ids is not None: 838 839 _query_params.append(("board_ids", board_ids)) 840 841 if emails is not None: 842 843 _query_params.append(("emails", emails)) 844 845 if var_from is not None: 846 if isinstance(var_from, datetime): 847 _query_params.append(("from", var_from.strftime(self.api_client.configuration.datetime_format))) 848 else: 849 _query_params.append(("from", var_from)) 850 851 if to is not None: 852 if isinstance(to, datetime): 853 _query_params.append(("to", to.strftime(self.api_client.configuration.datetime_format))) 854 else: 855 _query_params.append(("to", to)) 856 857 if cursor is not None: 858 859 _query_params.append(("cursor", cursor)) 860 861 if limit is not None: 862 863 _query_params.append(("limit", limit)) 864 865 if sorting is not None: 866 867 _query_params.append(("sorting", sorting)) 868 869 # process the header parameters 870 # process the form parameters 871 # process the body parameter 872 873 # set the HTTP header `Accept` 874 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 875 876 # authentication setting 877 _auth_settings: List[str] = [] 878 879 return self.api_client.param_serialize( 880 method="GET", 881 resource_path="/v2/orgs/{org_id}/content-logs/items", 882 path_params=_path_params, 883 query_params=_query_params, 884 header_params=_header_params, 885 body=_body_params, 886 post_params=_form_params, 887 files=_files, 888 auth_settings=_auth_settings, 889 collection_formats=_collection_formats, 890 _host=_host, 891 _request_auth=_request_auth, 892 ) 893 894 @validate_call 895 def enterprise_board_export_job_results( 896 self, 897 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 898 job_id: Annotated[StrictStr, Field(description="Unique identifier of the job.")], 899 _request_timeout: Union[ 900 None, 901 Annotated[StrictFloat, Field(gt=0)], 902 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 903 ] = None, 904 _request_auth: Optional[Dict[StrictStr, Any]] = None, 905 _content_type: Optional[StrictStr] = None, 906 _headers: Optional[Dict[StrictStr, Any]] = None, 907 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 908 ) -> BoardExportResult: 909 """Get results for board export job 910 911 Retrieves the result of the board export job. The response provides more information about the board export job, such as the S3 link to the files created.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 912 913 :param org_id: Unique identifier of the organization. (required) 914 :type org_id: str 915 :param job_id: Unique identifier of the job. (required) 916 :type job_id: str 917 :param _request_timeout: timeout setting for this request. If one 918 number provided, it will be total request 919 timeout. It can also be a pair (tuple) of 920 (connection, read) timeouts. 921 :type _request_timeout: int, tuple(int, int), optional 922 :param _request_auth: set to override the auth_settings for an a single 923 request; this effectively ignores the 924 authentication in the spec for a single request. 925 :type _request_auth: dict, optional 926 :param _content_type: force content-type for the request. 927 :type _content_type: str, Optional 928 :param _headers: set to override the headers for a single 929 request; this effectively ignores the headers 930 in the spec for a single request. 931 :type _headers: dict, optional 932 :param _host_index: set to override the host_index for a single 933 request; this effectively ignores the host_index 934 in the spec for a single request. 935 :type _host_index: int, optional 936 :return: Returns the result object. 937 """ # noqa: E501 938 939 _param = self._enterprise_board_export_job_results_serialize( 940 org_id=org_id, 941 job_id=job_id, 942 _request_auth=_request_auth, 943 _content_type=_content_type, 944 _headers=_headers, 945 _host_index=_host_index, 946 ) 947 948 _response_types_map: Dict[str, Optional[str]] = { 949 "200": "BoardExportResult", 950 "400": None, 951 "401": None, 952 "403": None, 953 "404": None, 954 "429": None, 955 } 956 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 957 response_data.read() 958 return self.api_client.response_deserialize( 959 response_data=response_data, 960 response_types_map=_response_types_map, 961 ).data 962 963 def _enterprise_board_export_job_results_serialize( 964 self, 965 org_id, 966 job_id, 967 _request_auth, 968 _content_type, 969 _headers, 970 _host_index, 971 ) -> RequestSerialized: 972 973 _host = None 974 975 _collection_formats: Dict[str, str] = {} 976 977 _path_params: Dict[str, str] = {} 978 _query_params: List[Tuple[str, str]] = [] 979 _header_params: Dict[str, Optional[str]] = _headers or {} 980 _form_params: List[Tuple[str, str]] = [] 981 _files: Dict[str, str] = {} 982 _body_params: Optional[bytes] = None 983 984 # process the path parameters 985 if org_id is not None: 986 _path_params["org_id"] = org_id 987 if job_id is not None: 988 _path_params["job_id"] = job_id 989 # process the query parameters 990 # process the header parameters 991 # process the form parameters 992 # process the body parameter 993 994 # set the HTTP header `Accept` 995 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 996 997 # authentication setting 998 _auth_settings: List[str] = [] 999 1000 return self.api_client.param_serialize( 1001 method="GET", 1002 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/results", 1003 path_params=_path_params, 1004 query_params=_query_params, 1005 header_params=_header_params, 1006 body=_body_params, 1007 post_params=_form_params, 1008 files=_files, 1009 auth_settings=_auth_settings, 1010 collection_formats=_collection_formats, 1011 _host=_host, 1012 _request_auth=_request_auth, 1013 ) 1014 1015 @validate_call 1016 def enterprise_board_export_job_status( 1017 self, 1018 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1019 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1020 _request_timeout: Union[ 1021 None, 1022 Annotated[StrictFloat, Field(gt=0)], 1023 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1024 ] = None, 1025 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1026 _content_type: Optional[StrictStr] = None, 1027 _headers: Optional[Dict[StrictStr, Any]] = None, 1028 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1029 ) -> BoardExportJobStatus: 1030 """Get board export job status 1031 1032 Retrieves the status of the board export job.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1033 1034 :param org_id: Unique identifier of the organization. (required) 1035 :type org_id: str 1036 :param job_id: Unique identifier of the board export job. (required) 1037 :type job_id: str 1038 :param _request_timeout: timeout setting for this request. If one 1039 number provided, it will be total request 1040 timeout. It can also be a pair (tuple) of 1041 (connection, read) timeouts. 1042 :type _request_timeout: int, tuple(int, int), optional 1043 :param _request_auth: set to override the auth_settings for an a single 1044 request; this effectively ignores the 1045 authentication in the spec for a single request. 1046 :type _request_auth: dict, optional 1047 :param _content_type: force content-type for the request. 1048 :type _content_type: str, Optional 1049 :param _headers: set to override the headers for a single 1050 request; this effectively ignores the headers 1051 in the spec for a single request. 1052 :type _headers: dict, optional 1053 :param _host_index: set to override the host_index for a single 1054 request; this effectively ignores the host_index 1055 in the spec for a single request. 1056 :type _host_index: int, optional 1057 :return: Returns the result object. 1058 """ # noqa: E501 1059 1060 _param = self._enterprise_board_export_job_status_serialize( 1061 org_id=org_id, 1062 job_id=job_id, 1063 _request_auth=_request_auth, 1064 _content_type=_content_type, 1065 _headers=_headers, 1066 _host_index=_host_index, 1067 ) 1068 1069 _response_types_map: Dict[str, Optional[str]] = { 1070 "200": "BoardExportJobStatus", 1071 "400": None, 1072 "401": None, 1073 "403": None, 1074 "404": None, 1075 "429": None, 1076 } 1077 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1078 response_data.read() 1079 return self.api_client.response_deserialize( 1080 response_data=response_data, 1081 response_types_map=_response_types_map, 1082 ).data 1083 1084 def _enterprise_board_export_job_status_serialize( 1085 self, 1086 org_id, 1087 job_id, 1088 _request_auth, 1089 _content_type, 1090 _headers, 1091 _host_index, 1092 ) -> RequestSerialized: 1093 1094 _host = None 1095 1096 _collection_formats: Dict[str, str] = {} 1097 1098 _path_params: Dict[str, str] = {} 1099 _query_params: List[Tuple[str, str]] = [] 1100 _header_params: Dict[str, Optional[str]] = _headers or {} 1101 _form_params: List[Tuple[str, str]] = [] 1102 _files: Dict[str, str] = {} 1103 _body_params: Optional[bytes] = None 1104 1105 # process the path parameters 1106 if org_id is not None: 1107 _path_params["org_id"] = org_id 1108 if job_id is not None: 1109 _path_params["job_id"] = job_id 1110 # process the query parameters 1111 # process the header parameters 1112 # process the form parameters 1113 # process the body parameter 1114 1115 # set the HTTP header `Accept` 1116 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1117 1118 # authentication setting 1119 _auth_settings: List[str] = [] 1120 1121 return self.api_client.param_serialize( 1122 method="GET", 1123 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}", 1124 path_params=_path_params, 1125 query_params=_query_params, 1126 header_params=_header_params, 1127 body=_body_params, 1128 post_params=_form_params, 1129 files=_files, 1130 auth_settings=_auth_settings, 1131 collection_formats=_collection_formats, 1132 _host=_host, 1133 _request_auth=_request_auth, 1134 ) 1135 1136 @validate_call 1137 def enterprise_board_export_job_tasks( 1138 self, 1139 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1140 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1141 status: Annotated[ 1142 Optional[List[StrictStr]], 1143 Field( 1144 description="Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR." 1145 ), 1146 ] = None, 1147 cursor: Annotated[ 1148 Optional[StrictStr], 1149 Field( 1150 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 1151 ), 1152 ] = None, 1153 limit: Annotated[ 1154 Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], 1155 Field( 1156 description="The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 1157 ), 1158 ] = None, 1159 _request_timeout: Union[ 1160 None, 1161 Annotated[StrictFloat, Field(gt=0)], 1162 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1163 ] = None, 1164 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1165 _content_type: Optional[StrictStr] = None, 1166 _headers: Optional[Dict[StrictStr, Any]] = None, 1167 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1168 ) -> BoardExportJobTasksList: 1169 """Get board export job tasks list 1170 1171 Retrieves the list of tasks for the board export job.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1172 1173 :param org_id: Unique identifier of the organization. (required) 1174 :type org_id: str 1175 :param job_id: Unique identifier of the board export job. (required) 1176 :type job_id: str 1177 :param status: Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR. 1178 :type status: List[str] 1179 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 1180 :type cursor: str 1181 :param limit: The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. 1182 :type limit: int 1183 :param _request_timeout: timeout setting for this request. If one 1184 number provided, it will be total request 1185 timeout. It can also be a pair (tuple) of 1186 (connection, read) timeouts. 1187 :type _request_timeout: int, tuple(int, int), optional 1188 :param _request_auth: set to override the auth_settings for an a single 1189 request; this effectively ignores the 1190 authentication in the spec for a single request. 1191 :type _request_auth: dict, optional 1192 :param _content_type: force content-type for the request. 1193 :type _content_type: str, Optional 1194 :param _headers: set to override the headers for a single 1195 request; this effectively ignores the headers 1196 in the spec for a single request. 1197 :type _headers: dict, optional 1198 :param _host_index: set to override the host_index for a single 1199 request; this effectively ignores the host_index 1200 in the spec for a single request. 1201 :type _host_index: int, optional 1202 :return: Returns the result object. 1203 """ # noqa: E501 1204 1205 _param = self._enterprise_board_export_job_tasks_serialize( 1206 org_id=org_id, 1207 job_id=job_id, 1208 status=status, 1209 cursor=cursor, 1210 limit=limit, 1211 _request_auth=_request_auth, 1212 _content_type=_content_type, 1213 _headers=_headers, 1214 _host_index=_host_index, 1215 ) 1216 1217 _response_types_map: Dict[str, Optional[str]] = { 1218 "200": "BoardExportJobTasksList", 1219 "400": None, 1220 "401": None, 1221 "403": None, 1222 "404": None, 1223 "429": None, 1224 } 1225 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1226 response_data.read() 1227 return self.api_client.response_deserialize( 1228 response_data=response_data, 1229 response_types_map=_response_types_map, 1230 ).data 1231 1232 def _enterprise_board_export_job_tasks_serialize( 1233 self, 1234 org_id, 1235 job_id, 1236 status, 1237 cursor, 1238 limit, 1239 _request_auth, 1240 _content_type, 1241 _headers, 1242 _host_index, 1243 ) -> RequestSerialized: 1244 1245 _host = None 1246 1247 _collection_formats: Dict[str, str] = { 1248 "status": "multi", 1249 } 1250 1251 _path_params: Dict[str, str] = {} 1252 _query_params: List[Tuple[str, str]] = [] 1253 _header_params: Dict[str, Optional[str]] = _headers or {} 1254 _form_params: List[Tuple[str, str]] = [] 1255 _files: Dict[str, str] = {} 1256 _body_params: Optional[bytes] = None 1257 1258 # process the path parameters 1259 if org_id is not None: 1260 _path_params["org_id"] = org_id 1261 if job_id is not None: 1262 _path_params["job_id"] = job_id 1263 # process the query parameters 1264 if status is not None: 1265 1266 _query_params.append(("status", status)) 1267 1268 if cursor is not None: 1269 1270 _query_params.append(("cursor", cursor)) 1271 1272 if limit is not None: 1273 1274 _query_params.append(("limit", limit)) 1275 1276 # process the header parameters 1277 # process the form parameters 1278 # process the body parameter 1279 1280 # set the HTTP header `Accept` 1281 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1282 1283 # authentication setting 1284 _auth_settings: List[str] = [] 1285 1286 return self.api_client.param_serialize( 1287 method="GET", 1288 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/tasks", 1289 path_params=_path_params, 1290 query_params=_query_params, 1291 header_params=_header_params, 1292 body=_body_params, 1293 post_params=_form_params, 1294 files=_files, 1295 auth_settings=_auth_settings, 1296 collection_formats=_collection_formats, 1297 _host=_host, 1298 _request_auth=_request_auth, 1299 ) 1300 1301 @validate_call 1302 def enterprise_board_export_jobs( 1303 self, 1304 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1305 status: Annotated[ 1306 Optional[List[StrictStr]], 1307 Field( 1308 description="Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED." 1309 ), 1310 ] = None, 1311 creator_id: Annotated[ 1312 Optional[List[StrictInt]], Field(description="Unique identifier of the board export job creator.") 1313 ] = None, 1314 cursor: Annotated[ 1315 Optional[StrictStr], 1316 Field( 1317 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 1318 ), 1319 ] = None, 1320 limit: Annotated[ 1321 Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], 1322 Field( 1323 description="The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 1324 ), 1325 ] = None, 1326 _request_timeout: Union[ 1327 None, 1328 Annotated[StrictFloat, Field(gt=0)], 1329 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1330 ] = None, 1331 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1332 _content_type: Optional[StrictStr] = None, 1333 _headers: Optional[Dict[StrictStr, Any]] = None, 1334 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1335 ) -> BoardExportJobsList: 1336 """Get board export jobs list 1337 1338 Retrieves the list of board export jobs based on the filters provided in the request.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1339 1340 :param org_id: Unique identifier of the organization. (required) 1341 :type org_id: str 1342 :param status: Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED. 1343 :type status: List[str] 1344 :param creator_id: Unique identifier of the board export job creator. 1345 :type creator_id: List[int] 1346 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 1347 :type cursor: str 1348 :param limit: The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. 1349 :type limit: int 1350 :param _request_timeout: timeout setting for this request. If one 1351 number provided, it will be total request 1352 timeout. It can also be a pair (tuple) of 1353 (connection, read) timeouts. 1354 :type _request_timeout: int, tuple(int, int), optional 1355 :param _request_auth: set to override the auth_settings for an a single 1356 request; this effectively ignores the 1357 authentication in the spec for a single request. 1358 :type _request_auth: dict, optional 1359 :param _content_type: force content-type for the request. 1360 :type _content_type: str, Optional 1361 :param _headers: set to override the headers for a single 1362 request; this effectively ignores the headers 1363 in the spec for a single request. 1364 :type _headers: dict, optional 1365 :param _host_index: set to override the host_index for a single 1366 request; this effectively ignores the host_index 1367 in the spec for a single request. 1368 :type _host_index: int, optional 1369 :return: Returns the result object. 1370 """ # noqa: E501 1371 1372 _param = self._enterprise_board_export_jobs_serialize( 1373 org_id=org_id, 1374 status=status, 1375 creator_id=creator_id, 1376 cursor=cursor, 1377 limit=limit, 1378 _request_auth=_request_auth, 1379 _content_type=_content_type, 1380 _headers=_headers, 1381 _host_index=_host_index, 1382 ) 1383 1384 _response_types_map: Dict[str, Optional[str]] = { 1385 "200": "BoardExportJobsList", 1386 "400": None, 1387 "401": None, 1388 "403": None, 1389 "404": None, 1390 "429": None, 1391 } 1392 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1393 response_data.read() 1394 return self.api_client.response_deserialize( 1395 response_data=response_data, 1396 response_types_map=_response_types_map, 1397 ).data 1398 1399 def _enterprise_board_export_jobs_serialize( 1400 self, 1401 org_id, 1402 status, 1403 creator_id, 1404 cursor, 1405 limit, 1406 _request_auth, 1407 _content_type, 1408 _headers, 1409 _host_index, 1410 ) -> RequestSerialized: 1411 1412 _host = None 1413 1414 _collection_formats: Dict[str, str] = { 1415 "status": "multi", 1416 "creatorId": "multi", 1417 } 1418 1419 _path_params: Dict[str, str] = {} 1420 _query_params: List[Tuple[str, str]] = [] 1421 _header_params: Dict[str, Optional[str]] = _headers or {} 1422 _form_params: List[Tuple[str, str]] = [] 1423 _files: Dict[str, str] = {} 1424 _body_params: Optional[bytes] = None 1425 1426 # process the path parameters 1427 if org_id is not None: 1428 _path_params["org_id"] = org_id 1429 # process the query parameters 1430 if status is not None: 1431 1432 _query_params.append(("status", status)) 1433 1434 if creator_id is not None: 1435 1436 _query_params.append(("creatorId", creator_id)) 1437 1438 if cursor is not None: 1439 1440 _query_params.append(("cursor", cursor)) 1441 1442 if limit is not None: 1443 1444 _query_params.append(("limit", limit)) 1445 1446 # process the header parameters 1447 # process the form parameters 1448 # process the body parameter 1449 1450 # set the HTTP header `Accept` 1451 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1452 1453 # authentication setting 1454 _auth_settings: List[str] = [] 1455 1456 return self.api_client.param_serialize( 1457 method="GET", 1458 resource_path="/v2/orgs/{org_id}/boards/export/jobs", 1459 path_params=_path_params, 1460 query_params=_query_params, 1461 header_params=_header_params, 1462 body=_body_params, 1463 post_params=_form_params, 1464 files=_files, 1465 auth_settings=_auth_settings, 1466 collection_formats=_collection_formats, 1467 _host=_host, 1468 _request_auth=_request_auth, 1469 ) 1470 1471 @validate_call 1472 def enterprise_create_board_export( 1473 self, 1474 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1475 request_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1476 create_board_export_request: CreateBoardExportRequest, 1477 _request_timeout: Union[ 1478 None, 1479 Annotated[StrictFloat, Field(gt=0)], 1480 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1481 ] = None, 1482 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1483 _content_type: Optional[StrictStr] = None, 1484 _headers: Optional[Dict[StrictStr, Any]] = None, 1485 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1486 ) -> BoardExportJobId: 1487 """Create board export job 1488 1489 Creates an export job for one or more boards.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1490 1491 :param org_id: Unique identifier of the organization. (required) 1492 :type org_id: str 1493 :param request_id: Unique identifier of the board export job. (required) 1494 :type request_id: str 1495 :param create_board_export_request: (required) 1496 :type create_board_export_request: CreateBoardExportRequest 1497 :param _request_timeout: timeout setting for this request. If one 1498 number provided, it will be total request 1499 timeout. It can also be a pair (tuple) of 1500 (connection, read) timeouts. 1501 :type _request_timeout: int, tuple(int, int), optional 1502 :param _request_auth: set to override the auth_settings for an a single 1503 request; this effectively ignores the 1504 authentication in the spec for a single request. 1505 :type _request_auth: dict, optional 1506 :param _content_type: force content-type for the request. 1507 :type _content_type: str, Optional 1508 :param _headers: set to override the headers for a single 1509 request; this effectively ignores the headers 1510 in the spec for a single request. 1511 :type _headers: dict, optional 1512 :param _host_index: set to override the host_index for a single 1513 request; this effectively ignores the host_index 1514 in the spec for a single request. 1515 :type _host_index: int, optional 1516 :return: Returns the result object. 1517 """ # noqa: E501 1518 1519 _param = self._enterprise_create_board_export_serialize( 1520 org_id=org_id, 1521 request_id=request_id, 1522 create_board_export_request=create_board_export_request, 1523 _request_auth=_request_auth, 1524 _content_type=_content_type, 1525 _headers=_headers, 1526 _host_index=_host_index, 1527 ) 1528 1529 _response_types_map: Dict[str, Optional[str]] = { 1530 "200": "BoardExportJobId", 1531 "400": None, 1532 "401": None, 1533 "403": None, 1534 "404": None, 1535 "425": None, 1536 "429": None, 1537 } 1538 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1539 response_data.read() 1540 return self.api_client.response_deserialize( 1541 response_data=response_data, 1542 response_types_map=_response_types_map, 1543 ).data 1544 1545 def _enterprise_create_board_export_serialize( 1546 self, 1547 org_id, 1548 request_id, 1549 create_board_export_request, 1550 _request_auth, 1551 _content_type, 1552 _headers, 1553 _host_index, 1554 ) -> RequestSerialized: 1555 1556 _host = None 1557 1558 _collection_formats: Dict[str, str] = {} 1559 1560 _path_params: Dict[str, str] = {} 1561 _query_params: List[Tuple[str, str]] = [] 1562 _header_params: Dict[str, Optional[str]] = _headers or {} 1563 _form_params: List[Tuple[str, str]] = [] 1564 _files: Dict[str, str] = {} 1565 _body_params: Optional[bytes] = None 1566 1567 # process the path parameters 1568 if org_id is not None: 1569 _path_params["org_id"] = org_id 1570 # process the query parameters 1571 if request_id is not None: 1572 1573 _query_params.append(("request_id", request_id)) 1574 1575 # process the header parameters 1576 # process the form parameters 1577 # process the body parameter 1578 if create_board_export_request is not None: 1579 _body_params = create_board_export_request 1580 1581 # set the HTTP header `Accept` 1582 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1583 1584 # set the HTTP header `Content-Type` 1585 if _content_type: 1586 _header_params["Content-Type"] = _content_type 1587 else: 1588 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 1589 if _default_content_type is not None: 1590 _header_params["Content-Type"] = _default_content_type 1591 1592 # authentication setting 1593 _auth_settings: List[str] = [] 1594 1595 return self.api_client.param_serialize( 1596 method="POST", 1597 resource_path="/v2/orgs/{org_id}/boards/export/jobs", 1598 path_params=_path_params, 1599 query_params=_query_params, 1600 header_params=_header_params, 1601 body=_body_params, 1602 post_params=_form_params, 1603 files=_files, 1604 auth_settings=_auth_settings, 1605 collection_formats=_collection_formats, 1606 _host=_host, 1607 _request_auth=_request_auth, 1608 ) 1609 1610 @validate_call 1611 def enterprise_create_board_export_task_export_link( 1612 self, 1613 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1614 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1615 task_id: Annotated[StrictStr, Field(description="Unique identifier of the board export task.")], 1616 _request_timeout: Union[ 1617 None, 1618 Annotated[StrictFloat, Field(gt=0)], 1619 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1620 ] = None, 1621 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1622 _content_type: Optional[StrictStr] = None, 1623 _headers: Optional[Dict[StrictStr, Any]] = None, 1624 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1625 ) -> BoardExportTaskExportLink: 1626 """Create task export link 1627 1628 Creates a link to download the results of a board export task.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1629 1630 :param org_id: Unique identifier of the organization. (required) 1631 :type org_id: str 1632 :param job_id: Unique identifier of the board export job. (required) 1633 :type job_id: str 1634 :param task_id: Unique identifier of the board export task. (required) 1635 :type task_id: str 1636 :param _request_timeout: timeout setting for this request. If one 1637 number provided, it will be total request 1638 timeout. It can also be a pair (tuple) of 1639 (connection, read) timeouts. 1640 :type _request_timeout: int, tuple(int, int), optional 1641 :param _request_auth: set to override the auth_settings for an a single 1642 request; this effectively ignores the 1643 authentication in the spec for a single request. 1644 :type _request_auth: dict, optional 1645 :param _content_type: force content-type for the request. 1646 :type _content_type: str, Optional 1647 :param _headers: set to override the headers for a single 1648 request; this effectively ignores the headers 1649 in the spec for a single request. 1650 :type _headers: dict, optional 1651 :param _host_index: set to override the host_index for a single 1652 request; this effectively ignores the host_index 1653 in the spec for a single request. 1654 :type _host_index: int, optional 1655 :return: Returns the result object. 1656 """ # noqa: E501 1657 1658 _param = self._enterprise_create_board_export_task_export_link_serialize( 1659 org_id=org_id, 1660 job_id=job_id, 1661 task_id=task_id, 1662 _request_auth=_request_auth, 1663 _content_type=_content_type, 1664 _headers=_headers, 1665 _host_index=_host_index, 1666 ) 1667 1668 _response_types_map: Dict[str, Optional[str]] = { 1669 "200": "BoardExportTaskExportLink", 1670 "400": None, 1671 "401": None, 1672 "403": None, 1673 "404": None, 1674 "425": None, 1675 "429": None, 1676 } 1677 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1678 response_data.read() 1679 return self.api_client.response_deserialize( 1680 response_data=response_data, 1681 response_types_map=_response_types_map, 1682 ).data 1683 1684 def _enterprise_create_board_export_task_export_link_serialize( 1685 self, 1686 org_id, 1687 job_id, 1688 task_id, 1689 _request_auth, 1690 _content_type, 1691 _headers, 1692 _host_index, 1693 ) -> RequestSerialized: 1694 1695 _host = None 1696 1697 _collection_formats: Dict[str, str] = {} 1698 1699 _path_params: Dict[str, str] = {} 1700 _query_params: List[Tuple[str, str]] = [] 1701 _header_params: Dict[str, Optional[str]] = _headers or {} 1702 _form_params: List[Tuple[str, str]] = [] 1703 _files: Dict[str, str] = {} 1704 _body_params: Optional[bytes] = None 1705 1706 # process the path parameters 1707 if org_id is not None: 1708 _path_params["org_id"] = org_id 1709 if job_id is not None: 1710 _path_params["job_id"] = job_id 1711 if task_id is not None: 1712 _path_params["task_id"] = task_id 1713 # process the query parameters 1714 # process the header parameters 1715 # process the form parameters 1716 # process the body parameter 1717 1718 # set the HTTP header `Accept` 1719 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1720 1721 # authentication setting 1722 _auth_settings: List[str] = [] 1723 1724 return self.api_client.param_serialize( 1725 method="POST", 1726 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/tasks/{task_id}/export-link", 1727 path_params=_path_params, 1728 query_params=_query_params, 1729 header_params=_header_params, 1730 body=_body_params, 1731 post_params=_form_params, 1732 files=_files, 1733 auth_settings=_auth_settings, 1734 collection_formats=_collection_formats, 1735 _host=_host, 1736 _request_auth=_request_auth, 1737 ) 1738 1739 @validate_call 1740 def enterprise_update_board_export_job( 1741 self, 1742 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1743 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1744 enterprise_update_board_export_job_request: Optional[EnterpriseUpdateBoardExportJobRequest] = None, 1745 _request_timeout: Union[ 1746 None, 1747 Annotated[StrictFloat, Field(gt=0)], 1748 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1749 ] = None, 1750 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1751 _content_type: Optional[StrictStr] = None, 1752 _headers: Optional[Dict[StrictStr, Any]] = None, 1753 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1754 ) -> EnterpriseUpdateBoardExportJob200Response: 1755 """Update board export job status 1756 1757 Updates the status of the board export job.<br/>Currently, only the cancellation of an ongoing export job is supported.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1758 1759 :param org_id: Unique identifier of the organization. (required) 1760 :type org_id: str 1761 :param job_id: Unique identifier of the board export job. (required) 1762 :type job_id: str 1763 :param enterprise_update_board_export_job_request: 1764 :type enterprise_update_board_export_job_request: EnterpriseUpdateBoardExportJobRequest 1765 :param _request_timeout: timeout setting for this request. If one 1766 number provided, it will be total request 1767 timeout. It can also be a pair (tuple) of 1768 (connection, read) timeouts. 1769 :type _request_timeout: int, tuple(int, int), optional 1770 :param _request_auth: set to override the auth_settings for an a single 1771 request; this effectively ignores the 1772 authentication in the spec for a single request. 1773 :type _request_auth: dict, optional 1774 :param _content_type: force content-type for the request. 1775 :type _content_type: str, Optional 1776 :param _headers: set to override the headers for a single 1777 request; this effectively ignores the headers 1778 in the spec for a single request. 1779 :type _headers: dict, optional 1780 :param _host_index: set to override the host_index for a single 1781 request; this effectively ignores the host_index 1782 in the spec for a single request. 1783 :type _host_index: int, optional 1784 :return: Returns the result object. 1785 """ # noqa: E501 1786 1787 _param = self._enterprise_update_board_export_job_serialize( 1788 org_id=org_id, 1789 job_id=job_id, 1790 enterprise_update_board_export_job_request=enterprise_update_board_export_job_request, 1791 _request_auth=_request_auth, 1792 _content_type=_content_type, 1793 _headers=_headers, 1794 _host_index=_host_index, 1795 ) 1796 1797 _response_types_map: Dict[str, Optional[str]] = { 1798 "200": "EnterpriseUpdateBoardExportJob200Response", 1799 "400": None, 1800 "401": None, 1801 "403": None, 1802 "404": None, 1803 "429": None, 1804 } 1805 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1806 response_data.read() 1807 return self.api_client.response_deserialize( 1808 response_data=response_data, 1809 response_types_map=_response_types_map, 1810 ).data 1811 1812 def _enterprise_update_board_export_job_serialize( 1813 self, 1814 org_id, 1815 job_id, 1816 enterprise_update_board_export_job_request, 1817 _request_auth, 1818 _content_type, 1819 _headers, 1820 _host_index, 1821 ) -> RequestSerialized: 1822 1823 _host = None 1824 1825 _collection_formats: Dict[str, str] = {} 1826 1827 _path_params: Dict[str, str] = {} 1828 _query_params: List[Tuple[str, str]] = [] 1829 _header_params: Dict[str, Optional[str]] = _headers or {} 1830 _form_params: List[Tuple[str, str]] = [] 1831 _files: Dict[str, str] = {} 1832 _body_params: Optional[bytes] = None 1833 1834 # process the path parameters 1835 if org_id is not None: 1836 _path_params["org_id"] = org_id 1837 if job_id is not None: 1838 _path_params["job_id"] = job_id 1839 # process the query parameters 1840 # process the header parameters 1841 # process the form parameters 1842 # process the body parameter 1843 if enterprise_update_board_export_job_request is not None: 1844 _body_params = enterprise_update_board_export_job_request 1845 1846 # set the HTTP header `Accept` 1847 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1848 1849 # set the HTTP header `Content-Type` 1850 if _content_type: 1851 _header_params["Content-Type"] = _content_type 1852 else: 1853 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 1854 if _default_content_type is not None: 1855 _header_params["Content-Type"] = _default_content_type 1856 1857 # authentication setting 1858 _auth_settings: List[str] = [] 1859 1860 return self.api_client.param_serialize( 1861 method="PUT", 1862 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/status", 1863 path_params=_path_params, 1864 query_params=_query_params, 1865 header_params=_header_params, 1866 body=_body_params, 1867 post_params=_form_params, 1868 files=_files, 1869 auth_settings=_auth_settings, 1870 collection_formats=_collection_formats, 1871 _host=_host, 1872 _request_auth=_request_auth, 1873 ) 1874 1875 @validate_call 1876 def enterprise_dataclassification_board_get( 1877 self, 1878 org_id: Annotated[StrictStr, Field(description="id of the organization")], 1879 team_id: Annotated[StrictStr, Field(description="id of the team")], 1880 board_id: Annotated[StrictStr, Field(description="Unique identifier of the board that you want to retrieve.")], 1881 _request_timeout: Union[ 1882 None, 1883 Annotated[StrictFloat, Field(gt=0)], 1884 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1885 ] = None, 1886 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1887 _content_type: Optional[StrictStr] = None, 1888 _headers: Optional[Dict[StrictStr, Any]] = None, 1889 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1890 ) -> BoardDataClassificationLabel: 1891 """Get board classification 1892 1893 Retrieves board classification for a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1894 1895 :param org_id: id of the organization (required) 1896 :type org_id: str 1897 :param team_id: id of the team (required) 1898 :type team_id: str 1899 :param board_id: Unique identifier of the board that you want to retrieve. (required) 1900 :type board_id: str 1901 :param _request_timeout: timeout setting for this request. If one 1902 number provided, it will be total request 1903 timeout. It can also be a pair (tuple) of 1904 (connection, read) timeouts. 1905 :type _request_timeout: int, tuple(int, int), optional 1906 :param _request_auth: set to override the auth_settings for an a single 1907 request; this effectively ignores the 1908 authentication in the spec for a single request. 1909 :type _request_auth: dict, optional 1910 :param _content_type: force content-type for the request. 1911 :type _content_type: str, Optional 1912 :param _headers: set to override the headers for a single 1913 request; this effectively ignores the headers 1914 in the spec for a single request. 1915 :type _headers: dict, optional 1916 :param _host_index: set to override the host_index for a single 1917 request; this effectively ignores the host_index 1918 in the spec for a single request. 1919 :type _host_index: int, optional 1920 :return: Returns the result object. 1921 """ # noqa: E501 1922 1923 _param = self._enterprise_dataclassification_board_get_serialize( 1924 org_id=org_id, 1925 team_id=team_id, 1926 board_id=board_id, 1927 _request_auth=_request_auth, 1928 _content_type=_content_type, 1929 _headers=_headers, 1930 _host_index=_host_index, 1931 ) 1932 1933 _response_types_map: Dict[str, Optional[str]] = { 1934 "200": "BoardDataClassificationLabel", 1935 "400": None, 1936 "401": None, 1937 "403": None, 1938 "404": None, 1939 "429": None, 1940 } 1941 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1942 response_data.read() 1943 return self.api_client.response_deserialize( 1944 response_data=response_data, 1945 response_types_map=_response_types_map, 1946 ).data 1947 1948 def _enterprise_dataclassification_board_get_serialize( 1949 self, 1950 org_id, 1951 team_id, 1952 board_id, 1953 _request_auth, 1954 _content_type, 1955 _headers, 1956 _host_index, 1957 ) -> RequestSerialized: 1958 1959 _host = None 1960 1961 _collection_formats: Dict[str, str] = {} 1962 1963 _path_params: Dict[str, str] = {} 1964 _query_params: List[Tuple[str, str]] = [] 1965 _header_params: Dict[str, Optional[str]] = _headers or {} 1966 _form_params: List[Tuple[str, str]] = [] 1967 _files: Dict[str, str] = {} 1968 _body_params: Optional[bytes] = None 1969 1970 # process the path parameters 1971 if org_id is not None: 1972 _path_params["org_id"] = org_id 1973 if team_id is not None: 1974 _path_params["team_id"] = team_id 1975 if board_id is not None: 1976 _path_params["board_id"] = board_id 1977 # process the query parameters 1978 # process the header parameters 1979 # process the form parameters 1980 # process the body parameter 1981 1982 # set the HTTP header `Accept` 1983 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1984 1985 # authentication setting 1986 _auth_settings: List[str] = [] 1987 1988 return self.api_client.param_serialize( 1989 method="GET", 1990 resource_path="/v2/orgs/{org_id}/teams/{team_id}/boards/{board_id}/data-classification", 1991 path_params=_path_params, 1992 query_params=_query_params, 1993 header_params=_header_params, 1994 body=_body_params, 1995 post_params=_form_params, 1996 files=_files, 1997 auth_settings=_auth_settings, 1998 collection_formats=_collection_formats, 1999 _host=_host, 2000 _request_auth=_request_auth, 2001 ) 2002 2003 @validate_call 2004 def enterprise_dataclassification_board_set( 2005 self, 2006 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2007 team_id: Annotated[StrictStr, Field(description="id of the team")], 2008 board_id: Annotated[StrictStr, Field(description="Unique identifier of the board that you want to update.")], 2009 data_classification_label_id: DataClassificationLabelId, 2010 _request_timeout: Union[ 2011 None, 2012 Annotated[StrictFloat, Field(gt=0)], 2013 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2014 ] = None, 2015 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2016 _content_type: Optional[StrictStr] = None, 2017 _headers: Optional[Dict[StrictStr, Any]] = None, 2018 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2019 ) -> BoardDataClassificationLabel: 2020 """Update board classification 2021 2022 Updates board classification for an existing board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2023 2024 :param org_id: id of the organization (required) 2025 :type org_id: str 2026 :param team_id: id of the team (required) 2027 :type team_id: str 2028 :param board_id: Unique identifier of the board that you want to update. (required) 2029 :type board_id: str 2030 :param data_classification_label_id: (required) 2031 :type data_classification_label_id: DataClassificationLabelId 2032 :param _request_timeout: timeout setting for this request. If one 2033 number provided, it will be total request 2034 timeout. It can also be a pair (tuple) of 2035 (connection, read) timeouts. 2036 :type _request_timeout: int, tuple(int, int), optional 2037 :param _request_auth: set to override the auth_settings for an a single 2038 request; this effectively ignores the 2039 authentication in the spec for a single request. 2040 :type _request_auth: dict, optional 2041 :param _content_type: force content-type for the request. 2042 :type _content_type: str, Optional 2043 :param _headers: set to override the headers for a single 2044 request; this effectively ignores the headers 2045 in the spec for a single request. 2046 :type _headers: dict, optional 2047 :param _host_index: set to override the host_index for a single 2048 request; this effectively ignores the host_index 2049 in the spec for a single request. 2050 :type _host_index: int, optional 2051 :return: Returns the result object. 2052 """ # noqa: E501 2053 2054 _param = self._enterprise_dataclassification_board_set_serialize( 2055 org_id=org_id, 2056 team_id=team_id, 2057 board_id=board_id, 2058 data_classification_label_id=data_classification_label_id, 2059 _request_auth=_request_auth, 2060 _content_type=_content_type, 2061 _headers=_headers, 2062 _host_index=_host_index, 2063 ) 2064 2065 _response_types_map: Dict[str, Optional[str]] = { 2066 "200": "BoardDataClassificationLabel", 2067 "400": None, 2068 "401": None, 2069 "403": None, 2070 "404": None, 2071 "429": None, 2072 } 2073 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2074 response_data.read() 2075 return self.api_client.response_deserialize( 2076 response_data=response_data, 2077 response_types_map=_response_types_map, 2078 ).data 2079 2080 def _enterprise_dataclassification_board_set_serialize( 2081 self, 2082 org_id, 2083 team_id, 2084 board_id, 2085 data_classification_label_id, 2086 _request_auth, 2087 _content_type, 2088 _headers, 2089 _host_index, 2090 ) -> RequestSerialized: 2091 2092 _host = None 2093 2094 _collection_formats: Dict[str, str] = {} 2095 2096 _path_params: Dict[str, str] = {} 2097 _query_params: List[Tuple[str, str]] = [] 2098 _header_params: Dict[str, Optional[str]] = _headers or {} 2099 _form_params: List[Tuple[str, str]] = [] 2100 _files: Dict[str, str] = {} 2101 _body_params: Optional[bytes] = None 2102 2103 # process the path parameters 2104 if org_id is not None: 2105 _path_params["org_id"] = org_id 2106 if team_id is not None: 2107 _path_params["team_id"] = team_id 2108 if board_id is not None: 2109 _path_params["board_id"] = board_id 2110 # process the query parameters 2111 # process the header parameters 2112 # process the form parameters 2113 # process the body parameter 2114 if data_classification_label_id is not None: 2115 _body_params = data_classification_label_id 2116 2117 # set the HTTP header `Accept` 2118 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2119 2120 # set the HTTP header `Content-Type` 2121 if _content_type: 2122 _header_params["Content-Type"] = _content_type 2123 else: 2124 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2125 if _default_content_type is not None: 2126 _header_params["Content-Type"] = _default_content_type 2127 2128 # authentication setting 2129 _auth_settings: List[str] = [] 2130 2131 return self.api_client.param_serialize( 2132 method="POST", 2133 resource_path="/v2/orgs/{org_id}/teams/{team_id}/boards/{board_id}/data-classification", 2134 path_params=_path_params, 2135 query_params=_query_params, 2136 header_params=_header_params, 2137 body=_body_params, 2138 post_params=_form_params, 2139 files=_files, 2140 auth_settings=_auth_settings, 2141 collection_formats=_collection_formats, 2142 _host=_host, 2143 _request_auth=_request_auth, 2144 ) 2145 2146 @validate_call 2147 def enterprise_dataclassification_organization_settings_get( 2148 self, 2149 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2150 _request_timeout: Union[ 2151 None, 2152 Annotated[StrictFloat, Field(gt=0)], 2153 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2154 ] = None, 2155 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2156 _content_type: Optional[StrictStr] = None, 2157 _headers: Optional[Dict[StrictStr, Any]] = None, 2158 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2159 ) -> DataClassificationOrganizationSettings: 2160 """Get organization settings 2161 2162 Retrieves board classification settings for an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2163 2164 :param org_id: id of the organization (required) 2165 :type org_id: str 2166 :param _request_timeout: timeout setting for this request. If one 2167 number provided, it will be total request 2168 timeout. It can also be a pair (tuple) of 2169 (connection, read) timeouts. 2170 :type _request_timeout: int, tuple(int, int), optional 2171 :param _request_auth: set to override the auth_settings for an a single 2172 request; this effectively ignores the 2173 authentication in the spec for a single request. 2174 :type _request_auth: dict, optional 2175 :param _content_type: force content-type for the request. 2176 :type _content_type: str, Optional 2177 :param _headers: set to override the headers for a single 2178 request; this effectively ignores the headers 2179 in the spec for a single request. 2180 :type _headers: dict, optional 2181 :param _host_index: set to override the host_index for a single 2182 request; this effectively ignores the host_index 2183 in the spec for a single request. 2184 :type _host_index: int, optional 2185 :return: Returns the result object. 2186 """ # noqa: E501 2187 2188 _param = self._enterprise_dataclassification_organization_settings_get_serialize( 2189 org_id=org_id, 2190 _request_auth=_request_auth, 2191 _content_type=_content_type, 2192 _headers=_headers, 2193 _host_index=_host_index, 2194 ) 2195 2196 _response_types_map: Dict[str, Optional[str]] = { 2197 "200": "DataClassificationOrganizationSettings", 2198 "400": None, 2199 "401": None, 2200 "403": None, 2201 "404": None, 2202 "429": None, 2203 } 2204 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2205 response_data.read() 2206 return self.api_client.response_deserialize( 2207 response_data=response_data, 2208 response_types_map=_response_types_map, 2209 ).data 2210 2211 def _enterprise_dataclassification_organization_settings_get_serialize( 2212 self, 2213 org_id, 2214 _request_auth, 2215 _content_type, 2216 _headers, 2217 _host_index, 2218 ) -> RequestSerialized: 2219 2220 _host = None 2221 2222 _collection_formats: Dict[str, str] = {} 2223 2224 _path_params: Dict[str, str] = {} 2225 _query_params: List[Tuple[str, str]] = [] 2226 _header_params: Dict[str, Optional[str]] = _headers or {} 2227 _form_params: List[Tuple[str, str]] = [] 2228 _files: Dict[str, str] = {} 2229 _body_params: Optional[bytes] = None 2230 2231 # process the path parameters 2232 if org_id is not None: 2233 _path_params["org_id"] = org_id 2234 # process the query parameters 2235 # process the header parameters 2236 # process the form parameters 2237 # process the body parameter 2238 2239 # set the HTTP header `Accept` 2240 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2241 2242 # authentication setting 2243 _auth_settings: List[str] = [] 2244 2245 return self.api_client.param_serialize( 2246 method="GET", 2247 resource_path="/v2/orgs/{org_id}/data-classification-settings", 2248 path_params=_path_params, 2249 query_params=_query_params, 2250 header_params=_header_params, 2251 body=_body_params, 2252 post_params=_form_params, 2253 files=_files, 2254 auth_settings=_auth_settings, 2255 collection_formats=_collection_formats, 2256 _host=_host, 2257 _request_auth=_request_auth, 2258 ) 2259 2260 @validate_call 2261 def enterprise_dataclassification_team_boards_bulk( 2262 self, 2263 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2264 team_id: Annotated[StrictStr, Field(description="id of the team")], 2265 update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest, 2266 _request_timeout: Union[ 2267 None, 2268 Annotated[StrictFloat, Field(gt=0)], 2269 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2270 ] = None, 2271 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2272 _content_type: Optional[StrictStr] = None, 2273 _headers: Optional[Dict[StrictStr, Any]] = None, 2274 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2275 ) -> UpdateBoardsDataClassificationLabel: 2276 """Bulk update boards classification 2277 2278 Updates board classification for not-classified only or all boards in an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2279 2280 :param org_id: id of the organization (required) 2281 :type org_id: str 2282 :param team_id: id of the team (required) 2283 :type team_id: str 2284 :param update_boards_data_classification_label_request: (required) 2285 :type update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest 2286 :param _request_timeout: timeout setting for this request. If one 2287 number provided, it will be total request 2288 timeout. It can also be a pair (tuple) of 2289 (connection, read) timeouts. 2290 :type _request_timeout: int, tuple(int, int), optional 2291 :param _request_auth: set to override the auth_settings for an a single 2292 request; this effectively ignores the 2293 authentication in the spec for a single request. 2294 :type _request_auth: dict, optional 2295 :param _content_type: force content-type for the request. 2296 :type _content_type: str, Optional 2297 :param _headers: set to override the headers for a single 2298 request; this effectively ignores the headers 2299 in the spec for a single request. 2300 :type _headers: dict, optional 2301 :param _host_index: set to override the host_index for a single 2302 request; this effectively ignores the host_index 2303 in the spec for a single request. 2304 :type _host_index: int, optional 2305 :return: Returns the result object. 2306 """ # noqa: E501 2307 2308 _param = self._enterprise_dataclassification_team_boards_bulk_serialize( 2309 org_id=org_id, 2310 team_id=team_id, 2311 update_boards_data_classification_label_request=update_boards_data_classification_label_request, 2312 _request_auth=_request_auth, 2313 _content_type=_content_type, 2314 _headers=_headers, 2315 _host_index=_host_index, 2316 ) 2317 2318 _response_types_map: Dict[str, Optional[str]] = { 2319 "200": "UpdateBoardsDataClassificationLabel", 2320 "400": None, 2321 "401": None, 2322 "403": None, 2323 "404": None, 2324 "429": None, 2325 } 2326 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2327 response_data.read() 2328 return self.api_client.response_deserialize( 2329 response_data=response_data, 2330 response_types_map=_response_types_map, 2331 ).data 2332 2333 def _enterprise_dataclassification_team_boards_bulk_serialize( 2334 self, 2335 org_id, 2336 team_id, 2337 update_boards_data_classification_label_request, 2338 _request_auth, 2339 _content_type, 2340 _headers, 2341 _host_index, 2342 ) -> RequestSerialized: 2343 2344 _host = None 2345 2346 _collection_formats: Dict[str, str] = {} 2347 2348 _path_params: Dict[str, str] = {} 2349 _query_params: List[Tuple[str, str]] = [] 2350 _header_params: Dict[str, Optional[str]] = _headers or {} 2351 _form_params: List[Tuple[str, str]] = [] 2352 _files: Dict[str, str] = {} 2353 _body_params: Optional[bytes] = None 2354 2355 # process the path parameters 2356 if org_id is not None: 2357 _path_params["org_id"] = org_id 2358 if team_id is not None: 2359 _path_params["team_id"] = team_id 2360 # process the query parameters 2361 # process the header parameters 2362 # process the form parameters 2363 # process the body parameter 2364 if update_boards_data_classification_label_request is not None: 2365 _body_params = update_boards_data_classification_label_request 2366 2367 # set the HTTP header `Accept` 2368 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2369 2370 # set the HTTP header `Content-Type` 2371 if _content_type: 2372 _header_params["Content-Type"] = _content_type 2373 else: 2374 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2375 if _default_content_type is not None: 2376 _header_params["Content-Type"] = _default_content_type 2377 2378 # authentication setting 2379 _auth_settings: List[str] = [] 2380 2381 return self.api_client.param_serialize( 2382 method="PATCH", 2383 resource_path="/v2/orgs/{org_id}/teams/{team_id}/data-classification", 2384 path_params=_path_params, 2385 query_params=_query_params, 2386 header_params=_header_params, 2387 body=_body_params, 2388 post_params=_form_params, 2389 files=_files, 2390 auth_settings=_auth_settings, 2391 collection_formats=_collection_formats, 2392 _host=_host, 2393 _request_auth=_request_auth, 2394 ) 2395 2396 @validate_call 2397 def enterprise_dataclassification_team_settings_get( 2398 self, 2399 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2400 team_id: Annotated[StrictStr, Field(description="id of the team")], 2401 _request_timeout: Union[ 2402 None, 2403 Annotated[StrictFloat, Field(gt=0)], 2404 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2405 ] = None, 2406 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2407 _content_type: Optional[StrictStr] = None, 2408 _headers: Optional[Dict[StrictStr, Any]] = None, 2409 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2410 ) -> DataClassificationTeamSettings: 2411 """Get team settings 2412 2413 Retrieves board classification settings for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2414 2415 :param org_id: id of the organization (required) 2416 :type org_id: str 2417 :param team_id: id of the team (required) 2418 :type team_id: str 2419 :param _request_timeout: timeout setting for this request. If one 2420 number provided, it will be total request 2421 timeout. It can also be a pair (tuple) of 2422 (connection, read) timeouts. 2423 :type _request_timeout: int, tuple(int, int), optional 2424 :param _request_auth: set to override the auth_settings for an a single 2425 request; this effectively ignores the 2426 authentication in the spec for a single request. 2427 :type _request_auth: dict, optional 2428 :param _content_type: force content-type for the request. 2429 :type _content_type: str, Optional 2430 :param _headers: set to override the headers for a single 2431 request; this effectively ignores the headers 2432 in the spec for a single request. 2433 :type _headers: dict, optional 2434 :param _host_index: set to override the host_index for a single 2435 request; this effectively ignores the host_index 2436 in the spec for a single request. 2437 :type _host_index: int, optional 2438 :return: Returns the result object. 2439 """ # noqa: E501 2440 2441 _param = self._enterprise_dataclassification_team_settings_get_serialize( 2442 org_id=org_id, 2443 team_id=team_id, 2444 _request_auth=_request_auth, 2445 _content_type=_content_type, 2446 _headers=_headers, 2447 _host_index=_host_index, 2448 ) 2449 2450 _response_types_map: Dict[str, Optional[str]] = { 2451 "200": "DataClassificationTeamSettings", 2452 "400": None, 2453 "401": None, 2454 "403": None, 2455 "404": None, 2456 "429": None, 2457 } 2458 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2459 response_data.read() 2460 return self.api_client.response_deserialize( 2461 response_data=response_data, 2462 response_types_map=_response_types_map, 2463 ).data 2464 2465 def _enterprise_dataclassification_team_settings_get_serialize( 2466 self, 2467 org_id, 2468 team_id, 2469 _request_auth, 2470 _content_type, 2471 _headers, 2472 _host_index, 2473 ) -> RequestSerialized: 2474 2475 _host = None 2476 2477 _collection_formats: Dict[str, str] = {} 2478 2479 _path_params: Dict[str, str] = {} 2480 _query_params: List[Tuple[str, str]] = [] 2481 _header_params: Dict[str, Optional[str]] = _headers or {} 2482 _form_params: List[Tuple[str, str]] = [] 2483 _files: Dict[str, str] = {} 2484 _body_params: Optional[bytes] = None 2485 2486 # process the path parameters 2487 if org_id is not None: 2488 _path_params["org_id"] = org_id 2489 if team_id is not None: 2490 _path_params["team_id"] = team_id 2491 # process the query parameters 2492 # process the header parameters 2493 # process the form parameters 2494 # process the body parameter 2495 2496 # set the HTTP header `Accept` 2497 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2498 2499 # authentication setting 2500 _auth_settings: List[str] = [] 2501 2502 return self.api_client.param_serialize( 2503 method="GET", 2504 resource_path="/v2/orgs/{org_id}/teams/{team_id}/data-classification-settings", 2505 path_params=_path_params, 2506 query_params=_query_params, 2507 header_params=_header_params, 2508 body=_body_params, 2509 post_params=_form_params, 2510 files=_files, 2511 auth_settings=_auth_settings, 2512 collection_formats=_collection_formats, 2513 _host=_host, 2514 _request_auth=_request_auth, 2515 ) 2516 2517 @validate_call 2518 def enterprise_dataclassification_team_settings_set( 2519 self, 2520 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2521 team_id: Annotated[StrictStr, Field(description="id of the team")], 2522 update_team_settings_request: UpdateTeamSettingsRequest, 2523 _request_timeout: Union[ 2524 None, 2525 Annotated[StrictFloat, Field(gt=0)], 2526 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2527 ] = None, 2528 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2529 _content_type: Optional[StrictStr] = None, 2530 _headers: Optional[Dict[StrictStr, Any]] = None, 2531 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2532 ) -> DataClassificationTeamSettings: 2533 """Update team settings 2534 2535 Updates board classification settings for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2536 2537 :param org_id: id of the organization (required) 2538 :type org_id: str 2539 :param team_id: id of the team (required) 2540 :type team_id: str 2541 :param update_team_settings_request: (required) 2542 :type update_team_settings_request: UpdateTeamSettingsRequest 2543 :param _request_timeout: timeout setting for this request. If one 2544 number provided, it will be total request 2545 timeout. It can also be a pair (tuple) of 2546 (connection, read) timeouts. 2547 :type _request_timeout: int, tuple(int, int), optional 2548 :param _request_auth: set to override the auth_settings for an a single 2549 request; this effectively ignores the 2550 authentication in the spec for a single request. 2551 :type _request_auth: dict, optional 2552 :param _content_type: force content-type for the request. 2553 :type _content_type: str, Optional 2554 :param _headers: set to override the headers for a single 2555 request; this effectively ignores the headers 2556 in the spec for a single request. 2557 :type _headers: dict, optional 2558 :param _host_index: set to override the host_index for a single 2559 request; this effectively ignores the host_index 2560 in the spec for a single request. 2561 :type _host_index: int, optional 2562 :return: Returns the result object. 2563 """ # noqa: E501 2564 2565 _param = self._enterprise_dataclassification_team_settings_set_serialize( 2566 org_id=org_id, 2567 team_id=team_id, 2568 update_team_settings_request=update_team_settings_request, 2569 _request_auth=_request_auth, 2570 _content_type=_content_type, 2571 _headers=_headers, 2572 _host_index=_host_index, 2573 ) 2574 2575 _response_types_map: Dict[str, Optional[str]] = { 2576 "200": "DataClassificationTeamSettings", 2577 "400": None, 2578 "401": None, 2579 "403": None, 2580 "404": None, 2581 "429": None, 2582 } 2583 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2584 response_data.read() 2585 return self.api_client.response_deserialize( 2586 response_data=response_data, 2587 response_types_map=_response_types_map, 2588 ).data 2589 2590 def _enterprise_dataclassification_team_settings_set_serialize( 2591 self, 2592 org_id, 2593 team_id, 2594 update_team_settings_request, 2595 _request_auth, 2596 _content_type, 2597 _headers, 2598 _host_index, 2599 ) -> RequestSerialized: 2600 2601 _host = None 2602 2603 _collection_formats: Dict[str, str] = {} 2604 2605 _path_params: Dict[str, str] = {} 2606 _query_params: List[Tuple[str, str]] = [] 2607 _header_params: Dict[str, Optional[str]] = _headers or {} 2608 _form_params: List[Tuple[str, str]] = [] 2609 _files: Dict[str, str] = {} 2610 _body_params: Optional[bytes] = None 2611 2612 # process the path parameters 2613 if org_id is not None: 2614 _path_params["org_id"] = org_id 2615 if team_id is not None: 2616 _path_params["team_id"] = team_id 2617 # process the query parameters 2618 # process the header parameters 2619 # process the form parameters 2620 # process the body parameter 2621 if update_team_settings_request is not None: 2622 _body_params = update_team_settings_request 2623 2624 # set the HTTP header `Accept` 2625 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2626 2627 # set the HTTP header `Content-Type` 2628 if _content_type: 2629 _header_params["Content-Type"] = _content_type 2630 else: 2631 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2632 if _default_content_type is not None: 2633 _header_params["Content-Type"] = _default_content_type 2634 2635 # authentication setting 2636 _auth_settings: List[str] = [] 2637 2638 return self.api_client.param_serialize( 2639 method="PATCH", 2640 resource_path="/v2/orgs/{org_id}/teams/{team_id}/data-classification-settings", 2641 path_params=_path_params, 2642 query_params=_query_params, 2643 header_params=_header_params, 2644 body=_body_params, 2645 post_params=_form_params, 2646 files=_files, 2647 auth_settings=_auth_settings, 2648 collection_formats=_collection_formats, 2649 _host=_host, 2650 _request_auth=_request_auth, 2651 ) 2652 2653 @validate_call 2654 def create_items( 2655 self, 2656 board_id: Annotated[ 2657 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 2658 ], 2659 item_create: Annotated[List[ItemCreate], Field(min_length=1, max_length=20)], 2660 _request_timeout: Union[ 2661 None, 2662 Annotated[StrictFloat, Field(gt=0)], 2663 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2664 ] = None, 2665 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2666 _content_type: Optional[StrictStr] = None, 2667 _headers: Optional[Dict[StrictStr, Any]] = None, 2668 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2669 ) -> Items: 2670 """Create items in bulk 2671 2672 Adds different types of items to a board. You can add up to 20 items of the same or different type per create call. For example, you can create 3 shape items, 4 card items, and 5 sticky notes in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. <br/><br>To try out this API in our documentation:<br/><br>1. In the **BODY PARAMS** section, scroll down until you see **ADD OBJECT** (Figure 1).<br><br><img alt=“add src=\"https://files.readme.io/570dac1-small-add_object.png\"><br>Figure 1. Add object user interface in readme<br><br>2. Click **ADD OBJECT**, and then select or enter the appropriate values for parameters of the item that you want to add.<br><br>3. Repeat steps 1 and 2 for each item that you want to add.<br> <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item. For example, if you want to create one sticky note, one card, and one shape item in one call, the rate limiting applicable will be 300 credits. This is because create item calls take Level 2 rate limiting of 100 credits each, 100 for sticky note, 100 for card, and 100 for shape item. 2673 2674 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 2675 :type board_id: str 2676 :param item_create: (required) 2677 :type item_create: List[ItemCreate] 2678 :param _request_timeout: timeout setting for this request. If one 2679 number provided, it will be total request 2680 timeout. It can also be a pair (tuple) of 2681 (connection, read) timeouts. 2682 :type _request_timeout: int, tuple(int, int), optional 2683 :param _request_auth: set to override the auth_settings for an a single 2684 request; this effectively ignores the 2685 authentication in the spec for a single request. 2686 :type _request_auth: dict, optional 2687 :param _content_type: force content-type for the request. 2688 :type _content_type: str, Optional 2689 :param _headers: set to override the headers for a single 2690 request; this effectively ignores the headers 2691 in the spec for a single request. 2692 :type _headers: dict, optional 2693 :param _host_index: set to override the host_index for a single 2694 request; this effectively ignores the host_index 2695 in the spec for a single request. 2696 :type _host_index: int, optional 2697 :return: Returns the result object. 2698 """ # noqa: E501 2699 2700 _param = self._create_items_serialize( 2701 board_id=board_id, 2702 item_create=item_create, 2703 _request_auth=_request_auth, 2704 _content_type=_content_type, 2705 _headers=_headers, 2706 _host_index=_host_index, 2707 ) 2708 2709 _response_types_map: Dict[str, Optional[str]] = { 2710 "201": "Items", 2711 "400": "BulkOperationError", 2712 "429": "Error", 2713 } 2714 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2715 response_data.read() 2716 return self.api_client.response_deserialize( 2717 response_data=response_data, 2718 response_types_map=_response_types_map, 2719 ).data 2720 2721 def _create_items_serialize( 2722 self, 2723 board_id, 2724 item_create, 2725 _request_auth, 2726 _content_type, 2727 _headers, 2728 _host_index, 2729 ) -> RequestSerialized: 2730 2731 _host = None 2732 2733 _collection_formats: Dict[str, str] = { 2734 "ItemCreate": "", 2735 } 2736 2737 _path_params: Dict[str, str] = {} 2738 _query_params: List[Tuple[str, str]] = [] 2739 _header_params: Dict[str, Optional[str]] = _headers or {} 2740 _form_params: List[Tuple[str, str]] = [] 2741 _files: Dict[str, str] = {} 2742 _body_params: Optional[bytes] = None 2743 2744 # process the path parameters 2745 if board_id is not None: 2746 _path_params["board_id"] = board_id 2747 # process the query parameters 2748 # process the header parameters 2749 # process the form parameters 2750 # process the body parameter 2751 if item_create is not None: 2752 _body_params = item_create 2753 2754 # set the HTTP header `Accept` 2755 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2756 2757 # set the HTTP header `Content-Type` 2758 if _content_type: 2759 _header_params["Content-Type"] = _content_type 2760 else: 2761 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2762 if _default_content_type is not None: 2763 _header_params["Content-Type"] = _default_content_type 2764 2765 # authentication setting 2766 _auth_settings: List[str] = [] 2767 2768 return self.api_client.param_serialize( 2769 method="POST", 2770 resource_path="/v2/boards/{board_id}/items/bulk", 2771 path_params=_path_params, 2772 query_params=_query_params, 2773 header_params=_header_params, 2774 body=_body_params, 2775 post_params=_form_params, 2776 files=_files, 2777 auth_settings=_auth_settings, 2778 collection_formats=_collection_formats, 2779 _host=_host, 2780 _request_auth=_request_auth, 2781 ) 2782 2783 @validate_call 2784 def create_items_in_bulk_using_file_from_device( 2785 self, 2786 board_id: Annotated[ 2787 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 2788 ], 2789 data: Annotated[ 2790 Union[StrictBytes, StrictStr], 2791 Field( 2792 description="JSON file containing bulk data, where each object represents an item to be created. For details, see [JSON file example](https://developers.miro.com/reference/json-data-example)." 2793 ), 2794 ], 2795 resources: Annotated[ 2796 List[Union[StrictBytes, StrictStr]], 2797 Field(description="Array of items to create (PDFs, images, etc.). Maximum of 20 items."), 2798 ], 2799 _request_timeout: Union[ 2800 None, 2801 Annotated[StrictFloat, Field(gt=0)], 2802 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2803 ] = None, 2804 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2805 _content_type: Optional[StrictStr] = None, 2806 _headers: Optional[Dict[StrictStr, Any]] = None, 2807 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2808 ) -> Items: 2809 """Create items in bulk using file from device 2810 2811 Adds different types of items to a board using files from a device. You can add up to 20 items of the same or different type per create call. For example, you can create 5 document items and 5 images in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. To try out this API in our documentation: 1. In the **BODY PARAMS** section, select **ADD FILE**, and then upload a local file. Repeat for each item that you want to add. 2. Upload a JSON file that contains the bulk data for the items you want to create. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item<br/> 2812 2813 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 2814 :type board_id: str 2815 :param data: JSON file containing bulk data, where each object represents an item to be created. For details, see [JSON file example](https://developers.miro.com/reference/json-data-example). (required) 2816 :type data: bytearray 2817 :param resources: Array of items to create (PDFs, images, etc.). Maximum of 20 items. (required) 2818 :type resources: List[bytearray] 2819 :param _request_timeout: timeout setting for this request. If one 2820 number provided, it will be total request 2821 timeout. It can also be a pair (tuple) of 2822 (connection, read) timeouts. 2823 :type _request_timeout: int, tuple(int, int), optional 2824 :param _request_auth: set to override the auth_settings for an a single 2825 request; this effectively ignores the 2826 authentication in the spec for a single request. 2827 :type _request_auth: dict, optional 2828 :param _content_type: force content-type for the request. 2829 :type _content_type: str, Optional 2830 :param _headers: set to override the headers for a single 2831 request; this effectively ignores the headers 2832 in the spec for a single request. 2833 :type _headers: dict, optional 2834 :param _host_index: set to override the host_index for a single 2835 request; this effectively ignores the host_index 2836 in the spec for a single request. 2837 :type _host_index: int, optional 2838 :return: Returns the result object. 2839 """ # noqa: E501 2840 2841 _param = self._create_items_in_bulk_using_file_from_device_serialize( 2842 board_id=board_id, 2843 data=data, 2844 resources=resources, 2845 _request_auth=_request_auth, 2846 _content_type=_content_type, 2847 _headers=_headers, 2848 _host_index=_host_index, 2849 ) 2850 2851 _response_types_map: Dict[str, Optional[str]] = { 2852 "201": "Items", 2853 } 2854 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2855 response_data.read() 2856 return self.api_client.response_deserialize( 2857 response_data=response_data, 2858 response_types_map=_response_types_map, 2859 ).data 2860 2861 def _create_items_in_bulk_using_file_from_device_serialize( 2862 self, 2863 board_id, 2864 data, 2865 resources, 2866 _request_auth, 2867 _content_type, 2868 _headers, 2869 _host_index, 2870 ) -> RequestSerialized: 2871 2872 _host = None 2873 2874 _collection_formats: Dict[str, str] = { 2875 "resources": "csv", 2876 } 2877 2878 _path_params: Dict[str, str] = {} 2879 _query_params: List[Tuple[str, str]] = [] 2880 _header_params: Dict[str, Optional[str]] = _headers or {} 2881 _form_params: List[Tuple[str, str]] = [] 2882 _files: Dict[str, str] = {} 2883 _body_params: Optional[bytes] = None 2884 2885 # process the path parameters 2886 if board_id is not None: 2887 _path_params["board_id"] = board_id 2888 # process the query parameters 2889 # process the header parameters 2890 # process the form parameters 2891 if data is not None: 2892 _files["data"] = data 2893 if resources is not None: 2894 _files["resources"] = resources 2895 # process the body parameter 2896 2897 # set the HTTP header `Accept` 2898 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2899 2900 # set the HTTP header `Content-Type` 2901 if _content_type: 2902 _header_params["Content-Type"] = _content_type 2903 else: 2904 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 2905 if _default_content_type is not None: 2906 _header_params["Content-Type"] = _default_content_type 2907 2908 # authentication setting 2909 _auth_settings: List[str] = [] 2910 2911 return self.api_client.param_serialize( 2912 method="POST", 2913 resource_path="/v2/boards/{board_id_Platformcreateitemsinbulkusingfilefromdevice}/items/bulk", 2914 path_params=_path_params, 2915 query_params=_query_params, 2916 header_params=_header_params, 2917 body=_body_params, 2918 post_params=_form_params, 2919 files=_files, 2920 auth_settings=_auth_settings, 2921 collection_formats=_collection_formats, 2922 _host=_host, 2923 _request_auth=_request_auth, 2924 ) 2925 2926 @validate_call 2927 def get_resource_type( 2928 self, 2929 resource: StrictStr, 2930 _request_timeout: Union[ 2931 None, 2932 Annotated[StrictFloat, Field(gt=0)], 2933 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2934 ] = None, 2935 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2936 _content_type: Optional[StrictStr] = None, 2937 _headers: Optional[Dict[StrictStr, Any]] = None, 2938 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2939 ) -> ResourceType: 2940 """Get resource type 2941 2942 Retrieve metadata for the available resource types (User and Group) that are supported. 2943 2944 :param resource: (required) 2945 :type resource: str 2946 :param _request_timeout: timeout setting for this request. If one 2947 number provided, it will be total request 2948 timeout. It can also be a pair (tuple) of 2949 (connection, read) timeouts. 2950 :type _request_timeout: int, tuple(int, int), optional 2951 :param _request_auth: set to override the auth_settings for an a single 2952 request; this effectively ignores the 2953 authentication in the spec for a single request. 2954 :type _request_auth: dict, optional 2955 :param _content_type: force content-type for the request. 2956 :type _content_type: str, Optional 2957 :param _headers: set to override the headers for a single 2958 request; this effectively ignores the headers 2959 in the spec for a single request. 2960 :type _headers: dict, optional 2961 :param _host_index: set to override the host_index for a single 2962 request; this effectively ignores the host_index 2963 in the spec for a single request. 2964 :type _host_index: int, optional 2965 :return: Returns the result object. 2966 """ # noqa: E501 2967 2968 _param = self._get_resource_type_serialize( 2969 resource=resource, 2970 _request_auth=_request_auth, 2971 _content_type=_content_type, 2972 _headers=_headers, 2973 _host_index=_host_index, 2974 ) 2975 2976 _response_types_map: Dict[str, Optional[str]] = { 2977 "200": "ResourceType", 2978 "400": None, 2979 "401": None, 2980 "403": None, 2981 "404": None, 2982 "500": None, 2983 } 2984 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2985 response_data.read() 2986 return self.api_client.response_deserialize( 2987 response_data=response_data, 2988 response_types_map=_response_types_map, 2989 ).data 2990 2991 def _get_resource_type_serialize( 2992 self, 2993 resource, 2994 _request_auth, 2995 _content_type, 2996 _headers, 2997 _host_index, 2998 ) -> RequestSerialized: 2999 3000 _host = None 3001 3002 _collection_formats: Dict[str, str] = {} 3003 3004 _path_params: Dict[str, str] = {} 3005 _query_params: List[Tuple[str, str]] = [] 3006 _header_params: Dict[str, Optional[str]] = _headers or {} 3007 _form_params: List[Tuple[str, str]] = [] 3008 _files: Dict[str, str] = {} 3009 _body_params: Optional[bytes] = None 3010 3011 # process the path parameters 3012 if resource is not None: 3013 _path_params["resource"] = resource 3014 # process the query parameters 3015 # process the header parameters 3016 # process the form parameters 3017 # process the body parameter 3018 3019 # set the HTTP header `Accept` 3020 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3021 3022 # authentication setting 3023 _auth_settings: List[str] = [] 3024 3025 return self.api_client.param_serialize( 3026 method="GET", 3027 resource_path="/ResourceTypes/{resource}", 3028 path_params=_path_params, 3029 query_params=_query_params, 3030 header_params=_header_params, 3031 body=_body_params, 3032 post_params=_form_params, 3033 files=_files, 3034 auth_settings=_auth_settings, 3035 collection_formats=_collection_formats, 3036 _host=_host, 3037 _request_auth=_request_auth, 3038 ) 3039 3040 @validate_call 3041 def get_schema( 3042 self, 3043 uri: Annotated[StrictStr, Field(description="Schema URI of a particular resource type.")], 3044 _request_timeout: Union[ 3045 None, 3046 Annotated[StrictFloat, Field(gt=0)], 3047 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3048 ] = None, 3049 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3050 _content_type: Optional[StrictStr] = None, 3051 _headers: Optional[Dict[StrictStr, Any]] = None, 3052 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3053 ) -> SchemaResource: 3054 """Get schema 3055 3056 Retrieve information about how users, groups, and enterprise-user attributes URIs that are formatted. 3057 3058 :param uri: Schema URI of a particular resource type. (required) 3059 :type uri: str 3060 :param _request_timeout: timeout setting for this request. If one 3061 number provided, it will be total request 3062 timeout. It can also be a pair (tuple) of 3063 (connection, read) timeouts. 3064 :type _request_timeout: int, tuple(int, int), optional 3065 :param _request_auth: set to override the auth_settings for an a single 3066 request; this effectively ignores the 3067 authentication in the spec for a single request. 3068 :type _request_auth: dict, optional 3069 :param _content_type: force content-type for the request. 3070 :type _content_type: str, Optional 3071 :param _headers: set to override the headers for a single 3072 request; this effectively ignores the headers 3073 in the spec for a single request. 3074 :type _headers: dict, optional 3075 :param _host_index: set to override the host_index for a single 3076 request; this effectively ignores the host_index 3077 in the spec for a single request. 3078 :type _host_index: int, optional 3079 :return: Returns the result object. 3080 """ # noqa: E501 3081 3082 _param = self._get_schema_serialize( 3083 uri=uri, 3084 _request_auth=_request_auth, 3085 _content_type=_content_type, 3086 _headers=_headers, 3087 _host_index=_host_index, 3088 ) 3089 3090 _response_types_map: Dict[str, Optional[str]] = { 3091 "200": "SchemaResource", 3092 "400": None, 3093 "401": None, 3094 "403": None, 3095 "404": None, 3096 "500": None, 3097 } 3098 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3099 response_data.read() 3100 return self.api_client.response_deserialize( 3101 response_data=response_data, 3102 response_types_map=_response_types_map, 3103 ).data 3104 3105 def _get_schema_serialize( 3106 self, 3107 uri, 3108 _request_auth, 3109 _content_type, 3110 _headers, 3111 _host_index, 3112 ) -> RequestSerialized: 3113 3114 _host = None 3115 3116 _collection_formats: Dict[str, str] = {} 3117 3118 _path_params: Dict[str, str] = {} 3119 _query_params: List[Tuple[str, str]] = [] 3120 _header_params: Dict[str, Optional[str]] = _headers or {} 3121 _form_params: List[Tuple[str, str]] = [] 3122 _files: Dict[str, str] = {} 3123 _body_params: Optional[bytes] = None 3124 3125 # process the path parameters 3126 if uri is not None: 3127 _path_params["uri"] = uri 3128 # process the query parameters 3129 # process the header parameters 3130 # process the form parameters 3131 # process the body parameter 3132 3133 # set the HTTP header `Accept` 3134 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3135 3136 # authentication setting 3137 _auth_settings: List[str] = [] 3138 3139 return self.api_client.param_serialize( 3140 method="GET", 3141 resource_path="/Schemas/{uri}", 3142 path_params=_path_params, 3143 query_params=_query_params, 3144 header_params=_header_params, 3145 body=_body_params, 3146 post_params=_form_params, 3147 files=_files, 3148 auth_settings=_auth_settings, 3149 collection_formats=_collection_formats, 3150 _host=_host, 3151 _request_auth=_request_auth, 3152 ) 3153 3154 @validate_call 3155 def list_resource_types( 3156 self, 3157 _request_timeout: Union[ 3158 None, 3159 Annotated[StrictFloat, Field(gt=0)], 3160 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3161 ] = None, 3162 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3163 _content_type: Optional[StrictStr] = None, 3164 _headers: Optional[Dict[StrictStr, Any]] = None, 3165 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3166 ) -> ResourceTypeListResponse: 3167 """List resource types 3168 3169 Retrieve information about which SCIM resources are supported. <br><br> Currently, Miro supports Users and Groups as Resource Types. 3170 3171 :param _request_timeout: timeout setting for this request. If one 3172 number provided, it will be total request 3173 timeout. It can also be a pair (tuple) of 3174 (connection, read) timeouts. 3175 :type _request_timeout: int, tuple(int, int), optional 3176 :param _request_auth: set to override the auth_settings for an a single 3177 request; this effectively ignores the 3178 authentication in the spec for a single request. 3179 :type _request_auth: dict, optional 3180 :param _content_type: force content-type for the request. 3181 :type _content_type: str, Optional 3182 :param _headers: set to override the headers for a single 3183 request; this effectively ignores the headers 3184 in the spec for a single request. 3185 :type _headers: dict, optional 3186 :param _host_index: set to override the host_index for a single 3187 request; this effectively ignores the host_index 3188 in the spec for a single request. 3189 :type _host_index: int, optional 3190 :return: Returns the result object. 3191 """ # noqa: E501 3192 3193 _param = self._list_resource_types_serialize( 3194 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3195 ) 3196 3197 _response_types_map: Dict[str, Optional[str]] = { 3198 "200": "ResourceTypeListResponse", 3199 "400": None, 3200 "401": None, 3201 "403": None, 3202 "404": None, 3203 "500": None, 3204 } 3205 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3206 response_data.read() 3207 return self.api_client.response_deserialize( 3208 response_data=response_data, 3209 response_types_map=_response_types_map, 3210 ).data 3211 3212 def _list_resource_types_serialize( 3213 self, 3214 _request_auth, 3215 _content_type, 3216 _headers, 3217 _host_index, 3218 ) -> RequestSerialized: 3219 3220 _host = None 3221 3222 _collection_formats: Dict[str, str] = {} 3223 3224 _path_params: Dict[str, str] = {} 3225 _query_params: List[Tuple[str, str]] = [] 3226 _header_params: Dict[str, Optional[str]] = _headers or {} 3227 _form_params: List[Tuple[str, str]] = [] 3228 _files: Dict[str, str] = {} 3229 _body_params: Optional[bytes] = None 3230 3231 # process the path parameters 3232 # process the query parameters 3233 # process the header parameters 3234 # process the form parameters 3235 # process the body parameter 3236 3237 # set the HTTP header `Accept` 3238 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3239 3240 # authentication setting 3241 _auth_settings: List[str] = [] 3242 3243 return self.api_client.param_serialize( 3244 method="GET", 3245 resource_path="/ResourceTypes", 3246 path_params=_path_params, 3247 query_params=_query_params, 3248 header_params=_header_params, 3249 body=_body_params, 3250 post_params=_form_params, 3251 files=_files, 3252 auth_settings=_auth_settings, 3253 collection_formats=_collection_formats, 3254 _host=_host, 3255 _request_auth=_request_auth, 3256 ) 3257 3258 @validate_call 3259 def list_schemas( 3260 self, 3261 _request_timeout: Union[ 3262 None, 3263 Annotated[StrictFloat, Field(gt=0)], 3264 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3265 ] = None, 3266 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3267 _content_type: Optional[StrictStr] = None, 3268 _headers: Optional[Dict[StrictStr, Any]] = None, 3269 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3270 ) -> SchemaListResponse: 3271 """List schemas 3272 3273 Retrieve metadata about Users, Groups, and extension attributes that are currently supported. 3274 3275 :param _request_timeout: timeout setting for this request. If one 3276 number provided, it will be total request 3277 timeout. It can also be a pair (tuple) of 3278 (connection, read) timeouts. 3279 :type _request_timeout: int, tuple(int, int), optional 3280 :param _request_auth: set to override the auth_settings for an a single 3281 request; this effectively ignores the 3282 authentication in the spec for a single request. 3283 :type _request_auth: dict, optional 3284 :param _content_type: force content-type for the request. 3285 :type _content_type: str, Optional 3286 :param _headers: set to override the headers for a single 3287 request; this effectively ignores the headers 3288 in the spec for a single request. 3289 :type _headers: dict, optional 3290 :param _host_index: set to override the host_index for a single 3291 request; this effectively ignores the host_index 3292 in the spec for a single request. 3293 :type _host_index: int, optional 3294 :return: Returns the result object. 3295 """ # noqa: E501 3296 3297 _param = self._list_schemas_serialize( 3298 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3299 ) 3300 3301 _response_types_map: Dict[str, Optional[str]] = { 3302 "200": "SchemaListResponse", 3303 "400": None, 3304 "401": None, 3305 "403": None, 3306 "404": None, 3307 "500": None, 3308 } 3309 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3310 response_data.read() 3311 return self.api_client.response_deserialize( 3312 response_data=response_data, 3313 response_types_map=_response_types_map, 3314 ).data 3315 3316 def _list_schemas_serialize( 3317 self, 3318 _request_auth, 3319 _content_type, 3320 _headers, 3321 _host_index, 3322 ) -> RequestSerialized: 3323 3324 _host = None 3325 3326 _collection_formats: Dict[str, str] = {} 3327 3328 _path_params: Dict[str, str] = {} 3329 _query_params: List[Tuple[str, str]] = [] 3330 _header_params: Dict[str, Optional[str]] = _headers or {} 3331 _form_params: List[Tuple[str, str]] = [] 3332 _files: Dict[str, str] = {} 3333 _body_params: Optional[bytes] = None 3334 3335 # process the path parameters 3336 # process the query parameters 3337 # process the header parameters 3338 # process the form parameters 3339 # process the body parameter 3340 3341 # set the HTTP header `Accept` 3342 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3343 3344 # authentication setting 3345 _auth_settings: List[str] = [] 3346 3347 return self.api_client.param_serialize( 3348 method="GET", 3349 resource_path="/Schemas", 3350 path_params=_path_params, 3351 query_params=_query_params, 3352 header_params=_header_params, 3353 body=_body_params, 3354 post_params=_form_params, 3355 files=_files, 3356 auth_settings=_auth_settings, 3357 collection_formats=_collection_formats, 3358 _host=_host, 3359 _request_auth=_request_auth, 3360 ) 3361 3362 @validate_call 3363 def list_service_provider_configs( 3364 self, 3365 _request_timeout: Union[ 3366 None, 3367 Annotated[StrictFloat, Field(gt=0)], 3368 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3369 ] = None, 3370 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3371 _content_type: Optional[StrictStr] = None, 3372 _headers: Optional[Dict[StrictStr, Any]] = None, 3373 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3374 ) -> ServiceProviderConfigResponse: 3375 """Get Service Provider Config 3376 3377 Retrieve supported operations and SCIM API basic configuration. 3378 3379 :param _request_timeout: timeout setting for this request. If one 3380 number provided, it will be total request 3381 timeout. It can also be a pair (tuple) of 3382 (connection, read) timeouts. 3383 :type _request_timeout: int, tuple(int, int), optional 3384 :param _request_auth: set to override the auth_settings for an a single 3385 request; this effectively ignores the 3386 authentication in the spec for a single request. 3387 :type _request_auth: dict, optional 3388 :param _content_type: force content-type for the request. 3389 :type _content_type: str, Optional 3390 :param _headers: set to override the headers for a single 3391 request; this effectively ignores the headers 3392 in the spec for a single request. 3393 :type _headers: dict, optional 3394 :param _host_index: set to override the host_index for a single 3395 request; this effectively ignores the host_index 3396 in the spec for a single request. 3397 :type _host_index: int, optional 3398 :return: Returns the result object. 3399 """ # noqa: E501 3400 3401 _param = self._list_service_provider_configs_serialize( 3402 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3403 ) 3404 3405 _response_types_map: Dict[str, Optional[str]] = { 3406 "200": "ServiceProviderConfigResponse", 3407 "400": None, 3408 "401": None, 3409 "403": None, 3410 "404": None, 3411 "500": None, 3412 } 3413 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3414 response_data.read() 3415 return self.api_client.response_deserialize( 3416 response_data=response_data, 3417 response_types_map=_response_types_map, 3418 ).data 3419 3420 def _list_service_provider_configs_serialize( 3421 self, 3422 _request_auth, 3423 _content_type, 3424 _headers, 3425 _host_index, 3426 ) -> RequestSerialized: 3427 3428 _host = None 3429 3430 _collection_formats: Dict[str, str] = {} 3431 3432 _path_params: Dict[str, str] = {} 3433 _query_params: List[Tuple[str, str]] = [] 3434 _header_params: Dict[str, Optional[str]] = _headers or {} 3435 _form_params: List[Tuple[str, str]] = [] 3436 _files: Dict[str, str] = {} 3437 _body_params: Optional[bytes] = None 3438 3439 # process the path parameters 3440 # process the query parameters 3441 # process the header parameters 3442 # process the form parameters 3443 # process the body parameter 3444 3445 # set the HTTP header `Accept` 3446 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3447 3448 # authentication setting 3449 _auth_settings: List[str] = [] 3450 3451 return self.api_client.param_serialize( 3452 method="GET", 3453 resource_path="/ServiceProviderConfig", 3454 path_params=_path_params, 3455 query_params=_query_params, 3456 header_params=_header_params, 3457 body=_body_params, 3458 post_params=_form_params, 3459 files=_files, 3460 auth_settings=_auth_settings, 3461 collection_formats=_collection_formats, 3462 _host=_host, 3463 _request_auth=_request_auth, 3464 ) 3465 3466 @validate_call 3467 def create_shape_item_flowchart( 3468 self, 3469 board_id: Annotated[ 3470 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 3471 ], 3472 shape_create_request: ShapeCreateRequest, 3473 _request_timeout: Union[ 3474 None, 3475 Annotated[StrictFloat, Field(gt=0)], 3476 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3477 ] = None, 3478 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3479 _content_type: Optional[StrictStr] = None, 3480 _headers: Optional[Dict[StrictStr, Any]] = None, 3481 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3482 ) -> ShapeItem: 3483 """Create shape item 3484 3485 Adds a flowchart shape item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 3486 3487 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 3488 :type board_id: str 3489 :param shape_create_request: (required) 3490 :type shape_create_request: ShapeCreateRequest 3491 :param _request_timeout: timeout setting for this request. If one 3492 number provided, it will be total request 3493 timeout. It can also be a pair (tuple) of 3494 (connection, read) timeouts. 3495 :type _request_timeout: int, tuple(int, int), optional 3496 :param _request_auth: set to override the auth_settings for an a single 3497 request; this effectively ignores the 3498 authentication in the spec for a single request. 3499 :type _request_auth: dict, optional 3500 :param _content_type: force content-type for the request. 3501 :type _content_type: str, Optional 3502 :param _headers: set to override the headers for a single 3503 request; this effectively ignores the headers 3504 in the spec for a single request. 3505 :type _headers: dict, optional 3506 :param _host_index: set to override the host_index for a single 3507 request; this effectively ignores the host_index 3508 in the spec for a single request. 3509 :type _host_index: int, optional 3510 :return: Returns the result object. 3511 """ # noqa: E501 3512 3513 _param = self._create_shape_item_flowchart_serialize( 3514 board_id=board_id, 3515 shape_create_request=shape_create_request, 3516 _request_auth=_request_auth, 3517 _content_type=_content_type, 3518 _headers=_headers, 3519 _host_index=_host_index, 3520 ) 3521 3522 _response_types_map: Dict[str, Optional[str]] = { 3523 "201": "ShapeItem", 3524 "400": "CreateFrameItem400Response", 3525 "404": "CreateFrameItem400Response", 3526 "429": "CreateFrameItem400Response", 3527 } 3528 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3529 response_data.read() 3530 return self.api_client.response_deserialize( 3531 response_data=response_data, 3532 response_types_map=_response_types_map, 3533 ).data 3534 3535 def _create_shape_item_flowchart_serialize( 3536 self, 3537 board_id, 3538 shape_create_request, 3539 _request_auth, 3540 _content_type, 3541 _headers, 3542 _host_index, 3543 ) -> RequestSerialized: 3544 3545 _host = None 3546 3547 _collection_formats: Dict[str, str] = {} 3548 3549 _path_params: Dict[str, str] = {} 3550 _query_params: List[Tuple[str, str]] = [] 3551 _header_params: Dict[str, Optional[str]] = _headers or {} 3552 _form_params: List[Tuple[str, str]] = [] 3553 _files: Dict[str, str] = {} 3554 _body_params: Optional[bytes] = None 3555 3556 # process the path parameters 3557 if board_id is not None: 3558 _path_params["board_id"] = board_id 3559 # process the query parameters 3560 # process the header parameters 3561 # process the form parameters 3562 # process the body parameter 3563 if shape_create_request is not None: 3564 _body_params = shape_create_request 3565 3566 # set the HTTP header `Accept` 3567 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3568 3569 # set the HTTP header `Content-Type` 3570 if _content_type: 3571 _header_params["Content-Type"] = _content_type 3572 else: 3573 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 3574 if _default_content_type is not None: 3575 _header_params["Content-Type"] = _default_content_type 3576 3577 # authentication setting 3578 _auth_settings: List[str] = [] 3579 3580 return self.api_client.param_serialize( 3581 method="POST", 3582 resource_path="/v2-experimental/boards/{board_id}/shapes", 3583 path_params=_path_params, 3584 query_params=_query_params, 3585 header_params=_header_params, 3586 body=_body_params, 3587 post_params=_form_params, 3588 files=_files, 3589 auth_settings=_auth_settings, 3590 collection_formats=_collection_formats, 3591 _host=_host, 3592 _request_auth=_request_auth, 3593 ) 3594 3595 @validate_call 3596 def delete_shape_item_flowchart( 3597 self, 3598 board_id: Annotated[ 3599 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 3600 ], 3601 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 3602 _request_timeout: Union[ 3603 None, 3604 Annotated[StrictFloat, Field(gt=0)], 3605 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3606 ] = None, 3607 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3608 _content_type: Optional[StrictStr] = None, 3609 _headers: Optional[Dict[StrictStr, Any]] = None, 3610 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3611 ) -> object: 3612 """Delete shape item 3613 3614 Deletes a flowchart shape item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 3615 3616 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 3617 :type board_id: str 3618 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 3619 :type item_id: str 3620 :param _request_timeout: timeout setting for this request. If one 3621 number provided, it will be total request 3622 timeout. It can also be a pair (tuple) of 3623 (connection, read) timeouts. 3624 :type _request_timeout: int, tuple(int, int), optional 3625 :param _request_auth: set to override the auth_settings for an a single 3626 request; this effectively ignores the 3627 authentication in the spec for a single request. 3628 :type _request_auth: dict, optional 3629 :param _content_type: force content-type for the request. 3630 :type _content_type: str, Optional 3631 :param _headers: set to override the headers for a single 3632 request; this effectively ignores the headers 3633 in the spec for a single request. 3634 :type _headers: dict, optional 3635 :param _host_index: set to override the host_index for a single 3636 request; this effectively ignores the host_index 3637 in the spec for a single request. 3638 :type _host_index: int, optional 3639 :return: Returns the result object. 3640 """ # noqa: E501 3641 3642 _param = self._delete_shape_item_flowchart_serialize( 3643 board_id=board_id, 3644 item_id=item_id, 3645 _request_auth=_request_auth, 3646 _content_type=_content_type, 3647 _headers=_headers, 3648 _host_index=_host_index, 3649 ) 3650 3651 _response_types_map: Dict[str, Optional[str]] = { 3652 "204": "object", 3653 "400": "CreateFrameItem400Response", 3654 "404": "CreateFrameItem400Response", 3655 "429": "CreateFrameItem400Response", 3656 } 3657 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3658 response_data.read() 3659 return self.api_client.response_deserialize( 3660 response_data=response_data, 3661 response_types_map=_response_types_map, 3662 ).data 3663 3664 def _delete_shape_item_flowchart_serialize( 3665 self, 3666 board_id, 3667 item_id, 3668 _request_auth, 3669 _content_type, 3670 _headers, 3671 _host_index, 3672 ) -> RequestSerialized: 3673 3674 _host = None 3675 3676 _collection_formats: Dict[str, str] = {} 3677 3678 _path_params: Dict[str, str] = {} 3679 _query_params: List[Tuple[str, str]] = [] 3680 _header_params: Dict[str, Optional[str]] = _headers or {} 3681 _form_params: List[Tuple[str, str]] = [] 3682 _files: Dict[str, str] = {} 3683 _body_params: Optional[bytes] = None 3684 3685 # process the path parameters 3686 if board_id is not None: 3687 _path_params["board_id"] = board_id 3688 if item_id is not None: 3689 _path_params["item_id"] = item_id 3690 # process the query parameters 3691 # process the header parameters 3692 # process the form parameters 3693 # process the body parameter 3694 3695 # set the HTTP header `Accept` 3696 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3697 3698 # authentication setting 3699 _auth_settings: List[str] = [] 3700 3701 return self.api_client.param_serialize( 3702 method="DELETE", 3703 resource_path="/v2-experimental/boards/{board_id}/shapes/{item_id}", 3704 path_params=_path_params, 3705 query_params=_query_params, 3706 header_params=_header_params, 3707 body=_body_params, 3708 post_params=_form_params, 3709 files=_files, 3710 auth_settings=_auth_settings, 3711 collection_formats=_collection_formats, 3712 _host=_host, 3713 _request_auth=_request_auth, 3714 ) 3715 3716 @validate_call 3717 def get_items_experimental( 3718 self, 3719 board_id: Annotated[ 3720 StrictStr, 3721 Field( 3722 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 3723 ), 3724 ], 3725 limit: Optional[Annotated[str, Field(strict=True)]] = None, 3726 type: Optional[StrictStr] = None, 3727 cursor: Optional[StrictStr] = None, 3728 _request_timeout: Union[ 3729 None, 3730 Annotated[StrictFloat, Field(gt=0)], 3731 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3732 ] = None, 3733 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3734 _content_type: Optional[StrictStr] = None, 3735 _headers: Optional[Dict[StrictStr, Any]] = None, 3736 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3737 ) -> GenericItemCursorPaged: 3738 """Get items on board 3739 3740 Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 3741 3742 :param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) 3743 :type board_id: str 3744 :param limit: 3745 :type limit: str 3746 :param type: 3747 :type type: str 3748 :param cursor: 3749 :type cursor: str 3750 :param _request_timeout: timeout setting for this request. If one 3751 number provided, it will be total request 3752 timeout. It can also be a pair (tuple) of 3753 (connection, read) timeouts. 3754 :type _request_timeout: int, tuple(int, int), optional 3755 :param _request_auth: set to override the auth_settings for an a single 3756 request; this effectively ignores the 3757 authentication in the spec for a single request. 3758 :type _request_auth: dict, optional 3759 :param _content_type: force content-type for the request. 3760 :type _content_type: str, Optional 3761 :param _headers: set to override the headers for a single 3762 request; this effectively ignores the headers 3763 in the spec for a single request. 3764 :type _headers: dict, optional 3765 :param _host_index: set to override the host_index for a single 3766 request; this effectively ignores the host_index 3767 in the spec for a single request. 3768 :type _host_index: int, optional 3769 :return: Returns the result object. 3770 """ # noqa: E501 3771 3772 _param = self._get_items_experimental_serialize( 3773 board_id=board_id, 3774 limit=limit, 3775 type=type, 3776 cursor=cursor, 3777 _request_auth=_request_auth, 3778 _content_type=_content_type, 3779 _headers=_headers, 3780 _host_index=_host_index, 3781 ) 3782 3783 _response_types_map: Dict[str, Optional[str]] = { 3784 "200": "GenericItemCursorPaged", 3785 "400": "CreateFrameItem400Response", 3786 "404": "CreateFrameItem400Response", 3787 "429": "CreateFrameItem400Response", 3788 } 3789 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3790 response_data.read() 3791 return self.api_client.response_deserialize( 3792 response_data=response_data, 3793 response_types_map=_response_types_map, 3794 ).data 3795 3796 def _get_items_experimental_serialize( 3797 self, 3798 board_id, 3799 limit, 3800 type, 3801 cursor, 3802 _request_auth, 3803 _content_type, 3804 _headers, 3805 _host_index, 3806 ) -> RequestSerialized: 3807 3808 _host = None 3809 3810 _collection_formats: Dict[str, str] = {} 3811 3812 _path_params: Dict[str, str] = {} 3813 _query_params: List[Tuple[str, str]] = [] 3814 _header_params: Dict[str, Optional[str]] = _headers or {} 3815 _form_params: List[Tuple[str, str]] = [] 3816 _files: Dict[str, str] = {} 3817 _body_params: Optional[bytes] = None 3818 3819 # process the path parameters 3820 if board_id is not None: 3821 _path_params["board_id"] = board_id 3822 # process the query parameters 3823 if limit is not None: 3824 3825 _query_params.append(("limit", limit)) 3826 3827 if type is not None: 3828 3829 _query_params.append(("type", type)) 3830 3831 if cursor is not None: 3832 3833 _query_params.append(("cursor", cursor)) 3834 3835 # process the header parameters 3836 # process the form parameters 3837 # process the body parameter 3838 3839 # set the HTTP header `Accept` 3840 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3841 3842 # authentication setting 3843 _auth_settings: List[str] = [] 3844 3845 return self.api_client.param_serialize( 3846 method="GET", 3847 resource_path="/v2-experimental/boards/{board_id}/items", 3848 path_params=_path_params, 3849 query_params=_query_params, 3850 header_params=_header_params, 3851 body=_body_params, 3852 post_params=_form_params, 3853 files=_files, 3854 auth_settings=_auth_settings, 3855 collection_formats=_collection_formats, 3856 _host=_host, 3857 _request_auth=_request_auth, 3858 ) 3859 3860 @validate_call 3861 def get_shape_item_flowchart( 3862 self, 3863 board_id: Annotated[ 3864 StrictStr, 3865 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 3866 ], 3867 item_id: Annotated[ 3868 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 3869 ], 3870 _request_timeout: Union[ 3871 None, 3872 Annotated[StrictFloat, Field(gt=0)], 3873 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3874 ] = None, 3875 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3876 _content_type: Optional[StrictStr] = None, 3877 _headers: Optional[Dict[StrictStr, Any]] = None, 3878 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3879 ) -> ShapeItem: 3880 """Get shape item 3881 3882 Retrieves information for a specific shape item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 3883 3884 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 3885 :type board_id: str 3886 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 3887 :type item_id: str 3888 :param _request_timeout: timeout setting for this request. If one 3889 number provided, it will be total request 3890 timeout. It can also be a pair (tuple) of 3891 (connection, read) timeouts. 3892 :type _request_timeout: int, tuple(int, int), optional 3893 :param _request_auth: set to override the auth_settings for an a single 3894 request; this effectively ignores the 3895 authentication in the spec for a single request. 3896 :type _request_auth: dict, optional 3897 :param _content_type: force content-type for the request. 3898 :type _content_type: str, Optional 3899 :param _headers: set to override the headers for a single 3900 request; this effectively ignores the headers 3901 in the spec for a single request. 3902 :type _headers: dict, optional 3903 :param _host_index: set to override the host_index for a single 3904 request; this effectively ignores the host_index 3905 in the spec for a single request. 3906 :type _host_index: int, optional 3907 :return: Returns the result object. 3908 """ # noqa: E501 3909 3910 _param = self._get_shape_item_flowchart_serialize( 3911 board_id=board_id, 3912 item_id=item_id, 3913 _request_auth=_request_auth, 3914 _content_type=_content_type, 3915 _headers=_headers, 3916 _host_index=_host_index, 3917 ) 3918 3919 _response_types_map: Dict[str, Optional[str]] = { 3920 "200": "ShapeItem", 3921 "400": "CreateFrameItem400Response", 3922 "404": "CreateFrameItem400Response", 3923 "429": "CreateFrameItem400Response", 3924 } 3925 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3926 response_data.read() 3927 return self.api_client.response_deserialize( 3928 response_data=response_data, 3929 response_types_map=_response_types_map, 3930 ).data 3931 3932 def _get_shape_item_flowchart_serialize( 3933 self, 3934 board_id, 3935 item_id, 3936 _request_auth, 3937 _content_type, 3938 _headers, 3939 _host_index, 3940 ) -> RequestSerialized: 3941 3942 _host = None 3943 3944 _collection_formats: Dict[str, str] = {} 3945 3946 _path_params: Dict[str, str] = {} 3947 _query_params: List[Tuple[str, str]] = [] 3948 _header_params: Dict[str, Optional[str]] = _headers or {} 3949 _form_params: List[Tuple[str, str]] = [] 3950 _files: Dict[str, str] = {} 3951 _body_params: Optional[bytes] = None 3952 3953 # process the path parameters 3954 if board_id is not None: 3955 _path_params["board_id"] = board_id 3956 if item_id is not None: 3957 _path_params["item_id"] = item_id 3958 # process the query parameters 3959 # process the header parameters 3960 # process the form parameters 3961 # process the body parameter 3962 3963 # set the HTTP header `Accept` 3964 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3965 3966 # authentication setting 3967 _auth_settings: List[str] = [] 3968 3969 return self.api_client.param_serialize( 3970 method="GET", 3971 resource_path="/v2-experimental/boards/{board_id}/shapes/{item_id}", 3972 path_params=_path_params, 3973 query_params=_query_params, 3974 header_params=_header_params, 3975 body=_body_params, 3976 post_params=_form_params, 3977 files=_files, 3978 auth_settings=_auth_settings, 3979 collection_formats=_collection_formats, 3980 _host=_host, 3981 _request_auth=_request_auth, 3982 ) 3983 3984 @validate_call 3985 def get_specific_item_experimental( 3986 self, 3987 board_id: Annotated[ 3988 StrictStr, 3989 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 3990 ], 3991 item_id: Annotated[ 3992 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 3993 ], 3994 _request_timeout: Union[ 3995 None, 3996 Annotated[StrictFloat, Field(gt=0)], 3997 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3998 ] = None, 3999 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4000 _content_type: Optional[StrictStr] = None, 4001 _headers: Optional[Dict[StrictStr, Any]] = None, 4002 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4003 ) -> GenericItem: 4004 """Get specific item on board 4005 4006 Retrieves information for a specific item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 4007 4008 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 4009 :type board_id: str 4010 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 4011 :type item_id: str 4012 :param _request_timeout: timeout setting for this request. If one 4013 number provided, it will be total request 4014 timeout. It can also be a pair (tuple) of 4015 (connection, read) timeouts. 4016 :type _request_timeout: int, tuple(int, int), optional 4017 :param _request_auth: set to override the auth_settings for an a single 4018 request; this effectively ignores the 4019 authentication in the spec for a single request. 4020 :type _request_auth: dict, optional 4021 :param _content_type: force content-type for the request. 4022 :type _content_type: str, Optional 4023 :param _headers: set to override the headers for a single 4024 request; this effectively ignores the headers 4025 in the spec for a single request. 4026 :type _headers: dict, optional 4027 :param _host_index: set to override the host_index for a single 4028 request; this effectively ignores the host_index 4029 in the spec for a single request. 4030 :type _host_index: int, optional 4031 :return: Returns the result object. 4032 """ # noqa: E501 4033 4034 _param = self._get_specific_item_experimental_serialize( 4035 board_id=board_id, 4036 item_id=item_id, 4037 _request_auth=_request_auth, 4038 _content_type=_content_type, 4039 _headers=_headers, 4040 _host_index=_host_index, 4041 ) 4042 4043 _response_types_map: Dict[str, Optional[str]] = { 4044 "200": "GenericItem", 4045 "400": "CreateFrameItem400Response", 4046 "404": "CreateFrameItem400Response", 4047 "429": "CreateFrameItem400Response", 4048 } 4049 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4050 response_data.read() 4051 return self.api_client.response_deserialize( 4052 response_data=response_data, 4053 response_types_map=_response_types_map, 4054 ).data 4055 4056 def _get_specific_item_experimental_serialize( 4057 self, 4058 board_id, 4059 item_id, 4060 _request_auth, 4061 _content_type, 4062 _headers, 4063 _host_index, 4064 ) -> RequestSerialized: 4065 4066 _host = None 4067 4068 _collection_formats: Dict[str, str] = {} 4069 4070 _path_params: Dict[str, str] = {} 4071 _query_params: List[Tuple[str, str]] = [] 4072 _header_params: Dict[str, Optional[str]] = _headers or {} 4073 _form_params: List[Tuple[str, str]] = [] 4074 _files: Dict[str, str] = {} 4075 _body_params: Optional[bytes] = None 4076 4077 # process the path parameters 4078 if board_id is not None: 4079 _path_params["board_id"] = board_id 4080 if item_id is not None: 4081 _path_params["item_id"] = item_id 4082 # process the query parameters 4083 # process the header parameters 4084 # process the form parameters 4085 # process the body parameter 4086 4087 # set the HTTP header `Accept` 4088 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4089 4090 # authentication setting 4091 _auth_settings: List[str] = [] 4092 4093 return self.api_client.param_serialize( 4094 method="GET", 4095 resource_path="/v2-experimental/boards/{board_id}/items/{item_id}", 4096 path_params=_path_params, 4097 query_params=_query_params, 4098 header_params=_header_params, 4099 body=_body_params, 4100 post_params=_form_params, 4101 files=_files, 4102 auth_settings=_auth_settings, 4103 collection_formats=_collection_formats, 4104 _host=_host, 4105 _request_auth=_request_auth, 4106 ) 4107 4108 @validate_call 4109 def update_shape_item_flowchart( 4110 self, 4111 board_id: Annotated[ 4112 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 4113 ], 4114 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 4115 shape_update_request: ShapeUpdateRequest, 4116 _request_timeout: Union[ 4117 None, 4118 Annotated[StrictFloat, Field(gt=0)], 4119 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4120 ] = None, 4121 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4122 _content_type: Optional[StrictStr] = None, 4123 _headers: Optional[Dict[StrictStr, Any]] = None, 4124 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4125 ) -> ShapeItem: 4126 """Update shape item 4127 4128 Updates a flowchart shape item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 4129 4130 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 4131 :type board_id: str 4132 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 4133 :type item_id: str 4134 :param shape_update_request: (required) 4135 :type shape_update_request: ShapeUpdateRequest 4136 :param _request_timeout: timeout setting for this request. If one 4137 number provided, it will be total request 4138 timeout. It can also be a pair (tuple) of 4139 (connection, read) timeouts. 4140 :type _request_timeout: int, tuple(int, int), optional 4141 :param _request_auth: set to override the auth_settings for an a single 4142 request; this effectively ignores the 4143 authentication in the spec for a single request. 4144 :type _request_auth: dict, optional 4145 :param _content_type: force content-type for the request. 4146 :type _content_type: str, Optional 4147 :param _headers: set to override the headers for a single 4148 request; this effectively ignores the headers 4149 in the spec for a single request. 4150 :type _headers: dict, optional 4151 :param _host_index: set to override the host_index for a single 4152 request; this effectively ignores the host_index 4153 in the spec for a single request. 4154 :type _host_index: int, optional 4155 :return: Returns the result object. 4156 """ # noqa: E501 4157 4158 _param = self._update_shape_item_flowchart_serialize( 4159 board_id=board_id, 4160 item_id=item_id, 4161 shape_update_request=shape_update_request, 4162 _request_auth=_request_auth, 4163 _content_type=_content_type, 4164 _headers=_headers, 4165 _host_index=_host_index, 4166 ) 4167 4168 _response_types_map: Dict[str, Optional[str]] = { 4169 "200": "ShapeItem", 4170 "400": "CreateFrameItem400Response", 4171 "404": "CreateFrameItem400Response", 4172 "429": "CreateFrameItem400Response", 4173 } 4174 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4175 response_data.read() 4176 return self.api_client.response_deserialize( 4177 response_data=response_data, 4178 response_types_map=_response_types_map, 4179 ).data 4180 4181 def _update_shape_item_flowchart_serialize( 4182 self, 4183 board_id, 4184 item_id, 4185 shape_update_request, 4186 _request_auth, 4187 _content_type, 4188 _headers, 4189 _host_index, 4190 ) -> RequestSerialized: 4191 4192 _host = None 4193 4194 _collection_formats: Dict[str, str] = {} 4195 4196 _path_params: Dict[str, str] = {} 4197 _query_params: List[Tuple[str, str]] = [] 4198 _header_params: Dict[str, Optional[str]] = _headers or {} 4199 _form_params: List[Tuple[str, str]] = [] 4200 _files: Dict[str, str] = {} 4201 _body_params: Optional[bytes] = None 4202 4203 # process the path parameters 4204 if board_id is not None: 4205 _path_params["board_id"] = board_id 4206 if item_id is not None: 4207 _path_params["item_id"] = item_id 4208 # process the query parameters 4209 # process the header parameters 4210 # process the form parameters 4211 # process the body parameter 4212 if shape_update_request is not None: 4213 _body_params = shape_update_request 4214 4215 # set the HTTP header `Accept` 4216 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4217 4218 # set the HTTP header `Content-Type` 4219 if _content_type: 4220 _header_params["Content-Type"] = _content_type 4221 else: 4222 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 4223 if _default_content_type is not None: 4224 _header_params["Content-Type"] = _default_content_type 4225 4226 # authentication setting 4227 _auth_settings: List[str] = [] 4228 4229 return self.api_client.param_serialize( 4230 method="PATCH", 4231 resource_path="/v2-experimental/boards/{board_id}/shapes/{item_id}", 4232 path_params=_path_params, 4233 query_params=_query_params, 4234 header_params=_header_params, 4235 body=_body_params, 4236 post_params=_form_params, 4237 files=_files, 4238 auth_settings=_auth_settings, 4239 collection_formats=_collection_formats, 4240 _host=_host, 4241 _request_auth=_request_auth, 4242 ) 4243 4244 @validate_call 4245 def get_group( 4246 self, 4247 id: Annotated[StrictStr, Field(description="A server-assigned, unique identifier for this Group (team).")], 4248 attributes: Annotated[ 4249 Optional[StrictStr], 4250 Field( 4251 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to retrieve attributes within complex attributes. For example: members.display" 4252 ), 4253 ] = None, 4254 _request_timeout: Union[ 4255 None, 4256 Annotated[StrictFloat, Field(gt=0)], 4257 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4258 ] = None, 4259 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4260 _content_type: Optional[StrictStr] = None, 4261 _headers: Optional[Dict[StrictStr, Any]] = None, 4262 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4263 ) -> GroupResource: 4264 """Get group 4265 4266 Retrieves a single Group resource.<br><b> Note</b>: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched. 4267 4268 :param id: A server-assigned, unique identifier for this Group (team). (required) 4269 :type id: str 4270 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to retrieve attributes within complex attributes. For example: members.display 4271 :type attributes: str 4272 :param _request_timeout: timeout setting for this request. If one 4273 number provided, it will be total request 4274 timeout. It can also be a pair (tuple) of 4275 (connection, read) timeouts. 4276 :type _request_timeout: int, tuple(int, int), optional 4277 :param _request_auth: set to override the auth_settings for an a single 4278 request; this effectively ignores the 4279 authentication in the spec for a single request. 4280 :type _request_auth: dict, optional 4281 :param _content_type: force content-type for the request. 4282 :type _content_type: str, Optional 4283 :param _headers: set to override the headers for a single 4284 request; this effectively ignores the headers 4285 in the spec for a single request. 4286 :type _headers: dict, optional 4287 :param _host_index: set to override the host_index for a single 4288 request; this effectively ignores the host_index 4289 in the spec for a single request. 4290 :type _host_index: int, optional 4291 :return: Returns the result object. 4292 """ # noqa: E501 4293 4294 _param = self._get_group_serialize( 4295 id=id, 4296 attributes=attributes, 4297 _request_auth=_request_auth, 4298 _content_type=_content_type, 4299 _headers=_headers, 4300 _host_index=_host_index, 4301 ) 4302 4303 _response_types_map: Dict[str, Optional[str]] = { 4304 "200": "GroupResource", 4305 "400": None, 4306 "401": None, 4307 "403": None, 4308 "404": None, 4309 "409": None, 4310 "413": None, 4311 "429": None, 4312 "500": None, 4313 } 4314 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4315 response_data.read() 4316 return self.api_client.response_deserialize( 4317 response_data=response_data, 4318 response_types_map=_response_types_map, 4319 ).data 4320 4321 def _get_group_serialize( 4322 self, 4323 id, 4324 attributes, 4325 _request_auth, 4326 _content_type, 4327 _headers, 4328 _host_index, 4329 ) -> RequestSerialized: 4330 4331 _host = None 4332 4333 _collection_formats: Dict[str, str] = {} 4334 4335 _path_params: Dict[str, str] = {} 4336 _query_params: List[Tuple[str, str]] = [] 4337 _header_params: Dict[str, Optional[str]] = _headers or {} 4338 _form_params: List[Tuple[str, str]] = [] 4339 _files: Dict[str, str] = {} 4340 _body_params: Optional[bytes] = None 4341 4342 # process the path parameters 4343 if id is not None: 4344 _path_params["id"] = id 4345 # process the query parameters 4346 if attributes is not None: 4347 4348 _query_params.append(("attributes", attributes)) 4349 4350 # process the header parameters 4351 # process the form parameters 4352 # process the body parameter 4353 4354 # set the HTTP header `Accept` 4355 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 4356 4357 # authentication setting 4358 _auth_settings: List[str] = [] 4359 4360 return self.api_client.param_serialize( 4361 method="GET", 4362 resource_path="/Groups/{id}", 4363 path_params=_path_params, 4364 query_params=_query_params, 4365 header_params=_header_params, 4366 body=_body_params, 4367 post_params=_form_params, 4368 files=_files, 4369 auth_settings=_auth_settings, 4370 collection_formats=_collection_formats, 4371 _host=_host, 4372 _request_auth=_request_auth, 4373 ) 4374 4375 @validate_call 4376 def list_groups( 4377 self, 4378 attributes: Annotated[ 4379 Optional[StrictStr], 4380 Field( 4381 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to fetch attributes within complex attributes, for Example: members.display." 4382 ), 4383 ] = None, 4384 filter: Annotated[ 4385 Optional[StrictStr], 4386 Field( 4387 description='You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical "and"<br> or = Logical "or"<br> not = "Not" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br>For Example: displayName eq "Product Team" will fetch information related to team matching the display name "Product Team". <br>Note</b>: Filtering on complex attributes is not supported' 4388 ), 4389 ] = None, 4390 start_index: Annotated[ 4391 Optional[StrictInt], 4392 Field( 4393 description="Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1" 4394 ), 4395 ] = None, 4396 count: Annotated[ 4397 Optional[StrictInt], 4398 Field( 4399 description="Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12" 4400 ), 4401 ] = None, 4402 sort_by: Annotated[ 4403 Optional[StrictStr], 4404 Field( 4405 description="Specifies the attribute whose value will be used to order the response. Example sortBy=displayName" 4406 ), 4407 ] = None, 4408 sort_order: Annotated[ 4409 Optional[StrictStr], 4410 Field( 4411 description="Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending" 4412 ), 4413 ] = None, 4414 _request_timeout: Union[ 4415 None, 4416 Annotated[StrictFloat, Field(gt=0)], 4417 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4418 ] = None, 4419 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4420 _content_type: Optional[StrictStr] = None, 4421 _headers: Optional[Dict[StrictStr, Any]] = None, 4422 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4423 ) -> GroupListResponse: 4424 """List groups 4425 4426 Retrieves the list of groups (teams) in the organization.<br><br> Note: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched. 4427 4428 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to fetch attributes within complex attributes, for Example: members.display. 4429 :type attributes: str 4430 :param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical \"and\"<br> or = Logical \"or\"<br> not = \"Not\" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br>For Example: displayName eq \"Product Team\" will fetch information related to team matching the display name \"Product Team\". <br>Note</b>: Filtering on complex attributes is not supported 4431 :type filter: str 4432 :param start_index: Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1 4433 :type start_index: int 4434 :param count: Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12 4435 :type count: int 4436 :param sort_by: Specifies the attribute whose value will be used to order the response. Example sortBy=displayName 4437 :type sort_by: str 4438 :param sort_order: Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending 4439 :type sort_order: str 4440 :param _request_timeout: timeout setting for this request. If one 4441 number provided, it will be total request 4442 timeout. It can also be a pair (tuple) of 4443 (connection, read) timeouts. 4444 :type _request_timeout: int, tuple(int, int), optional 4445 :param _request_auth: set to override the auth_settings for an a single 4446 request; this effectively ignores the 4447 authentication in the spec for a single request. 4448 :type _request_auth: dict, optional 4449 :param _content_type: force content-type for the request. 4450 :type _content_type: str, Optional 4451 :param _headers: set to override the headers for a single 4452 request; this effectively ignores the headers 4453 in the spec for a single request. 4454 :type _headers: dict, optional 4455 :param _host_index: set to override the host_index for a single 4456 request; this effectively ignores the host_index 4457 in the spec for a single request. 4458 :type _host_index: int, optional 4459 :return: Returns the result object. 4460 """ # noqa: E501 4461 4462 _param = self._list_groups_serialize( 4463 attributes=attributes, 4464 filter=filter, 4465 start_index=start_index, 4466 count=count, 4467 sort_by=sort_by, 4468 sort_order=sort_order, 4469 _request_auth=_request_auth, 4470 _content_type=_content_type, 4471 _headers=_headers, 4472 _host_index=_host_index, 4473 ) 4474 4475 _response_types_map: Dict[str, Optional[str]] = { 4476 "200": "GroupListResponse", 4477 "400": None, 4478 "401": None, 4479 "403": None, 4480 "404": None, 4481 "429": None, 4482 "500": None, 4483 } 4484 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4485 response_data.read() 4486 return self.api_client.response_deserialize( 4487 response_data=response_data, 4488 response_types_map=_response_types_map, 4489 ).data 4490 4491 def _list_groups_serialize( 4492 self, 4493 attributes, 4494 filter, 4495 start_index, 4496 count, 4497 sort_by, 4498 sort_order, 4499 _request_auth, 4500 _content_type, 4501 _headers, 4502 _host_index, 4503 ) -> RequestSerialized: 4504 4505 _host = None 4506 4507 _collection_formats: Dict[str, str] = {} 4508 4509 _path_params: Dict[str, str] = {} 4510 _query_params: List[Tuple[str, str]] = [] 4511 _header_params: Dict[str, Optional[str]] = _headers or {} 4512 _form_params: List[Tuple[str, str]] = [] 4513 _files: Dict[str, str] = {} 4514 _body_params: Optional[bytes] = None 4515 4516 # process the path parameters 4517 # process the query parameters 4518 if attributes is not None: 4519 4520 _query_params.append(("attributes", attributes)) 4521 4522 if filter is not None: 4523 4524 _query_params.append(("filter", filter)) 4525 4526 if start_index is not None: 4527 4528 _query_params.append(("startIndex", start_index)) 4529 4530 if count is not None: 4531 4532 _query_params.append(("count", count)) 4533 4534 if sort_by is not None: 4535 4536 _query_params.append(("sortBy", sort_by)) 4537 4538 if sort_order is not None: 4539 4540 _query_params.append(("sortOrder", sort_order)) 4541 4542 # process the header parameters 4543 # process the form parameters 4544 # process the body parameter 4545 4546 # set the HTTP header `Accept` 4547 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 4548 4549 # authentication setting 4550 _auth_settings: List[str] = [] 4551 4552 return self.api_client.param_serialize( 4553 method="GET", 4554 resource_path="/Groups", 4555 path_params=_path_params, 4556 query_params=_query_params, 4557 header_params=_header_params, 4558 body=_body_params, 4559 post_params=_form_params, 4560 files=_files, 4561 auth_settings=_auth_settings, 4562 collection_formats=_collection_formats, 4563 _host=_host, 4564 _request_auth=_request_auth, 4565 ) 4566 4567 @validate_call 4568 def patch_group( 4569 self, 4570 id: Annotated[ 4571 StrictStr, Field(description="Group (Team) ID. A server-assigned, unique identifier for this Group (team).") 4572 ], 4573 patch_group_resource: Annotated[ 4574 PatchGroupResource, 4575 Field( 4576 description="Payload to add, replace, remove members in the specified group (team). <br><br> The body of a PATCH request must contain the attribute `Operations` and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one `op` member. " 4577 ), 4578 ], 4579 attributes: Annotated[ 4580 Optional[StrictStr], 4581 Field( 4582 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> It is also possible to fetch attributes within complex attributes, for Example: members.display" 4583 ), 4584 ] = None, 4585 _request_timeout: Union[ 4586 None, 4587 Annotated[StrictFloat, Field(gt=0)], 4588 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4589 ] = None, 4590 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4591 _content_type: Optional[StrictStr] = None, 4592 _headers: Optional[Dict[StrictStr, Any]] = None, 4593 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4594 ) -> GroupResource: 4595 """Patch group 4596 4597 Updates an existing group resource, i.e. a team, overwriting values for specified attributes. Patch operation for group can be used to add, remove, or replace team members and to update the display name of the group (team). <br><br> To add a user to the group (team), use add operation. <br> To remove a user from a group (team), use remove operation. <br> To update a user resource, use the replace operation. <br> The last team admin cannot be removed from the team. <br><br> Note: Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided. <br><br> Team members removal specifics: <br> For remove or replace operations, the team member is removed from the team and from all team boards. The ownership of boards that belong to the removed team member is transferred to the oldest team member who currently has an admin role. After you remove a team member, adding the team member again to the team does not automatically restore their previous ownership of the boards. If the user is not registered fully in Miro and is not assigned to any other team, the user is also removed from the organization. <br><br> Add team members specifics: <br> All added team members are reactivated or recreated if they were deactivated or deleted earlier. <br><br> External users specifics: <br> When adding existing users with the role ORGANIZATION_EXTERNAL_USER or ORGANIZATION_TEAM_GUEST_USER to a team, we set FULL license and ORGANIZATION_INTERNAL_USER roles. 4598 4599 :param id: Group (Team) ID. A server-assigned, unique identifier for this Group (team). (required) 4600 :type id: str 4601 :param patch_group_resource: Payload to add, replace, remove members in the specified group (team). <br><br> The body of a PATCH request must contain the attribute `Operations` and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one `op` member. (required) 4602 :type patch_group_resource: PatchGroupResource 4603 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> It is also possible to fetch attributes within complex attributes, for Example: members.display 4604 :type attributes: str 4605 :param _request_timeout: timeout setting for this request. If one 4606 number provided, it will be total request 4607 timeout. It can also be a pair (tuple) of 4608 (connection, read) timeouts. 4609 :type _request_timeout: int, tuple(int, int), optional 4610 :param _request_auth: set to override the auth_settings for an a single 4611 request; this effectively ignores the 4612 authentication in the spec for a single request. 4613 :type _request_auth: dict, optional 4614 :param _content_type: force content-type for the request. 4615 :type _content_type: str, Optional 4616 :param _headers: set to override the headers for a single 4617 request; this effectively ignores the headers 4618 in the spec for a single request. 4619 :type _headers: dict, optional 4620 :param _host_index: set to override the host_index for a single 4621 request; this effectively ignores the host_index 4622 in the spec for a single request. 4623 :type _host_index: int, optional 4624 :return: Returns the result object. 4625 """ # noqa: E501 4626 4627 _param = self._patch_group_serialize( 4628 id=id, 4629 patch_group_resource=patch_group_resource, 4630 attributes=attributes, 4631 _request_auth=_request_auth, 4632 _content_type=_content_type, 4633 _headers=_headers, 4634 _host_index=_host_index, 4635 ) 4636 4637 _response_types_map: Dict[str, Optional[str]] = { 4638 "200": "GroupResource", 4639 "400": None, 4640 "401": None, 4641 "403": None, 4642 "404": None, 4643 "409": None, 4644 "413": None, 4645 "429": None, 4646 "500": None, 4647 } 4648 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4649 response_data.read() 4650 return self.api_client.response_deserialize( 4651 response_data=response_data, 4652 response_types_map=_response_types_map, 4653 ).data 4654 4655 def _patch_group_serialize( 4656 self, 4657 id, 4658 patch_group_resource, 4659 attributes, 4660 _request_auth, 4661 _content_type, 4662 _headers, 4663 _host_index, 4664 ) -> RequestSerialized: 4665 4666 _host = None 4667 4668 _collection_formats: Dict[str, str] = {} 4669 4670 _path_params: Dict[str, str] = {} 4671 _query_params: List[Tuple[str, str]] = [] 4672 _header_params: Dict[str, Optional[str]] = _headers or {} 4673 _form_params: List[Tuple[str, str]] = [] 4674 _files: Dict[str, str] = {} 4675 _body_params: Optional[bytes] = None 4676 4677 # process the path parameters 4678 if id is not None: 4679 _path_params["id"] = id 4680 # process the query parameters 4681 if attributes is not None: 4682 4683 _query_params.append(("attributes", attributes)) 4684 4685 # process the header parameters 4686 # process the form parameters 4687 # process the body parameter 4688 if patch_group_resource is not None: 4689 _body_params = patch_group_resource 4690 4691 # set the HTTP header `Accept` 4692 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 4693 4694 # set the HTTP header `Content-Type` 4695 if _content_type: 4696 _header_params["Content-Type"] = _content_type 4697 else: 4698 _default_content_type = self.api_client.select_header_content_type( 4699 ["application/scim+json", "application/json"] 4700 ) 4701 if _default_content_type is not None: 4702 _header_params["Content-Type"] = _default_content_type 4703 4704 # authentication setting 4705 _auth_settings: List[str] = [] 4706 4707 return self.api_client.param_serialize( 4708 method="PATCH", 4709 resource_path="/Groups/{id}", 4710 path_params=_path_params, 4711 query_params=_query_params, 4712 header_params=_header_params, 4713 body=_body_params, 4714 post_params=_form_params, 4715 files=_files, 4716 auth_settings=_auth_settings, 4717 collection_formats=_collection_formats, 4718 _host=_host, 4719 _request_auth=_request_auth, 4720 ) 4721 4722 @validate_call 4723 def create_case( 4724 self, 4725 org_id: Annotated[ 4726 str, Field(strict=True, description="The ID of the organization in which you want to create a new case.") 4727 ], 4728 case_request: CaseRequest, 4729 _request_timeout: Union[ 4730 None, 4731 Annotated[StrictFloat, Field(gt=0)], 4732 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4733 ] = None, 4734 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4735 _content_type: Optional[StrictStr] = None, 4736 _headers: Optional[Dict[StrictStr, Any]] = None, 4737 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4738 ) -> CaseResponse: 4739 """Create case 4740 4741 Creating a case for legal hold is the first critical step in the eDiscovery process when litigation or an investigation is anticipated. One of the purposes of creating a case is that it acts as a container that allows admins to group multiple legal holds under one case. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120022370962-Create-a-case\" target=_blank>Help Center page on creating a case</a>. <br><br>This API creates a new case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 4742 4743 :param org_id: The ID of the organization in which you want to create a new case. (required) 4744 :type org_id: str 4745 :param case_request: (required) 4746 :type case_request: CaseRequest 4747 :param _request_timeout: timeout setting for this request. If one 4748 number provided, it will be total request 4749 timeout. It can also be a pair (tuple) of 4750 (connection, read) timeouts. 4751 :type _request_timeout: int, tuple(int, int), optional 4752 :param _request_auth: set to override the auth_settings for an a single 4753 request; this effectively ignores the 4754 authentication in the spec for a single request. 4755 :type _request_auth: dict, optional 4756 :param _content_type: force content-type for the request. 4757 :type _content_type: str, Optional 4758 :param _headers: set to override the headers for a single 4759 request; this effectively ignores the headers 4760 in the spec for a single request. 4761 :type _headers: dict, optional 4762 :param _host_index: set to override the host_index for a single 4763 request; this effectively ignores the host_index 4764 in the spec for a single request. 4765 :type _host_index: int, optional 4766 :return: Returns the result object. 4767 """ # noqa: E501 4768 4769 _param = self._create_case_serialize( 4770 org_id=org_id, 4771 case_request=case_request, 4772 _request_auth=_request_auth, 4773 _content_type=_content_type, 4774 _headers=_headers, 4775 _host_index=_host_index, 4776 ) 4777 4778 _response_types_map: Dict[str, Optional[str]] = { 4779 "200": "CaseResponse", 4780 "400": None, 4781 "401": None, 4782 "403": None, 4783 "404": None, 4784 "429": None, 4785 } 4786 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4787 response_data.read() 4788 return self.api_client.response_deserialize( 4789 response_data=response_data, 4790 response_types_map=_response_types_map, 4791 ).data 4792 4793 def _create_case_serialize( 4794 self, 4795 org_id, 4796 case_request, 4797 _request_auth, 4798 _content_type, 4799 _headers, 4800 _host_index, 4801 ) -> RequestSerialized: 4802 4803 _host = None 4804 4805 _collection_formats: Dict[str, str] = {} 4806 4807 _path_params: Dict[str, str] = {} 4808 _query_params: List[Tuple[str, str]] = [] 4809 _header_params: Dict[str, Optional[str]] = _headers or {} 4810 _form_params: List[Tuple[str, str]] = [] 4811 _files: Dict[str, str] = {} 4812 _body_params: Optional[bytes] = None 4813 4814 # process the path parameters 4815 if org_id is not None: 4816 _path_params["org_id"] = org_id 4817 # process the query parameters 4818 # process the header parameters 4819 # process the form parameters 4820 # process the body parameter 4821 if case_request is not None: 4822 _body_params = case_request 4823 4824 # set the HTTP header `Accept` 4825 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4826 4827 # set the HTTP header `Content-Type` 4828 if _content_type: 4829 _header_params["Content-Type"] = _content_type 4830 else: 4831 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 4832 if _default_content_type is not None: 4833 _header_params["Content-Type"] = _default_content_type 4834 4835 # authentication setting 4836 _auth_settings: List[str] = [] 4837 4838 return self.api_client.param_serialize( 4839 method="POST", 4840 resource_path="/v2/orgs/{org_id}/cases", 4841 path_params=_path_params, 4842 query_params=_query_params, 4843 header_params=_header_params, 4844 body=_body_params, 4845 post_params=_form_params, 4846 files=_files, 4847 auth_settings=_auth_settings, 4848 collection_formats=_collection_formats, 4849 _host=_host, 4850 _request_auth=_request_auth, 4851 ) 4852 4853 @validate_call 4854 def create_legal_hold( 4855 self, 4856 org_id: Annotated[ 4857 str, 4858 Field(strict=True, description="The ID of the organization in which you want to create a new legal hold."), 4859 ], 4860 case_id: Annotated[ 4861 str, Field(strict=True, description="The ID of the case in which you want to create a new legal hold.") 4862 ], 4863 legal_hold_request: LegalHoldRequest, 4864 _request_timeout: Union[ 4865 None, 4866 Annotated[StrictFloat, Field(gt=0)], 4867 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4868 ] = None, 4869 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4870 _content_type: Optional[StrictStr] = None, 4871 _headers: Optional[Dict[StrictStr, Any]] = None, 4872 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4873 ) -> LegalHoldResponse: 4874 """Create legal hold 4875 4876 After creating a case it is possible to add one or multiple legal holds to the case. Creating a legal hold involves identifying the relevant users associated with a case and applying the hold to prevent permanent deletion of content that those users own, co-own, create, edit or access. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120471564946-Add-a-legal-hold-to-a-case\" target=_blank>Help Center page on adding a legal hold to a case</a>. <br><br>This API creates a new legal hold in a case for an organization. Newly created legal holds could take up to 24 hours to be processed.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 4877 4878 :param org_id: The ID of the organization in which you want to create a new legal hold. (required) 4879 :type org_id: str 4880 :param case_id: The ID of the case in which you want to create a new legal hold. (required) 4881 :type case_id: str 4882 :param legal_hold_request: (required) 4883 :type legal_hold_request: LegalHoldRequest 4884 :param _request_timeout: timeout setting for this request. If one 4885 number provided, it will be total request 4886 timeout. It can also be a pair (tuple) of 4887 (connection, read) timeouts. 4888 :type _request_timeout: int, tuple(int, int), optional 4889 :param _request_auth: set to override the auth_settings for an a single 4890 request; this effectively ignores the 4891 authentication in the spec for a single request. 4892 :type _request_auth: dict, optional 4893 :param _content_type: force content-type for the request. 4894 :type _content_type: str, Optional 4895 :param _headers: set to override the headers for a single 4896 request; this effectively ignores the headers 4897 in the spec for a single request. 4898 :type _headers: dict, optional 4899 :param _host_index: set to override the host_index for a single 4900 request; this effectively ignores the host_index 4901 in the spec for a single request. 4902 :type _host_index: int, optional 4903 :return: Returns the result object. 4904 """ # noqa: E501 4905 4906 _param = self._create_legal_hold_serialize( 4907 org_id=org_id, 4908 case_id=case_id, 4909 legal_hold_request=legal_hold_request, 4910 _request_auth=_request_auth, 4911 _content_type=_content_type, 4912 _headers=_headers, 4913 _host_index=_host_index, 4914 ) 4915 4916 _response_types_map: Dict[str, Optional[str]] = { 4917 "200": "LegalHoldResponse", 4918 "400": None, 4919 "401": None, 4920 "403": None, 4921 "404": None, 4922 "429": None, 4923 } 4924 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4925 response_data.read() 4926 return self.api_client.response_deserialize( 4927 response_data=response_data, 4928 response_types_map=_response_types_map, 4929 ).data 4930 4931 def _create_legal_hold_serialize( 4932 self, 4933 org_id, 4934 case_id, 4935 legal_hold_request, 4936 _request_auth, 4937 _content_type, 4938 _headers, 4939 _host_index, 4940 ) -> RequestSerialized: 4941 4942 _host = None 4943 4944 _collection_formats: Dict[str, str] = {} 4945 4946 _path_params: Dict[str, str] = {} 4947 _query_params: List[Tuple[str, str]] = [] 4948 _header_params: Dict[str, Optional[str]] = _headers or {} 4949 _form_params: List[Tuple[str, str]] = [] 4950 _files: Dict[str, str] = {} 4951 _body_params: Optional[bytes] = None 4952 4953 # process the path parameters 4954 if org_id is not None: 4955 _path_params["org_id"] = org_id 4956 if case_id is not None: 4957 _path_params["case_id"] = case_id 4958 # process the query parameters 4959 # process the header parameters 4960 # process the form parameters 4961 # process the body parameter 4962 if legal_hold_request is not None: 4963 _body_params = legal_hold_request 4964 4965 # set the HTTP header `Accept` 4966 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4967 4968 # set the HTTP header `Content-Type` 4969 if _content_type: 4970 _header_params["Content-Type"] = _content_type 4971 else: 4972 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 4973 if _default_content_type is not None: 4974 _header_params["Content-Type"] = _default_content_type 4975 4976 # authentication setting 4977 _auth_settings: List[str] = [] 4978 4979 return self.api_client.param_serialize( 4980 method="POST", 4981 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds", 4982 path_params=_path_params, 4983 query_params=_query_params, 4984 header_params=_header_params, 4985 body=_body_params, 4986 post_params=_form_params, 4987 files=_files, 4988 auth_settings=_auth_settings, 4989 collection_formats=_collection_formats, 4990 _host=_host, 4991 _request_auth=_request_auth, 4992 ) 4993 4994 @validate_call 4995 def delete_case( 4996 self, 4997 org_id: Annotated[ 4998 str, Field(strict=True, description="The ID of the organization in which you want to close a case.") 4999 ], 5000 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to close.")], 5001 _request_timeout: Union[ 5002 None, 5003 Annotated[StrictFloat, Field(gt=0)], 5004 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5005 ] = None, 5006 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5007 _content_type: Optional[StrictStr] = None, 5008 _headers: Optional[Dict[StrictStr, Any]] = None, 5009 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5010 ) -> None: 5011 """Close case 5012 5013 Closing a case is the final stage in the eDiscovery process, marking the conclusion of a legal matter or investigation. You must ensure that all associated legal holds within the case are closed before closing the case. Closing a case will permanently delete it. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22138936297746-Close-a-case\" target=_blank>Help Center page on closing a case</a>. <br><br>This API closes a case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5014 5015 :param org_id: The ID of the organization in which you want to close a case. (required) 5016 :type org_id: str 5017 :param case_id: The ID of the case you want to close. (required) 5018 :type case_id: str 5019 :param _request_timeout: timeout setting for this request. If one 5020 number provided, it will be total request 5021 timeout. It can also be a pair (tuple) of 5022 (connection, read) timeouts. 5023 :type _request_timeout: int, tuple(int, int), optional 5024 :param _request_auth: set to override the auth_settings for an a single 5025 request; this effectively ignores the 5026 authentication in the spec for a single request. 5027 :type _request_auth: dict, optional 5028 :param _content_type: force content-type for the request. 5029 :type _content_type: str, Optional 5030 :param _headers: set to override the headers for a single 5031 request; this effectively ignores the headers 5032 in the spec for a single request. 5033 :type _headers: dict, optional 5034 :param _host_index: set to override the host_index for a single 5035 request; this effectively ignores the host_index 5036 in the spec for a single request. 5037 :type _host_index: int, optional 5038 :return: Returns the result object. 5039 """ # noqa: E501 5040 5041 _param = self._delete_case_serialize( 5042 org_id=org_id, 5043 case_id=case_id, 5044 _request_auth=_request_auth, 5045 _content_type=_content_type, 5046 _headers=_headers, 5047 _host_index=_host_index, 5048 ) 5049 5050 _response_types_map: Dict[str, Optional[str]] = { 5051 "204": None, 5052 "400": None, 5053 "401": None, 5054 "403": None, 5055 "404": None, 5056 "429": None, 5057 } 5058 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5059 response_data.read() 5060 return self.api_client.response_deserialize( 5061 response_data=response_data, 5062 response_types_map=_response_types_map, 5063 ).data 5064 5065 def _delete_case_serialize( 5066 self, 5067 org_id, 5068 case_id, 5069 _request_auth, 5070 _content_type, 5071 _headers, 5072 _host_index, 5073 ) -> RequestSerialized: 5074 5075 _host = None 5076 5077 _collection_formats: Dict[str, str] = {} 5078 5079 _path_params: Dict[str, str] = {} 5080 _query_params: List[Tuple[str, str]] = [] 5081 _header_params: Dict[str, Optional[str]] = _headers or {} 5082 _form_params: List[Tuple[str, str]] = [] 5083 _files: Dict[str, str] = {} 5084 _body_params: Optional[bytes] = None 5085 5086 # process the path parameters 5087 if org_id is not None: 5088 _path_params["org_id"] = org_id 5089 if case_id is not None: 5090 _path_params["case_id"] = case_id 5091 # process the query parameters 5092 # process the header parameters 5093 # process the form parameters 5094 # process the body parameter 5095 5096 # authentication setting 5097 _auth_settings: List[str] = [] 5098 5099 return self.api_client.param_serialize( 5100 method="DELETE", 5101 resource_path="/v2/orgs/{org_id}/cases/{case_id}", 5102 path_params=_path_params, 5103 query_params=_query_params, 5104 header_params=_header_params, 5105 body=_body_params, 5106 post_params=_form_params, 5107 files=_files, 5108 auth_settings=_auth_settings, 5109 collection_formats=_collection_formats, 5110 _host=_host, 5111 _request_auth=_request_auth, 5112 ) 5113 5114 @validate_call 5115 def delete_legal_hold( 5116 self, 5117 org_id: Annotated[ 5118 str, Field(strict=True, description="The ID of the organization in which you want to close a legal hold.") 5119 ], 5120 case_id: Annotated[ 5121 str, Field(strict=True, description="The ID of the case in which you want to close a legal hold.") 5122 ], 5123 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to close.")], 5124 _request_timeout: Union[ 5125 None, 5126 Annotated[StrictFloat, Field(gt=0)], 5127 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5128 ] = None, 5129 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5130 _content_type: Optional[StrictStr] = None, 5131 _headers: Optional[Dict[StrictStr, Any]] = None, 5132 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5133 ) -> None: 5134 """Close legal hold 5135 5136 Closing a legal hold is one of the final steps in the eDiscovery process once the litigation or investigation has concluded. This process involves releasing the Miro boards and custodians that were under legal hold, allowing the preserved boards to return to normal operations. Closing a legal hold will permanently delete it. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/21922521629330-Close-a-legal-hold\" target=_blank>Help Center page on closing a legal hold</a>. <br><br>This API closes a legal hold in a case for an organization. Once a legal hold is closed, it can take up to 24 hours to release the content items from the legal hold. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5137 5138 :param org_id: The ID of the organization in which you want to close a legal hold. (required) 5139 :type org_id: str 5140 :param case_id: The ID of the case in which you want to close a legal hold. (required) 5141 :type case_id: str 5142 :param legal_hold_id: The ID of the legal hold you want to close. (required) 5143 :type legal_hold_id: str 5144 :param _request_timeout: timeout setting for this request. If one 5145 number provided, it will be total request 5146 timeout. It can also be a pair (tuple) of 5147 (connection, read) timeouts. 5148 :type _request_timeout: int, tuple(int, int), optional 5149 :param _request_auth: set to override the auth_settings for an a single 5150 request; this effectively ignores the 5151 authentication in the spec for a single request. 5152 :type _request_auth: dict, optional 5153 :param _content_type: force content-type for the request. 5154 :type _content_type: str, Optional 5155 :param _headers: set to override the headers for a single 5156 request; this effectively ignores the headers 5157 in the spec for a single request. 5158 :type _headers: dict, optional 5159 :param _host_index: set to override the host_index for a single 5160 request; this effectively ignores the host_index 5161 in the spec for a single request. 5162 :type _host_index: int, optional 5163 :return: Returns the result object. 5164 """ # noqa: E501 5165 5166 _param = self._delete_legal_hold_serialize( 5167 org_id=org_id, 5168 case_id=case_id, 5169 legal_hold_id=legal_hold_id, 5170 _request_auth=_request_auth, 5171 _content_type=_content_type, 5172 _headers=_headers, 5173 _host_index=_host_index, 5174 ) 5175 5176 _response_types_map: Dict[str, Optional[str]] = { 5177 "204": None, 5178 "400": None, 5179 "401": None, 5180 "403": None, 5181 "404": None, 5182 "429": None, 5183 } 5184 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5185 response_data.read() 5186 return self.api_client.response_deserialize( 5187 response_data=response_data, 5188 response_types_map=_response_types_map, 5189 ).data 5190 5191 def _delete_legal_hold_serialize( 5192 self, 5193 org_id, 5194 case_id, 5195 legal_hold_id, 5196 _request_auth, 5197 _content_type, 5198 _headers, 5199 _host_index, 5200 ) -> RequestSerialized: 5201 5202 _host = None 5203 5204 _collection_formats: Dict[str, str] = {} 5205 5206 _path_params: Dict[str, str] = {} 5207 _query_params: List[Tuple[str, str]] = [] 5208 _header_params: Dict[str, Optional[str]] = _headers or {} 5209 _form_params: List[Tuple[str, str]] = [] 5210 _files: Dict[str, str] = {} 5211 _body_params: Optional[bytes] = None 5212 5213 # process the path parameters 5214 if org_id is not None: 5215 _path_params["org_id"] = org_id 5216 if case_id is not None: 5217 _path_params["case_id"] = case_id 5218 if legal_hold_id is not None: 5219 _path_params["legal_hold_id"] = legal_hold_id 5220 # process the query parameters 5221 # process the header parameters 5222 # process the form parameters 5223 # process the body parameter 5224 5225 # authentication setting 5226 _auth_settings: List[str] = [] 5227 5228 return self.api_client.param_serialize( 5229 method="DELETE", 5230 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}", 5231 path_params=_path_params, 5232 query_params=_query_params, 5233 header_params=_header_params, 5234 body=_body_params, 5235 post_params=_form_params, 5236 files=_files, 5237 auth_settings=_auth_settings, 5238 collection_formats=_collection_formats, 5239 _host=_host, 5240 _request_auth=_request_auth, 5241 ) 5242 5243 @validate_call 5244 def edit_case( 5245 self, 5246 org_id: Annotated[ 5247 str, 5248 Field( 5249 strict=True, description="The ID of the organization for which you want to edit the case information." 5250 ), 5251 ], 5252 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to edit.")], 5253 case_request: CaseRequest, 5254 _request_timeout: Union[ 5255 None, 5256 Annotated[StrictFloat, Field(gt=0)], 5257 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5258 ] = None, 5259 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5260 _content_type: Optional[StrictStr] = None, 5261 _headers: Optional[Dict[StrictStr, Any]] = None, 5262 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5263 ) -> CaseResponse: 5264 """Edit case 5265 5266 Editing a case allows eDiscovery Admins to keep case details accurate and aligned with the evolving scope of a legal matter. As investigations progress, it may be necessary to update the case name or description to reflect changes in focus, terminology, or internal documentation standards. Since a case serves as the central container for one or more legal holds, keeping its information up to date helps ensure clarity, consistency, and easier navigation for all stakeholders involved in the legal process.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5267 5268 :param org_id: The ID of the organization for which you want to edit the case information. (required) 5269 :type org_id: str 5270 :param case_id: The ID of the case you want to edit. (required) 5271 :type case_id: str 5272 :param case_request: (required) 5273 :type case_request: CaseRequest 5274 :param _request_timeout: timeout setting for this request. If one 5275 number provided, it will be total request 5276 timeout. It can also be a pair (tuple) of 5277 (connection, read) timeouts. 5278 :type _request_timeout: int, tuple(int, int), optional 5279 :param _request_auth: set to override the auth_settings for an a single 5280 request; this effectively ignores the 5281 authentication in the spec for a single request. 5282 :type _request_auth: dict, optional 5283 :param _content_type: force content-type for the request. 5284 :type _content_type: str, Optional 5285 :param _headers: set to override the headers for a single 5286 request; this effectively ignores the headers 5287 in the spec for a single request. 5288 :type _headers: dict, optional 5289 :param _host_index: set to override the host_index for a single 5290 request; this effectively ignores the host_index 5291 in the spec for a single request. 5292 :type _host_index: int, optional 5293 :return: Returns the result object. 5294 """ # noqa: E501 5295 5296 _param = self._edit_case_serialize( 5297 org_id=org_id, 5298 case_id=case_id, 5299 case_request=case_request, 5300 _request_auth=_request_auth, 5301 _content_type=_content_type, 5302 _headers=_headers, 5303 _host_index=_host_index, 5304 ) 5305 5306 _response_types_map: Dict[str, Optional[str]] = { 5307 "200": "CaseResponse", 5308 "400": None, 5309 "401": None, 5310 "403": None, 5311 "404": None, 5312 "429": None, 5313 } 5314 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5315 response_data.read() 5316 return self.api_client.response_deserialize( 5317 response_data=response_data, 5318 response_types_map=_response_types_map, 5319 ).data 5320 5321 def _edit_case_serialize( 5322 self, 5323 org_id, 5324 case_id, 5325 case_request, 5326 _request_auth, 5327 _content_type, 5328 _headers, 5329 _host_index, 5330 ) -> RequestSerialized: 5331 5332 _host = None 5333 5334 _collection_formats: Dict[str, str] = {} 5335 5336 _path_params: Dict[str, str] = {} 5337 _query_params: List[Tuple[str, str]] = [] 5338 _header_params: Dict[str, Optional[str]] = _headers or {} 5339 _form_params: List[Tuple[str, str]] = [] 5340 _files: Dict[str, str] = {} 5341 _body_params: Optional[bytes] = None 5342 5343 # process the path parameters 5344 if org_id is not None: 5345 _path_params["org_id"] = org_id 5346 if case_id is not None: 5347 _path_params["case_id"] = case_id 5348 # process the query parameters 5349 # process the header parameters 5350 # process the form parameters 5351 # process the body parameter 5352 if case_request is not None: 5353 _body_params = case_request 5354 5355 # set the HTTP header `Accept` 5356 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5357 5358 # set the HTTP header `Content-Type` 5359 if _content_type: 5360 _header_params["Content-Type"] = _content_type 5361 else: 5362 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 5363 if _default_content_type is not None: 5364 _header_params["Content-Type"] = _default_content_type 5365 5366 # authentication setting 5367 _auth_settings: List[str] = [] 5368 5369 return self.api_client.param_serialize( 5370 method="PUT", 5371 resource_path="/v2/orgs/{org_id}/cases/{case_id}", 5372 path_params=_path_params, 5373 query_params=_query_params, 5374 header_params=_header_params, 5375 body=_body_params, 5376 post_params=_form_params, 5377 files=_files, 5378 auth_settings=_auth_settings, 5379 collection_formats=_collection_formats, 5380 _host=_host, 5381 _request_auth=_request_auth, 5382 ) 5383 5384 @validate_call 5385 def edit_legal_hold( 5386 self, 5387 org_id: Annotated[ 5388 str, 5389 Field( 5390 strict=True, 5391 description="The ID of the organization for which you want to edit the legal hold information.", 5392 ), 5393 ], 5394 case_id: Annotated[ 5395 str, 5396 Field(strict=True, description="The ID of the case for which you want to edit the legal hold information."), 5397 ], 5398 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to edit.")], 5399 legal_hold_request: LegalHoldRequest, 5400 _request_timeout: Union[ 5401 None, 5402 Annotated[StrictFloat, Field(gt=0)], 5403 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5404 ] = None, 5405 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5406 _content_type: Optional[StrictStr] = None, 5407 _headers: Optional[Dict[StrictStr, Any]] = None, 5408 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5409 ) -> LegalHoldResponse: 5410 """Edit legal hold 5411 5412 Editing a legal hold allows eDiscovery Admins to adjust and refine ongoing legal preservation efforts as case requirements evolve. Whether new custodians are identified, additional Miro boards become relevant, or existing boards or users are no longer in scope, editing a legal hold ensures that the correct data remains preserved and defensible throughout the legal process. Admins can update the legal hold’s name or description and add or remove users and boards as needed. This flexibility supports dynamic legal workflows and ensures that preservation stays precise, up to date, and aligned with the scope of the legal matter—maintaining compliance while avoiding unnecessary data retention.<br/><br/>When a legal hold is edited, boards newly added to the hold will begin having their versions preserved from that point forward, boards or users removed from the hold will stop being preserved, and their versions will no longer be preserved as part of that legal hold, boards that remain under hold will continue to have all versions preserved, including any deletions that occur after the hold was applied. This approach ensures organizations can respond to legal demands with accuracy and accountability as a case evolves.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5413 5414 :param org_id: The ID of the organization for which you want to edit the legal hold information. (required) 5415 :type org_id: str 5416 :param case_id: The ID of the case for which you want to edit the legal hold information. (required) 5417 :type case_id: str 5418 :param legal_hold_id: The ID of the legal hold you want to edit. (required) 5419 :type legal_hold_id: str 5420 :param legal_hold_request: (required) 5421 :type legal_hold_request: LegalHoldRequest 5422 :param _request_timeout: timeout setting for this request. If one 5423 number provided, it will be total request 5424 timeout. It can also be a pair (tuple) of 5425 (connection, read) timeouts. 5426 :type _request_timeout: int, tuple(int, int), optional 5427 :param _request_auth: set to override the auth_settings for an a single 5428 request; this effectively ignores the 5429 authentication in the spec for a single request. 5430 :type _request_auth: dict, optional 5431 :param _content_type: force content-type for the request. 5432 :type _content_type: str, Optional 5433 :param _headers: set to override the headers for a single 5434 request; this effectively ignores the headers 5435 in the spec for a single request. 5436 :type _headers: dict, optional 5437 :param _host_index: set to override the host_index for a single 5438 request; this effectively ignores the host_index 5439 in the spec for a single request. 5440 :type _host_index: int, optional 5441 :return: Returns the result object. 5442 """ # noqa: E501 5443 5444 _param = self._edit_legal_hold_serialize( 5445 org_id=org_id, 5446 case_id=case_id, 5447 legal_hold_id=legal_hold_id, 5448 legal_hold_request=legal_hold_request, 5449 _request_auth=_request_auth, 5450 _content_type=_content_type, 5451 _headers=_headers, 5452 _host_index=_host_index, 5453 ) 5454 5455 _response_types_map: Dict[str, Optional[str]] = { 5456 "200": "LegalHoldResponse", 5457 "400": None, 5458 "401": None, 5459 "403": None, 5460 "404": None, 5461 "429": None, 5462 } 5463 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5464 response_data.read() 5465 return self.api_client.response_deserialize( 5466 response_data=response_data, 5467 response_types_map=_response_types_map, 5468 ).data 5469 5470 def _edit_legal_hold_serialize( 5471 self, 5472 org_id, 5473 case_id, 5474 legal_hold_id, 5475 legal_hold_request, 5476 _request_auth, 5477 _content_type, 5478 _headers, 5479 _host_index, 5480 ) -> RequestSerialized: 5481 5482 _host = None 5483 5484 _collection_formats: Dict[str, str] = {} 5485 5486 _path_params: Dict[str, str] = {} 5487 _query_params: List[Tuple[str, str]] = [] 5488 _header_params: Dict[str, Optional[str]] = _headers or {} 5489 _form_params: List[Tuple[str, str]] = [] 5490 _files: Dict[str, str] = {} 5491 _body_params: Optional[bytes] = None 5492 5493 # process the path parameters 5494 if org_id is not None: 5495 _path_params["org_id"] = org_id 5496 if case_id is not None: 5497 _path_params["case_id"] = case_id 5498 if legal_hold_id is not None: 5499 _path_params["legal_hold_id"] = legal_hold_id 5500 # process the query parameters 5501 # process the header parameters 5502 # process the form parameters 5503 # process the body parameter 5504 if legal_hold_request is not None: 5505 _body_params = legal_hold_request 5506 5507 # set the HTTP header `Accept` 5508 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5509 5510 # set the HTTP header `Content-Type` 5511 if _content_type: 5512 _header_params["Content-Type"] = _content_type 5513 else: 5514 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 5515 if _default_content_type is not None: 5516 _header_params["Content-Type"] = _default_content_type 5517 5518 # authentication setting 5519 _auth_settings: List[str] = [] 5520 5521 return self.api_client.param_serialize( 5522 method="PUT", 5523 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}", 5524 path_params=_path_params, 5525 query_params=_query_params, 5526 header_params=_header_params, 5527 body=_body_params, 5528 post_params=_form_params, 5529 files=_files, 5530 auth_settings=_auth_settings, 5531 collection_formats=_collection_formats, 5532 _host=_host, 5533 _request_auth=_request_auth, 5534 ) 5535 5536 @validate_call 5537 def get_all_cases( 5538 self, 5539 org_id: Annotated[ 5540 str, 5541 Field( 5542 strict=True, description="The ID of the organization for which you want to retrieve the list of cases." 5543 ), 5544 ], 5545 limit: Annotated[ 5546 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 5547 Field(description="The maximum number of items in the result list."), 5548 ] = None, 5549 cursor: Annotated[ 5550 Optional[StrictStr], 5551 Field( 5552 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 5553 ), 5554 ] = None, 5555 _request_timeout: Union[ 5556 None, 5557 Annotated[StrictFloat, Field(gt=0)], 5558 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5559 ] = None, 5560 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5561 _content_type: Optional[StrictStr] = None, 5562 _headers: Optional[Dict[StrictStr, Any]] = None, 5563 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5564 ) -> PaginatedCaseResponse: 5565 """Get all cases 5566 5567 Retrieves the list of eDiscovery cases in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5568 5569 :param org_id: The ID of the organization for which you want to retrieve the list of cases. (required) 5570 :type org_id: str 5571 :param limit: The maximum number of items in the result list. 5572 :type limit: int 5573 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 5574 :type cursor: str 5575 :param _request_timeout: timeout setting for this request. If one 5576 number provided, it will be total request 5577 timeout. It can also be a pair (tuple) of 5578 (connection, read) timeouts. 5579 :type _request_timeout: int, tuple(int, int), optional 5580 :param _request_auth: set to override the auth_settings for an a single 5581 request; this effectively ignores the 5582 authentication in the spec for a single request. 5583 :type _request_auth: dict, optional 5584 :param _content_type: force content-type for the request. 5585 :type _content_type: str, Optional 5586 :param _headers: set to override the headers for a single 5587 request; this effectively ignores the headers 5588 in the spec for a single request. 5589 :type _headers: dict, optional 5590 :param _host_index: set to override the host_index for a single 5591 request; this effectively ignores the host_index 5592 in the spec for a single request. 5593 :type _host_index: int, optional 5594 :return: Returns the result object. 5595 """ # noqa: E501 5596 5597 _param = self._get_all_cases_serialize( 5598 org_id=org_id, 5599 limit=limit, 5600 cursor=cursor, 5601 _request_auth=_request_auth, 5602 _content_type=_content_type, 5603 _headers=_headers, 5604 _host_index=_host_index, 5605 ) 5606 5607 _response_types_map: Dict[str, Optional[str]] = { 5608 "200": "PaginatedCaseResponse", 5609 "400": None, 5610 "401": None, 5611 "403": None, 5612 "404": None, 5613 "429": None, 5614 } 5615 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5616 response_data.read() 5617 return self.api_client.response_deserialize( 5618 response_data=response_data, 5619 response_types_map=_response_types_map, 5620 ).data 5621 5622 def _get_all_cases_serialize( 5623 self, 5624 org_id, 5625 limit, 5626 cursor, 5627 _request_auth, 5628 _content_type, 5629 _headers, 5630 _host_index, 5631 ) -> RequestSerialized: 5632 5633 _host = None 5634 5635 _collection_formats: Dict[str, str] = {} 5636 5637 _path_params: Dict[str, str] = {} 5638 _query_params: List[Tuple[str, str]] = [] 5639 _header_params: Dict[str, Optional[str]] = _headers or {} 5640 _form_params: List[Tuple[str, str]] = [] 5641 _files: Dict[str, str] = {} 5642 _body_params: Optional[bytes] = None 5643 5644 # process the path parameters 5645 if org_id is not None: 5646 _path_params["org_id"] = org_id 5647 # process the query parameters 5648 if limit is not None: 5649 5650 _query_params.append(("limit", limit)) 5651 5652 if cursor is not None: 5653 5654 _query_params.append(("cursor", cursor)) 5655 5656 # process the header parameters 5657 # process the form parameters 5658 # process the body parameter 5659 5660 # set the HTTP header `Accept` 5661 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5662 5663 # authentication setting 5664 _auth_settings: List[str] = [] 5665 5666 return self.api_client.param_serialize( 5667 method="GET", 5668 resource_path="/v2/orgs/{org_id}/cases", 5669 path_params=_path_params, 5670 query_params=_query_params, 5671 header_params=_header_params, 5672 body=_body_params, 5673 post_params=_form_params, 5674 files=_files, 5675 auth_settings=_auth_settings, 5676 collection_formats=_collection_formats, 5677 _host=_host, 5678 _request_auth=_request_auth, 5679 ) 5680 5681 @validate_call 5682 def get_all_legal_holds( 5683 self, 5684 org_id: Annotated[ 5685 str, 5686 Field( 5687 strict=True, 5688 description="The ID of the organization for which you want to retrieve the list of legal holds within a case.", 5689 ), 5690 ], 5691 case_id: Annotated[ 5692 str, 5693 Field( 5694 strict=True, description="The ID of the case for which you want to retrieve the list of legal holds." 5695 ), 5696 ], 5697 limit: Annotated[ 5698 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 5699 Field(description="The maximum number of items in the result list."), 5700 ] = None, 5701 cursor: Annotated[ 5702 Optional[StrictStr], 5703 Field( 5704 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 5705 ), 5706 ] = None, 5707 _request_timeout: Union[ 5708 None, 5709 Annotated[StrictFloat, Field(gt=0)], 5710 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5711 ] = None, 5712 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5713 _content_type: Optional[StrictStr] = None, 5714 _headers: Optional[Dict[StrictStr, Any]] = None, 5715 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5716 ) -> PaginatedLegalHoldResponse: 5717 """Get all legal holds within a case 5718 5719 Retrieves the list of all legal holds within a case for an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5720 5721 :param org_id: The ID of the organization for which you want to retrieve the list of legal holds within a case. (required) 5722 :type org_id: str 5723 :param case_id: The ID of the case for which you want to retrieve the list of legal holds. (required) 5724 :type case_id: str 5725 :param limit: The maximum number of items in the result list. 5726 :type limit: int 5727 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 5728 :type cursor: str 5729 :param _request_timeout: timeout setting for this request. If one 5730 number provided, it will be total request 5731 timeout. It can also be a pair (tuple) of 5732 (connection, read) timeouts. 5733 :type _request_timeout: int, tuple(int, int), optional 5734 :param _request_auth: set to override the auth_settings for an a single 5735 request; this effectively ignores the 5736 authentication in the spec for a single request. 5737 :type _request_auth: dict, optional 5738 :param _content_type: force content-type for the request. 5739 :type _content_type: str, Optional 5740 :param _headers: set to override the headers for a single 5741 request; this effectively ignores the headers 5742 in the spec for a single request. 5743 :type _headers: dict, optional 5744 :param _host_index: set to override the host_index for a single 5745 request; this effectively ignores the host_index 5746 in the spec for a single request. 5747 :type _host_index: int, optional 5748 :return: Returns the result object. 5749 """ # noqa: E501 5750 5751 _param = self._get_all_legal_holds_serialize( 5752 org_id=org_id, 5753 case_id=case_id, 5754 limit=limit, 5755 cursor=cursor, 5756 _request_auth=_request_auth, 5757 _content_type=_content_type, 5758 _headers=_headers, 5759 _host_index=_host_index, 5760 ) 5761 5762 _response_types_map: Dict[str, Optional[str]] = { 5763 "200": "PaginatedLegalHoldResponse", 5764 "400": None, 5765 "401": None, 5766 "403": None, 5767 "404": None, 5768 "429": None, 5769 } 5770 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5771 response_data.read() 5772 return self.api_client.response_deserialize( 5773 response_data=response_data, 5774 response_types_map=_response_types_map, 5775 ).data 5776 5777 def _get_all_legal_holds_serialize( 5778 self, 5779 org_id, 5780 case_id, 5781 limit, 5782 cursor, 5783 _request_auth, 5784 _content_type, 5785 _headers, 5786 _host_index, 5787 ) -> RequestSerialized: 5788 5789 _host = None 5790 5791 _collection_formats: Dict[str, str] = {} 5792 5793 _path_params: Dict[str, str] = {} 5794 _query_params: List[Tuple[str, str]] = [] 5795 _header_params: Dict[str, Optional[str]] = _headers or {} 5796 _form_params: List[Tuple[str, str]] = [] 5797 _files: Dict[str, str] = {} 5798 _body_params: Optional[bytes] = None 5799 5800 # process the path parameters 5801 if org_id is not None: 5802 _path_params["org_id"] = org_id 5803 if case_id is not None: 5804 _path_params["case_id"] = case_id 5805 # process the query parameters 5806 if limit is not None: 5807 5808 _query_params.append(("limit", limit)) 5809 5810 if cursor is not None: 5811 5812 _query_params.append(("cursor", cursor)) 5813 5814 # process the header parameters 5815 # process the form parameters 5816 # process the body parameter 5817 5818 # set the HTTP header `Accept` 5819 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5820 5821 # authentication setting 5822 _auth_settings: List[str] = [] 5823 5824 return self.api_client.param_serialize( 5825 method="GET", 5826 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds", 5827 path_params=_path_params, 5828 query_params=_query_params, 5829 header_params=_header_params, 5830 body=_body_params, 5831 post_params=_form_params, 5832 files=_files, 5833 auth_settings=_auth_settings, 5834 collection_formats=_collection_formats, 5835 _host=_host, 5836 _request_auth=_request_auth, 5837 ) 5838 5839 @validate_call 5840 def get_case( 5841 self, 5842 org_id: Annotated[ 5843 str, 5844 Field( 5845 strict=True, 5846 description="The ID of the organization for which you want to retrieve the case information.", 5847 ), 5848 ], 5849 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to retrieve.")], 5850 _request_timeout: Union[ 5851 None, 5852 Annotated[StrictFloat, Field(gt=0)], 5853 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5854 ] = None, 5855 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5856 _content_type: Optional[StrictStr] = None, 5857 _headers: Optional[Dict[StrictStr, Any]] = None, 5858 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5859 ) -> CaseResponse: 5860 """Get case 5861 5862 Retrieves information about a case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5863 5864 :param org_id: The ID of the organization for which you want to retrieve the case information. (required) 5865 :type org_id: str 5866 :param case_id: The ID of the case you want to retrieve. (required) 5867 :type case_id: str 5868 :param _request_timeout: timeout setting for this request. If one 5869 number provided, it will be total request 5870 timeout. It can also be a pair (tuple) of 5871 (connection, read) timeouts. 5872 :type _request_timeout: int, tuple(int, int), optional 5873 :param _request_auth: set to override the auth_settings for an a single 5874 request; this effectively ignores the 5875 authentication in the spec for a single request. 5876 :type _request_auth: dict, optional 5877 :param _content_type: force content-type for the request. 5878 :type _content_type: str, Optional 5879 :param _headers: set to override the headers for a single 5880 request; this effectively ignores the headers 5881 in the spec for a single request. 5882 :type _headers: dict, optional 5883 :param _host_index: set to override the host_index for a single 5884 request; this effectively ignores the host_index 5885 in the spec for a single request. 5886 :type _host_index: int, optional 5887 :return: Returns the result object. 5888 """ # noqa: E501 5889 5890 _param = self._get_case_serialize( 5891 org_id=org_id, 5892 case_id=case_id, 5893 _request_auth=_request_auth, 5894 _content_type=_content_type, 5895 _headers=_headers, 5896 _host_index=_host_index, 5897 ) 5898 5899 _response_types_map: Dict[str, Optional[str]] = { 5900 "200": "CaseResponse", 5901 "400": None, 5902 "401": None, 5903 "403": None, 5904 "404": None, 5905 "429": None, 5906 } 5907 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5908 response_data.read() 5909 return self.api_client.response_deserialize( 5910 response_data=response_data, 5911 response_types_map=_response_types_map, 5912 ).data 5913 5914 def _get_case_serialize( 5915 self, 5916 org_id, 5917 case_id, 5918 _request_auth, 5919 _content_type, 5920 _headers, 5921 _host_index, 5922 ) -> RequestSerialized: 5923 5924 _host = None 5925 5926 _collection_formats: Dict[str, str] = {} 5927 5928 _path_params: Dict[str, str] = {} 5929 _query_params: List[Tuple[str, str]] = [] 5930 _header_params: Dict[str, Optional[str]] = _headers or {} 5931 _form_params: List[Tuple[str, str]] = [] 5932 _files: Dict[str, str] = {} 5933 _body_params: Optional[bytes] = None 5934 5935 # process the path parameters 5936 if org_id is not None: 5937 _path_params["org_id"] = org_id 5938 if case_id is not None: 5939 _path_params["case_id"] = case_id 5940 # process the query parameters 5941 # process the header parameters 5942 # process the form parameters 5943 # process the body parameter 5944 5945 # set the HTTP header `Accept` 5946 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5947 5948 # authentication setting 5949 _auth_settings: List[str] = [] 5950 5951 return self.api_client.param_serialize( 5952 method="GET", 5953 resource_path="/v2/orgs/{org_id}/cases/{case_id}", 5954 path_params=_path_params, 5955 query_params=_query_params, 5956 header_params=_header_params, 5957 body=_body_params, 5958 post_params=_form_params, 5959 files=_files, 5960 auth_settings=_auth_settings, 5961 collection_formats=_collection_formats, 5962 _host=_host, 5963 _request_auth=_request_auth, 5964 ) 5965 5966 @validate_call 5967 def get_legal_hold( 5968 self, 5969 org_id: Annotated[ 5970 str, 5971 Field( 5972 strict=True, 5973 description="The ID of the organization for which you want to retrieve the legal hold information.", 5974 ), 5975 ], 5976 case_id: Annotated[ 5977 str, 5978 Field( 5979 strict=True, description="The ID of the case for which you want to retrieve the legal hold information." 5980 ), 5981 ], 5982 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to retrieve.")], 5983 _request_timeout: Union[ 5984 None, 5985 Annotated[StrictFloat, Field(gt=0)], 5986 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5987 ] = None, 5988 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5989 _content_type: Optional[StrictStr] = None, 5990 _headers: Optional[Dict[StrictStr, Any]] = None, 5991 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5992 ) -> LegalHoldResponse: 5993 """Get legal hold information 5994 5995 Retrieves information about a legal hold within a case for an organization. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5996 5997 :param org_id: The ID of the organization for which you want to retrieve the legal hold information. (required) 5998 :type org_id: str 5999 :param case_id: The ID of the case for which you want to retrieve the legal hold information. (required) 6000 :type case_id: str 6001 :param legal_hold_id: The ID of the legal hold you want to retrieve. (required) 6002 :type legal_hold_id: str 6003 :param _request_timeout: timeout setting for this request. If one 6004 number provided, it will be total request 6005 timeout. It can also be a pair (tuple) of 6006 (connection, read) timeouts. 6007 :type _request_timeout: int, tuple(int, int), optional 6008 :param _request_auth: set to override the auth_settings for an a single 6009 request; this effectively ignores the 6010 authentication in the spec for a single request. 6011 :type _request_auth: dict, optional 6012 :param _content_type: force content-type for the request. 6013 :type _content_type: str, Optional 6014 :param _headers: set to override the headers for a single 6015 request; this effectively ignores the headers 6016 in the spec for a single request. 6017 :type _headers: dict, optional 6018 :param _host_index: set to override the host_index for a single 6019 request; this effectively ignores the host_index 6020 in the spec for a single request. 6021 :type _host_index: int, optional 6022 :return: Returns the result object. 6023 """ # noqa: E501 6024 6025 _param = self._get_legal_hold_serialize( 6026 org_id=org_id, 6027 case_id=case_id, 6028 legal_hold_id=legal_hold_id, 6029 _request_auth=_request_auth, 6030 _content_type=_content_type, 6031 _headers=_headers, 6032 _host_index=_host_index, 6033 ) 6034 6035 _response_types_map: Dict[str, Optional[str]] = { 6036 "200": "LegalHoldResponse", 6037 "400": None, 6038 "401": None, 6039 "403": None, 6040 "404": None, 6041 "429": None, 6042 } 6043 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6044 response_data.read() 6045 return self.api_client.response_deserialize( 6046 response_data=response_data, 6047 response_types_map=_response_types_map, 6048 ).data 6049 6050 def _get_legal_hold_serialize( 6051 self, 6052 org_id, 6053 case_id, 6054 legal_hold_id, 6055 _request_auth, 6056 _content_type, 6057 _headers, 6058 _host_index, 6059 ) -> RequestSerialized: 6060 6061 _host = None 6062 6063 _collection_formats: Dict[str, str] = {} 6064 6065 _path_params: Dict[str, str] = {} 6066 _query_params: List[Tuple[str, str]] = [] 6067 _header_params: Dict[str, Optional[str]] = _headers or {} 6068 _form_params: List[Tuple[str, str]] = [] 6069 _files: Dict[str, str] = {} 6070 _body_params: Optional[bytes] = None 6071 6072 # process the path parameters 6073 if org_id is not None: 6074 _path_params["org_id"] = org_id 6075 if case_id is not None: 6076 _path_params["case_id"] = case_id 6077 if legal_hold_id is not None: 6078 _path_params["legal_hold_id"] = legal_hold_id 6079 # process the query parameters 6080 # process the header parameters 6081 # process the form parameters 6082 # process the body parameter 6083 6084 # set the HTTP header `Accept` 6085 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6086 6087 # authentication setting 6088 _auth_settings: List[str] = [] 6089 6090 return self.api_client.param_serialize( 6091 method="GET", 6092 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}", 6093 path_params=_path_params, 6094 query_params=_query_params, 6095 header_params=_header_params, 6096 body=_body_params, 6097 post_params=_form_params, 6098 files=_files, 6099 auth_settings=_auth_settings, 6100 collection_formats=_collection_formats, 6101 _host=_host, 6102 _request_auth=_request_auth, 6103 ) 6104 6105 @validate_call 6106 def get_legal_hold_content_items( 6107 self, 6108 org_id: Annotated[ 6109 str, 6110 Field( 6111 strict=True, 6112 description="The ID of the organization for which you want to retrieve the list of content items under hold.", 6113 ), 6114 ], 6115 case_id: Annotated[ 6116 str, 6117 Field( 6118 strict=True, 6119 description="The ID of the case for which you want to retrieve the list of content items under hold.", 6120 ), 6121 ], 6122 legal_hold_id: Annotated[ 6123 str, 6124 Field( 6125 strict=True, 6126 description="The ID of the legal hold for which you want to retrieve the list of content items under hold.", 6127 ), 6128 ], 6129 limit: Annotated[ 6130 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 6131 Field(description="The maximum number of items in the result list."), 6132 ] = None, 6133 cursor: Annotated[ 6134 Optional[StrictStr], 6135 Field( 6136 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 6137 ), 6138 ] = None, 6139 _request_timeout: Union[ 6140 None, 6141 Annotated[StrictFloat, Field(gt=0)], 6142 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6143 ] = None, 6144 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6145 _content_type: Optional[StrictStr] = None, 6146 _headers: Optional[Dict[StrictStr, Any]] = None, 6147 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6148 ) -> PaginatedLegalHoldContentItemsResponse: 6149 """Get content items under legal hold 6150 6151 Once a legal hold is in place you can review or explore the preserved Miro boards to ensure that all relevant data is intact and ready for legal proceedings or investigations. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120628583570-Review-boards-under-legal-hold\" target=_blank>Help Center page on reviewing boards under legal hold</a>. <br><br>This API lists all content items under a specific legal hold in a case for an organization. Please verify that the legal hold is in 'ACTIVE' state to guarantee that the legal hold has finished processing the full list of content items under hold. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 6152 6153 :param org_id: The ID of the organization for which you want to retrieve the list of content items under hold. (required) 6154 :type org_id: str 6155 :param case_id: The ID of the case for which you want to retrieve the list of content items under hold. (required) 6156 :type case_id: str 6157 :param legal_hold_id: The ID of the legal hold for which you want to retrieve the list of content items under hold. (required) 6158 :type legal_hold_id: str 6159 :param limit: The maximum number of items in the result list. 6160 :type limit: int 6161 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 6162 :type cursor: str 6163 :param _request_timeout: timeout setting for this request. If one 6164 number provided, it will be total request 6165 timeout. It can also be a pair (tuple) of 6166 (connection, read) timeouts. 6167 :type _request_timeout: int, tuple(int, int), optional 6168 :param _request_auth: set to override the auth_settings for an a single 6169 request; this effectively ignores the 6170 authentication in the spec for a single request. 6171 :type _request_auth: dict, optional 6172 :param _content_type: force content-type for the request. 6173 :type _content_type: str, Optional 6174 :param _headers: set to override the headers for a single 6175 request; this effectively ignores the headers 6176 in the spec for a single request. 6177 :type _headers: dict, optional 6178 :param _host_index: set to override the host_index for a single 6179 request; this effectively ignores the host_index 6180 in the spec for a single request. 6181 :type _host_index: int, optional 6182 :return: Returns the result object. 6183 """ # noqa: E501 6184 6185 _param = self._get_legal_hold_content_items_serialize( 6186 org_id=org_id, 6187 case_id=case_id, 6188 legal_hold_id=legal_hold_id, 6189 limit=limit, 6190 cursor=cursor, 6191 _request_auth=_request_auth, 6192 _content_type=_content_type, 6193 _headers=_headers, 6194 _host_index=_host_index, 6195 ) 6196 6197 _response_types_map: Dict[str, Optional[str]] = { 6198 "200": "PaginatedLegalHoldContentItemsResponse", 6199 "400": None, 6200 "401": None, 6201 "403": None, 6202 "404": None, 6203 "429": None, 6204 } 6205 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6206 response_data.read() 6207 return self.api_client.response_deserialize( 6208 response_data=response_data, 6209 response_types_map=_response_types_map, 6210 ).data 6211 6212 def _get_legal_hold_content_items_serialize( 6213 self, 6214 org_id, 6215 case_id, 6216 legal_hold_id, 6217 limit, 6218 cursor, 6219 _request_auth, 6220 _content_type, 6221 _headers, 6222 _host_index, 6223 ) -> RequestSerialized: 6224 6225 _host = None 6226 6227 _collection_formats: Dict[str, str] = {} 6228 6229 _path_params: Dict[str, str] = {} 6230 _query_params: List[Tuple[str, str]] = [] 6231 _header_params: Dict[str, Optional[str]] = _headers or {} 6232 _form_params: List[Tuple[str, str]] = [] 6233 _files: Dict[str, str] = {} 6234 _body_params: Optional[bytes] = None 6235 6236 # process the path parameters 6237 if org_id is not None: 6238 _path_params["org_id"] = org_id 6239 if case_id is not None: 6240 _path_params["case_id"] = case_id 6241 if legal_hold_id is not None: 6242 _path_params["legal_hold_id"] = legal_hold_id 6243 # process the query parameters 6244 if limit is not None: 6245 6246 _query_params.append(("limit", limit)) 6247 6248 if cursor is not None: 6249 6250 _query_params.append(("cursor", cursor)) 6251 6252 # process the header parameters 6253 # process the form parameters 6254 # process the body parameter 6255 6256 # set the HTTP header `Accept` 6257 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6258 6259 # authentication setting 6260 _auth_settings: List[str] = [] 6261 6262 return self.api_client.param_serialize( 6263 method="GET", 6264 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}/content-items", 6265 path_params=_path_params, 6266 query_params=_query_params, 6267 header_params=_header_params, 6268 body=_body_params, 6269 post_params=_form_params, 6270 files=_files, 6271 auth_settings=_auth_settings, 6272 collection_formats=_collection_formats, 6273 _host=_host, 6274 _request_auth=_request_auth, 6275 ) 6276 6277 @validate_call 6278 def get_legal_hold_export_jobs( 6279 self, 6280 org_id: Annotated[ 6281 str, 6282 Field( 6283 strict=True, 6284 description="The ID of the organization for which you want to retrieve the list of export jobs within a case.", 6285 ), 6286 ], 6287 case_id: Annotated[ 6288 str, 6289 Field( 6290 strict=True, description="The ID of the case for which you want to retrieve the list of export jobs." 6291 ), 6292 ], 6293 limit: Annotated[ 6294 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 6295 Field(description="The maximum number of items in the result list."), 6296 ] = None, 6297 cursor: Annotated[ 6298 Optional[StrictStr], 6299 Field( 6300 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 6301 ), 6302 ] = None, 6303 _request_timeout: Union[ 6304 None, 6305 Annotated[StrictFloat, Field(gt=0)], 6306 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6307 ] = None, 6308 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6309 _content_type: Optional[StrictStr] = None, 6310 _headers: Optional[Dict[StrictStr, Any]] = None, 6311 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6312 ) -> PaginatedCaseExportJobsResponse: 6313 """Get board export jobs of a case 6314 6315 Retrieves board export jobs for a case.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 6316 6317 :param org_id: The ID of the organization for which you want to retrieve the list of export jobs within a case. (required) 6318 :type org_id: str 6319 :param case_id: The ID of the case for which you want to retrieve the list of export jobs. (required) 6320 :type case_id: str 6321 :param limit: The maximum number of items in the result list. 6322 :type limit: int 6323 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 6324 :type cursor: str 6325 :param _request_timeout: timeout setting for this request. If one 6326 number provided, it will be total request 6327 timeout. It can also be a pair (tuple) of 6328 (connection, read) timeouts. 6329 :type _request_timeout: int, tuple(int, int), optional 6330 :param _request_auth: set to override the auth_settings for an a single 6331 request; this effectively ignores the 6332 authentication in the spec for a single request. 6333 :type _request_auth: dict, optional 6334 :param _content_type: force content-type for the request. 6335 :type _content_type: str, Optional 6336 :param _headers: set to override the headers for a single 6337 request; this effectively ignores the headers 6338 in the spec for a single request. 6339 :type _headers: dict, optional 6340 :param _host_index: set to override the host_index for a single 6341 request; this effectively ignores the host_index 6342 in the spec for a single request. 6343 :type _host_index: int, optional 6344 :return: Returns the result object. 6345 """ # noqa: E501 6346 6347 _param = self._get_legal_hold_export_jobs_serialize( 6348 org_id=org_id, 6349 case_id=case_id, 6350 limit=limit, 6351 cursor=cursor, 6352 _request_auth=_request_auth, 6353 _content_type=_content_type, 6354 _headers=_headers, 6355 _host_index=_host_index, 6356 ) 6357 6358 _response_types_map: Dict[str, Optional[str]] = { 6359 "200": "PaginatedCaseExportJobsResponse", 6360 "400": None, 6361 "401": None, 6362 "403": None, 6363 "404": None, 6364 "429": None, 6365 } 6366 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6367 response_data.read() 6368 return self.api_client.response_deserialize( 6369 response_data=response_data, 6370 response_types_map=_response_types_map, 6371 ).data 6372 6373 def _get_legal_hold_export_jobs_serialize( 6374 self, 6375 org_id, 6376 case_id, 6377 limit, 6378 cursor, 6379 _request_auth, 6380 _content_type, 6381 _headers, 6382 _host_index, 6383 ) -> RequestSerialized: 6384 6385 _host = None 6386 6387 _collection_formats: Dict[str, str] = {} 6388 6389 _path_params: Dict[str, str] = {} 6390 _query_params: List[Tuple[str, str]] = [] 6391 _header_params: Dict[str, Optional[str]] = _headers or {} 6392 _form_params: List[Tuple[str, str]] = [] 6393 _files: Dict[str, str] = {} 6394 _body_params: Optional[bytes] = None 6395 6396 # process the path parameters 6397 if org_id is not None: 6398 _path_params["org_id"] = org_id 6399 if case_id is not None: 6400 _path_params["case_id"] = case_id 6401 # process the query parameters 6402 if limit is not None: 6403 6404 _query_params.append(("limit", limit)) 6405 6406 if cursor is not None: 6407 6408 _query_params.append(("cursor", cursor)) 6409 6410 # process the header parameters 6411 # process the form parameters 6412 # process the body parameter 6413 6414 # set the HTTP header `Accept` 6415 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6416 6417 # authentication setting 6418 _auth_settings: List[str] = [] 6419 6420 return self.api_client.param_serialize( 6421 method="GET", 6422 resource_path="/v2/orgs/{org_id}/cases/{case_id}/export-jobs", 6423 path_params=_path_params, 6424 query_params=_query_params, 6425 header_params=_header_params, 6426 body=_body_params, 6427 post_params=_form_params, 6428 files=_files, 6429 auth_settings=_auth_settings, 6430 collection_formats=_collection_formats, 6431 _host=_host, 6432 _request_auth=_request_auth, 6433 ) 6434 6435 @validate_call 6436 def create_mindmap_nodes_experimental( 6437 self, 6438 board_id: Annotated[ 6439 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 6440 ], 6441 mindmap_create_request: MindmapCreateRequest, 6442 _request_timeout: Union[ 6443 None, 6444 Annotated[StrictFloat, Field(gt=0)], 6445 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6446 ] = None, 6447 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6448 _content_type: Optional[StrictStr] = None, 6449 _headers: Optional[Dict[StrictStr, Any]] = None, 6450 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6451 ) -> MindmapItem: 6452 """Create mind map node 6453 6454 Adds a mind map node to a board. A root node is the starting point of a mind map. A node that is created under a root node is a child node. For information on mind maps, use cases, mind map structure, and more, see the <a href=\"https://developers.miro.com/docs/mind-maps\" target=_blank>Mind Map Overview</a> page. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/><br/> <b>Known limitations on node placement: </b> Currently, the create API supports explicit positions for nodes. This means that users can only place nodes based on the x, y coordinates provided in the position parameters. If the position is not provided in the request, nodes default to coordinates x=0, y=0, effectively placing them at the center of the board. <br /><br /><b>Upcoming changes:</b> We understand the importance of flexibility in node placement. We are actively working on implementing changes to support positioning nodes relative to their parent node as well. This enhancement offers a more dynamic and intuitive mind mapping experience. <br /><br />Additionally, we are actively working on providing the update API, further enhancing the functionality of mind map APIs. 6455 6456 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 6457 :type board_id: str 6458 :param mindmap_create_request: (required) 6459 :type mindmap_create_request: MindmapCreateRequest 6460 :param _request_timeout: timeout setting for this request. If one 6461 number provided, it will be total request 6462 timeout. It can also be a pair (tuple) of 6463 (connection, read) timeouts. 6464 :type _request_timeout: int, tuple(int, int), optional 6465 :param _request_auth: set to override the auth_settings for an a single 6466 request; this effectively ignores the 6467 authentication in the spec for a single request. 6468 :type _request_auth: dict, optional 6469 :param _content_type: force content-type for the request. 6470 :type _content_type: str, Optional 6471 :param _headers: set to override the headers for a single 6472 request; this effectively ignores the headers 6473 in the spec for a single request. 6474 :type _headers: dict, optional 6475 :param _host_index: set to override the host_index for a single 6476 request; this effectively ignores the host_index 6477 in the spec for a single request. 6478 :type _host_index: int, optional 6479 :return: Returns the result object. 6480 """ # noqa: E501 6481 6482 _param = self._create_mindmap_nodes_experimental_serialize( 6483 board_id=board_id, 6484 mindmap_create_request=mindmap_create_request, 6485 _request_auth=_request_auth, 6486 _content_type=_content_type, 6487 _headers=_headers, 6488 _host_index=_host_index, 6489 ) 6490 6491 _response_types_map: Dict[str, Optional[str]] = { 6492 "201": "MindmapItem", 6493 "400": "CreateFrameItem400Response", 6494 "404": "CreateFrameItem400Response", 6495 "429": "CreateFrameItem400Response", 6496 } 6497 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6498 response_data.read() 6499 return self.api_client.response_deserialize( 6500 response_data=response_data, 6501 response_types_map=_response_types_map, 6502 ).data 6503 6504 def _create_mindmap_nodes_experimental_serialize( 6505 self, 6506 board_id, 6507 mindmap_create_request, 6508 _request_auth, 6509 _content_type, 6510 _headers, 6511 _host_index, 6512 ) -> RequestSerialized: 6513 6514 _host = None 6515 6516 _collection_formats: Dict[str, str] = {} 6517 6518 _path_params: Dict[str, str] = {} 6519 _query_params: List[Tuple[str, str]] = [] 6520 _header_params: Dict[str, Optional[str]] = _headers or {} 6521 _form_params: List[Tuple[str, str]] = [] 6522 _files: Dict[str, str] = {} 6523 _body_params: Optional[bytes] = None 6524 6525 # process the path parameters 6526 if board_id is not None: 6527 _path_params["board_id"] = board_id 6528 # process the query parameters 6529 # process the header parameters 6530 # process the form parameters 6531 # process the body parameter 6532 if mindmap_create_request is not None: 6533 _body_params = mindmap_create_request 6534 6535 # set the HTTP header `Accept` 6536 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6537 6538 # set the HTTP header `Content-Type` 6539 if _content_type: 6540 _header_params["Content-Type"] = _content_type 6541 else: 6542 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 6543 if _default_content_type is not None: 6544 _header_params["Content-Type"] = _default_content_type 6545 6546 # authentication setting 6547 _auth_settings: List[str] = [] 6548 6549 return self.api_client.param_serialize( 6550 method="POST", 6551 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes", 6552 path_params=_path_params, 6553 query_params=_query_params, 6554 header_params=_header_params, 6555 body=_body_params, 6556 post_params=_form_params, 6557 files=_files, 6558 auth_settings=_auth_settings, 6559 collection_formats=_collection_formats, 6560 _host=_host, 6561 _request_auth=_request_auth, 6562 ) 6563 6564 @validate_call 6565 def delete_mindmap_node_experimental( 6566 self, 6567 board_id: Annotated[ 6568 StrictStr, 6569 Field(description="Unique identifier (ID) of the board from which you want to delete the mind map node."), 6570 ], 6571 item_id: Annotated[ 6572 StrictStr, Field(description="Unique identifier (ID) of the mind map node that you want to delete.") 6573 ], 6574 _request_timeout: Union[ 6575 None, 6576 Annotated[StrictFloat, Field(gt=0)], 6577 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6578 ] = None, 6579 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6580 _content_type: Optional[StrictStr] = None, 6581 _headers: Optional[Dict[StrictStr, Any]] = None, 6582 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6583 ) -> object: 6584 """Delete mind map node 6585 6586 Deletes a mind map node item and its child nodes from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 6587 6588 :param board_id: Unique identifier (ID) of the board from which you want to delete the mind map node. (required) 6589 :type board_id: str 6590 :param item_id: Unique identifier (ID) of the mind map node that you want to delete. (required) 6591 :type item_id: str 6592 :param _request_timeout: timeout setting for this request. If one 6593 number provided, it will be total request 6594 timeout. It can also be a pair (tuple) of 6595 (connection, read) timeouts. 6596 :type _request_timeout: int, tuple(int, int), optional 6597 :param _request_auth: set to override the auth_settings for an a single 6598 request; this effectively ignores the 6599 authentication in the spec for a single request. 6600 :type _request_auth: dict, optional 6601 :param _content_type: force content-type for the request. 6602 :type _content_type: str, Optional 6603 :param _headers: set to override the headers for a single 6604 request; this effectively ignores the headers 6605 in the spec for a single request. 6606 :type _headers: dict, optional 6607 :param _host_index: set to override the host_index for a single 6608 request; this effectively ignores the host_index 6609 in the spec for a single request. 6610 :type _host_index: int, optional 6611 :return: Returns the result object. 6612 """ # noqa: E501 6613 6614 _param = self._delete_mindmap_node_experimental_serialize( 6615 board_id=board_id, 6616 item_id=item_id, 6617 _request_auth=_request_auth, 6618 _content_type=_content_type, 6619 _headers=_headers, 6620 _host_index=_host_index, 6621 ) 6622 6623 _response_types_map: Dict[str, Optional[str]] = { 6624 "204": "object", 6625 "400": "CreateFrameItem400Response", 6626 "404": "CreateFrameItem400Response", 6627 "429": "CreateFrameItem400Response", 6628 } 6629 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6630 response_data.read() 6631 return self.api_client.response_deserialize( 6632 response_data=response_data, 6633 response_types_map=_response_types_map, 6634 ).data 6635 6636 def _delete_mindmap_node_experimental_serialize( 6637 self, 6638 board_id, 6639 item_id, 6640 _request_auth, 6641 _content_type, 6642 _headers, 6643 _host_index, 6644 ) -> RequestSerialized: 6645 6646 _host = None 6647 6648 _collection_formats: Dict[str, str] = {} 6649 6650 _path_params: Dict[str, str] = {} 6651 _query_params: List[Tuple[str, str]] = [] 6652 _header_params: Dict[str, Optional[str]] = _headers or {} 6653 _form_params: List[Tuple[str, str]] = [] 6654 _files: Dict[str, str] = {} 6655 _body_params: Optional[bytes] = None 6656 6657 # process the path parameters 6658 if board_id is not None: 6659 _path_params["board_id"] = board_id 6660 if item_id is not None: 6661 _path_params["item_id"] = item_id 6662 # process the query parameters 6663 # process the header parameters 6664 # process the form parameters 6665 # process the body parameter 6666 6667 # set the HTTP header `Accept` 6668 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6669 6670 # authentication setting 6671 _auth_settings: List[str] = [] 6672 6673 return self.api_client.param_serialize( 6674 method="DELETE", 6675 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes/{item_id}", 6676 path_params=_path_params, 6677 query_params=_query_params, 6678 header_params=_header_params, 6679 body=_body_params, 6680 post_params=_form_params, 6681 files=_files, 6682 auth_settings=_auth_settings, 6683 collection_formats=_collection_formats, 6684 _host=_host, 6685 _request_auth=_request_auth, 6686 ) 6687 6688 @validate_call 6689 def get_mindmap_node_experimental( 6690 self, 6691 board_id: Annotated[ 6692 StrictStr, 6693 Field(description="Unique identifier (ID) of the board from which you want to retrieve a mind map node."), 6694 ], 6695 item_id: Annotated[ 6696 StrictStr, Field(description="Unique identifier (ID) of the mind map node that you want to retrieve.") 6697 ], 6698 _request_timeout: Union[ 6699 None, 6700 Annotated[StrictFloat, Field(gt=0)], 6701 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6702 ] = None, 6703 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6704 _content_type: Optional[StrictStr] = None, 6705 _headers: Optional[Dict[StrictStr, Any]] = None, 6706 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6707 ) -> MindmapItem: 6708 """Get specific mind map node 6709 6710 Retrieves information for a specific mind map node on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 6711 6712 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a mind map node. (required) 6713 :type board_id: str 6714 :param item_id: Unique identifier (ID) of the mind map node that you want to retrieve. (required) 6715 :type item_id: str 6716 :param _request_timeout: timeout setting for this request. If one 6717 number provided, it will be total request 6718 timeout. It can also be a pair (tuple) of 6719 (connection, read) timeouts. 6720 :type _request_timeout: int, tuple(int, int), optional 6721 :param _request_auth: set to override the auth_settings for an a single 6722 request; this effectively ignores the 6723 authentication in the spec for a single request. 6724 :type _request_auth: dict, optional 6725 :param _content_type: force content-type for the request. 6726 :type _content_type: str, Optional 6727 :param _headers: set to override the headers for a single 6728 request; this effectively ignores the headers 6729 in the spec for a single request. 6730 :type _headers: dict, optional 6731 :param _host_index: set to override the host_index for a single 6732 request; this effectively ignores the host_index 6733 in the spec for a single request. 6734 :type _host_index: int, optional 6735 :return: Returns the result object. 6736 """ # noqa: E501 6737 6738 _param = self._get_mindmap_node_experimental_serialize( 6739 board_id=board_id, 6740 item_id=item_id, 6741 _request_auth=_request_auth, 6742 _content_type=_content_type, 6743 _headers=_headers, 6744 _host_index=_host_index, 6745 ) 6746 6747 _response_types_map: Dict[str, Optional[str]] = { 6748 "200": "MindmapItem", 6749 } 6750 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6751 response_data.read() 6752 return self.api_client.response_deserialize( 6753 response_data=response_data, 6754 response_types_map=_response_types_map, 6755 ).data 6756 6757 def _get_mindmap_node_experimental_serialize( 6758 self, 6759 board_id, 6760 item_id, 6761 _request_auth, 6762 _content_type, 6763 _headers, 6764 _host_index, 6765 ) -> RequestSerialized: 6766 6767 _host = None 6768 6769 _collection_formats: Dict[str, str] = {} 6770 6771 _path_params: Dict[str, str] = {} 6772 _query_params: List[Tuple[str, str]] = [] 6773 _header_params: Dict[str, Optional[str]] = _headers or {} 6774 _form_params: List[Tuple[str, str]] = [] 6775 _files: Dict[str, str] = {} 6776 _body_params: Optional[bytes] = None 6777 6778 # process the path parameters 6779 if board_id is not None: 6780 _path_params["board_id"] = board_id 6781 if item_id is not None: 6782 _path_params["item_id"] = item_id 6783 # process the query parameters 6784 # process the header parameters 6785 # process the form parameters 6786 # process the body parameter 6787 6788 # set the HTTP header `Accept` 6789 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6790 6791 # authentication setting 6792 _auth_settings: List[str] = [] 6793 6794 return self.api_client.param_serialize( 6795 method="GET", 6796 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes/{item_id}", 6797 path_params=_path_params, 6798 query_params=_query_params, 6799 header_params=_header_params, 6800 body=_body_params, 6801 post_params=_form_params, 6802 files=_files, 6803 auth_settings=_auth_settings, 6804 collection_formats=_collection_formats, 6805 _host=_host, 6806 _request_auth=_request_auth, 6807 ) 6808 6809 @validate_call 6810 def get_mindmap_nodes_experimental( 6811 self, 6812 board_id: Annotated[ 6813 StrictStr, 6814 Field(description="Unique identifier (ID) of the board from which you want to retrieve mind map nodes."), 6815 ], 6816 limit: Annotated[Optional[StrictStr], Field(description="Maximum number of results returned")] = None, 6817 cursor: Annotated[ 6818 Optional[StrictStr], Field(description="Points to the next portion of the results set") 6819 ] = None, 6820 _request_timeout: Union[ 6821 None, 6822 Annotated[StrictFloat, Field(gt=0)], 6823 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6824 ] = None, 6825 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6826 _content_type: Optional[StrictStr] = None, 6827 _headers: Optional[Dict[StrictStr, Any]] = None, 6828 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6829 ) -> MindmapCursorPaged: 6830 """Get mind map nodes 6831 6832 Retrieves a list of mind map nodes for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 6833 6834 :param board_id: Unique identifier (ID) of the board from which you want to retrieve mind map nodes. (required) 6835 :type board_id: str 6836 :param limit: Maximum number of results returned 6837 :type limit: str 6838 :param cursor: Points to the next portion of the results set 6839 :type cursor: str 6840 :param _request_timeout: timeout setting for this request. If one 6841 number provided, it will be total request 6842 timeout. It can also be a pair (tuple) of 6843 (connection, read) timeouts. 6844 :type _request_timeout: int, tuple(int, int), optional 6845 :param _request_auth: set to override the auth_settings for an a single 6846 request; this effectively ignores the 6847 authentication in the spec for a single request. 6848 :type _request_auth: dict, optional 6849 :param _content_type: force content-type for the request. 6850 :type _content_type: str, Optional 6851 :param _headers: set to override the headers for a single 6852 request; this effectively ignores the headers 6853 in the spec for a single request. 6854 :type _headers: dict, optional 6855 :param _host_index: set to override the host_index for a single 6856 request; this effectively ignores the host_index 6857 in the spec for a single request. 6858 :type _host_index: int, optional 6859 :return: Returns the result object. 6860 """ # noqa: E501 6861 6862 _param = self._get_mindmap_nodes_experimental_serialize( 6863 board_id=board_id, 6864 limit=limit, 6865 cursor=cursor, 6866 _request_auth=_request_auth, 6867 _content_type=_content_type, 6868 _headers=_headers, 6869 _host_index=_host_index, 6870 ) 6871 6872 _response_types_map: Dict[str, Optional[str]] = { 6873 "200": "MindmapCursorPaged", 6874 } 6875 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6876 response_data.read() 6877 return self.api_client.response_deserialize( 6878 response_data=response_data, 6879 response_types_map=_response_types_map, 6880 ).data 6881 6882 def _get_mindmap_nodes_experimental_serialize( 6883 self, 6884 board_id, 6885 limit, 6886 cursor, 6887 _request_auth, 6888 _content_type, 6889 _headers, 6890 _host_index, 6891 ) -> RequestSerialized: 6892 6893 _host = None 6894 6895 _collection_formats: Dict[str, str] = {} 6896 6897 _path_params: Dict[str, str] = {} 6898 _query_params: List[Tuple[str, str]] = [] 6899 _header_params: Dict[str, Optional[str]] = _headers or {} 6900 _form_params: List[Tuple[str, str]] = [] 6901 _files: Dict[str, str] = {} 6902 _body_params: Optional[bytes] = None 6903 6904 # process the path parameters 6905 if board_id is not None: 6906 _path_params["board_id"] = board_id 6907 # process the query parameters 6908 if limit is not None: 6909 6910 _query_params.append(("limit", limit)) 6911 6912 if cursor is not None: 6913 6914 _query_params.append(("cursor", cursor)) 6915 6916 # process the header parameters 6917 # process the form parameters 6918 # process the body parameter 6919 6920 # set the HTTP header `Accept` 6921 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6922 6923 # authentication setting 6924 _auth_settings: List[str] = [] 6925 6926 return self.api_client.param_serialize( 6927 method="GET", 6928 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes", 6929 path_params=_path_params, 6930 query_params=_query_params, 6931 header_params=_header_params, 6932 body=_body_params, 6933 post_params=_form_params, 6934 files=_files, 6935 auth_settings=_auth_settings, 6936 collection_formats=_collection_formats, 6937 _host=_host, 6938 _request_auth=_request_auth, 6939 ) 6940 6941 @validate_call 6942 def revoke_token_v2( 6943 self, 6944 revoke_token_request: RevokeTokenRequest, 6945 _request_timeout: Union[ 6946 None, 6947 Annotated[StrictFloat, Field(gt=0)], 6948 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6949 ] = None, 6950 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6951 _content_type: Optional[StrictStr] = None, 6952 _headers: Optional[Dict[StrictStr, Any]] = None, 6953 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6954 ) -> None: 6955 """Revoke token (v2) 6956 6957 Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user. 6958 6959 :param revoke_token_request: (required) 6960 :type revoke_token_request: RevokeTokenRequest 6961 :param _request_timeout: timeout setting for this request. If one 6962 number provided, it will be total request 6963 timeout. It can also be a pair (tuple) of 6964 (connection, read) timeouts. 6965 :type _request_timeout: int, tuple(int, int), optional 6966 :param _request_auth: set to override the auth_settings for an a single 6967 request; this effectively ignores the 6968 authentication in the spec for a single request. 6969 :type _request_auth: dict, optional 6970 :param _content_type: force content-type for the request. 6971 :type _content_type: str, Optional 6972 :param _headers: set to override the headers for a single 6973 request; this effectively ignores the headers 6974 in the spec for a single request. 6975 :type _headers: dict, optional 6976 :param _host_index: set to override the host_index for a single 6977 request; this effectively ignores the host_index 6978 in the spec for a single request. 6979 :type _host_index: int, optional 6980 :return: Returns the result object. 6981 """ # noqa: E501 6982 6983 _param = self._revoke_token_v2_serialize( 6984 revoke_token_request=revoke_token_request, 6985 _request_auth=_request_auth, 6986 _content_type=_content_type, 6987 _headers=_headers, 6988 _host_index=_host_index, 6989 ) 6990 6991 _response_types_map: Dict[str, Optional[str]] = { 6992 "204": None, 6993 "404": "ErrorResponse", 6994 } 6995 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6996 response_data.read() 6997 return self.api_client.response_deserialize( 6998 response_data=response_data, 6999 response_types_map=_response_types_map, 7000 ).data 7001 7002 def _revoke_token_v2_serialize( 7003 self, 7004 revoke_token_request, 7005 _request_auth, 7006 _content_type, 7007 _headers, 7008 _host_index, 7009 ) -> RequestSerialized: 7010 7011 _host = None 7012 7013 _collection_formats: Dict[str, str] = {} 7014 7015 _path_params: Dict[str, str] = {} 7016 _query_params: List[Tuple[str, str]] = [] 7017 _header_params: Dict[str, Optional[str]] = _headers or {} 7018 _form_params: List[Tuple[str, str]] = [] 7019 _files: Dict[str, str] = {} 7020 _body_params: Optional[bytes] = None 7021 7022 # process the path parameters 7023 # process the query parameters 7024 # process the header parameters 7025 # process the form parameters 7026 # process the body parameter 7027 if revoke_token_request is not None: 7028 _body_params = revoke_token_request 7029 7030 # set the HTTP header `Accept` 7031 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7032 7033 # set the HTTP header `Content-Type` 7034 if _content_type: 7035 _header_params["Content-Type"] = _content_type 7036 else: 7037 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 7038 if _default_content_type is not None: 7039 _header_params["Content-Type"] = _default_content_type 7040 7041 # authentication setting 7042 _auth_settings: List[str] = [] 7043 7044 return self.api_client.param_serialize( 7045 method="POST", 7046 resource_path="/v2/oauth/revoke", 7047 path_params=_path_params, 7048 query_params=_query_params, 7049 header_params=_header_params, 7050 body=_body_params, 7051 post_params=_form_params, 7052 files=_files, 7053 auth_settings=_auth_settings, 7054 collection_formats=_collection_formats, 7055 _host=_host, 7056 _request_auth=_request_auth, 7057 ) 7058 7059 @validate_call 7060 def enterprise_get_organization_member( 7061 self, 7062 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7063 member_id: Annotated[StrictStr, Field(description="id of the organization member")], 7064 _request_timeout: Union[ 7065 None, 7066 Annotated[StrictFloat, Field(gt=0)], 7067 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7068 ] = None, 7069 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7070 _content_type: Optional[StrictStr] = None, 7071 _headers: Optional[Dict[StrictStr, Any]] = None, 7072 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7073 ) -> OrganizationMember: 7074 """Get organization member 7075 7076 Retrieves organization member information for an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7077 7078 :param org_id: id of the organization (required) 7079 :type org_id: str 7080 :param member_id: id of the organization member (required) 7081 :type member_id: str 7082 :param _request_timeout: timeout setting for this request. If one 7083 number provided, it will be total request 7084 timeout. It can also be a pair (tuple) of 7085 (connection, read) timeouts. 7086 :type _request_timeout: int, tuple(int, int), optional 7087 :param _request_auth: set to override the auth_settings for an a single 7088 request; this effectively ignores the 7089 authentication in the spec for a single request. 7090 :type _request_auth: dict, optional 7091 :param _content_type: force content-type for the request. 7092 :type _content_type: str, Optional 7093 :param _headers: set to override the headers for a single 7094 request; this effectively ignores the headers 7095 in the spec for a single request. 7096 :type _headers: dict, optional 7097 :param _host_index: set to override the host_index for a single 7098 request; this effectively ignores the host_index 7099 in the spec for a single request. 7100 :type _host_index: int, optional 7101 :return: Returns the result object. 7102 """ # noqa: E501 7103 7104 _param = self._enterprise_get_organization_member_serialize( 7105 org_id=org_id, 7106 member_id=member_id, 7107 _request_auth=_request_auth, 7108 _content_type=_content_type, 7109 _headers=_headers, 7110 _host_index=_host_index, 7111 ) 7112 7113 _response_types_map: Dict[str, Optional[str]] = { 7114 "200": "OrganizationMember", 7115 "400": None, 7116 "401": None, 7117 "403": None, 7118 "404": None, 7119 "409": None, 7120 "429": None, 7121 } 7122 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7123 response_data.read() 7124 return self.api_client.response_deserialize( 7125 response_data=response_data, 7126 response_types_map=_response_types_map, 7127 ).data 7128 7129 def _enterprise_get_organization_member_serialize( 7130 self, 7131 org_id, 7132 member_id, 7133 _request_auth, 7134 _content_type, 7135 _headers, 7136 _host_index, 7137 ) -> RequestSerialized: 7138 7139 _host = None 7140 7141 _collection_formats: Dict[str, str] = {} 7142 7143 _path_params: Dict[str, str] = {} 7144 _query_params: List[Tuple[str, str]] = [] 7145 _header_params: Dict[str, Optional[str]] = _headers or {} 7146 _form_params: List[Tuple[str, str]] = [] 7147 _files: Dict[str, str] = {} 7148 _body_params: Optional[bytes] = None 7149 7150 # process the path parameters 7151 if org_id is not None: 7152 _path_params["org_id"] = org_id 7153 if member_id is not None: 7154 _path_params["member_id"] = member_id 7155 # process the query parameters 7156 # process the header parameters 7157 # process the form parameters 7158 # process the body parameter 7159 7160 # set the HTTP header `Accept` 7161 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7162 7163 # authentication setting 7164 _auth_settings: List[str] = [] 7165 7166 return self.api_client.param_serialize( 7167 method="GET", 7168 resource_path="/v2/orgs/{org_id}/members/{member_id}", 7169 path_params=_path_params, 7170 query_params=_query_params, 7171 header_params=_header_params, 7172 body=_body_params, 7173 post_params=_form_params, 7174 files=_files, 7175 auth_settings=_auth_settings, 7176 collection_formats=_collection_formats, 7177 _host=_host, 7178 _request_auth=_request_auth, 7179 ) 7180 7181 @validate_call 7182 def enterprise_get_organization_members( 7183 self, 7184 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7185 emails: Optional[StrictStr] = None, 7186 role: Optional[StrictStr] = None, 7187 license: Optional[StrictStr] = None, 7188 active: Optional[StrictBool] = None, 7189 cursor: Optional[StrictStr] = None, 7190 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 7191 _request_timeout: Union[ 7192 None, 7193 Annotated[StrictFloat, Field(gt=0)], 7194 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7195 ] = None, 7196 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7197 _content_type: Optional[StrictStr] = None, 7198 _headers: Optional[Dict[StrictStr, Any]] = None, 7199 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7200 ) -> EnterpriseGetOrganizationMembers200Response: 7201 """Get organization members 7202 7203 Retrieves organization members based on the organization ID and the cursor, or based on the user emails provided in the request.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7204 7205 :param org_id: id of the organization (required) 7206 :type org_id: str 7207 :param emails: 7208 :type emails: str 7209 :param role: 7210 :type role: str 7211 :param license: 7212 :type license: str 7213 :param active: 7214 :type active: bool 7215 :param cursor: 7216 :type cursor: str 7217 :param limit: 7218 :type limit: int 7219 :param _request_timeout: timeout setting for this request. If one 7220 number provided, it will be total request 7221 timeout. It can also be a pair (tuple) of 7222 (connection, read) timeouts. 7223 :type _request_timeout: int, tuple(int, int), optional 7224 :param _request_auth: set to override the auth_settings for an a single 7225 request; this effectively ignores the 7226 authentication in the spec for a single request. 7227 :type _request_auth: dict, optional 7228 :param _content_type: force content-type for the request. 7229 :type _content_type: str, Optional 7230 :param _headers: set to override the headers for a single 7231 request; this effectively ignores the headers 7232 in the spec for a single request. 7233 :type _headers: dict, optional 7234 :param _host_index: set to override the host_index for a single 7235 request; this effectively ignores the host_index 7236 in the spec for a single request. 7237 :type _host_index: int, optional 7238 :return: Returns the result object. 7239 """ # noqa: E501 7240 7241 _param = self._enterprise_get_organization_members_serialize( 7242 org_id=org_id, 7243 emails=emails, 7244 role=role, 7245 license=license, 7246 active=active, 7247 cursor=cursor, 7248 limit=limit, 7249 _request_auth=_request_auth, 7250 _content_type=_content_type, 7251 _headers=_headers, 7252 _host_index=_host_index, 7253 ) 7254 7255 _response_types_map: Dict[str, Optional[str]] = { 7256 "200": "EnterpriseGetOrganizationMembers200Response", 7257 "400": None, 7258 "401": None, 7259 "403": None, 7260 "404": None, 7261 "409": None, 7262 "429": None, 7263 } 7264 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7265 response_data.read() 7266 return self.api_client.response_deserialize( 7267 response_data=response_data, 7268 response_types_map=_response_types_map, 7269 ).data 7270 7271 def _enterprise_get_organization_members_serialize( 7272 self, 7273 org_id, 7274 emails, 7275 role, 7276 license, 7277 active, 7278 cursor, 7279 limit, 7280 _request_auth, 7281 _content_type, 7282 _headers, 7283 _host_index, 7284 ) -> RequestSerialized: 7285 7286 _host = None 7287 7288 _collection_formats: Dict[str, str] = {} 7289 7290 _path_params: Dict[str, str] = {} 7291 _query_params: List[Tuple[str, str]] = [] 7292 _header_params: Dict[str, Optional[str]] = _headers or {} 7293 _form_params: List[Tuple[str, str]] = [] 7294 _files: Dict[str, str] = {} 7295 _body_params: Optional[bytes] = None 7296 7297 # process the path parameters 7298 if org_id is not None: 7299 _path_params["org_id"] = org_id 7300 # process the query parameters 7301 if emails is not None: 7302 7303 _query_params.append(("emails", emails)) 7304 7305 if role is not None: 7306 7307 _query_params.append(("role", role)) 7308 7309 if license is not None: 7310 7311 _query_params.append(("license", license)) 7312 7313 if active is not None: 7314 7315 _query_params.append(("active", active)) 7316 7317 if cursor is not None: 7318 7319 _query_params.append(("cursor", cursor)) 7320 7321 if limit is not None: 7322 7323 _query_params.append(("limit", limit)) 7324 7325 # process the header parameters 7326 # process the form parameters 7327 # process the body parameter 7328 7329 # set the HTTP header `Accept` 7330 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7331 7332 # authentication setting 7333 _auth_settings: List[str] = [] 7334 7335 return self.api_client.param_serialize( 7336 method="GET", 7337 resource_path="/v2/orgs/{org_id}/members", 7338 path_params=_path_params, 7339 query_params=_query_params, 7340 header_params=_header_params, 7341 body=_body_params, 7342 post_params=_form_params, 7343 files=_files, 7344 auth_settings=_auth_settings, 7345 collection_formats=_collection_formats, 7346 _host=_host, 7347 _request_auth=_request_auth, 7348 ) 7349 7350 @validate_call 7351 def enterprise_get_organization( 7352 self, 7353 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7354 _request_timeout: Union[ 7355 None, 7356 Annotated[StrictFloat, Field(gt=0)], 7357 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7358 ] = None, 7359 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7360 _content_type: Optional[StrictStr] = None, 7361 _headers: Optional[Dict[StrictStr, Any]] = None, 7362 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7363 ) -> Organization: 7364 """Get organization info 7365 7366 Retrieves organization information.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7367 7368 :param org_id: id of the organization (required) 7369 :type org_id: str 7370 :param _request_timeout: timeout setting for this request. If one 7371 number provided, it will be total request 7372 timeout. It can also be a pair (tuple) of 7373 (connection, read) timeouts. 7374 :type _request_timeout: int, tuple(int, int), optional 7375 :param _request_auth: set to override the auth_settings for an a single 7376 request; this effectively ignores the 7377 authentication in the spec for a single request. 7378 :type _request_auth: dict, optional 7379 :param _content_type: force content-type for the request. 7380 :type _content_type: str, Optional 7381 :param _headers: set to override the headers for a single 7382 request; this effectively ignores the headers 7383 in the spec for a single request. 7384 :type _headers: dict, optional 7385 :param _host_index: set to override the host_index for a single 7386 request; this effectively ignores the host_index 7387 in the spec for a single request. 7388 :type _host_index: int, optional 7389 :return: Returns the result object. 7390 """ # noqa: E501 7391 7392 _param = self._enterprise_get_organization_serialize( 7393 org_id=org_id, 7394 _request_auth=_request_auth, 7395 _content_type=_content_type, 7396 _headers=_headers, 7397 _host_index=_host_index, 7398 ) 7399 7400 _response_types_map: Dict[str, Optional[str]] = { 7401 "200": "Organization", 7402 "400": None, 7403 "401": None, 7404 "403": None, 7405 "404": None, 7406 "409": None, 7407 "429": None, 7408 } 7409 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7410 response_data.read() 7411 return self.api_client.response_deserialize( 7412 response_data=response_data, 7413 response_types_map=_response_types_map, 7414 ).data 7415 7416 def _enterprise_get_organization_serialize( 7417 self, 7418 org_id, 7419 _request_auth, 7420 _content_type, 7421 _headers, 7422 _host_index, 7423 ) -> RequestSerialized: 7424 7425 _host = None 7426 7427 _collection_formats: Dict[str, str] = {} 7428 7429 _path_params: Dict[str, str] = {} 7430 _query_params: List[Tuple[str, str]] = [] 7431 _header_params: Dict[str, Optional[str]] = _headers or {} 7432 _form_params: List[Tuple[str, str]] = [] 7433 _files: Dict[str, str] = {} 7434 _body_params: Optional[bytes] = None 7435 7436 # process the path parameters 7437 if org_id is not None: 7438 _path_params["org_id"] = org_id 7439 # process the query parameters 7440 # process the header parameters 7441 # process the form parameters 7442 # process the body parameter 7443 7444 # set the HTTP header `Accept` 7445 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7446 7447 # authentication setting 7448 _auth_settings: List[str] = [] 7449 7450 return self.api_client.param_serialize( 7451 method="GET", 7452 resource_path="/v2/orgs/{org_id}", 7453 path_params=_path_params, 7454 query_params=_query_params, 7455 header_params=_header_params, 7456 body=_body_params, 7457 post_params=_form_params, 7458 files=_files, 7459 auth_settings=_auth_settings, 7460 collection_formats=_collection_formats, 7461 _host=_host, 7462 _request_auth=_request_auth, 7463 ) 7464 7465 @validate_call 7466 def enterprise_add_project_member( 7467 self, 7468 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7469 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7470 project_id: Annotated[StrictStr, Field(description="The ID of the project to which you want to add a user.")], 7471 add_project_member_request: AddProjectMemberRequest, 7472 _request_timeout: Union[ 7473 None, 7474 Annotated[StrictFloat, Field(gt=0)], 7475 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7476 ] = None, 7477 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7478 _content_type: Optional[StrictStr] = None, 7479 _headers: Optional[Dict[StrictStr, Any]] = None, 7480 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7481 ) -> ProjectMember: 7482 """Add member in a project 7483 7484 Add a Miro user to a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7485 7486 :param org_id: The ID of the organization to which the project belongs. (required) 7487 :type org_id: str 7488 :param team_id: The ID of the team to which the project belongs. (required) 7489 :type team_id: str 7490 :param project_id: The ID of the project to which you want to add a user. (required) 7491 :type project_id: str 7492 :param add_project_member_request: (required) 7493 :type add_project_member_request: AddProjectMemberRequest 7494 :param _request_timeout: timeout setting for this request. If one 7495 number provided, it will be total request 7496 timeout. It can also be a pair (tuple) of 7497 (connection, read) timeouts. 7498 :type _request_timeout: int, tuple(int, int), optional 7499 :param _request_auth: set to override the auth_settings for an a single 7500 request; this effectively ignores the 7501 authentication in the spec for a single request. 7502 :type _request_auth: dict, optional 7503 :param _content_type: force content-type for the request. 7504 :type _content_type: str, Optional 7505 :param _headers: set to override the headers for a single 7506 request; this effectively ignores the headers 7507 in the spec for a single request. 7508 :type _headers: dict, optional 7509 :param _host_index: set to override the host_index for a single 7510 request; this effectively ignores the host_index 7511 in the spec for a single request. 7512 :type _host_index: int, optional 7513 :return: Returns the result object. 7514 """ # noqa: E501 7515 7516 _param = self._enterprise_add_project_member_serialize( 7517 org_id=org_id, 7518 team_id=team_id, 7519 project_id=project_id, 7520 add_project_member_request=add_project_member_request, 7521 _request_auth=_request_auth, 7522 _content_type=_content_type, 7523 _headers=_headers, 7524 _host_index=_host_index, 7525 ) 7526 7527 _response_types_map: Dict[str, Optional[str]] = { 7528 "201": "ProjectMember", 7529 "400": "Error400", 7530 "401": "Error401", 7531 "403": "Error403", 7532 "404": "Error404", 7533 "409": "Error409", 7534 "429": "Error429", 7535 } 7536 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7537 response_data.read() 7538 return self.api_client.response_deserialize( 7539 response_data=response_data, 7540 response_types_map=_response_types_map, 7541 ).data 7542 7543 def _enterprise_add_project_member_serialize( 7544 self, 7545 org_id, 7546 team_id, 7547 project_id, 7548 add_project_member_request, 7549 _request_auth, 7550 _content_type, 7551 _headers, 7552 _host_index, 7553 ) -> RequestSerialized: 7554 7555 _host = None 7556 7557 _collection_formats: Dict[str, str] = {} 7558 7559 _path_params: Dict[str, str] = {} 7560 _query_params: List[Tuple[str, str]] = [] 7561 _header_params: Dict[str, Optional[str]] = _headers or {} 7562 _form_params: List[Tuple[str, str]] = [] 7563 _files: Dict[str, str] = {} 7564 _body_params: Optional[bytes] = None 7565 7566 # process the path parameters 7567 if org_id is not None: 7568 _path_params["org_id"] = org_id 7569 if team_id is not None: 7570 _path_params["team_id"] = team_id 7571 if project_id is not None: 7572 _path_params["project_id"] = project_id 7573 # process the query parameters 7574 # process the header parameters 7575 # process the form parameters 7576 # process the body parameter 7577 if add_project_member_request is not None: 7578 _body_params = add_project_member_request 7579 7580 # set the HTTP header `Accept` 7581 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7582 7583 # set the HTTP header `Content-Type` 7584 if _content_type: 7585 _header_params["Content-Type"] = _content_type 7586 else: 7587 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 7588 if _default_content_type is not None: 7589 _header_params["Content-Type"] = _default_content_type 7590 7591 # authentication setting 7592 _auth_settings: List[str] = [] 7593 7594 return self.api_client.param_serialize( 7595 method="POST", 7596 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members", 7597 path_params=_path_params, 7598 query_params=_query_params, 7599 header_params=_header_params, 7600 body=_body_params, 7601 post_params=_form_params, 7602 files=_files, 7603 auth_settings=_auth_settings, 7604 collection_formats=_collection_formats, 7605 _host=_host, 7606 _request_auth=_request_auth, 7607 ) 7608 7609 @validate_call 7610 def enterprise_delete_project_member( 7611 self, 7612 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7613 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7614 project_id: Annotated[ 7615 StrictStr, Field(description="The ID of the project from which you want to remove a member.") 7616 ], 7617 member_id: Annotated[ 7618 StrictStr, Field(description="The ID of the member that you want to remove from a project.") 7619 ], 7620 _request_timeout: Union[ 7621 None, 7622 Annotated[StrictFloat, Field(gt=0)], 7623 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7624 ] = None, 7625 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7626 _content_type: Optional[StrictStr] = None, 7627 _headers: Optional[Dict[StrictStr, Any]] = None, 7628 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7629 ) -> None: 7630 """Remove project member 7631 7632 Remove a member from a project. The user remains in the team even after the member is removed from a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7633 7634 :param org_id: The ID of the organization to which the project belongs. (required) 7635 :type org_id: str 7636 :param team_id: The ID of the team to which the project belongs. (required) 7637 :type team_id: str 7638 :param project_id: The ID of the project from which you want to remove a member. (required) 7639 :type project_id: str 7640 :param member_id: The ID of the member that you want to remove from a project. (required) 7641 :type member_id: str 7642 :param _request_timeout: timeout setting for this request. If one 7643 number provided, it will be total request 7644 timeout. It can also be a pair (tuple) of 7645 (connection, read) timeouts. 7646 :type _request_timeout: int, tuple(int, int), optional 7647 :param _request_auth: set to override the auth_settings for an a single 7648 request; this effectively ignores the 7649 authentication in the spec for a single request. 7650 :type _request_auth: dict, optional 7651 :param _content_type: force content-type for the request. 7652 :type _content_type: str, Optional 7653 :param _headers: set to override the headers for a single 7654 request; this effectively ignores the headers 7655 in the spec for a single request. 7656 :type _headers: dict, optional 7657 :param _host_index: set to override the host_index for a single 7658 request; this effectively ignores the host_index 7659 in the spec for a single request. 7660 :type _host_index: int, optional 7661 :return: Returns the result object. 7662 """ # noqa: E501 7663 7664 _param = self._enterprise_delete_project_member_serialize( 7665 org_id=org_id, 7666 team_id=team_id, 7667 project_id=project_id, 7668 member_id=member_id, 7669 _request_auth=_request_auth, 7670 _content_type=_content_type, 7671 _headers=_headers, 7672 _host_index=_host_index, 7673 ) 7674 7675 _response_types_map: Dict[str, Optional[str]] = { 7676 "204": None, 7677 "400": "Error400", 7678 "401": "Error401", 7679 "403": "Error403", 7680 "404": "Error404", 7681 "409": "Error409", 7682 "429": "Error429", 7683 } 7684 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7685 response_data.read() 7686 return self.api_client.response_deserialize( 7687 response_data=response_data, 7688 response_types_map=_response_types_map, 7689 ).data 7690 7691 def _enterprise_delete_project_member_serialize( 7692 self, 7693 org_id, 7694 team_id, 7695 project_id, 7696 member_id, 7697 _request_auth, 7698 _content_type, 7699 _headers, 7700 _host_index, 7701 ) -> RequestSerialized: 7702 7703 _host = None 7704 7705 _collection_formats: Dict[str, str] = {} 7706 7707 _path_params: Dict[str, str] = {} 7708 _query_params: List[Tuple[str, str]] = [] 7709 _header_params: Dict[str, Optional[str]] = _headers or {} 7710 _form_params: List[Tuple[str, str]] = [] 7711 _files: Dict[str, str] = {} 7712 _body_params: Optional[bytes] = None 7713 7714 # process the path parameters 7715 if org_id is not None: 7716 _path_params["org_id"] = org_id 7717 if team_id is not None: 7718 _path_params["team_id"] = team_id 7719 if project_id is not None: 7720 _path_params["project_id"] = project_id 7721 if member_id is not None: 7722 _path_params["member_id"] = member_id 7723 # process the query parameters 7724 # process the header parameters 7725 # process the form parameters 7726 # process the body parameter 7727 7728 # set the HTTP header `Accept` 7729 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7730 7731 # authentication setting 7732 _auth_settings: List[str] = [] 7733 7734 return self.api_client.param_serialize( 7735 method="DELETE", 7736 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members/{member_id}", 7737 path_params=_path_params, 7738 query_params=_query_params, 7739 header_params=_header_params, 7740 body=_body_params, 7741 post_params=_form_params, 7742 files=_files, 7743 auth_settings=_auth_settings, 7744 collection_formats=_collection_formats, 7745 _host=_host, 7746 _request_auth=_request_auth, 7747 ) 7748 7749 @validate_call 7750 def enterprise_get_project_member( 7751 self, 7752 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7753 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7754 project_id: Annotated[ 7755 StrictStr, 7756 Field(description="The ID of the project from which you want to retrieve specific member information."), 7757 ], 7758 member_id: Annotated[ 7759 StrictStr, Field(description="The ID of the member for which you want to retrieve information.") 7760 ], 7761 _request_timeout: Union[ 7762 None, 7763 Annotated[StrictFloat, Field(gt=0)], 7764 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7765 ] = None, 7766 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7767 _content_type: Optional[StrictStr] = None, 7768 _headers: Optional[Dict[StrictStr, Any]] = None, 7769 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7770 ) -> ProjectMember: 7771 """Get project member 7772 7773 Retrieves information for a specific project member.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7774 7775 :param org_id: The ID of the organization to which the project belongs. (required) 7776 :type org_id: str 7777 :param team_id: The ID of the team to which the project belongs. (required) 7778 :type team_id: str 7779 :param project_id: The ID of the project from which you want to retrieve specific member information. (required) 7780 :type project_id: str 7781 :param member_id: The ID of the member for which you want to retrieve information. (required) 7782 :type member_id: str 7783 :param _request_timeout: timeout setting for this request. If one 7784 number provided, it will be total request 7785 timeout. It can also be a pair (tuple) of 7786 (connection, read) timeouts. 7787 :type _request_timeout: int, tuple(int, int), optional 7788 :param _request_auth: set to override the auth_settings for an a single 7789 request; this effectively ignores the 7790 authentication in the spec for a single request. 7791 :type _request_auth: dict, optional 7792 :param _content_type: force content-type for the request. 7793 :type _content_type: str, Optional 7794 :param _headers: set to override the headers for a single 7795 request; this effectively ignores the headers 7796 in the spec for a single request. 7797 :type _headers: dict, optional 7798 :param _host_index: set to override the host_index for a single 7799 request; this effectively ignores the host_index 7800 in the spec for a single request. 7801 :type _host_index: int, optional 7802 :return: Returns the result object. 7803 """ # noqa: E501 7804 7805 _param = self._enterprise_get_project_member_serialize( 7806 org_id=org_id, 7807 team_id=team_id, 7808 project_id=project_id, 7809 member_id=member_id, 7810 _request_auth=_request_auth, 7811 _content_type=_content_type, 7812 _headers=_headers, 7813 _host_index=_host_index, 7814 ) 7815 7816 _response_types_map: Dict[str, Optional[str]] = { 7817 "200": "ProjectMember", 7818 "400": "Error400", 7819 "401": "Error401", 7820 "403": "Error403", 7821 "404": "Error404", 7822 "409": "Error409", 7823 "429": "Error429", 7824 } 7825 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7826 response_data.read() 7827 return self.api_client.response_deserialize( 7828 response_data=response_data, 7829 response_types_map=_response_types_map, 7830 ).data 7831 7832 def _enterprise_get_project_member_serialize( 7833 self, 7834 org_id, 7835 team_id, 7836 project_id, 7837 member_id, 7838 _request_auth, 7839 _content_type, 7840 _headers, 7841 _host_index, 7842 ) -> RequestSerialized: 7843 7844 _host = None 7845 7846 _collection_formats: Dict[str, str] = {} 7847 7848 _path_params: Dict[str, str] = {} 7849 _query_params: List[Tuple[str, str]] = [] 7850 _header_params: Dict[str, Optional[str]] = _headers or {} 7851 _form_params: List[Tuple[str, str]] = [] 7852 _files: Dict[str, str] = {} 7853 _body_params: Optional[bytes] = None 7854 7855 # process the path parameters 7856 if org_id is not None: 7857 _path_params["org_id"] = org_id 7858 if team_id is not None: 7859 _path_params["team_id"] = team_id 7860 if project_id is not None: 7861 _path_params["project_id"] = project_id 7862 if member_id is not None: 7863 _path_params["member_id"] = member_id 7864 # process the query parameters 7865 # process the header parameters 7866 # process the form parameters 7867 # process the body parameter 7868 7869 # set the HTTP header `Accept` 7870 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7871 7872 # authentication setting 7873 _auth_settings: List[str] = [] 7874 7875 return self.api_client.param_serialize( 7876 method="GET", 7877 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members/{member_id}", 7878 path_params=_path_params, 7879 query_params=_query_params, 7880 header_params=_header_params, 7881 body=_body_params, 7882 post_params=_form_params, 7883 files=_files, 7884 auth_settings=_auth_settings, 7885 collection_formats=_collection_formats, 7886 _host=_host, 7887 _request_auth=_request_auth, 7888 ) 7889 7890 @validate_call 7891 def enterprise_get_project_members( 7892 self, 7893 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7894 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7895 project_id: Annotated[ 7896 StrictStr, Field(description="The ID of the project for which you want to retrieve the list of members.") 7897 ], 7898 limit: Annotated[ 7899 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 7900 Field( 7901 description="The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value." 7902 ), 7903 ] = None, 7904 cursor: Annotated[ 7905 Optional[StrictStr], 7906 Field( 7907 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 7908 ), 7909 ] = None, 7910 _request_timeout: Union[ 7911 None, 7912 Annotated[StrictFloat, Field(gt=0)], 7913 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7914 ] = None, 7915 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7916 _content_type: Optional[StrictStr] = None, 7917 _headers: Optional[Dict[StrictStr, Any]] = None, 7918 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7919 ) -> ProjectMemberPage: 7920 """List of project members 7921 7922 Retrieves the list of members for a specific project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7923 7924 :param org_id: The ID of the organization to which the project belongs. (required) 7925 :type org_id: str 7926 :param team_id: The ID of the team to which the project belongs. (required) 7927 :type team_id: str 7928 :param project_id: The ID of the project for which you want to retrieve the list of members. (required) 7929 :type project_id: str 7930 :param limit: The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value. 7931 :type limit: int 7932 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 7933 :type cursor: str 7934 :param _request_timeout: timeout setting for this request. If one 7935 number provided, it will be total request 7936 timeout. It can also be a pair (tuple) of 7937 (connection, read) timeouts. 7938 :type _request_timeout: int, tuple(int, int), optional 7939 :param _request_auth: set to override the auth_settings for an a single 7940 request; this effectively ignores the 7941 authentication in the spec for a single request. 7942 :type _request_auth: dict, optional 7943 :param _content_type: force content-type for the request. 7944 :type _content_type: str, Optional 7945 :param _headers: set to override the headers for a single 7946 request; this effectively ignores the headers 7947 in the spec for a single request. 7948 :type _headers: dict, optional 7949 :param _host_index: set to override the host_index for a single 7950 request; this effectively ignores the host_index 7951 in the spec for a single request. 7952 :type _host_index: int, optional 7953 :return: Returns the result object. 7954 """ # noqa: E501 7955 7956 _param = self._enterprise_get_project_members_serialize( 7957 org_id=org_id, 7958 team_id=team_id, 7959 project_id=project_id, 7960 limit=limit, 7961 cursor=cursor, 7962 _request_auth=_request_auth, 7963 _content_type=_content_type, 7964 _headers=_headers, 7965 _host_index=_host_index, 7966 ) 7967 7968 _response_types_map: Dict[str, Optional[str]] = { 7969 "200": "ProjectMemberPage", 7970 "400": "Error400", 7971 "401": "Error401", 7972 "403": "Error403", 7973 "404": "Error404", 7974 "409": "Error409", 7975 "429": "Error429", 7976 } 7977 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7978 response_data.read() 7979 return self.api_client.response_deserialize( 7980 response_data=response_data, 7981 response_types_map=_response_types_map, 7982 ).data 7983 7984 def _enterprise_get_project_members_serialize( 7985 self, 7986 org_id, 7987 team_id, 7988 project_id, 7989 limit, 7990 cursor, 7991 _request_auth, 7992 _content_type, 7993 _headers, 7994 _host_index, 7995 ) -> RequestSerialized: 7996 7997 _host = None 7998 7999 _collection_formats: Dict[str, str] = {} 8000 8001 _path_params: Dict[str, str] = {} 8002 _query_params: List[Tuple[str, str]] = [] 8003 _header_params: Dict[str, Optional[str]] = _headers or {} 8004 _form_params: List[Tuple[str, str]] = [] 8005 _files: Dict[str, str] = {} 8006 _body_params: Optional[bytes] = None 8007 8008 # process the path parameters 8009 if org_id is not None: 8010 _path_params["org_id"] = org_id 8011 if team_id is not None: 8012 _path_params["team_id"] = team_id 8013 if project_id is not None: 8014 _path_params["project_id"] = project_id 8015 # process the query parameters 8016 if limit is not None: 8017 8018 _query_params.append(("limit", limit)) 8019 8020 if cursor is not None: 8021 8022 _query_params.append(("cursor", cursor)) 8023 8024 # process the header parameters 8025 # process the form parameters 8026 # process the body parameter 8027 8028 # set the HTTP header `Accept` 8029 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8030 8031 # authentication setting 8032 _auth_settings: List[str] = [] 8033 8034 return self.api_client.param_serialize( 8035 method="GET", 8036 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members", 8037 path_params=_path_params, 8038 query_params=_query_params, 8039 header_params=_header_params, 8040 body=_body_params, 8041 post_params=_form_params, 8042 files=_files, 8043 auth_settings=_auth_settings, 8044 collection_formats=_collection_formats, 8045 _host=_host, 8046 _request_auth=_request_auth, 8047 ) 8048 8049 @validate_call 8050 def enterprise_update_project_member( 8051 self, 8052 org_id: Annotated[ 8053 StrictStr, Field(description="The ID of the organization to which the project member belongs.") 8054 ], 8055 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project member belongs.")], 8056 project_id: Annotated[StrictStr, Field(description="The ID of a Project.")], 8057 member_id: Annotated[StrictStr, Field(description="The ID of the member whose details you want to update.")], 8058 update_project_member_request: UpdateProjectMemberRequest, 8059 _request_timeout: Union[ 8060 None, 8061 Annotated[StrictFloat, Field(gt=0)], 8062 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8063 ] = None, 8064 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8065 _content_type: Optional[StrictStr] = None, 8066 _headers: Optional[Dict[StrictStr, Any]] = None, 8067 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8068 ) -> ProjectMember: 8069 """Update project member 8070 8071 Updates details of a project member, such as the member's role.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8072 8073 :param org_id: The ID of the organization to which the project member belongs. (required) 8074 :type org_id: str 8075 :param team_id: The ID of the team to which the project member belongs. (required) 8076 :type team_id: str 8077 :param project_id: The ID of a Project. (required) 8078 :type project_id: str 8079 :param member_id: The ID of the member whose details you want to update. (required) 8080 :type member_id: str 8081 :param update_project_member_request: (required) 8082 :type update_project_member_request: UpdateProjectMemberRequest 8083 :param _request_timeout: timeout setting for this request. If one 8084 number provided, it will be total request 8085 timeout. It can also be a pair (tuple) of 8086 (connection, read) timeouts. 8087 :type _request_timeout: int, tuple(int, int), optional 8088 :param _request_auth: set to override the auth_settings for an a single 8089 request; this effectively ignores the 8090 authentication in the spec for a single request. 8091 :type _request_auth: dict, optional 8092 :param _content_type: force content-type for the request. 8093 :type _content_type: str, Optional 8094 :param _headers: set to override the headers for a single 8095 request; this effectively ignores the headers 8096 in the spec for a single request. 8097 :type _headers: dict, optional 8098 :param _host_index: set to override the host_index for a single 8099 request; this effectively ignores the host_index 8100 in the spec for a single request. 8101 :type _host_index: int, optional 8102 :return: Returns the result object. 8103 """ # noqa: E501 8104 8105 _param = self._enterprise_update_project_member_serialize( 8106 org_id=org_id, 8107 team_id=team_id, 8108 project_id=project_id, 8109 member_id=member_id, 8110 update_project_member_request=update_project_member_request, 8111 _request_auth=_request_auth, 8112 _content_type=_content_type, 8113 _headers=_headers, 8114 _host_index=_host_index, 8115 ) 8116 8117 _response_types_map: Dict[str, Optional[str]] = { 8118 "200": "ProjectMember", 8119 "400": "Error400", 8120 "401": "Error401", 8121 "403": "Error403", 8122 "404": "Error404", 8123 "409": "Error409", 8124 "429": "Error429", 8125 } 8126 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8127 response_data.read() 8128 return self.api_client.response_deserialize( 8129 response_data=response_data, 8130 response_types_map=_response_types_map, 8131 ).data 8132 8133 def _enterprise_update_project_member_serialize( 8134 self, 8135 org_id, 8136 team_id, 8137 project_id, 8138 member_id, 8139 update_project_member_request, 8140 _request_auth, 8141 _content_type, 8142 _headers, 8143 _host_index, 8144 ) -> RequestSerialized: 8145 8146 _host = None 8147 8148 _collection_formats: Dict[str, str] = {} 8149 8150 _path_params: Dict[str, str] = {} 8151 _query_params: List[Tuple[str, str]] = [] 8152 _header_params: Dict[str, Optional[str]] = _headers or {} 8153 _form_params: List[Tuple[str, str]] = [] 8154 _files: Dict[str, str] = {} 8155 _body_params: Optional[bytes] = None 8156 8157 # process the path parameters 8158 if org_id is not None: 8159 _path_params["org_id"] = org_id 8160 if team_id is not None: 8161 _path_params["team_id"] = team_id 8162 if project_id is not None: 8163 _path_params["project_id"] = project_id 8164 if member_id is not None: 8165 _path_params["member_id"] = member_id 8166 # process the query parameters 8167 # process the header parameters 8168 # process the form parameters 8169 # process the body parameter 8170 if update_project_member_request is not None: 8171 _body_params = update_project_member_request 8172 8173 # set the HTTP header `Accept` 8174 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8175 8176 # set the HTTP header `Content-Type` 8177 if _content_type: 8178 _header_params["Content-Type"] = _content_type 8179 else: 8180 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 8181 if _default_content_type is not None: 8182 _header_params["Content-Type"] = _default_content_type 8183 8184 # authentication setting 8185 _auth_settings: List[str] = [] 8186 8187 return self.api_client.param_serialize( 8188 method="PATCH", 8189 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members/{member_id}", 8190 path_params=_path_params, 8191 query_params=_query_params, 8192 header_params=_header_params, 8193 body=_body_params, 8194 post_params=_form_params, 8195 files=_files, 8196 auth_settings=_auth_settings, 8197 collection_formats=_collection_formats, 8198 _host=_host, 8199 _request_auth=_request_auth, 8200 ) 8201 8202 @validate_call 8203 def enterprise_get_project_settings( 8204 self, 8205 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 8206 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 8207 project_id: Annotated[ 8208 StrictStr, Field(description="The ID of the project for which you want to retrieve the project settings.") 8209 ], 8210 _request_timeout: Union[ 8211 None, 8212 Annotated[StrictFloat, Field(gt=0)], 8213 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8214 ] = None, 8215 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8216 _content_type: Optional[StrictStr] = None, 8217 _headers: Optional[Dict[StrictStr, Any]] = None, 8218 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8219 ) -> ProjectSettings: 8220 """Get project settings 8221 8222 Retrieves the project settings.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8223 8224 :param org_id: The ID of the organization to which the project belongs. (required) 8225 :type org_id: str 8226 :param team_id: The ID of the team to which the project belongs. (required) 8227 :type team_id: str 8228 :param project_id: The ID of the project for which you want to retrieve the project settings. (required) 8229 :type project_id: str 8230 :param _request_timeout: timeout setting for this request. If one 8231 number provided, it will be total request 8232 timeout. It can also be a pair (tuple) of 8233 (connection, read) timeouts. 8234 :type _request_timeout: int, tuple(int, int), optional 8235 :param _request_auth: set to override the auth_settings for an a single 8236 request; this effectively ignores the 8237 authentication in the spec for a single request. 8238 :type _request_auth: dict, optional 8239 :param _content_type: force content-type for the request. 8240 :type _content_type: str, Optional 8241 :param _headers: set to override the headers for a single 8242 request; this effectively ignores the headers 8243 in the spec for a single request. 8244 :type _headers: dict, optional 8245 :param _host_index: set to override the host_index for a single 8246 request; this effectively ignores the host_index 8247 in the spec for a single request. 8248 :type _host_index: int, optional 8249 :return: Returns the result object. 8250 """ # noqa: E501 8251 8252 _param = self._enterprise_get_project_settings_serialize( 8253 org_id=org_id, 8254 team_id=team_id, 8255 project_id=project_id, 8256 _request_auth=_request_auth, 8257 _content_type=_content_type, 8258 _headers=_headers, 8259 _host_index=_host_index, 8260 ) 8261 8262 _response_types_map: Dict[str, Optional[str]] = { 8263 "200": "ProjectSettings", 8264 "400": "Error400", 8265 "401": "Error401", 8266 "403": "Error403", 8267 "404": "Error404", 8268 "429": "Error429", 8269 } 8270 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8271 response_data.read() 8272 return self.api_client.response_deserialize( 8273 response_data=response_data, 8274 response_types_map=_response_types_map, 8275 ).data 8276 8277 def _enterprise_get_project_settings_serialize( 8278 self, 8279 org_id, 8280 team_id, 8281 project_id, 8282 _request_auth, 8283 _content_type, 8284 _headers, 8285 _host_index, 8286 ) -> RequestSerialized: 8287 8288 _host = None 8289 8290 _collection_formats: Dict[str, str] = {} 8291 8292 _path_params: Dict[str, str] = {} 8293 _query_params: List[Tuple[str, str]] = [] 8294 _header_params: Dict[str, Optional[str]] = _headers or {} 8295 _form_params: List[Tuple[str, str]] = [] 8296 _files: Dict[str, str] = {} 8297 _body_params: Optional[bytes] = None 8298 8299 # process the path parameters 8300 if org_id is not None: 8301 _path_params["org_id"] = org_id 8302 if team_id is not None: 8303 _path_params["team_id"] = team_id 8304 if project_id is not None: 8305 _path_params["project_id"] = project_id 8306 # process the query parameters 8307 # process the header parameters 8308 # process the form parameters 8309 # process the body parameter 8310 8311 # set the HTTP header `Accept` 8312 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8313 8314 # authentication setting 8315 _auth_settings: List[str] = [] 8316 8317 return self.api_client.param_serialize( 8318 method="GET", 8319 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/settings", 8320 path_params=_path_params, 8321 query_params=_query_params, 8322 header_params=_header_params, 8323 body=_body_params, 8324 post_params=_form_params, 8325 files=_files, 8326 auth_settings=_auth_settings, 8327 collection_formats=_collection_formats, 8328 _host=_host, 8329 _request_auth=_request_auth, 8330 ) 8331 8332 @validate_call 8333 def enterprise_update_project_settings( 8334 self, 8335 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 8336 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 8337 project_id: Annotated[StrictStr, Field(description="The ID of the project whose settings you want to update.")], 8338 update_project_settings_request: UpdateProjectSettingsRequest, 8339 _request_timeout: Union[ 8340 None, 8341 Annotated[StrictFloat, Field(gt=0)], 8342 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8343 ] = None, 8344 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8345 _content_type: Optional[StrictStr] = None, 8346 _headers: Optional[Dict[StrictStr, Any]] = None, 8347 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8348 ) -> ProjectSettings: 8349 """Update project settings 8350 8351 Updates the settings of a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8352 8353 :param org_id: The ID of the organization to which the project belongs. (required) 8354 :type org_id: str 8355 :param team_id: The ID of the team to which the project belongs. (required) 8356 :type team_id: str 8357 :param project_id: The ID of the project whose settings you want to update. (required) 8358 :type project_id: str 8359 :param update_project_settings_request: (required) 8360 :type update_project_settings_request: UpdateProjectSettingsRequest 8361 :param _request_timeout: timeout setting for this request. If one 8362 number provided, it will be total request 8363 timeout. It can also be a pair (tuple) of 8364 (connection, read) timeouts. 8365 :type _request_timeout: int, tuple(int, int), optional 8366 :param _request_auth: set to override the auth_settings for an a single 8367 request; this effectively ignores the 8368 authentication in the spec for a single request. 8369 :type _request_auth: dict, optional 8370 :param _content_type: force content-type for the request. 8371 :type _content_type: str, Optional 8372 :param _headers: set to override the headers for a single 8373 request; this effectively ignores the headers 8374 in the spec for a single request. 8375 :type _headers: dict, optional 8376 :param _host_index: set to override the host_index for a single 8377 request; this effectively ignores the host_index 8378 in the spec for a single request. 8379 :type _host_index: int, optional 8380 :return: Returns the result object. 8381 """ # noqa: E501 8382 8383 _param = self._enterprise_update_project_settings_serialize( 8384 org_id=org_id, 8385 team_id=team_id, 8386 project_id=project_id, 8387 update_project_settings_request=update_project_settings_request, 8388 _request_auth=_request_auth, 8389 _content_type=_content_type, 8390 _headers=_headers, 8391 _host_index=_host_index, 8392 ) 8393 8394 _response_types_map: Dict[str, Optional[str]] = { 8395 "200": "ProjectSettings", 8396 "400": "Error400", 8397 "401": "Error401", 8398 "403": "Error403", 8399 "404": "Error404", 8400 "409": "Error409", 8401 "429": "Error429", 8402 } 8403 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8404 response_data.read() 8405 return self.api_client.response_deserialize( 8406 response_data=response_data, 8407 response_types_map=_response_types_map, 8408 ).data 8409 8410 def _enterprise_update_project_settings_serialize( 8411 self, 8412 org_id, 8413 team_id, 8414 project_id, 8415 update_project_settings_request, 8416 _request_auth, 8417 _content_type, 8418 _headers, 8419 _host_index, 8420 ) -> RequestSerialized: 8421 8422 _host = None 8423 8424 _collection_formats: Dict[str, str] = {} 8425 8426 _path_params: Dict[str, str] = {} 8427 _query_params: List[Tuple[str, str]] = [] 8428 _header_params: Dict[str, Optional[str]] = _headers or {} 8429 _form_params: List[Tuple[str, str]] = [] 8430 _files: Dict[str, str] = {} 8431 _body_params: Optional[bytes] = None 8432 8433 # process the path parameters 8434 if org_id is not None: 8435 _path_params["org_id"] = org_id 8436 if team_id is not None: 8437 _path_params["team_id"] = team_id 8438 if project_id is not None: 8439 _path_params["project_id"] = project_id 8440 # process the query parameters 8441 # process the header parameters 8442 # process the form parameters 8443 # process the body parameter 8444 if update_project_settings_request is not None: 8445 _body_params = update_project_settings_request 8446 8447 # set the HTTP header `Accept` 8448 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8449 8450 # set the HTTP header `Content-Type` 8451 if _content_type: 8452 _header_params["Content-Type"] = _content_type 8453 else: 8454 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 8455 if _default_content_type is not None: 8456 _header_params["Content-Type"] = _default_content_type 8457 8458 # authentication setting 8459 _auth_settings: List[str] = [] 8460 8461 return self.api_client.param_serialize( 8462 method="PATCH", 8463 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/settings", 8464 path_params=_path_params, 8465 query_params=_query_params, 8466 header_params=_header_params, 8467 body=_body_params, 8468 post_params=_form_params, 8469 files=_files, 8470 auth_settings=_auth_settings, 8471 collection_formats=_collection_formats, 8472 _host=_host, 8473 _request_auth=_request_auth, 8474 ) 8475 8476 @validate_call 8477 def enterprise_create_project( 8478 self, 8479 org_id: Annotated[ 8480 StrictStr, Field(description="The ID of the organization within which you you want to create a project.") 8481 ], 8482 team_id: Annotated[ 8483 StrictStr, Field(description="The ID of the team within which you you want to create a project.") 8484 ], 8485 create_project_request: CreateProjectRequest, 8486 _request_timeout: Union[ 8487 None, 8488 Annotated[StrictFloat, Field(gt=0)], 8489 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8490 ] = None, 8491 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8492 _content_type: Optional[StrictStr] = None, 8493 _headers: Optional[Dict[StrictStr, Any]] = None, 8494 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8495 ) -> Project: 8496 """Create project 8497 8498 Projects are essentially folders of boards with the option to manage user access for a smaller group of people within a team. Projects are here to help you organize your boards and make them easier to find and share. In other words, a project is a group of boards that you can share with your teammates all at once. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/360018262033-Projects\" target=_blank>Help Center page on Projects</a>. <br><br>This API creates a new project in an existing team of an organization.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8499 8500 :param org_id: The ID of the organization within which you you want to create a project. (required) 8501 :type org_id: str 8502 :param team_id: The ID of the team within which you you want to create a project. (required) 8503 :type team_id: str 8504 :param create_project_request: (required) 8505 :type create_project_request: CreateProjectRequest 8506 :param _request_timeout: timeout setting for this request. If one 8507 number provided, it will be total request 8508 timeout. It can also be a pair (tuple) of 8509 (connection, read) timeouts. 8510 :type _request_timeout: int, tuple(int, int), optional 8511 :param _request_auth: set to override the auth_settings for an a single 8512 request; this effectively ignores the 8513 authentication in the spec for a single request. 8514 :type _request_auth: dict, optional 8515 :param _content_type: force content-type for the request. 8516 :type _content_type: str, Optional 8517 :param _headers: set to override the headers for a single 8518 request; this effectively ignores the headers 8519 in the spec for a single request. 8520 :type _headers: dict, optional 8521 :param _host_index: set to override the host_index for a single 8522 request; this effectively ignores the host_index 8523 in the spec for a single request. 8524 :type _host_index: int, optional 8525 :return: Returns the result object. 8526 """ # noqa: E501 8527 8528 _param = self._enterprise_create_project_serialize( 8529 org_id=org_id, 8530 team_id=team_id, 8531 create_project_request=create_project_request, 8532 _request_auth=_request_auth, 8533 _content_type=_content_type, 8534 _headers=_headers, 8535 _host_index=_host_index, 8536 ) 8537 8538 _response_types_map: Dict[str, Optional[str]] = { 8539 "201": "Project", 8540 "400": "Error400", 8541 "401": "Error401", 8542 "403": "Error403", 8543 "404": "Error404", 8544 "409": "Error409", 8545 "429": "Error429", 8546 } 8547 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8548 response_data.read() 8549 return self.api_client.response_deserialize( 8550 response_data=response_data, 8551 response_types_map=_response_types_map, 8552 ).data 8553 8554 def _enterprise_create_project_serialize( 8555 self, 8556 org_id, 8557 team_id, 8558 create_project_request, 8559 _request_auth, 8560 _content_type, 8561 _headers, 8562 _host_index, 8563 ) -> RequestSerialized: 8564 8565 _host = None 8566 8567 _collection_formats: Dict[str, str] = {} 8568 8569 _path_params: Dict[str, str] = {} 8570 _query_params: List[Tuple[str, str]] = [] 8571 _header_params: Dict[str, Optional[str]] = _headers or {} 8572 _form_params: List[Tuple[str, str]] = [] 8573 _files: Dict[str, str] = {} 8574 _body_params: Optional[bytes] = None 8575 8576 # process the path parameters 8577 if org_id is not None: 8578 _path_params["org_id"] = org_id 8579 if team_id is not None: 8580 _path_params["team_id"] = team_id 8581 # process the query parameters 8582 # process the header parameters 8583 # process the form parameters 8584 # process the body parameter 8585 if create_project_request is not None: 8586 _body_params = create_project_request 8587 8588 # set the HTTP header `Accept` 8589 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8590 8591 # set the HTTP header `Content-Type` 8592 if _content_type: 8593 _header_params["Content-Type"] = _content_type 8594 else: 8595 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 8596 if _default_content_type is not None: 8597 _header_params["Content-Type"] = _default_content_type 8598 8599 # authentication setting 8600 _auth_settings: List[str] = [] 8601 8602 return self.api_client.param_serialize( 8603 method="POST", 8604 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects", 8605 path_params=_path_params, 8606 query_params=_query_params, 8607 header_params=_header_params, 8608 body=_body_params, 8609 post_params=_form_params, 8610 files=_files, 8611 auth_settings=_auth_settings, 8612 collection_formats=_collection_formats, 8613 _host=_host, 8614 _request_auth=_request_auth, 8615 ) 8616 8617 @validate_call 8618 def enterprise_delete_project( 8619 self, 8620 org_id: Annotated[ 8621 StrictStr, Field(description="The ID of the organization from which you want to delete a project.") 8622 ], 8623 team_id: Annotated[StrictStr, Field(description="The ID of the team from which you want to delete a project.")], 8624 project_id: Annotated[StrictStr, Field(description="The ID of the project that you want to delete.")], 8625 _request_timeout: Union[ 8626 None, 8627 Annotated[StrictFloat, Field(gt=0)], 8628 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8629 ] = None, 8630 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8631 _content_type: Optional[StrictStr] = None, 8632 _headers: Optional[Dict[StrictStr, Any]] = None, 8633 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8634 ) -> None: 8635 """Delete project 8636 8637 Deletes a project. After a project is deleted, all boards and users that belong to the project remain in the team.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8638 8639 :param org_id: The ID of the organization from which you want to delete a project. (required) 8640 :type org_id: str 8641 :param team_id: The ID of the team from which you want to delete a project. (required) 8642 :type team_id: str 8643 :param project_id: The ID of the project that you want to delete. (required) 8644 :type project_id: str 8645 :param _request_timeout: timeout setting for this request. If one 8646 number provided, it will be total request 8647 timeout. It can also be a pair (tuple) of 8648 (connection, read) timeouts. 8649 :type _request_timeout: int, tuple(int, int), optional 8650 :param _request_auth: set to override the auth_settings for an a single 8651 request; this effectively ignores the 8652 authentication in the spec for a single request. 8653 :type _request_auth: dict, optional 8654 :param _content_type: force content-type for the request. 8655 :type _content_type: str, Optional 8656 :param _headers: set to override the headers for a single 8657 request; this effectively ignores the headers 8658 in the spec for a single request. 8659 :type _headers: dict, optional 8660 :param _host_index: set to override the host_index for a single 8661 request; this effectively ignores the host_index 8662 in the spec for a single request. 8663 :type _host_index: int, optional 8664 :return: Returns the result object. 8665 """ # noqa: E501 8666 8667 _param = self._enterprise_delete_project_serialize( 8668 org_id=org_id, 8669 team_id=team_id, 8670 project_id=project_id, 8671 _request_auth=_request_auth, 8672 _content_type=_content_type, 8673 _headers=_headers, 8674 _host_index=_host_index, 8675 ) 8676 8677 _response_types_map: Dict[str, Optional[str]] = { 8678 "204": None, 8679 "400": "Error400", 8680 "401": "Error401", 8681 "403": "Error403", 8682 "404": "Error404", 8683 "409": "Error409", 8684 "429": "Error429", 8685 } 8686 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8687 response_data.read() 8688 return self.api_client.response_deserialize( 8689 response_data=response_data, 8690 response_types_map=_response_types_map, 8691 ).data 8692 8693 def _enterprise_delete_project_serialize( 8694 self, 8695 org_id, 8696 team_id, 8697 project_id, 8698 _request_auth, 8699 _content_type, 8700 _headers, 8701 _host_index, 8702 ) -> RequestSerialized: 8703 8704 _host = None 8705 8706 _collection_formats: Dict[str, str] = {} 8707 8708 _path_params: Dict[str, str] = {} 8709 _query_params: List[Tuple[str, str]] = [] 8710 _header_params: Dict[str, Optional[str]] = _headers or {} 8711 _form_params: List[Tuple[str, str]] = [] 8712 _files: Dict[str, str] = {} 8713 _body_params: Optional[bytes] = None 8714 8715 # process the path parameters 8716 if org_id is not None: 8717 _path_params["org_id"] = org_id 8718 if team_id is not None: 8719 _path_params["team_id"] = team_id 8720 if project_id is not None: 8721 _path_params["project_id"] = project_id 8722 # process the query parameters 8723 # process the header parameters 8724 # process the form parameters 8725 # process the body parameter 8726 8727 # set the HTTP header `Accept` 8728 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8729 8730 # authentication setting 8731 _auth_settings: List[str] = [] 8732 8733 return self.api_client.param_serialize( 8734 method="DELETE", 8735 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}", 8736 path_params=_path_params, 8737 query_params=_query_params, 8738 header_params=_header_params, 8739 body=_body_params, 8740 post_params=_form_params, 8741 files=_files, 8742 auth_settings=_auth_settings, 8743 collection_formats=_collection_formats, 8744 _host=_host, 8745 _request_auth=_request_auth, 8746 ) 8747 8748 @validate_call 8749 def enterprise_get_project( 8750 self, 8751 org_id: Annotated[ 8752 StrictStr, 8753 Field(description="The ID of the organization from which you want to retrieve the project information."), 8754 ], 8755 team_id: Annotated[ 8756 StrictStr, Field(description="The ID of the team from which you want to retrieve the project information.") 8757 ], 8758 project_id: Annotated[ 8759 StrictStr, Field(description="The ID of the project for which you want to retrieve the information.") 8760 ], 8761 _request_timeout: Union[ 8762 None, 8763 Annotated[StrictFloat, Field(gt=0)], 8764 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8765 ] = None, 8766 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8767 _content_type: Optional[StrictStr] = None, 8768 _headers: Optional[Dict[StrictStr, Any]] = None, 8769 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8770 ) -> Project: 8771 """Get project 8772 8773 Retrieves project information, such as a name for an existing project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8774 8775 :param org_id: The ID of the organization from which you want to retrieve the project information. (required) 8776 :type org_id: str 8777 :param team_id: The ID of the team from which you want to retrieve the project information. (required) 8778 :type team_id: str 8779 :param project_id: The ID of the project for which you want to retrieve the information. (required) 8780 :type project_id: str 8781 :param _request_timeout: timeout setting for this request. If one 8782 number provided, it will be total request 8783 timeout. It can also be a pair (tuple) of 8784 (connection, read) timeouts. 8785 :type _request_timeout: int, tuple(int, int), optional 8786 :param _request_auth: set to override the auth_settings for an a single 8787 request; this effectively ignores the 8788 authentication in the spec for a single request. 8789 :type _request_auth: dict, optional 8790 :param _content_type: force content-type for the request. 8791 :type _content_type: str, Optional 8792 :param _headers: set to override the headers for a single 8793 request; this effectively ignores the headers 8794 in the spec for a single request. 8795 :type _headers: dict, optional 8796 :param _host_index: set to override the host_index for a single 8797 request; this effectively ignores the host_index 8798 in the spec for a single request. 8799 :type _host_index: int, optional 8800 :return: Returns the result object. 8801 """ # noqa: E501 8802 8803 _param = self._enterprise_get_project_serialize( 8804 org_id=org_id, 8805 team_id=team_id, 8806 project_id=project_id, 8807 _request_auth=_request_auth, 8808 _content_type=_content_type, 8809 _headers=_headers, 8810 _host_index=_host_index, 8811 ) 8812 8813 _response_types_map: Dict[str, Optional[str]] = { 8814 "200": "Project", 8815 "400": "Error400", 8816 "401": "Error401", 8817 "403": "Error403", 8818 "404": "Error404", 8819 "429": "Error429", 8820 } 8821 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8822 response_data.read() 8823 return self.api_client.response_deserialize( 8824 response_data=response_data, 8825 response_types_map=_response_types_map, 8826 ).data 8827 8828 def _enterprise_get_project_serialize( 8829 self, 8830 org_id, 8831 team_id, 8832 project_id, 8833 _request_auth, 8834 _content_type, 8835 _headers, 8836 _host_index, 8837 ) -> RequestSerialized: 8838 8839 _host = None 8840 8841 _collection_formats: Dict[str, str] = {} 8842 8843 _path_params: Dict[str, str] = {} 8844 _query_params: List[Tuple[str, str]] = [] 8845 _header_params: Dict[str, Optional[str]] = _headers or {} 8846 _form_params: List[Tuple[str, str]] = [] 8847 _files: Dict[str, str] = {} 8848 _body_params: Optional[bytes] = None 8849 8850 # process the path parameters 8851 if org_id is not None: 8852 _path_params["org_id"] = org_id 8853 if team_id is not None: 8854 _path_params["team_id"] = team_id 8855 if project_id is not None: 8856 _path_params["project_id"] = project_id 8857 # process the query parameters 8858 # process the header parameters 8859 # process the form parameters 8860 # process the body parameter 8861 8862 # set the HTTP header `Accept` 8863 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8864 8865 # authentication setting 8866 _auth_settings: List[str] = [] 8867 8868 return self.api_client.param_serialize( 8869 method="GET", 8870 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}", 8871 path_params=_path_params, 8872 query_params=_query_params, 8873 header_params=_header_params, 8874 body=_body_params, 8875 post_params=_form_params, 8876 files=_files, 8877 auth_settings=_auth_settings, 8878 collection_formats=_collection_formats, 8879 _host=_host, 8880 _request_auth=_request_auth, 8881 ) 8882 8883 @validate_call 8884 def enterprise_get_projects( 8885 self, 8886 org_id: Annotated[ 8887 StrictStr, 8888 Field( 8889 description="The ID of the organization from which you want to retrieve the list of available projects." 8890 ), 8891 ], 8892 team_id: Annotated[ 8893 StrictStr, 8894 Field(description="The ID of the team from which you want to retrieve the list of available projects."), 8895 ], 8896 limit: Annotated[ 8897 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 8898 Field( 8899 description="The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value." 8900 ), 8901 ] = None, 8902 cursor: Annotated[ 8903 Optional[StrictStr], 8904 Field( 8905 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 8906 ), 8907 ] = None, 8908 _request_timeout: Union[ 8909 None, 8910 Annotated[StrictFloat, Field(gt=0)], 8911 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8912 ] = None, 8913 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8914 _content_type: Optional[StrictStr] = None, 8915 _headers: Optional[Dict[StrictStr, Any]] = None, 8916 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8917 ) -> ProjectPage: 8918 """List of projects 8919 8920 Retrieves the list of projects in an existing team of an organization. You can retrieve all projects, including all private projects (projects that haven't been specifically shared with you) by enabling Content Admin permissions. To enable Content Admin permissions, see [Content Admin permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins).<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8921 8922 :param org_id: The ID of the organization from which you want to retrieve the list of available projects. (required) 8923 :type org_id: str 8924 :param team_id: The ID of the team from which you want to retrieve the list of available projects. (required) 8925 :type team_id: str 8926 :param limit: The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value. 8927 :type limit: int 8928 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 8929 :type cursor: str 8930 :param _request_timeout: timeout setting for this request. If one 8931 number provided, it will be total request 8932 timeout. It can also be a pair (tuple) of 8933 (connection, read) timeouts. 8934 :type _request_timeout: int, tuple(int, int), optional 8935 :param _request_auth: set to override the auth_settings for an a single 8936 request; this effectively ignores the 8937 authentication in the spec for a single request. 8938 :type _request_auth: dict, optional 8939 :param _content_type: force content-type for the request. 8940 :type _content_type: str, Optional 8941 :param _headers: set to override the headers for a single 8942 request; this effectively ignores the headers 8943 in the spec for a single request. 8944 :type _headers: dict, optional 8945 :param _host_index: set to override the host_index for a single 8946 request; this effectively ignores the host_index 8947 in the spec for a single request. 8948 :type _host_index: int, optional 8949 :return: Returns the result object. 8950 """ # noqa: E501 8951 8952 _param = self._enterprise_get_projects_serialize( 8953 org_id=org_id, 8954 team_id=team_id, 8955 limit=limit, 8956 cursor=cursor, 8957 _request_auth=_request_auth, 8958 _content_type=_content_type, 8959 _headers=_headers, 8960 _host_index=_host_index, 8961 ) 8962 8963 _response_types_map: Dict[str, Optional[str]] = { 8964 "200": "ProjectPage", 8965 "400": "Error400", 8966 "401": "Error401", 8967 "403": "Error403", 8968 "404": "Error404", 8969 "429": "Error429", 8970 } 8971 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8972 response_data.read() 8973 return self.api_client.response_deserialize( 8974 response_data=response_data, 8975 response_types_map=_response_types_map, 8976 ).data 8977 8978 def _enterprise_get_projects_serialize( 8979 self, 8980 org_id, 8981 team_id, 8982 limit, 8983 cursor, 8984 _request_auth, 8985 _content_type, 8986 _headers, 8987 _host_index, 8988 ) -> RequestSerialized: 8989 8990 _host = None 8991 8992 _collection_formats: Dict[str, str] = {} 8993 8994 _path_params: Dict[str, str] = {} 8995 _query_params: List[Tuple[str, str]] = [] 8996 _header_params: Dict[str, Optional[str]] = _headers or {} 8997 _form_params: List[Tuple[str, str]] = [] 8998 _files: Dict[str, str] = {} 8999 _body_params: Optional[bytes] = None 9000 9001 # process the path parameters 9002 if org_id is not None: 9003 _path_params["org_id"] = org_id 9004 if team_id is not None: 9005 _path_params["team_id"] = team_id 9006 # process the query parameters 9007 if limit is not None: 9008 9009 _query_params.append(("limit", limit)) 9010 9011 if cursor is not None: 9012 9013 _query_params.append(("cursor", cursor)) 9014 9015 # process the header parameters 9016 # process the form parameters 9017 # process the body parameter 9018 9019 # set the HTTP header `Accept` 9020 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9021 9022 # authentication setting 9023 _auth_settings: List[str] = [] 9024 9025 return self.api_client.param_serialize( 9026 method="GET", 9027 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects", 9028 path_params=_path_params, 9029 query_params=_query_params, 9030 header_params=_header_params, 9031 body=_body_params, 9032 post_params=_form_params, 9033 files=_files, 9034 auth_settings=_auth_settings, 9035 collection_formats=_collection_formats, 9036 _host=_host, 9037 _request_auth=_request_auth, 9038 ) 9039 9040 @validate_call 9041 def enterprise_update_project( 9042 self, 9043 org_id: Annotated[StrictStr, Field(description="The ID of an Organization.")], 9044 team_id: Annotated[StrictStr, Field(description="The ID of a Team.")], 9045 project_id: Annotated[StrictStr, Field(description="The ID of a Project.")], 9046 update_project_request: UpdateProjectRequest, 9047 _request_timeout: Union[ 9048 None, 9049 Annotated[StrictFloat, Field(gt=0)], 9050 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9051 ] = None, 9052 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9053 _content_type: Optional[StrictStr] = None, 9054 _headers: Optional[Dict[StrictStr, Any]] = None, 9055 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9056 ) -> Project: 9057 """Update project 9058 9059 Update information about a project, such as the project name.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9060 9061 :param org_id: The ID of an Organization. (required) 9062 :type org_id: str 9063 :param team_id: The ID of a Team. (required) 9064 :type team_id: str 9065 :param project_id: The ID of a Project. (required) 9066 :type project_id: str 9067 :param update_project_request: (required) 9068 :type update_project_request: UpdateProjectRequest 9069 :param _request_timeout: timeout setting for this request. If one 9070 number provided, it will be total request 9071 timeout. It can also be a pair (tuple) of 9072 (connection, read) timeouts. 9073 :type _request_timeout: int, tuple(int, int), optional 9074 :param _request_auth: set to override the auth_settings for an a single 9075 request; this effectively ignores the 9076 authentication in the spec for a single request. 9077 :type _request_auth: dict, optional 9078 :param _content_type: force content-type for the request. 9079 :type _content_type: str, Optional 9080 :param _headers: set to override the headers for a single 9081 request; this effectively ignores the headers 9082 in the spec for a single request. 9083 :type _headers: dict, optional 9084 :param _host_index: set to override the host_index for a single 9085 request; this effectively ignores the host_index 9086 in the spec for a single request. 9087 :type _host_index: int, optional 9088 :return: Returns the result object. 9089 """ # noqa: E501 9090 9091 _param = self._enterprise_update_project_serialize( 9092 org_id=org_id, 9093 team_id=team_id, 9094 project_id=project_id, 9095 update_project_request=update_project_request, 9096 _request_auth=_request_auth, 9097 _content_type=_content_type, 9098 _headers=_headers, 9099 _host_index=_host_index, 9100 ) 9101 9102 _response_types_map: Dict[str, Optional[str]] = { 9103 "200": "Project", 9104 "400": "Error400", 9105 "401": "Error401", 9106 "403": "Error403", 9107 "404": "Error404", 9108 "409": "Error409", 9109 "429": "Error429", 9110 } 9111 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9112 response_data.read() 9113 return self.api_client.response_deserialize( 9114 response_data=response_data, 9115 response_types_map=_response_types_map, 9116 ).data 9117 9118 def _enterprise_update_project_serialize( 9119 self, 9120 org_id, 9121 team_id, 9122 project_id, 9123 update_project_request, 9124 _request_auth, 9125 _content_type, 9126 _headers, 9127 _host_index, 9128 ) -> RequestSerialized: 9129 9130 _host = None 9131 9132 _collection_formats: Dict[str, str] = {} 9133 9134 _path_params: Dict[str, str] = {} 9135 _query_params: List[Tuple[str, str]] = [] 9136 _header_params: Dict[str, Optional[str]] = _headers or {} 9137 _form_params: List[Tuple[str, str]] = [] 9138 _files: Dict[str, str] = {} 9139 _body_params: Optional[bytes] = None 9140 9141 # process the path parameters 9142 if org_id is not None: 9143 _path_params["org_id"] = org_id 9144 if team_id is not None: 9145 _path_params["team_id"] = team_id 9146 if project_id is not None: 9147 _path_params["project_id"] = project_id 9148 # process the query parameters 9149 # process the header parameters 9150 # process the form parameters 9151 # process the body parameter 9152 if update_project_request is not None: 9153 _body_params = update_project_request 9154 9155 # set the HTTP header `Accept` 9156 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9157 9158 # set the HTTP header `Content-Type` 9159 if _content_type: 9160 _header_params["Content-Type"] = _content_type 9161 else: 9162 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 9163 if _default_content_type is not None: 9164 _header_params["Content-Type"] = _default_content_type 9165 9166 # authentication setting 9167 _auth_settings: List[str] = [] 9168 9169 return self.api_client.param_serialize( 9170 method="PATCH", 9171 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}", 9172 path_params=_path_params, 9173 query_params=_query_params, 9174 header_params=_header_params, 9175 body=_body_params, 9176 post_params=_form_params, 9177 files=_files, 9178 auth_settings=_auth_settings, 9179 collection_formats=_collection_formats, 9180 _host=_host, 9181 _request_auth=_request_auth, 9182 ) 9183 9184 @validate_call 9185 def enterprise_post_user_sessions_reset( 9186 self, 9187 email: Annotated[ 9188 StrictStr, 9189 Field( 9190 description="Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices." 9191 ), 9192 ], 9193 _request_timeout: Union[ 9194 None, 9195 Annotated[StrictFloat, Field(gt=0)], 9196 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9197 ] = None, 9198 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9199 _content_type: Optional[StrictStr] = None, 9200 _headers: Optional[Dict[StrictStr, Any]] = None, 9201 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9202 ) -> None: 9203 """Reset all sessions of a user 9204 9205 Reset all sessions of a user. Admins can now take immediate action to restrict user access to company data in case of security concerns. Calling this API ends all active Miro sessions across devices for a particular user, requiring the user to sign in again. This is useful in situations where a user leaves the company, their credentials are compromised, or there's suspicious activity on their account.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>sessions:delete</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9206 9207 :param email: Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices. (required) 9208 :type email: str 9209 :param _request_timeout: timeout setting for this request. If one 9210 number provided, it will be total request 9211 timeout. It can also be a pair (tuple) of 9212 (connection, read) timeouts. 9213 :type _request_timeout: int, tuple(int, int), optional 9214 :param _request_auth: set to override the auth_settings for an a single 9215 request; this effectively ignores the 9216 authentication in the spec for a single request. 9217 :type _request_auth: dict, optional 9218 :param _content_type: force content-type for the request. 9219 :type _content_type: str, Optional 9220 :param _headers: set to override the headers for a single 9221 request; this effectively ignores the headers 9222 in the spec for a single request. 9223 :type _headers: dict, optional 9224 :param _host_index: set to override the host_index for a single 9225 request; this effectively ignores the host_index 9226 in the spec for a single request. 9227 :type _host_index: int, optional 9228 :return: Returns the result object. 9229 """ # noqa: E501 9230 9231 _param = self._enterprise_post_user_sessions_reset_serialize( 9232 email=email, 9233 _request_auth=_request_auth, 9234 _content_type=_content_type, 9235 _headers=_headers, 9236 _host_index=_host_index, 9237 ) 9238 9239 _response_types_map: Dict[str, Optional[str]] = { 9240 "200": None, 9241 "400": None, 9242 "401": None, 9243 "403": None, 9244 "404": None, 9245 "429": None, 9246 } 9247 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9248 response_data.read() 9249 return self.api_client.response_deserialize( 9250 response_data=response_data, 9251 response_types_map=_response_types_map, 9252 ).data 9253 9254 def _enterprise_post_user_sessions_reset_serialize( 9255 self, 9256 email, 9257 _request_auth, 9258 _content_type, 9259 _headers, 9260 _host_index, 9261 ) -> RequestSerialized: 9262 9263 _host = None 9264 9265 _collection_formats: Dict[str, str] = {} 9266 9267 _path_params: Dict[str, str] = {} 9268 _query_params: List[Tuple[str, str]] = [] 9269 _header_params: Dict[str, Optional[str]] = _headers or {} 9270 _form_params: List[Tuple[str, str]] = [] 9271 _files: Dict[str, str] = {} 9272 _body_params: Optional[bytes] = None 9273 9274 # process the path parameters 9275 # process the query parameters 9276 if email is not None: 9277 9278 _query_params.append(("email", email)) 9279 9280 # process the header parameters 9281 # process the form parameters 9282 # process the body parameter 9283 9284 # authentication setting 9285 _auth_settings: List[str] = [] 9286 9287 return self.api_client.param_serialize( 9288 method="POST", 9289 resource_path="/v2/sessions/reset_all", 9290 path_params=_path_params, 9291 query_params=_query_params, 9292 header_params=_header_params, 9293 body=_body_params, 9294 post_params=_form_params, 9295 files=_files, 9296 auth_settings=_auth_settings, 9297 collection_formats=_collection_formats, 9298 _host=_host, 9299 _request_auth=_request_auth, 9300 ) 9301 9302 @validate_call 9303 def enterprise_boards_create_group( 9304 self, 9305 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9306 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9307 create_board_user_groups_request: CreateBoardUserGroupsRequest, 9308 _request_timeout: Union[ 9309 None, 9310 Annotated[StrictFloat, Field(gt=0)], 9311 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9312 ] = None, 9313 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9314 _content_type: Optional[StrictStr] = None, 9315 _headers: Optional[Dict[StrictStr, Any]] = None, 9316 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9317 ) -> BoardUserGroup: 9318 """Create board user group assignments 9319 9320 Shares a board with user groups with a specified role. Updates the role if already shared.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9321 9322 :param org_id: The ID of an organization. (required) 9323 :type org_id: str 9324 :param board_id: The ID of the board. (required) 9325 :type board_id: str 9326 :param create_board_user_groups_request: (required) 9327 :type create_board_user_groups_request: CreateBoardUserGroupsRequest 9328 :param _request_timeout: timeout setting for this request. If one 9329 number provided, it will be total request 9330 timeout. It can also be a pair (tuple) of 9331 (connection, read) timeouts. 9332 :type _request_timeout: int, tuple(int, int), optional 9333 :param _request_auth: set to override the auth_settings for an a single 9334 request; this effectively ignores the 9335 authentication in the spec for a single request. 9336 :type _request_auth: dict, optional 9337 :param _content_type: force content-type for the request. 9338 :type _content_type: str, Optional 9339 :param _headers: set to override the headers for a single 9340 request; this effectively ignores the headers 9341 in the spec for a single request. 9342 :type _headers: dict, optional 9343 :param _host_index: set to override the host_index for a single 9344 request; this effectively ignores the host_index 9345 in the spec for a single request. 9346 :type _host_index: int, optional 9347 :return: Returns the result object. 9348 """ # noqa: E501 9349 9350 _param = self._enterprise_boards_create_group_serialize( 9351 org_id=org_id, 9352 board_id=board_id, 9353 create_board_user_groups_request=create_board_user_groups_request, 9354 _request_auth=_request_auth, 9355 _content_type=_content_type, 9356 _headers=_headers, 9357 _host_index=_host_index, 9358 ) 9359 9360 _response_types_map: Dict[str, Optional[str]] = { 9361 "200": "BoardUserGroup", 9362 "400": None, 9363 "401": None, 9364 "403": None, 9365 "409": None, 9366 "429": None, 9367 } 9368 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9369 response_data.read() 9370 return self.api_client.response_deserialize( 9371 response_data=response_data, 9372 response_types_map=_response_types_map, 9373 ).data 9374 9375 def _enterprise_boards_create_group_serialize( 9376 self, 9377 org_id, 9378 board_id, 9379 create_board_user_groups_request, 9380 _request_auth, 9381 _content_type, 9382 _headers, 9383 _host_index, 9384 ) -> RequestSerialized: 9385 9386 _host = None 9387 9388 _collection_formats: Dict[str, str] = {} 9389 9390 _path_params: Dict[str, str] = {} 9391 _query_params: List[Tuple[str, str]] = [] 9392 _header_params: Dict[str, Optional[str]] = _headers or {} 9393 _form_params: List[Tuple[str, str]] = [] 9394 _files: Dict[str, str] = {} 9395 _body_params: Optional[bytes] = None 9396 9397 # process the path parameters 9398 if org_id is not None: 9399 _path_params["org_id"] = org_id 9400 if board_id is not None: 9401 _path_params["board_id"] = board_id 9402 # process the query parameters 9403 # process the header parameters 9404 # process the form parameters 9405 # process the body parameter 9406 if create_board_user_groups_request is not None: 9407 _body_params = create_board_user_groups_request 9408 9409 # set the HTTP header `Accept` 9410 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9411 9412 # set the HTTP header `Content-Type` 9413 if _content_type: 9414 _header_params["Content-Type"] = _content_type 9415 else: 9416 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 9417 if _default_content_type is not None: 9418 _header_params["Content-Type"] = _default_content_type 9419 9420 # authentication setting 9421 _auth_settings: List[str] = [] 9422 9423 return self.api_client.param_serialize( 9424 method="POST", 9425 resource_path="/v2/orgs/{org_id}/boards/{board_id}/groups", 9426 path_params=_path_params, 9427 query_params=_query_params, 9428 header_params=_header_params, 9429 body=_body_params, 9430 post_params=_form_params, 9431 files=_files, 9432 auth_settings=_auth_settings, 9433 collection_formats=_collection_formats, 9434 _host=_host, 9435 _request_auth=_request_auth, 9436 ) 9437 9438 @validate_call 9439 def enterprise_boards_delete_groups( 9440 self, 9441 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9442 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9443 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 9444 _request_timeout: Union[ 9445 None, 9446 Annotated[StrictFloat, Field(gt=0)], 9447 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9448 ] = None, 9449 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9450 _content_type: Optional[StrictStr] = None, 9451 _headers: Optional[Dict[StrictStr, Any]] = None, 9452 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9453 ) -> None: 9454 """Delete board user group assignment 9455 9456 Removes a user group from the specified board.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9457 9458 :param org_id: The ID of an organization. (required) 9459 :type org_id: str 9460 :param board_id: The ID of the board. (required) 9461 :type board_id: str 9462 :param group_id: The ID of a user group. (required) 9463 :type group_id: str 9464 :param _request_timeout: timeout setting for this request. If one 9465 number provided, it will be total request 9466 timeout. It can also be a pair (tuple) of 9467 (connection, read) timeouts. 9468 :type _request_timeout: int, tuple(int, int), optional 9469 :param _request_auth: set to override the auth_settings for an a single 9470 request; this effectively ignores the 9471 authentication in the spec for a single request. 9472 :type _request_auth: dict, optional 9473 :param _content_type: force content-type for the request. 9474 :type _content_type: str, Optional 9475 :param _headers: set to override the headers for a single 9476 request; this effectively ignores the headers 9477 in the spec for a single request. 9478 :type _headers: dict, optional 9479 :param _host_index: set to override the host_index for a single 9480 request; this effectively ignores the host_index 9481 in the spec for a single request. 9482 :type _host_index: int, optional 9483 :return: Returns the result object. 9484 """ # noqa: E501 9485 9486 _param = self._enterprise_boards_delete_groups_serialize( 9487 org_id=org_id, 9488 board_id=board_id, 9489 group_id=group_id, 9490 _request_auth=_request_auth, 9491 _content_type=_content_type, 9492 _headers=_headers, 9493 _host_index=_host_index, 9494 ) 9495 9496 _response_types_map: Dict[str, Optional[str]] = { 9497 "204": None, 9498 "400": None, 9499 "401": None, 9500 "403": None, 9501 "404": None, 9502 "409": None, 9503 "429": None, 9504 } 9505 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9506 response_data.read() 9507 return self.api_client.response_deserialize( 9508 response_data=response_data, 9509 response_types_map=_response_types_map, 9510 ).data 9511 9512 def _enterprise_boards_delete_groups_serialize( 9513 self, 9514 org_id, 9515 board_id, 9516 group_id, 9517 _request_auth, 9518 _content_type, 9519 _headers, 9520 _host_index, 9521 ) -> RequestSerialized: 9522 9523 _host = None 9524 9525 _collection_formats: Dict[str, str] = {} 9526 9527 _path_params: Dict[str, str] = {} 9528 _query_params: List[Tuple[str, str]] = [] 9529 _header_params: Dict[str, Optional[str]] = _headers or {} 9530 _form_params: List[Tuple[str, str]] = [] 9531 _files: Dict[str, str] = {} 9532 _body_params: Optional[bytes] = None 9533 9534 # process the path parameters 9535 if org_id is not None: 9536 _path_params["org_id"] = org_id 9537 if board_id is not None: 9538 _path_params["board_id"] = board_id 9539 if group_id is not None: 9540 _path_params["group_id"] = group_id 9541 # process the query parameters 9542 # process the header parameters 9543 # process the form parameters 9544 # process the body parameter 9545 9546 # authentication setting 9547 _auth_settings: List[str] = [] 9548 9549 return self.api_client.param_serialize( 9550 method="DELETE", 9551 resource_path="/v2/orgs/{org_id}/boards/{board_id}/groups/{group_id}", 9552 path_params=_path_params, 9553 query_params=_query_params, 9554 header_params=_header_params, 9555 body=_body_params, 9556 post_params=_form_params, 9557 files=_files, 9558 auth_settings=_auth_settings, 9559 collection_formats=_collection_formats, 9560 _host=_host, 9561 _request_auth=_request_auth, 9562 ) 9563 9564 @validate_call 9565 def enterprise_boards_get_groups( 9566 self, 9567 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9568 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9569 limit: Annotated[ 9570 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 9571 Field(description="The maximum number of user groups in the result list."), 9572 ] = None, 9573 cursor: Annotated[ 9574 Optional[StrictStr], 9575 Field( 9576 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 9577 ), 9578 ] = None, 9579 _request_timeout: Union[ 9580 None, 9581 Annotated[StrictFloat, Field(gt=0)], 9582 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9583 ] = None, 9584 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9585 _content_type: Optional[StrictStr] = None, 9586 _headers: Optional[Dict[StrictStr, Any]] = None, 9587 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9588 ) -> BoardUserGroupsPage: 9589 """Get board user group assignments 9590 9591 Retrieves information about user groups invited to the specified board.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9592 9593 :param org_id: The ID of an organization. (required) 9594 :type org_id: str 9595 :param board_id: The ID of the board. (required) 9596 :type board_id: str 9597 :param limit: The maximum number of user groups in the result list. 9598 :type limit: int 9599 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 9600 :type cursor: str 9601 :param _request_timeout: timeout setting for this request. If one 9602 number provided, it will be total request 9603 timeout. It can also be a pair (tuple) of 9604 (connection, read) timeouts. 9605 :type _request_timeout: int, tuple(int, int), optional 9606 :param _request_auth: set to override the auth_settings for an a single 9607 request; this effectively ignores the 9608 authentication in the spec for a single request. 9609 :type _request_auth: dict, optional 9610 :param _content_type: force content-type for the request. 9611 :type _content_type: str, Optional 9612 :param _headers: set to override the headers for a single 9613 request; this effectively ignores the headers 9614 in the spec for a single request. 9615 :type _headers: dict, optional 9616 :param _host_index: set to override the host_index for a single 9617 request; this effectively ignores the host_index 9618 in the spec for a single request. 9619 :type _host_index: int, optional 9620 :return: Returns the result object. 9621 """ # noqa: E501 9622 9623 _param = self._enterprise_boards_get_groups_serialize( 9624 org_id=org_id, 9625 board_id=board_id, 9626 limit=limit, 9627 cursor=cursor, 9628 _request_auth=_request_auth, 9629 _content_type=_content_type, 9630 _headers=_headers, 9631 _host_index=_host_index, 9632 ) 9633 9634 _response_types_map: Dict[str, Optional[str]] = { 9635 "200": "BoardUserGroupsPage", 9636 "400": None, 9637 "401": None, 9638 "403": None, 9639 "404": None, 9640 "429": None, 9641 } 9642 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9643 response_data.read() 9644 return self.api_client.response_deserialize( 9645 response_data=response_data, 9646 response_types_map=_response_types_map, 9647 ).data 9648 9649 def _enterprise_boards_get_groups_serialize( 9650 self, 9651 org_id, 9652 board_id, 9653 limit, 9654 cursor, 9655 _request_auth, 9656 _content_type, 9657 _headers, 9658 _host_index, 9659 ) -> RequestSerialized: 9660 9661 _host = None 9662 9663 _collection_formats: Dict[str, str] = {} 9664 9665 _path_params: Dict[str, str] = {} 9666 _query_params: List[Tuple[str, str]] = [] 9667 _header_params: Dict[str, Optional[str]] = _headers or {} 9668 _form_params: List[Tuple[str, str]] = [] 9669 _files: Dict[str, str] = {} 9670 _body_params: Optional[bytes] = None 9671 9672 # process the path parameters 9673 if org_id is not None: 9674 _path_params["org_id"] = org_id 9675 if board_id is not None: 9676 _path_params["board_id"] = board_id 9677 # process the query parameters 9678 if limit is not None: 9679 9680 _query_params.append(("limit", limit)) 9681 9682 if cursor is not None: 9683 9684 _query_params.append(("cursor", cursor)) 9685 9686 # process the header parameters 9687 # process the form parameters 9688 # process the body parameter 9689 9690 # set the HTTP header `Accept` 9691 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9692 9693 # authentication setting 9694 _auth_settings: List[str] = [] 9695 9696 return self.api_client.param_serialize( 9697 method="GET", 9698 resource_path="/v2/orgs/{org_id}/boards/{board_id}/groups", 9699 path_params=_path_params, 9700 query_params=_query_params, 9701 header_params=_header_params, 9702 body=_body_params, 9703 post_params=_form_params, 9704 files=_files, 9705 auth_settings=_auth_settings, 9706 collection_formats=_collection_formats, 9707 _host=_host, 9708 _request_auth=_request_auth, 9709 ) 9710 9711 @validate_call 9712 def enterprise_project_create_group( 9713 self, 9714 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9715 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9716 create_project_user_groups_request: CreateProjectUserGroupsRequest, 9717 _request_timeout: Union[ 9718 None, 9719 Annotated[StrictFloat, Field(gt=0)], 9720 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9721 ] = None, 9722 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9723 _content_type: Optional[StrictStr] = None, 9724 _headers: Optional[Dict[StrictStr, Any]] = None, 9725 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9726 ) -> ProjectUserGroup: 9727 """Create project user group assignments 9728 9729 Shares a project with user groups with a specified role. Updates the role if already shared.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9730 9731 :param org_id: The ID of an organization. (required) 9732 :type org_id: str 9733 :param project_id: The ID of the project. (required) 9734 :type project_id: str 9735 :param create_project_user_groups_request: (required) 9736 :type create_project_user_groups_request: CreateProjectUserGroupsRequest 9737 :param _request_timeout: timeout setting for this request. If one 9738 number provided, it will be total request 9739 timeout. It can also be a pair (tuple) of 9740 (connection, read) timeouts. 9741 :type _request_timeout: int, tuple(int, int), optional 9742 :param _request_auth: set to override the auth_settings for an a single 9743 request; this effectively ignores the 9744 authentication in the spec for a single request. 9745 :type _request_auth: dict, optional 9746 :param _content_type: force content-type for the request. 9747 :type _content_type: str, Optional 9748 :param _headers: set to override the headers for a single 9749 request; this effectively ignores the headers 9750 in the spec for a single request. 9751 :type _headers: dict, optional 9752 :param _host_index: set to override the host_index for a single 9753 request; this effectively ignores the host_index 9754 in the spec for a single request. 9755 :type _host_index: int, optional 9756 :return: Returns the result object. 9757 """ # noqa: E501 9758 9759 _param = self._enterprise_project_create_group_serialize( 9760 org_id=org_id, 9761 project_id=project_id, 9762 create_project_user_groups_request=create_project_user_groups_request, 9763 _request_auth=_request_auth, 9764 _content_type=_content_type, 9765 _headers=_headers, 9766 _host_index=_host_index, 9767 ) 9768 9769 _response_types_map: Dict[str, Optional[str]] = { 9770 "200": "ProjectUserGroup", 9771 "400": None, 9772 "401": None, 9773 "403": None, 9774 "409": None, 9775 "429": None, 9776 } 9777 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9778 response_data.read() 9779 return self.api_client.response_deserialize( 9780 response_data=response_data, 9781 response_types_map=_response_types_map, 9782 ).data 9783 9784 def _enterprise_project_create_group_serialize( 9785 self, 9786 org_id, 9787 project_id, 9788 create_project_user_groups_request, 9789 _request_auth, 9790 _content_type, 9791 _headers, 9792 _host_index, 9793 ) -> RequestSerialized: 9794 9795 _host = None 9796 9797 _collection_formats: Dict[str, str] = {} 9798 9799 _path_params: Dict[str, str] = {} 9800 _query_params: List[Tuple[str, str]] = [] 9801 _header_params: Dict[str, Optional[str]] = _headers or {} 9802 _form_params: List[Tuple[str, str]] = [] 9803 _files: Dict[str, str] = {} 9804 _body_params: Optional[bytes] = None 9805 9806 # process the path parameters 9807 if org_id is not None: 9808 _path_params["org_id"] = org_id 9809 if project_id is not None: 9810 _path_params["project_id"] = project_id 9811 # process the query parameters 9812 # process the header parameters 9813 # process the form parameters 9814 # process the body parameter 9815 if create_project_user_groups_request is not None: 9816 _body_params = create_project_user_groups_request 9817 9818 # set the HTTP header `Accept` 9819 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9820 9821 # set the HTTP header `Content-Type` 9822 if _content_type: 9823 _header_params["Content-Type"] = _content_type 9824 else: 9825 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 9826 if _default_content_type is not None: 9827 _header_params["Content-Type"] = _default_content_type 9828 9829 # authentication setting 9830 _auth_settings: List[str] = [] 9831 9832 return self.api_client.param_serialize( 9833 method="POST", 9834 resource_path="/v2/orgs/{org_id}/projects/{project_id}/groups", 9835 path_params=_path_params, 9836 query_params=_query_params, 9837 header_params=_header_params, 9838 body=_body_params, 9839 post_params=_form_params, 9840 files=_files, 9841 auth_settings=_auth_settings, 9842 collection_formats=_collection_formats, 9843 _host=_host, 9844 _request_auth=_request_auth, 9845 ) 9846 9847 @validate_call 9848 def enterprise_project_delete_groups( 9849 self, 9850 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9851 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9852 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 9853 _request_timeout: Union[ 9854 None, 9855 Annotated[StrictFloat, Field(gt=0)], 9856 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9857 ] = None, 9858 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9859 _content_type: Optional[StrictStr] = None, 9860 _headers: Optional[Dict[StrictStr, Any]] = None, 9861 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9862 ) -> None: 9863 """Delete project user group assignment 9864 9865 Removes a user group from the specified project.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9866 9867 :param org_id: The ID of an organization. (required) 9868 :type org_id: str 9869 :param project_id: The ID of the project. (required) 9870 :type project_id: str 9871 :param group_id: The ID of a user group. (required) 9872 :type group_id: str 9873 :param _request_timeout: timeout setting for this request. If one 9874 number provided, it will be total request 9875 timeout. It can also be a pair (tuple) of 9876 (connection, read) timeouts. 9877 :type _request_timeout: int, tuple(int, int), optional 9878 :param _request_auth: set to override the auth_settings for an a single 9879 request; this effectively ignores the 9880 authentication in the spec for a single request. 9881 :type _request_auth: dict, optional 9882 :param _content_type: force content-type for the request. 9883 :type _content_type: str, Optional 9884 :param _headers: set to override the headers for a single 9885 request; this effectively ignores the headers 9886 in the spec for a single request. 9887 :type _headers: dict, optional 9888 :param _host_index: set to override the host_index for a single 9889 request; this effectively ignores the host_index 9890 in the spec for a single request. 9891 :type _host_index: int, optional 9892 :return: Returns the result object. 9893 """ # noqa: E501 9894 9895 _param = self._enterprise_project_delete_groups_serialize( 9896 org_id=org_id, 9897 project_id=project_id, 9898 group_id=group_id, 9899 _request_auth=_request_auth, 9900 _content_type=_content_type, 9901 _headers=_headers, 9902 _host_index=_host_index, 9903 ) 9904 9905 _response_types_map: Dict[str, Optional[str]] = { 9906 "204": None, 9907 "400": None, 9908 "401": None, 9909 "403": None, 9910 "404": None, 9911 "409": None, 9912 "429": None, 9913 } 9914 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9915 response_data.read() 9916 return self.api_client.response_deserialize( 9917 response_data=response_data, 9918 response_types_map=_response_types_map, 9919 ).data 9920 9921 def _enterprise_project_delete_groups_serialize( 9922 self, 9923 org_id, 9924 project_id, 9925 group_id, 9926 _request_auth, 9927 _content_type, 9928 _headers, 9929 _host_index, 9930 ) -> RequestSerialized: 9931 9932 _host = None 9933 9934 _collection_formats: Dict[str, str] = {} 9935 9936 _path_params: Dict[str, str] = {} 9937 _query_params: List[Tuple[str, str]] = [] 9938 _header_params: Dict[str, Optional[str]] = _headers or {} 9939 _form_params: List[Tuple[str, str]] = [] 9940 _files: Dict[str, str] = {} 9941 _body_params: Optional[bytes] = None 9942 9943 # process the path parameters 9944 if org_id is not None: 9945 _path_params["org_id"] = org_id 9946 if project_id is not None: 9947 _path_params["project_id"] = project_id 9948 if group_id is not None: 9949 _path_params["group_id"] = group_id 9950 # process the query parameters 9951 # process the header parameters 9952 # process the form parameters 9953 # process the body parameter 9954 9955 # authentication setting 9956 _auth_settings: List[str] = [] 9957 9958 return self.api_client.param_serialize( 9959 method="DELETE", 9960 resource_path="/v2/orgs/{org_id}/projects/{project_id}/groups/{group_id}", 9961 path_params=_path_params, 9962 query_params=_query_params, 9963 header_params=_header_params, 9964 body=_body_params, 9965 post_params=_form_params, 9966 files=_files, 9967 auth_settings=_auth_settings, 9968 collection_formats=_collection_formats, 9969 _host=_host, 9970 _request_auth=_request_auth, 9971 ) 9972 9973 @validate_call 9974 def enterprise_projects_get_groups( 9975 self, 9976 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9977 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9978 limit: Annotated[ 9979 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 9980 Field(description="The maximum number of user groups in the result list."), 9981 ] = None, 9982 cursor: Annotated[ 9983 Optional[StrictStr], 9984 Field( 9985 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 9986 ), 9987 ] = None, 9988 _request_timeout: Union[ 9989 None, 9990 Annotated[StrictFloat, Field(gt=0)], 9991 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9992 ] = None, 9993 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9994 _content_type: Optional[StrictStr] = None, 9995 _headers: Optional[Dict[StrictStr, Any]] = None, 9996 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9997 ) -> ProjectUserGroupsPage: 9998 """Get project user group assignments 9999 10000 Retrieves information about user groups invited to the specified project.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10001 10002 :param org_id: The ID of an organization. (required) 10003 :type org_id: str 10004 :param project_id: The ID of the project. (required) 10005 :type project_id: str 10006 :param limit: The maximum number of user groups in the result list. 10007 :type limit: int 10008 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 10009 :type cursor: str 10010 :param _request_timeout: timeout setting for this request. If one 10011 number provided, it will be total request 10012 timeout. It can also be a pair (tuple) of 10013 (connection, read) timeouts. 10014 :type _request_timeout: int, tuple(int, int), optional 10015 :param _request_auth: set to override the auth_settings for an a single 10016 request; this effectively ignores the 10017 authentication in the spec for a single request. 10018 :type _request_auth: dict, optional 10019 :param _content_type: force content-type for the request. 10020 :type _content_type: str, Optional 10021 :param _headers: set to override the headers for a single 10022 request; this effectively ignores the headers 10023 in the spec for a single request. 10024 :type _headers: dict, optional 10025 :param _host_index: set to override the host_index for a single 10026 request; this effectively ignores the host_index 10027 in the spec for a single request. 10028 :type _host_index: int, optional 10029 :return: Returns the result object. 10030 """ # noqa: E501 10031 10032 _param = self._enterprise_projects_get_groups_serialize( 10033 org_id=org_id, 10034 project_id=project_id, 10035 limit=limit, 10036 cursor=cursor, 10037 _request_auth=_request_auth, 10038 _content_type=_content_type, 10039 _headers=_headers, 10040 _host_index=_host_index, 10041 ) 10042 10043 _response_types_map: Dict[str, Optional[str]] = { 10044 "200": "ProjectUserGroupsPage", 10045 "400": None, 10046 "401": None, 10047 "403": None, 10048 "404": None, 10049 "429": None, 10050 } 10051 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10052 response_data.read() 10053 return self.api_client.response_deserialize( 10054 response_data=response_data, 10055 response_types_map=_response_types_map, 10056 ).data 10057 10058 def _enterprise_projects_get_groups_serialize( 10059 self, 10060 org_id, 10061 project_id, 10062 limit, 10063 cursor, 10064 _request_auth, 10065 _content_type, 10066 _headers, 10067 _host_index, 10068 ) -> RequestSerialized: 10069 10070 _host = None 10071 10072 _collection_formats: Dict[str, str] = {} 10073 10074 _path_params: Dict[str, str] = {} 10075 _query_params: List[Tuple[str, str]] = [] 10076 _header_params: Dict[str, Optional[str]] = _headers or {} 10077 _form_params: List[Tuple[str, str]] = [] 10078 _files: Dict[str, str] = {} 10079 _body_params: Optional[bytes] = None 10080 10081 # process the path parameters 10082 if org_id is not None: 10083 _path_params["org_id"] = org_id 10084 if project_id is not None: 10085 _path_params["project_id"] = project_id 10086 # process the query parameters 10087 if limit is not None: 10088 10089 _query_params.append(("limit", limit)) 10090 10091 if cursor is not None: 10092 10093 _query_params.append(("cursor", cursor)) 10094 10095 # process the header parameters 10096 # process the form parameters 10097 # process the body parameter 10098 10099 # set the HTTP header `Accept` 10100 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10101 10102 # authentication setting 10103 _auth_settings: List[str] = [] 10104 10105 return self.api_client.param_serialize( 10106 method="GET", 10107 resource_path="/v2/orgs/{org_id}/projects/{project_id}/groups", 10108 path_params=_path_params, 10109 query_params=_query_params, 10110 header_params=_header_params, 10111 body=_body_params, 10112 post_params=_form_params, 10113 files=_files, 10114 auth_settings=_auth_settings, 10115 collection_formats=_collection_formats, 10116 _host=_host, 10117 _request_auth=_request_auth, 10118 ) 10119 10120 @validate_call 10121 def enterprise_delete_team_member( 10122 self, 10123 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10124 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10125 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10126 _request_timeout: Union[ 10127 None, 10128 Annotated[StrictFloat, Field(gt=0)], 10129 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10130 ] = None, 10131 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10132 _content_type: Optional[StrictStr] = None, 10133 _headers: Optional[Dict[StrictStr, Any]] = None, 10134 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10135 ) -> None: 10136 """Delete team member from team 10137 10138 Deletes team member from team by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10139 10140 :param org_id: The ID of an organization. (required) 10141 :type org_id: str 10142 :param team_id: The ID of a team. (required) 10143 :type team_id: str 10144 :param member_id: The id of the Team Member (required) 10145 :type member_id: str 10146 :param _request_timeout: timeout setting for this request. If one 10147 number provided, it will be total request 10148 timeout. It can also be a pair (tuple) of 10149 (connection, read) timeouts. 10150 :type _request_timeout: int, tuple(int, int), optional 10151 :param _request_auth: set to override the auth_settings for an a single 10152 request; this effectively ignores the 10153 authentication in the spec for a single request. 10154 :type _request_auth: dict, optional 10155 :param _content_type: force content-type for the request. 10156 :type _content_type: str, Optional 10157 :param _headers: set to override the headers for a single 10158 request; this effectively ignores the headers 10159 in the spec for a single request. 10160 :type _headers: dict, optional 10161 :param _host_index: set to override the host_index for a single 10162 request; this effectively ignores the host_index 10163 in the spec for a single request. 10164 :type _host_index: int, optional 10165 :return: Returns the result object. 10166 """ # noqa: E501 10167 10168 _param = self._enterprise_delete_team_member_serialize( 10169 org_id=org_id, 10170 team_id=team_id, 10171 member_id=member_id, 10172 _request_auth=_request_auth, 10173 _content_type=_content_type, 10174 _headers=_headers, 10175 _host_index=_host_index, 10176 ) 10177 10178 _response_types_map: Dict[str, Optional[str]] = { 10179 "204": None, 10180 "400": None, 10181 "401": None, 10182 "403": None, 10183 "404": None, 10184 "409": None, 10185 "429": None, 10186 } 10187 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10188 response_data.read() 10189 return self.api_client.response_deserialize( 10190 response_data=response_data, 10191 response_types_map=_response_types_map, 10192 ).data 10193 10194 def _enterprise_delete_team_member_serialize( 10195 self, 10196 org_id, 10197 team_id, 10198 member_id, 10199 _request_auth, 10200 _content_type, 10201 _headers, 10202 _host_index, 10203 ) -> RequestSerialized: 10204 10205 _host = None 10206 10207 _collection_formats: Dict[str, str] = {} 10208 10209 _path_params: Dict[str, str] = {} 10210 _query_params: List[Tuple[str, str]] = [] 10211 _header_params: Dict[str, Optional[str]] = _headers or {} 10212 _form_params: List[Tuple[str, str]] = [] 10213 _files: Dict[str, str] = {} 10214 _body_params: Optional[bytes] = None 10215 10216 # process the path parameters 10217 if org_id is not None: 10218 _path_params["org_id"] = org_id 10219 if team_id is not None: 10220 _path_params["team_id"] = team_id 10221 if member_id is not None: 10222 _path_params["member_id"] = member_id 10223 # process the query parameters 10224 # process the header parameters 10225 # process the form parameters 10226 # process the body parameter 10227 10228 # authentication setting 10229 _auth_settings: List[str] = [] 10230 10231 return self.api_client.param_serialize( 10232 method="DELETE", 10233 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}", 10234 path_params=_path_params, 10235 query_params=_query_params, 10236 header_params=_header_params, 10237 body=_body_params, 10238 post_params=_form_params, 10239 files=_files, 10240 auth_settings=_auth_settings, 10241 collection_formats=_collection_formats, 10242 _host=_host, 10243 _request_auth=_request_auth, 10244 ) 10245 10246 @validate_call 10247 def enterprise_get_team_member( 10248 self, 10249 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10250 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10251 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10252 _request_timeout: Union[ 10253 None, 10254 Annotated[StrictFloat, Field(gt=0)], 10255 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10256 ] = None, 10257 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10258 _content_type: Optional[StrictStr] = None, 10259 _headers: Optional[Dict[StrictStr, Any]] = None, 10260 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10261 ) -> TeamMember: 10262 """Get team member 10263 10264 Retrieves team member by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10265 10266 :param org_id: The ID of an organization. (required) 10267 :type org_id: str 10268 :param team_id: The ID of a team. (required) 10269 :type team_id: str 10270 :param member_id: The id of the Team Member (required) 10271 :type member_id: str 10272 :param _request_timeout: timeout setting for this request. If one 10273 number provided, it will be total request 10274 timeout. It can also be a pair (tuple) of 10275 (connection, read) timeouts. 10276 :type _request_timeout: int, tuple(int, int), optional 10277 :param _request_auth: set to override the auth_settings for an a single 10278 request; this effectively ignores the 10279 authentication in the spec for a single request. 10280 :type _request_auth: dict, optional 10281 :param _content_type: force content-type for the request. 10282 :type _content_type: str, Optional 10283 :param _headers: set to override the headers for a single 10284 request; this effectively ignores the headers 10285 in the spec for a single request. 10286 :type _headers: dict, optional 10287 :param _host_index: set to override the host_index for a single 10288 request; this effectively ignores the host_index 10289 in the spec for a single request. 10290 :type _host_index: int, optional 10291 :return: Returns the result object. 10292 """ # noqa: E501 10293 10294 _param = self._enterprise_get_team_member_serialize( 10295 org_id=org_id, 10296 team_id=team_id, 10297 member_id=member_id, 10298 _request_auth=_request_auth, 10299 _content_type=_content_type, 10300 _headers=_headers, 10301 _host_index=_host_index, 10302 ) 10303 10304 _response_types_map: Dict[str, Optional[str]] = { 10305 "200": "TeamMember", 10306 "400": None, 10307 "401": None, 10308 "403": None, 10309 "404": None, 10310 "429": None, 10311 } 10312 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10313 response_data.read() 10314 return self.api_client.response_deserialize( 10315 response_data=response_data, 10316 response_types_map=_response_types_map, 10317 ).data 10318 10319 def _enterprise_get_team_member_serialize( 10320 self, 10321 org_id, 10322 team_id, 10323 member_id, 10324 _request_auth, 10325 _content_type, 10326 _headers, 10327 _host_index, 10328 ) -> RequestSerialized: 10329 10330 _host = None 10331 10332 _collection_formats: Dict[str, str] = {} 10333 10334 _path_params: Dict[str, str] = {} 10335 _query_params: List[Tuple[str, str]] = [] 10336 _header_params: Dict[str, Optional[str]] = _headers or {} 10337 _form_params: List[Tuple[str, str]] = [] 10338 _files: Dict[str, str] = {} 10339 _body_params: Optional[bytes] = None 10340 10341 # process the path parameters 10342 if org_id is not None: 10343 _path_params["org_id"] = org_id 10344 if team_id is not None: 10345 _path_params["team_id"] = team_id 10346 if member_id is not None: 10347 _path_params["member_id"] = member_id 10348 # process the query parameters 10349 # process the header parameters 10350 # process the form parameters 10351 # process the body parameter 10352 10353 # set the HTTP header `Accept` 10354 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10355 10356 # authentication setting 10357 _auth_settings: List[str] = [] 10358 10359 return self.api_client.param_serialize( 10360 method="GET", 10361 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}", 10362 path_params=_path_params, 10363 query_params=_query_params, 10364 header_params=_header_params, 10365 body=_body_params, 10366 post_params=_form_params, 10367 files=_files, 10368 auth_settings=_auth_settings, 10369 collection_formats=_collection_formats, 10370 _host=_host, 10371 _request_auth=_request_auth, 10372 ) 10373 10374 @validate_call 10375 def enterprise_get_team_members( 10376 self, 10377 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10378 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10379 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 10380 cursor: Annotated[ 10381 Optional[StrictStr], 10382 Field( 10383 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 10384 ), 10385 ] = None, 10386 role: Annotated[ 10387 Optional[StrictStr], 10388 Field( 10389 description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": (Deprecated) Team-guest user, user with access only to a team without access to organization. ' 10390 ), 10391 ] = None, 10392 _request_timeout: Union[ 10393 None, 10394 Annotated[StrictFloat, Field(gt=0)], 10395 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10396 ] = None, 10397 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10398 _content_type: Optional[StrictStr] = None, 10399 _headers: Optional[Dict[StrictStr, Any]] = None, 10400 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10401 ) -> TeamMembersPage: 10402 """List team members 10403 10404 Retrieves team members by cursor.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10405 10406 :param org_id: The ID of an organization. (required) 10407 :type org_id: str 10408 :param team_id: The ID of a team. (required) 10409 :type team_id: str 10410 :param limit: 10411 :type limit: int 10412 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 10413 :type cursor: str 10414 :param role: Role query. Filters members by role using full word match. Accepted values are: * \"member\": Team member with full member permissions. * \"admin\": Admin of a team. Team member with permission to manage team. * \"non_team\": External user, non-team user. * \"team_guest\": (Deprecated) Team-guest user, user with access only to a team without access to organization. 10415 :type role: str 10416 :param _request_timeout: timeout setting for this request. If one 10417 number provided, it will be total request 10418 timeout. It can also be a pair (tuple) of 10419 (connection, read) timeouts. 10420 :type _request_timeout: int, tuple(int, int), optional 10421 :param _request_auth: set to override the auth_settings for an a single 10422 request; this effectively ignores the 10423 authentication in the spec for a single request. 10424 :type _request_auth: dict, optional 10425 :param _content_type: force content-type for the request. 10426 :type _content_type: str, Optional 10427 :param _headers: set to override the headers for a single 10428 request; this effectively ignores the headers 10429 in the spec for a single request. 10430 :type _headers: dict, optional 10431 :param _host_index: set to override the host_index for a single 10432 request; this effectively ignores the host_index 10433 in the spec for a single request. 10434 :type _host_index: int, optional 10435 :return: Returns the result object. 10436 """ # noqa: E501 10437 10438 _param = self._enterprise_get_team_members_serialize( 10439 org_id=org_id, 10440 team_id=team_id, 10441 limit=limit, 10442 cursor=cursor, 10443 role=role, 10444 _request_auth=_request_auth, 10445 _content_type=_content_type, 10446 _headers=_headers, 10447 _host_index=_host_index, 10448 ) 10449 10450 _response_types_map: Dict[str, Optional[str]] = { 10451 "200": "TeamMembersPage", 10452 "400": None, 10453 "401": None, 10454 "403": None, 10455 "404": None, 10456 "429": None, 10457 } 10458 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10459 response_data.read() 10460 return self.api_client.response_deserialize( 10461 response_data=response_data, 10462 response_types_map=_response_types_map, 10463 ).data 10464 10465 def _enterprise_get_team_members_serialize( 10466 self, 10467 org_id, 10468 team_id, 10469 limit, 10470 cursor, 10471 role, 10472 _request_auth, 10473 _content_type, 10474 _headers, 10475 _host_index, 10476 ) -> RequestSerialized: 10477 10478 _host = None 10479 10480 _collection_formats: Dict[str, str] = {} 10481 10482 _path_params: Dict[str, str] = {} 10483 _query_params: List[Tuple[str, str]] = [] 10484 _header_params: Dict[str, Optional[str]] = _headers or {} 10485 _form_params: List[Tuple[str, str]] = [] 10486 _files: Dict[str, str] = {} 10487 _body_params: Optional[bytes] = None 10488 10489 # process the path parameters 10490 if org_id is not None: 10491 _path_params["org_id"] = org_id 10492 if team_id is not None: 10493 _path_params["team_id"] = team_id 10494 # process the query parameters 10495 if limit is not None: 10496 10497 _query_params.append(("limit", limit)) 10498 10499 if cursor is not None: 10500 10501 _query_params.append(("cursor", cursor)) 10502 10503 if role is not None: 10504 10505 _query_params.append(("role", role)) 10506 10507 # process the header parameters 10508 # process the form parameters 10509 # process the body parameter 10510 10511 # set the HTTP header `Accept` 10512 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10513 10514 # authentication setting 10515 _auth_settings: List[str] = [] 10516 10517 return self.api_client.param_serialize( 10518 method="GET", 10519 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members", 10520 path_params=_path_params, 10521 query_params=_query_params, 10522 header_params=_header_params, 10523 body=_body_params, 10524 post_params=_form_params, 10525 files=_files, 10526 auth_settings=_auth_settings, 10527 collection_formats=_collection_formats, 10528 _host=_host, 10529 _request_auth=_request_auth, 10530 ) 10531 10532 @validate_call 10533 def enterprise_invite_team_member( 10534 self, 10535 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10536 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10537 team_member_invite: TeamMemberInvite, 10538 _request_timeout: Union[ 10539 None, 10540 Annotated[StrictFloat, Field(gt=0)], 10541 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10542 ] = None, 10543 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10544 _content_type: Optional[StrictStr] = None, 10545 _headers: Optional[Dict[StrictStr, Any]] = None, 10546 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10547 ) -> TeamMember: 10548 """Invite team members 10549 10550 Invites a new Miro user to an existing team. The user must exist in your Miro organization. Users who do not exist in your Miro organization can be invited to the team via [SCIM](https://developers.miro.com/docs/scim) and an external identity provider, such as Okta or Azure Active Directory.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10551 10552 :param org_id: The ID of an organization. (required) 10553 :type org_id: str 10554 :param team_id: The ID of a team. (required) 10555 :type team_id: str 10556 :param team_member_invite: (required) 10557 :type team_member_invite: TeamMemberInvite 10558 :param _request_timeout: timeout setting for this request. If one 10559 number provided, it will be total request 10560 timeout. It can also be a pair (tuple) of 10561 (connection, read) timeouts. 10562 :type _request_timeout: int, tuple(int, int), optional 10563 :param _request_auth: set to override the auth_settings for an a single 10564 request; this effectively ignores the 10565 authentication in the spec for a single request. 10566 :type _request_auth: dict, optional 10567 :param _content_type: force content-type for the request. 10568 :type _content_type: str, Optional 10569 :param _headers: set to override the headers for a single 10570 request; this effectively ignores the headers 10571 in the spec for a single request. 10572 :type _headers: dict, optional 10573 :param _host_index: set to override the host_index for a single 10574 request; this effectively ignores the host_index 10575 in the spec for a single request. 10576 :type _host_index: int, optional 10577 :return: Returns the result object. 10578 """ # noqa: E501 10579 10580 _param = self._enterprise_invite_team_member_serialize( 10581 org_id=org_id, 10582 team_id=team_id, 10583 team_member_invite=team_member_invite, 10584 _request_auth=_request_auth, 10585 _content_type=_content_type, 10586 _headers=_headers, 10587 _host_index=_host_index, 10588 ) 10589 10590 _response_types_map: Dict[str, Optional[str]] = { 10591 "201": "TeamMember", 10592 "400": None, 10593 "401": None, 10594 "403": None, 10595 "404": None, 10596 "409": None, 10597 "429": None, 10598 } 10599 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10600 response_data.read() 10601 return self.api_client.response_deserialize( 10602 response_data=response_data, 10603 response_types_map=_response_types_map, 10604 ).data 10605 10606 def _enterprise_invite_team_member_serialize( 10607 self, 10608 org_id, 10609 team_id, 10610 team_member_invite, 10611 _request_auth, 10612 _content_type, 10613 _headers, 10614 _host_index, 10615 ) -> RequestSerialized: 10616 10617 _host = None 10618 10619 _collection_formats: Dict[str, str] = {} 10620 10621 _path_params: Dict[str, str] = {} 10622 _query_params: List[Tuple[str, str]] = [] 10623 _header_params: Dict[str, Optional[str]] = _headers or {} 10624 _form_params: List[Tuple[str, str]] = [] 10625 _files: Dict[str, str] = {} 10626 _body_params: Optional[bytes] = None 10627 10628 # process the path parameters 10629 if org_id is not None: 10630 _path_params["org_id"] = org_id 10631 if team_id is not None: 10632 _path_params["team_id"] = team_id 10633 # process the query parameters 10634 # process the header parameters 10635 # process the form parameters 10636 # process the body parameter 10637 if team_member_invite is not None: 10638 _body_params = team_member_invite 10639 10640 # set the HTTP header `Accept` 10641 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10642 10643 # set the HTTP header `Content-Type` 10644 if _content_type: 10645 _header_params["Content-Type"] = _content_type 10646 else: 10647 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 10648 if _default_content_type is not None: 10649 _header_params["Content-Type"] = _default_content_type 10650 10651 # authentication setting 10652 _auth_settings: List[str] = [] 10653 10654 return self.api_client.param_serialize( 10655 method="POST", 10656 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members", 10657 path_params=_path_params, 10658 query_params=_query_params, 10659 header_params=_header_params, 10660 body=_body_params, 10661 post_params=_form_params, 10662 files=_files, 10663 auth_settings=_auth_settings, 10664 collection_formats=_collection_formats, 10665 _host=_host, 10666 _request_auth=_request_auth, 10667 ) 10668 10669 @validate_call 10670 def enterprise_update_team_member( 10671 self, 10672 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10673 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10674 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10675 team_member_changes: TeamMemberChanges, 10676 _request_timeout: Union[ 10677 None, 10678 Annotated[StrictFloat, Field(gt=0)], 10679 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10680 ] = None, 10681 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10682 _content_type: Optional[StrictStr] = None, 10683 _headers: Optional[Dict[StrictStr, Any]] = None, 10684 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10685 ) -> TeamMember: 10686 """Update team member 10687 10688 Updates team member role in team by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10689 10690 :param org_id: The ID of an organization. (required) 10691 :type org_id: str 10692 :param team_id: The ID of a team. (required) 10693 :type team_id: str 10694 :param member_id: The id of the Team Member (required) 10695 :type member_id: str 10696 :param team_member_changes: (required) 10697 :type team_member_changes: TeamMemberChanges 10698 :param _request_timeout: timeout setting for this request. If one 10699 number provided, it will be total request 10700 timeout. It can also be a pair (tuple) of 10701 (connection, read) timeouts. 10702 :type _request_timeout: int, tuple(int, int), optional 10703 :param _request_auth: set to override the auth_settings for an a single 10704 request; this effectively ignores the 10705 authentication in the spec for a single request. 10706 :type _request_auth: dict, optional 10707 :param _content_type: force content-type for the request. 10708 :type _content_type: str, Optional 10709 :param _headers: set to override the headers for a single 10710 request; this effectively ignores the headers 10711 in the spec for a single request. 10712 :type _headers: dict, optional 10713 :param _host_index: set to override the host_index for a single 10714 request; this effectively ignores the host_index 10715 in the spec for a single request. 10716 :type _host_index: int, optional 10717 :return: Returns the result object. 10718 """ # noqa: E501 10719 10720 _param = self._enterprise_update_team_member_serialize( 10721 org_id=org_id, 10722 team_id=team_id, 10723 member_id=member_id, 10724 team_member_changes=team_member_changes, 10725 _request_auth=_request_auth, 10726 _content_type=_content_type, 10727 _headers=_headers, 10728 _host_index=_host_index, 10729 ) 10730 10731 _response_types_map: Dict[str, Optional[str]] = { 10732 "200": "TeamMember", 10733 "400": None, 10734 "401": None, 10735 "403": None, 10736 "404": None, 10737 "409": None, 10738 "429": None, 10739 } 10740 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10741 response_data.read() 10742 return self.api_client.response_deserialize( 10743 response_data=response_data, 10744 response_types_map=_response_types_map, 10745 ).data 10746 10747 def _enterprise_update_team_member_serialize( 10748 self, 10749 org_id, 10750 team_id, 10751 member_id, 10752 team_member_changes, 10753 _request_auth, 10754 _content_type, 10755 _headers, 10756 _host_index, 10757 ) -> RequestSerialized: 10758 10759 _host = None 10760 10761 _collection_formats: Dict[str, str] = {} 10762 10763 _path_params: Dict[str, str] = {} 10764 _query_params: List[Tuple[str, str]] = [] 10765 _header_params: Dict[str, Optional[str]] = _headers or {} 10766 _form_params: List[Tuple[str, str]] = [] 10767 _files: Dict[str, str] = {} 10768 _body_params: Optional[bytes] = None 10769 10770 # process the path parameters 10771 if org_id is not None: 10772 _path_params["org_id"] = org_id 10773 if team_id is not None: 10774 _path_params["team_id"] = team_id 10775 if member_id is not None: 10776 _path_params["member_id"] = member_id 10777 # process the query parameters 10778 # process the header parameters 10779 # process the form parameters 10780 # process the body parameter 10781 if team_member_changes is not None: 10782 _body_params = team_member_changes 10783 10784 # set the HTTP header `Accept` 10785 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10786 10787 # set the HTTP header `Content-Type` 10788 if _content_type: 10789 _header_params["Content-Type"] = _content_type 10790 else: 10791 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 10792 if _default_content_type is not None: 10793 _header_params["Content-Type"] = _default_content_type 10794 10795 # authentication setting 10796 _auth_settings: List[str] = [] 10797 10798 return self.api_client.param_serialize( 10799 method="PATCH", 10800 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}", 10801 path_params=_path_params, 10802 query_params=_query_params, 10803 header_params=_header_params, 10804 body=_body_params, 10805 post_params=_form_params, 10806 files=_files, 10807 auth_settings=_auth_settings, 10808 collection_formats=_collection_formats, 10809 _host=_host, 10810 _request_auth=_request_auth, 10811 ) 10812 10813 @validate_call 10814 def enterprise_get_default_team_settings( 10815 self, 10816 org_id: Annotated[StrictStr, Field(description="The id of an Organization.")], 10817 _request_timeout: Union[ 10818 None, 10819 Annotated[StrictFloat, Field(gt=0)], 10820 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10821 ] = None, 10822 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10823 _content_type: Optional[StrictStr] = None, 10824 _headers: Optional[Dict[StrictStr, Any]] = None, 10825 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10826 ) -> TeamSettings: 10827 """Get default team settings 10828 10829 Retrieves default team settings of an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10830 10831 :param org_id: The id of an Organization. (required) 10832 :type org_id: str 10833 :param _request_timeout: timeout setting for this request. If one 10834 number provided, it will be total request 10835 timeout. It can also be a pair (tuple) of 10836 (connection, read) timeouts. 10837 :type _request_timeout: int, tuple(int, int), optional 10838 :param _request_auth: set to override the auth_settings for an a single 10839 request; this effectively ignores the 10840 authentication in the spec for a single request. 10841 :type _request_auth: dict, optional 10842 :param _content_type: force content-type for the request. 10843 :type _content_type: str, Optional 10844 :param _headers: set to override the headers for a single 10845 request; this effectively ignores the headers 10846 in the spec for a single request. 10847 :type _headers: dict, optional 10848 :param _host_index: set to override the host_index for a single 10849 request; this effectively ignores the host_index 10850 in the spec for a single request. 10851 :type _host_index: int, optional 10852 :return: Returns the result object. 10853 """ # noqa: E501 10854 10855 _param = self._enterprise_get_default_team_settings_serialize( 10856 org_id=org_id, 10857 _request_auth=_request_auth, 10858 _content_type=_content_type, 10859 _headers=_headers, 10860 _host_index=_host_index, 10861 ) 10862 10863 _response_types_map: Dict[str, Optional[str]] = { 10864 "200": "TeamSettings", 10865 "400": None, 10866 "401": None, 10867 "403": None, 10868 "404": None, 10869 "429": None, 10870 } 10871 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10872 response_data.read() 10873 return self.api_client.response_deserialize( 10874 response_data=response_data, 10875 response_types_map=_response_types_map, 10876 ).data 10877 10878 def _enterprise_get_default_team_settings_serialize( 10879 self, 10880 org_id, 10881 _request_auth, 10882 _content_type, 10883 _headers, 10884 _host_index, 10885 ) -> RequestSerialized: 10886 10887 _host = None 10888 10889 _collection_formats: Dict[str, str] = {} 10890 10891 _path_params: Dict[str, str] = {} 10892 _query_params: List[Tuple[str, str]] = [] 10893 _header_params: Dict[str, Optional[str]] = _headers or {} 10894 _form_params: List[Tuple[str, str]] = [] 10895 _files: Dict[str, str] = {} 10896 _body_params: Optional[bytes] = None 10897 10898 # process the path parameters 10899 if org_id is not None: 10900 _path_params["org_id"] = org_id 10901 # process the query parameters 10902 # process the header parameters 10903 # process the form parameters 10904 # process the body parameter 10905 10906 # set the HTTP header `Accept` 10907 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10908 10909 # authentication setting 10910 _auth_settings: List[str] = [] 10911 10912 return self.api_client.param_serialize( 10913 method="GET", 10914 resource_path="/v2/orgs/{org_id}/default_teams_settings", 10915 path_params=_path_params, 10916 query_params=_query_params, 10917 header_params=_header_params, 10918 body=_body_params, 10919 post_params=_form_params, 10920 files=_files, 10921 auth_settings=_auth_settings, 10922 collection_formats=_collection_formats, 10923 _host=_host, 10924 _request_auth=_request_auth, 10925 ) 10926 10927 @validate_call 10928 def enterprise_get_team_settings( 10929 self, 10930 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10931 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10932 _request_timeout: Union[ 10933 None, 10934 Annotated[StrictFloat, Field(gt=0)], 10935 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10936 ] = None, 10937 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10938 _content_type: Optional[StrictStr] = None, 10939 _headers: Optional[Dict[StrictStr, Any]] = None, 10940 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10941 ) -> TeamSettings: 10942 """Get team settings 10943 10944 Retrieves team settings of an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10945 10946 :param org_id: The ID of an organization. (required) 10947 :type org_id: str 10948 :param team_id: The ID of a team. (required) 10949 :type team_id: str 10950 :param _request_timeout: timeout setting for this request. If one 10951 number provided, it will be total request 10952 timeout. It can also be a pair (tuple) of 10953 (connection, read) timeouts. 10954 :type _request_timeout: int, tuple(int, int), optional 10955 :param _request_auth: set to override the auth_settings for an a single 10956 request; this effectively ignores the 10957 authentication in the spec for a single request. 10958 :type _request_auth: dict, optional 10959 :param _content_type: force content-type for the request. 10960 :type _content_type: str, Optional 10961 :param _headers: set to override the headers for a single 10962 request; this effectively ignores the headers 10963 in the spec for a single request. 10964 :type _headers: dict, optional 10965 :param _host_index: set to override the host_index for a single 10966 request; this effectively ignores the host_index 10967 in the spec for a single request. 10968 :type _host_index: int, optional 10969 :return: Returns the result object. 10970 """ # noqa: E501 10971 10972 _param = self._enterprise_get_team_settings_serialize( 10973 org_id=org_id, 10974 team_id=team_id, 10975 _request_auth=_request_auth, 10976 _content_type=_content_type, 10977 _headers=_headers, 10978 _host_index=_host_index, 10979 ) 10980 10981 _response_types_map: Dict[str, Optional[str]] = { 10982 "200": "TeamSettings", 10983 "400": None, 10984 "401": None, 10985 "403": None, 10986 "404": None, 10987 "429": None, 10988 } 10989 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10990 response_data.read() 10991 return self.api_client.response_deserialize( 10992 response_data=response_data, 10993 response_types_map=_response_types_map, 10994 ).data 10995 10996 def _enterprise_get_team_settings_serialize( 10997 self, 10998 org_id, 10999 team_id, 11000 _request_auth, 11001 _content_type, 11002 _headers, 11003 _host_index, 11004 ) -> RequestSerialized: 11005 11006 _host = None 11007 11008 _collection_formats: Dict[str, str] = {} 11009 11010 _path_params: Dict[str, str] = {} 11011 _query_params: List[Tuple[str, str]] = [] 11012 _header_params: Dict[str, Optional[str]] = _headers or {} 11013 _form_params: List[Tuple[str, str]] = [] 11014 _files: Dict[str, str] = {} 11015 _body_params: Optional[bytes] = None 11016 11017 # process the path parameters 11018 if org_id is not None: 11019 _path_params["org_id"] = org_id 11020 if team_id is not None: 11021 _path_params["team_id"] = team_id 11022 # process the query parameters 11023 # process the header parameters 11024 # process the form parameters 11025 # process the body parameter 11026 11027 # set the HTTP header `Accept` 11028 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11029 11030 # authentication setting 11031 _auth_settings: List[str] = [] 11032 11033 return self.api_client.param_serialize( 11034 method="GET", 11035 resource_path="/v2/orgs/{org_id}/teams/{team_id}/settings", 11036 path_params=_path_params, 11037 query_params=_query_params, 11038 header_params=_header_params, 11039 body=_body_params, 11040 post_params=_form_params, 11041 files=_files, 11042 auth_settings=_auth_settings, 11043 collection_formats=_collection_formats, 11044 _host=_host, 11045 _request_auth=_request_auth, 11046 ) 11047 11048 @validate_call 11049 def enterprise_update_team_settings( 11050 self, 11051 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11052 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11053 team_settings_changes: TeamSettingsChanges, 11054 _request_timeout: Union[ 11055 None, 11056 Annotated[StrictFloat, Field(gt=0)], 11057 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11058 ] = None, 11059 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11060 _content_type: Optional[StrictStr] = None, 11061 _headers: Optional[Dict[StrictStr, Any]] = None, 11062 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11063 ) -> TeamSettings: 11064 """Update team settings 11065 11066 Updates team settings of an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11067 11068 :param org_id: The ID of an organization. (required) 11069 :type org_id: str 11070 :param team_id: The ID of a team. (required) 11071 :type team_id: str 11072 :param team_settings_changes: (required) 11073 :type team_settings_changes: TeamSettingsChanges 11074 :param _request_timeout: timeout setting for this request. If one 11075 number provided, it will be total request 11076 timeout. It can also be a pair (tuple) of 11077 (connection, read) timeouts. 11078 :type _request_timeout: int, tuple(int, int), optional 11079 :param _request_auth: set to override the auth_settings for an a single 11080 request; this effectively ignores the 11081 authentication in the spec for a single request. 11082 :type _request_auth: dict, optional 11083 :param _content_type: force content-type for the request. 11084 :type _content_type: str, Optional 11085 :param _headers: set to override the headers for a single 11086 request; this effectively ignores the headers 11087 in the spec for a single request. 11088 :type _headers: dict, optional 11089 :param _host_index: set to override the host_index for a single 11090 request; this effectively ignores the host_index 11091 in the spec for a single request. 11092 :type _host_index: int, optional 11093 :return: Returns the result object. 11094 """ # noqa: E501 11095 11096 _param = self._enterprise_update_team_settings_serialize( 11097 org_id=org_id, 11098 team_id=team_id, 11099 team_settings_changes=team_settings_changes, 11100 _request_auth=_request_auth, 11101 _content_type=_content_type, 11102 _headers=_headers, 11103 _host_index=_host_index, 11104 ) 11105 11106 _response_types_map: Dict[str, Optional[str]] = { 11107 "200": "TeamSettings", 11108 "400": None, 11109 "401": None, 11110 "403": None, 11111 "404": None, 11112 "409": None, 11113 "429": None, 11114 } 11115 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11116 response_data.read() 11117 return self.api_client.response_deserialize( 11118 response_data=response_data, 11119 response_types_map=_response_types_map, 11120 ).data 11121 11122 def _enterprise_update_team_settings_serialize( 11123 self, 11124 org_id, 11125 team_id, 11126 team_settings_changes, 11127 _request_auth, 11128 _content_type, 11129 _headers, 11130 _host_index, 11131 ) -> RequestSerialized: 11132 11133 _host = None 11134 11135 _collection_formats: Dict[str, str] = {} 11136 11137 _path_params: Dict[str, str] = {} 11138 _query_params: List[Tuple[str, str]] = [] 11139 _header_params: Dict[str, Optional[str]] = _headers or {} 11140 _form_params: List[Tuple[str, str]] = [] 11141 _files: Dict[str, str] = {} 11142 _body_params: Optional[bytes] = None 11143 11144 # process the path parameters 11145 if org_id is not None: 11146 _path_params["org_id"] = org_id 11147 if team_id is not None: 11148 _path_params["team_id"] = team_id 11149 # process the query parameters 11150 # process the header parameters 11151 # process the form parameters 11152 # process the body parameter 11153 if team_settings_changes is not None: 11154 _body_params = team_settings_changes 11155 11156 # set the HTTP header `Accept` 11157 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11158 11159 # set the HTTP header `Content-Type` 11160 if _content_type: 11161 _header_params["Content-Type"] = _content_type 11162 else: 11163 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 11164 if _default_content_type is not None: 11165 _header_params["Content-Type"] = _default_content_type 11166 11167 # authentication setting 11168 _auth_settings: List[str] = [] 11169 11170 return self.api_client.param_serialize( 11171 method="PATCH", 11172 resource_path="/v2/orgs/{org_id}/teams/{team_id}/settings", 11173 path_params=_path_params, 11174 query_params=_query_params, 11175 header_params=_header_params, 11176 body=_body_params, 11177 post_params=_form_params, 11178 files=_files, 11179 auth_settings=_auth_settings, 11180 collection_formats=_collection_formats, 11181 _host=_host, 11182 _request_auth=_request_auth, 11183 ) 11184 11185 @validate_call 11186 def enterprise_teams_create_group( 11187 self, 11188 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11189 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11190 create_team_group_request: CreateTeamGroupRequest, 11191 _request_timeout: Union[ 11192 None, 11193 Annotated[StrictFloat, Field(gt=0)], 11194 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11195 ] = None, 11196 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11197 _content_type: Optional[StrictStr] = None, 11198 _headers: Optional[Dict[StrictStr, Any]] = None, 11199 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11200 ) -> TeamGroup: 11201 """Create user group to team connection 11202 11203 Adds a user group to a team in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p>' 11204 11205 :param org_id: The ID of an organization. (required) 11206 :type org_id: str 11207 :param team_id: The ID of a team. (required) 11208 :type team_id: str 11209 :param create_team_group_request: (required) 11210 :type create_team_group_request: CreateTeamGroupRequest 11211 :param _request_timeout: timeout setting for this request. If one 11212 number provided, it will be total request 11213 timeout. It can also be a pair (tuple) of 11214 (connection, read) timeouts. 11215 :type _request_timeout: int, tuple(int, int), optional 11216 :param _request_auth: set to override the auth_settings for an a single 11217 request; this effectively ignores the 11218 authentication in the spec for a single request. 11219 :type _request_auth: dict, optional 11220 :param _content_type: force content-type for the request. 11221 :type _content_type: str, Optional 11222 :param _headers: set to override the headers for a single 11223 request; this effectively ignores the headers 11224 in the spec for a single request. 11225 :type _headers: dict, optional 11226 :param _host_index: set to override the host_index for a single 11227 request; this effectively ignores the host_index 11228 in the spec for a single request. 11229 :type _host_index: int, optional 11230 :return: Returns the result object. 11231 """ # noqa: E501 11232 11233 _param = self._enterprise_teams_create_group_serialize( 11234 org_id=org_id, 11235 team_id=team_id, 11236 create_team_group_request=create_team_group_request, 11237 _request_auth=_request_auth, 11238 _content_type=_content_type, 11239 _headers=_headers, 11240 _host_index=_host_index, 11241 ) 11242 11243 _response_types_map: Dict[str, Optional[str]] = { 11244 "201": "TeamGroup", 11245 "400": None, 11246 "401": None, 11247 "403": None, 11248 "409": None, 11249 "429": None, 11250 } 11251 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11252 response_data.read() 11253 return self.api_client.response_deserialize( 11254 response_data=response_data, 11255 response_types_map=_response_types_map, 11256 ).data 11257 11258 def _enterprise_teams_create_group_serialize( 11259 self, 11260 org_id, 11261 team_id, 11262 create_team_group_request, 11263 _request_auth, 11264 _content_type, 11265 _headers, 11266 _host_index, 11267 ) -> RequestSerialized: 11268 11269 _host = None 11270 11271 _collection_formats: Dict[str, str] = {} 11272 11273 _path_params: Dict[str, str] = {} 11274 _query_params: List[Tuple[str, str]] = [] 11275 _header_params: Dict[str, Optional[str]] = _headers or {} 11276 _form_params: List[Tuple[str, str]] = [] 11277 _files: Dict[str, str] = {} 11278 _body_params: Optional[bytes] = None 11279 11280 # process the path parameters 11281 if org_id is not None: 11282 _path_params["org_id"] = org_id 11283 if team_id is not None: 11284 _path_params["team_id"] = team_id 11285 # process the query parameters 11286 # process the header parameters 11287 # process the form parameters 11288 # process the body parameter 11289 if create_team_group_request is not None: 11290 _body_params = create_team_group_request 11291 11292 # set the HTTP header `Accept` 11293 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11294 11295 # set the HTTP header `Content-Type` 11296 if _content_type: 11297 _header_params["Content-Type"] = _content_type 11298 else: 11299 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 11300 if _default_content_type is not None: 11301 _header_params["Content-Type"] = _default_content_type 11302 11303 # authentication setting 11304 _auth_settings: List[str] = [] 11305 11306 return self.api_client.param_serialize( 11307 method="POST", 11308 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups", 11309 path_params=_path_params, 11310 query_params=_query_params, 11311 header_params=_header_params, 11312 body=_body_params, 11313 post_params=_form_params, 11314 files=_files, 11315 auth_settings=_auth_settings, 11316 collection_formats=_collection_formats, 11317 _host=_host, 11318 _request_auth=_request_auth, 11319 ) 11320 11321 @validate_call 11322 def enterprise_teams_delete_group( 11323 self, 11324 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11325 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11326 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 11327 _request_timeout: Union[ 11328 None, 11329 Annotated[StrictFloat, Field(gt=0)], 11330 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11331 ] = None, 11332 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11333 _content_type: Optional[StrictStr] = None, 11334 _headers: Optional[Dict[StrictStr, Any]] = None, 11335 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11336 ) -> None: 11337 """Delete user group to team connection 11338 11339 Removes a user group from a team in an existing organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11340 11341 :param org_id: The ID of an organization. (required) 11342 :type org_id: str 11343 :param team_id: The ID of a team. (required) 11344 :type team_id: str 11345 :param group_id: The ID of a user group. (required) 11346 :type group_id: str 11347 :param _request_timeout: timeout setting for this request. If one 11348 number provided, it will be total request 11349 timeout. It can also be a pair (tuple) of 11350 (connection, read) timeouts. 11351 :type _request_timeout: int, tuple(int, int), optional 11352 :param _request_auth: set to override the auth_settings for an a single 11353 request; this effectively ignores the 11354 authentication in the spec for a single request. 11355 :type _request_auth: dict, optional 11356 :param _content_type: force content-type for the request. 11357 :type _content_type: str, Optional 11358 :param _headers: set to override the headers for a single 11359 request; this effectively ignores the headers 11360 in the spec for a single request. 11361 :type _headers: dict, optional 11362 :param _host_index: set to override the host_index for a single 11363 request; this effectively ignores the host_index 11364 in the spec for a single request. 11365 :type _host_index: int, optional 11366 :return: Returns the result object. 11367 """ # noqa: E501 11368 11369 _param = self._enterprise_teams_delete_group_serialize( 11370 org_id=org_id, 11371 team_id=team_id, 11372 group_id=group_id, 11373 _request_auth=_request_auth, 11374 _content_type=_content_type, 11375 _headers=_headers, 11376 _host_index=_host_index, 11377 ) 11378 11379 _response_types_map: Dict[str, Optional[str]] = { 11380 "204": None, 11381 "400": None, 11382 "401": None, 11383 "403": None, 11384 "404": None, 11385 "409": None, 11386 "429": None, 11387 } 11388 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11389 response_data.read() 11390 return self.api_client.response_deserialize( 11391 response_data=response_data, 11392 response_types_map=_response_types_map, 11393 ).data 11394 11395 def _enterprise_teams_delete_group_serialize( 11396 self, 11397 org_id, 11398 team_id, 11399 group_id, 11400 _request_auth, 11401 _content_type, 11402 _headers, 11403 _host_index, 11404 ) -> RequestSerialized: 11405 11406 _host = None 11407 11408 _collection_formats: Dict[str, str] = {} 11409 11410 _path_params: Dict[str, str] = {} 11411 _query_params: List[Tuple[str, str]] = [] 11412 _header_params: Dict[str, Optional[str]] = _headers or {} 11413 _form_params: List[Tuple[str, str]] = [] 11414 _files: Dict[str, str] = {} 11415 _body_params: Optional[bytes] = None 11416 11417 # process the path parameters 11418 if org_id is not None: 11419 _path_params["org_id"] = org_id 11420 if team_id is not None: 11421 _path_params["team_id"] = team_id 11422 if group_id is not None: 11423 _path_params["group_id"] = group_id 11424 # process the query parameters 11425 # process the header parameters 11426 # process the form parameters 11427 # process the body parameter 11428 11429 # authentication setting 11430 _auth_settings: List[str] = [] 11431 11432 return self.api_client.param_serialize( 11433 method="DELETE", 11434 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups/{group_id}", 11435 path_params=_path_params, 11436 query_params=_query_params, 11437 header_params=_header_params, 11438 body=_body_params, 11439 post_params=_form_params, 11440 files=_files, 11441 auth_settings=_auth_settings, 11442 collection_formats=_collection_formats, 11443 _host=_host, 11444 _request_auth=_request_auth, 11445 ) 11446 11447 @validate_call 11448 def enterprise_teams_get_group( 11449 self, 11450 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11451 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11452 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 11453 _request_timeout: Union[ 11454 None, 11455 Annotated[StrictFloat, Field(gt=0)], 11456 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11457 ] = None, 11458 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11459 _content_type: Optional[StrictStr] = None, 11460 _headers: Optional[Dict[StrictStr, Any]] = None, 11461 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11462 ) -> TeamGroup: 11463 """Get user group of a team 11464 11465 Retrieves information about a specific user group of a team.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11466 11467 :param org_id: The ID of an organization. (required) 11468 :type org_id: str 11469 :param team_id: The ID of a team. (required) 11470 :type team_id: str 11471 :param group_id: The ID of a user group. (required) 11472 :type group_id: str 11473 :param _request_timeout: timeout setting for this request. If one 11474 number provided, it will be total request 11475 timeout. It can also be a pair (tuple) of 11476 (connection, read) timeouts. 11477 :type _request_timeout: int, tuple(int, int), optional 11478 :param _request_auth: set to override the auth_settings for an a single 11479 request; this effectively ignores the 11480 authentication in the spec for a single request. 11481 :type _request_auth: dict, optional 11482 :param _content_type: force content-type for the request. 11483 :type _content_type: str, Optional 11484 :param _headers: set to override the headers for a single 11485 request; this effectively ignores the headers 11486 in the spec for a single request. 11487 :type _headers: dict, optional 11488 :param _host_index: set to override the host_index for a single 11489 request; this effectively ignores the host_index 11490 in the spec for a single request. 11491 :type _host_index: int, optional 11492 :return: Returns the result object. 11493 """ # noqa: E501 11494 11495 _param = self._enterprise_teams_get_group_serialize( 11496 org_id=org_id, 11497 team_id=team_id, 11498 group_id=group_id, 11499 _request_auth=_request_auth, 11500 _content_type=_content_type, 11501 _headers=_headers, 11502 _host_index=_host_index, 11503 ) 11504 11505 _response_types_map: Dict[str, Optional[str]] = { 11506 "200": "TeamGroup", 11507 "400": None, 11508 "401": None, 11509 "403": None, 11510 "404": None, 11511 "429": None, 11512 } 11513 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11514 response_data.read() 11515 return self.api_client.response_deserialize( 11516 response_data=response_data, 11517 response_types_map=_response_types_map, 11518 ).data 11519 11520 def _enterprise_teams_get_group_serialize( 11521 self, 11522 org_id, 11523 team_id, 11524 group_id, 11525 _request_auth, 11526 _content_type, 11527 _headers, 11528 _host_index, 11529 ) -> RequestSerialized: 11530 11531 _host = None 11532 11533 _collection_formats: Dict[str, str] = {} 11534 11535 _path_params: Dict[str, str] = {} 11536 _query_params: List[Tuple[str, str]] = [] 11537 _header_params: Dict[str, Optional[str]] = _headers or {} 11538 _form_params: List[Tuple[str, str]] = [] 11539 _files: Dict[str, str] = {} 11540 _body_params: Optional[bytes] = None 11541 11542 # process the path parameters 11543 if org_id is not None: 11544 _path_params["org_id"] = org_id 11545 if team_id is not None: 11546 _path_params["team_id"] = team_id 11547 if group_id is not None: 11548 _path_params["group_id"] = group_id 11549 # process the query parameters 11550 # process the header parameters 11551 # process the form parameters 11552 # process the body parameter 11553 11554 # set the HTTP header `Accept` 11555 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11556 11557 # authentication setting 11558 _auth_settings: List[str] = [] 11559 11560 return self.api_client.param_serialize( 11561 method="GET", 11562 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups/{group_id}", 11563 path_params=_path_params, 11564 query_params=_query_params, 11565 header_params=_header_params, 11566 body=_body_params, 11567 post_params=_form_params, 11568 files=_files, 11569 auth_settings=_auth_settings, 11570 collection_formats=_collection_formats, 11571 _host=_host, 11572 _request_auth=_request_auth, 11573 ) 11574 11575 @validate_call 11576 def enterprise_teams_get_groups( 11577 self, 11578 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11579 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11580 limit: Annotated[ 11581 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 11582 Field(description="The maximum number of user groups in the result list."), 11583 ] = None, 11584 cursor: Annotated[ 11585 Optional[StrictStr], 11586 Field( 11587 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 11588 ), 11589 ] = None, 11590 _request_timeout: Union[ 11591 None, 11592 Annotated[StrictFloat, Field(gt=0)], 11593 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11594 ] = None, 11595 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11596 _content_type: Optional[StrictStr] = None, 11597 _headers: Optional[Dict[StrictStr, Any]] = None, 11598 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11599 ) -> TeamGroupsPage: 11600 """List of user group to team connections 11601 11602 Retrieves the list of user groups that are part of a team in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11603 11604 :param org_id: The ID of an organization. (required) 11605 :type org_id: str 11606 :param team_id: The ID of a team. (required) 11607 :type team_id: str 11608 :param limit: The maximum number of user groups in the result list. 11609 :type limit: int 11610 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 11611 :type cursor: str 11612 :param _request_timeout: timeout setting for this request. If one 11613 number provided, it will be total request 11614 timeout. It can also be a pair (tuple) of 11615 (connection, read) timeouts. 11616 :type _request_timeout: int, tuple(int, int), optional 11617 :param _request_auth: set to override the auth_settings for an a single 11618 request; this effectively ignores the 11619 authentication in the spec for a single request. 11620 :type _request_auth: dict, optional 11621 :param _content_type: force content-type for the request. 11622 :type _content_type: str, Optional 11623 :param _headers: set to override the headers for a single 11624 request; this effectively ignores the headers 11625 in the spec for a single request. 11626 :type _headers: dict, optional 11627 :param _host_index: set to override the host_index for a single 11628 request; this effectively ignores the host_index 11629 in the spec for a single request. 11630 :type _host_index: int, optional 11631 :return: Returns the result object. 11632 """ # noqa: E501 11633 11634 _param = self._enterprise_teams_get_groups_serialize( 11635 org_id=org_id, 11636 team_id=team_id, 11637 limit=limit, 11638 cursor=cursor, 11639 _request_auth=_request_auth, 11640 _content_type=_content_type, 11641 _headers=_headers, 11642 _host_index=_host_index, 11643 ) 11644 11645 _response_types_map: Dict[str, Optional[str]] = { 11646 "200": "TeamGroupsPage", 11647 "400": None, 11648 "401": None, 11649 "403": None, 11650 "429": None, 11651 } 11652 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11653 response_data.read() 11654 return self.api_client.response_deserialize( 11655 response_data=response_data, 11656 response_types_map=_response_types_map, 11657 ).data 11658 11659 def _enterprise_teams_get_groups_serialize( 11660 self, 11661 org_id, 11662 team_id, 11663 limit, 11664 cursor, 11665 _request_auth, 11666 _content_type, 11667 _headers, 11668 _host_index, 11669 ) -> RequestSerialized: 11670 11671 _host = None 11672 11673 _collection_formats: Dict[str, str] = {} 11674 11675 _path_params: Dict[str, str] = {} 11676 _query_params: List[Tuple[str, str]] = [] 11677 _header_params: Dict[str, Optional[str]] = _headers or {} 11678 _form_params: List[Tuple[str, str]] = [] 11679 _files: Dict[str, str] = {} 11680 _body_params: Optional[bytes] = None 11681 11682 # process the path parameters 11683 if org_id is not None: 11684 _path_params["org_id"] = org_id 11685 if team_id is not None: 11686 _path_params["team_id"] = team_id 11687 # process the query parameters 11688 if limit is not None: 11689 11690 _query_params.append(("limit", limit)) 11691 11692 if cursor is not None: 11693 11694 _query_params.append(("cursor", cursor)) 11695 11696 # process the header parameters 11697 # process the form parameters 11698 # process the body parameter 11699 11700 # set the HTTP header `Accept` 11701 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11702 11703 # authentication setting 11704 _auth_settings: List[str] = [] 11705 11706 return self.api_client.param_serialize( 11707 method="GET", 11708 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups", 11709 path_params=_path_params, 11710 query_params=_query_params, 11711 header_params=_header_params, 11712 body=_body_params, 11713 post_params=_form_params, 11714 files=_files, 11715 auth_settings=_auth_settings, 11716 collection_formats=_collection_formats, 11717 _host=_host, 11718 _request_auth=_request_auth, 11719 ) 11720 11721 @validate_call 11722 def enterprise_create_team( 11723 self, 11724 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11725 create_team_request: CreateTeamRequest, 11726 _request_timeout: Union[ 11727 None, 11728 Annotated[StrictFloat, Field(gt=0)], 11729 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11730 ] = None, 11731 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11732 _content_type: Optional[StrictStr] = None, 11733 _headers: Optional[Dict[StrictStr, Any]] = None, 11734 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11735 ) -> Team: 11736 """Create team 11737 11738 Creates a new team in an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11739 11740 :param org_id: The ID of an organization. (required) 11741 :type org_id: str 11742 :param create_team_request: (required) 11743 :type create_team_request: CreateTeamRequest 11744 :param _request_timeout: timeout setting for this request. If one 11745 number provided, it will be total request 11746 timeout. It can also be a pair (tuple) of 11747 (connection, read) timeouts. 11748 :type _request_timeout: int, tuple(int, int), optional 11749 :param _request_auth: set to override the auth_settings for an a single 11750 request; this effectively ignores the 11751 authentication in the spec for a single request. 11752 :type _request_auth: dict, optional 11753 :param _content_type: force content-type for the request. 11754 :type _content_type: str, Optional 11755 :param _headers: set to override the headers for a single 11756 request; this effectively ignores the headers 11757 in the spec for a single request. 11758 :type _headers: dict, optional 11759 :param _host_index: set to override the host_index for a single 11760 request; this effectively ignores the host_index 11761 in the spec for a single request. 11762 :type _host_index: int, optional 11763 :return: Returns the result object. 11764 """ # noqa: E501 11765 11766 _param = self._enterprise_create_team_serialize( 11767 org_id=org_id, 11768 create_team_request=create_team_request, 11769 _request_auth=_request_auth, 11770 _content_type=_content_type, 11771 _headers=_headers, 11772 _host_index=_host_index, 11773 ) 11774 11775 _response_types_map: Dict[str, Optional[str]] = { 11776 "201": "Team", 11777 "400": None, 11778 "401": None, 11779 "403": None, 11780 "404": None, 11781 "429": None, 11782 } 11783 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11784 response_data.read() 11785 return self.api_client.response_deserialize( 11786 response_data=response_data, 11787 response_types_map=_response_types_map, 11788 ).data 11789 11790 def _enterprise_create_team_serialize( 11791 self, 11792 org_id, 11793 create_team_request, 11794 _request_auth, 11795 _content_type, 11796 _headers, 11797 _host_index, 11798 ) -> RequestSerialized: 11799 11800 _host = None 11801 11802 _collection_formats: Dict[str, str] = {} 11803 11804 _path_params: Dict[str, str] = {} 11805 _query_params: List[Tuple[str, str]] = [] 11806 _header_params: Dict[str, Optional[str]] = _headers or {} 11807 _form_params: List[Tuple[str, str]] = [] 11808 _files: Dict[str, str] = {} 11809 _body_params: Optional[bytes] = None 11810 11811 # process the path parameters 11812 if org_id is not None: 11813 _path_params["org_id"] = org_id 11814 # process the query parameters 11815 # process the header parameters 11816 # process the form parameters 11817 # process the body parameter 11818 if create_team_request is not None: 11819 _body_params = create_team_request 11820 11821 # set the HTTP header `Accept` 11822 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11823 11824 # set the HTTP header `Content-Type` 11825 if _content_type: 11826 _header_params["Content-Type"] = _content_type 11827 else: 11828 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 11829 if _default_content_type is not None: 11830 _header_params["Content-Type"] = _default_content_type 11831 11832 # authentication setting 11833 _auth_settings: List[str] = [] 11834 11835 return self.api_client.param_serialize( 11836 method="POST", 11837 resource_path="/v2/orgs/{org_id}/teams", 11838 path_params=_path_params, 11839 query_params=_query_params, 11840 header_params=_header_params, 11841 body=_body_params, 11842 post_params=_form_params, 11843 files=_files, 11844 auth_settings=_auth_settings, 11845 collection_formats=_collection_formats, 11846 _host=_host, 11847 _request_auth=_request_auth, 11848 ) 11849 11850 @validate_call 11851 def enterprise_delete_team( 11852 self, 11853 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11854 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11855 _request_timeout: Union[ 11856 None, 11857 Annotated[StrictFloat, Field(gt=0)], 11858 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11859 ] = None, 11860 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11861 _content_type: Optional[StrictStr] = None, 11862 _headers: Optional[Dict[StrictStr, Any]] = None, 11863 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11864 ) -> None: 11865 """Delete team 11866 11867 Deletes an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11868 11869 :param org_id: The ID of an organization. (required) 11870 :type org_id: str 11871 :param team_id: The ID of a team. (required) 11872 :type team_id: str 11873 :param _request_timeout: timeout setting for this request. If one 11874 number provided, it will be total request 11875 timeout. It can also be a pair (tuple) of 11876 (connection, read) timeouts. 11877 :type _request_timeout: int, tuple(int, int), optional 11878 :param _request_auth: set to override the auth_settings for an a single 11879 request; this effectively ignores the 11880 authentication in the spec for a single request. 11881 :type _request_auth: dict, optional 11882 :param _content_type: force content-type for the request. 11883 :type _content_type: str, Optional 11884 :param _headers: set to override the headers for a single 11885 request; this effectively ignores the headers 11886 in the spec for a single request. 11887 :type _headers: dict, optional 11888 :param _host_index: set to override the host_index for a single 11889 request; this effectively ignores the host_index 11890 in the spec for a single request. 11891 :type _host_index: int, optional 11892 :return: Returns the result object. 11893 """ # noqa: E501 11894 11895 _param = self._enterprise_delete_team_serialize( 11896 org_id=org_id, 11897 team_id=team_id, 11898 _request_auth=_request_auth, 11899 _content_type=_content_type, 11900 _headers=_headers, 11901 _host_index=_host_index, 11902 ) 11903 11904 _response_types_map: Dict[str, Optional[str]] = { 11905 "204": None, 11906 "400": None, 11907 "401": None, 11908 "403": None, 11909 "404": None, 11910 "429": None, 11911 } 11912 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11913 response_data.read() 11914 return self.api_client.response_deserialize( 11915 response_data=response_data, 11916 response_types_map=_response_types_map, 11917 ).data 11918 11919 def _enterprise_delete_team_serialize( 11920 self, 11921 org_id, 11922 team_id, 11923 _request_auth, 11924 _content_type, 11925 _headers, 11926 _host_index, 11927 ) -> RequestSerialized: 11928 11929 _host = None 11930 11931 _collection_formats: Dict[str, str] = {} 11932 11933 _path_params: Dict[str, str] = {} 11934 _query_params: List[Tuple[str, str]] = [] 11935 _header_params: Dict[str, Optional[str]] = _headers or {} 11936 _form_params: List[Tuple[str, str]] = [] 11937 _files: Dict[str, str] = {} 11938 _body_params: Optional[bytes] = None 11939 11940 # process the path parameters 11941 if org_id is not None: 11942 _path_params["org_id"] = org_id 11943 if team_id is not None: 11944 _path_params["team_id"] = team_id 11945 # process the query parameters 11946 # process the header parameters 11947 # process the form parameters 11948 # process the body parameter 11949 11950 # authentication setting 11951 _auth_settings: List[str] = [] 11952 11953 return self.api_client.param_serialize( 11954 method="DELETE", 11955 resource_path="/v2/orgs/{org_id}/teams/{team_id}", 11956 path_params=_path_params, 11957 query_params=_query_params, 11958 header_params=_header_params, 11959 body=_body_params, 11960 post_params=_form_params, 11961 files=_files, 11962 auth_settings=_auth_settings, 11963 collection_formats=_collection_formats, 11964 _host=_host, 11965 _request_auth=_request_auth, 11966 ) 11967 11968 @validate_call 11969 def enterprise_get_team( 11970 self, 11971 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11972 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11973 _request_timeout: Union[ 11974 None, 11975 Annotated[StrictFloat, Field(gt=0)], 11976 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11977 ] = None, 11978 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11979 _content_type: Optional[StrictStr] = None, 11980 _headers: Optional[Dict[StrictStr, Any]] = None, 11981 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11982 ) -> Team: 11983 """Get team 11984 11985 Retrieves team information for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11986 11987 :param org_id: The ID of an organization. (required) 11988 :type org_id: str 11989 :param team_id: The ID of a team. (required) 11990 :type team_id: str 11991 :param _request_timeout: timeout setting for this request. If one 11992 number provided, it will be total request 11993 timeout. It can also be a pair (tuple) of 11994 (connection, read) timeouts. 11995 :type _request_timeout: int, tuple(int, int), optional 11996 :param _request_auth: set to override the auth_settings for an a single 11997 request; this effectively ignores the 11998 authentication in the spec for a single request. 11999 :type _request_auth: dict, optional 12000 :param _content_type: force content-type for the request. 12001 :type _content_type: str, Optional 12002 :param _headers: set to override the headers for a single 12003 request; this effectively ignores the headers 12004 in the spec for a single request. 12005 :type _headers: dict, optional 12006 :param _host_index: set to override the host_index for a single 12007 request; this effectively ignores the host_index 12008 in the spec for a single request. 12009 :type _host_index: int, optional 12010 :return: Returns the result object. 12011 """ # noqa: E501 12012 12013 _param = self._enterprise_get_team_serialize( 12014 org_id=org_id, 12015 team_id=team_id, 12016 _request_auth=_request_auth, 12017 _content_type=_content_type, 12018 _headers=_headers, 12019 _host_index=_host_index, 12020 ) 12021 12022 _response_types_map: Dict[str, Optional[str]] = { 12023 "200": "Team", 12024 "400": None, 12025 "401": None, 12026 "403": None, 12027 "404": None, 12028 "429": None, 12029 } 12030 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12031 response_data.read() 12032 return self.api_client.response_deserialize( 12033 response_data=response_data, 12034 response_types_map=_response_types_map, 12035 ).data 12036 12037 def _enterprise_get_team_serialize( 12038 self, 12039 org_id, 12040 team_id, 12041 _request_auth, 12042 _content_type, 12043 _headers, 12044 _host_index, 12045 ) -> RequestSerialized: 12046 12047 _host = None 12048 12049 _collection_formats: Dict[str, str] = {} 12050 12051 _path_params: Dict[str, str] = {} 12052 _query_params: List[Tuple[str, str]] = [] 12053 _header_params: Dict[str, Optional[str]] = _headers or {} 12054 _form_params: List[Tuple[str, str]] = [] 12055 _files: Dict[str, str] = {} 12056 _body_params: Optional[bytes] = None 12057 12058 # process the path parameters 12059 if org_id is not None: 12060 _path_params["org_id"] = org_id 12061 if team_id is not None: 12062 _path_params["team_id"] = team_id 12063 # process the query parameters 12064 # process the header parameters 12065 # process the form parameters 12066 # process the body parameter 12067 12068 # set the HTTP header `Accept` 12069 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 12070 12071 # authentication setting 12072 _auth_settings: List[str] = [] 12073 12074 return self.api_client.param_serialize( 12075 method="GET", 12076 resource_path="/v2/orgs/{org_id}/teams/{team_id}", 12077 path_params=_path_params, 12078 query_params=_query_params, 12079 header_params=_header_params, 12080 body=_body_params, 12081 post_params=_form_params, 12082 files=_files, 12083 auth_settings=_auth_settings, 12084 collection_formats=_collection_formats, 12085 _host=_host, 12086 _request_auth=_request_auth, 12087 ) 12088 12089 @validate_call 12090 def enterprise_get_teams( 12091 self, 12092 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 12093 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 12094 cursor: Annotated[ 12095 Optional[StrictStr], 12096 Field( 12097 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 12098 ), 12099 ] = None, 12100 name: Annotated[ 12101 Optional[StrictStr], 12102 Field( 12103 description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".' 12104 ), 12105 ] = None, 12106 _request_timeout: Union[ 12107 None, 12108 Annotated[StrictFloat, Field(gt=0)], 12109 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12110 ] = None, 12111 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12112 _content_type: Optional[StrictStr] = None, 12113 _headers: Optional[Dict[StrictStr, Any]] = None, 12114 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12115 ) -> TeamsPage: 12116 """List teams 12117 12118 Retrieves list of teams in an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 12119 12120 :param org_id: The ID of an organization. (required) 12121 :type org_id: str 12122 :param limit: 12123 :type limit: int 12124 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 12125 :type cursor: str 12126 :param name: Name query. Filters teams by name using case insensitive partial match. A value \"dev\" will return both \"Developer's team\" and \"Team for developers\". 12127 :type name: str 12128 :param _request_timeout: timeout setting for this request. If one 12129 number provided, it will be total request 12130 timeout. It can also be a pair (tuple) of 12131 (connection, read) timeouts. 12132 :type _request_timeout: int, tuple(int, int), optional 12133 :param _request_auth: set to override the auth_settings for an a single 12134 request; this effectively ignores the 12135 authentication in the spec for a single request. 12136 :type _request_auth: dict, optional 12137 :param _content_type: force content-type for the request. 12138 :type _content_type: str, Optional 12139 :param _headers: set to override the headers for a single 12140 request; this effectively ignores the headers 12141 in the spec for a single request. 12142 :type _headers: dict, optional 12143 :param _host_index: set to override the host_index for a single 12144 request; this effectively ignores the host_index 12145 in the spec for a single request. 12146 :type _host_index: int, optional 12147 :return: Returns the result object. 12148 """ # noqa: E501 12149 12150 _param = self._enterprise_get_teams_serialize( 12151 org_id=org_id, 12152 limit=limit, 12153 cursor=cursor, 12154 name=name, 12155 _request_auth=_request_auth, 12156 _content_type=_content_type, 12157 _headers=_headers, 12158 _host_index=_host_index, 12159 ) 12160 12161 _response_types_map: Dict[str, Optional[str]] = { 12162 "200": "TeamsPage", 12163 "400": None, 12164 "401": None, 12165 "403": None, 12166 "404": None, 12167 "429": None, 12168 } 12169 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12170 response_data.read() 12171 return self.api_client.response_deserialize( 12172 response_data=response_data, 12173 response_types_map=_response_types_map, 12174 ).data 12175 12176 def _enterprise_get_teams_serialize( 12177 self, 12178 org_id, 12179 limit, 12180 cursor, 12181 name, 12182 _request_auth, 12183 _content_type, 12184 _headers, 12185 _host_index, 12186 ) -> RequestSerialized: 12187 12188 _host = None 12189 12190 _collection_formats: Dict[str, str] = {} 12191 12192 _path_params: Dict[str, str] = {} 12193 _query_params: List[Tuple[str, str]] = [] 12194 _header_params: Dict[str, Optional[str]] = _headers or {} 12195 _form_params: List[Tuple[str, str]] = [] 12196 _files: Dict[str, str] = {} 12197 _body_params: Optional[bytes] = None 12198 12199 # process the path parameters 12200 if org_id is not None: 12201 _path_params["org_id"] = org_id 12202 # process the query parameters 12203 if limit is not None: 12204 12205 _query_params.append(("limit", limit)) 12206 12207 if cursor is not None: 12208 12209 _query_params.append(("cursor", cursor)) 12210 12211 if name is not None: 12212 12213 _query_params.append(("name", name)) 12214 12215 # process the header parameters 12216 # process the form parameters 12217 # process the body parameter 12218 12219 # set the HTTP header `Accept` 12220 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 12221 12222 # authentication setting 12223 _auth_settings: List[str] = [] 12224 12225 return self.api_client.param_serialize( 12226 method="GET", 12227 resource_path="/v2/orgs/{org_id}/teams", 12228 path_params=_path_params, 12229 query_params=_query_params, 12230 header_params=_header_params, 12231 body=_body_params, 12232 post_params=_form_params, 12233 files=_files, 12234 auth_settings=_auth_settings, 12235 collection_formats=_collection_formats, 12236 _host=_host, 12237 _request_auth=_request_auth, 12238 ) 12239 12240 @validate_call 12241 def enterprise_update_team( 12242 self, 12243 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 12244 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 12245 team_changes: TeamChanges, 12246 _request_timeout: Union[ 12247 None, 12248 Annotated[StrictFloat, Field(gt=0)], 12249 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12250 ] = None, 12251 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12252 _content_type: Optional[StrictStr] = None, 12253 _headers: Optional[Dict[StrictStr, Any]] = None, 12254 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12255 ) -> Team: 12256 """Update team 12257 12258 Updates an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 12259 12260 :param org_id: The ID of an organization. (required) 12261 :type org_id: str 12262 :param team_id: The ID of a team. (required) 12263 :type team_id: str 12264 :param team_changes: (required) 12265 :type team_changes: TeamChanges 12266 :param _request_timeout: timeout setting for this request. If one 12267 number provided, it will be total request 12268 timeout. It can also be a pair (tuple) of 12269 (connection, read) timeouts. 12270 :type _request_timeout: int, tuple(int, int), optional 12271 :param _request_auth: set to override the auth_settings for an a single 12272 request; this effectively ignores the 12273 authentication in the spec for a single request. 12274 :type _request_auth: dict, optional 12275 :param _content_type: force content-type for the request. 12276 :type _content_type: str, Optional 12277 :param _headers: set to override the headers for a single 12278 request; this effectively ignores the headers 12279 in the spec for a single request. 12280 :type _headers: dict, optional 12281 :param _host_index: set to override the host_index for a single 12282 request; this effectively ignores the host_index 12283 in the spec for a single request. 12284 :type _host_index: int, optional 12285 :return: Returns the result object. 12286 """ # noqa: E501 12287 12288 _param = self._enterprise_update_team_serialize( 12289 org_id=org_id, 12290 team_id=team_id, 12291 team_changes=team_changes, 12292 _request_auth=_request_auth, 12293 _content_type=_content_type, 12294 _headers=_headers, 12295 _host_index=_host_index, 12296 ) 12297 12298 _response_types_map: Dict[str, Optional[str]] = { 12299 "200": "Team", 12300 "400": None, 12301 "401": None, 12302 "403": None, 12303 "404": None, 12304 "429": None, 12305 } 12306 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12307 response_data.read() 12308 return self.api_client.response_deserialize( 12309 response_data=response_data, 12310 response_types_map=_response_types_map, 12311 ).data 12312 12313 def _enterprise_update_team_serialize( 12314 self, 12315 org_id, 12316 team_id, 12317 team_changes, 12318 _request_auth, 12319 _content_type, 12320 _headers, 12321 _host_index, 12322 ) -> RequestSerialized: 12323 12324 _host = None 12325 12326 _collection_formats: Dict[str, str] = {} 12327 12328 _path_params: Dict[str, str] = {} 12329 _query_params: List[Tuple[str, str]] = [] 12330 _header_params: Dict[str, Optional[str]] = _headers or {} 12331 _form_params: List[Tuple[str, str]] = [] 12332 _files: Dict[str, str] = {} 12333 _body_params: Optional[bytes] = None 12334 12335 # process the path parameters 12336 if org_id is not None: 12337 _path_params["org_id"] = org_id 12338 if team_id is not None: 12339 _path_params["team_id"] = team_id 12340 # process the query parameters 12341 # process the header parameters 12342 # process the form parameters 12343 # process the body parameter 12344 if team_changes is not None: 12345 _body_params = team_changes 12346 12347 # set the HTTP header `Accept` 12348 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 12349 12350 # set the HTTP header `Content-Type` 12351 if _content_type: 12352 _header_params["Content-Type"] = _content_type 12353 else: 12354 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 12355 if _default_content_type is not None: 12356 _header_params["Content-Type"] = _default_content_type 12357 12358 # authentication setting 12359 _auth_settings: List[str] = [] 12360 12361 return self.api_client.param_serialize( 12362 method="PATCH", 12363 resource_path="/v2/orgs/{org_id}/teams/{team_id}", 12364 path_params=_path_params, 12365 query_params=_query_params, 12366 header_params=_header_params, 12367 body=_body_params, 12368 post_params=_form_params, 12369 files=_files, 12370 auth_settings=_auth_settings, 12371 collection_formats=_collection_formats, 12372 _host=_host, 12373 _request_auth=_request_auth, 12374 ) 12375 12376 @validate_call 12377 def create_user( 12378 self, 12379 create_user_resource: CreateUserResource, 12380 _request_timeout: Union[ 12381 None, 12382 Annotated[StrictFloat, Field(gt=0)], 12383 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12384 ] = None, 12385 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12386 _content_type: Optional[StrictStr] = None, 12387 _headers: Optional[Dict[StrictStr, Any]] = None, 12388 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12389 ) -> UserResource: 12390 """Create user 12391 12392 Creates a new user in the organization. <br><br> <br>Note</b>: All newly provisioned users are added to the default team. 12393 12394 :param create_user_resource: (required) 12395 :type create_user_resource: CreateUserResource 12396 :param _request_timeout: timeout setting for this request. If one 12397 number provided, it will be total request 12398 timeout. It can also be a pair (tuple) of 12399 (connection, read) timeouts. 12400 :type _request_timeout: int, tuple(int, int), optional 12401 :param _request_auth: set to override the auth_settings for an a single 12402 request; this effectively ignores the 12403 authentication in the spec for a single request. 12404 :type _request_auth: dict, optional 12405 :param _content_type: force content-type for the request. 12406 :type _content_type: str, Optional 12407 :param _headers: set to override the headers for a single 12408 request; this effectively ignores the headers 12409 in the spec for a single request. 12410 :type _headers: dict, optional 12411 :param _host_index: set to override the host_index for a single 12412 request; this effectively ignores the host_index 12413 in the spec for a single request. 12414 :type _host_index: int, optional 12415 :return: Returns the result object. 12416 """ # noqa: E501 12417 12418 _param = self._create_user_serialize( 12419 create_user_resource=create_user_resource, 12420 _request_auth=_request_auth, 12421 _content_type=_content_type, 12422 _headers=_headers, 12423 _host_index=_host_index, 12424 ) 12425 12426 _response_types_map: Dict[str, Optional[str]] = { 12427 "201": "UserResource", 12428 "400": None, 12429 "401": None, 12430 "403": None, 12431 "404": None, 12432 "409": None, 12433 "413": None, 12434 "429": None, 12435 "500": None, 12436 } 12437 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12438 response_data.read() 12439 return self.api_client.response_deserialize( 12440 response_data=response_data, 12441 response_types_map=_response_types_map, 12442 ).data 12443 12444 def _create_user_serialize( 12445 self, 12446 create_user_resource, 12447 _request_auth, 12448 _content_type, 12449 _headers, 12450 _host_index, 12451 ) -> RequestSerialized: 12452 12453 _host = None 12454 12455 _collection_formats: Dict[str, str] = {} 12456 12457 _path_params: Dict[str, str] = {} 12458 _query_params: List[Tuple[str, str]] = [] 12459 _header_params: Dict[str, Optional[str]] = _headers or {} 12460 _form_params: List[Tuple[str, str]] = [] 12461 _files: Dict[str, str] = {} 12462 _body_params: Optional[bytes] = None 12463 12464 # process the path parameters 12465 # process the query parameters 12466 # process the header parameters 12467 # process the form parameters 12468 # process the body parameter 12469 if create_user_resource is not None: 12470 _body_params = create_user_resource 12471 12472 # set the HTTP header `Accept` 12473 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 12474 12475 # set the HTTP header `Content-Type` 12476 if _content_type: 12477 _header_params["Content-Type"] = _content_type 12478 else: 12479 _default_content_type = self.api_client.select_header_content_type( 12480 ["application/scim+json", "application/json"] 12481 ) 12482 if _default_content_type is not None: 12483 _header_params["Content-Type"] = _default_content_type 12484 12485 # authentication setting 12486 _auth_settings: List[str] = [] 12487 12488 return self.api_client.param_serialize( 12489 method="POST", 12490 resource_path="/Users", 12491 path_params=_path_params, 12492 query_params=_query_params, 12493 header_params=_header_params, 12494 body=_body_params, 12495 post_params=_form_params, 12496 files=_files, 12497 auth_settings=_auth_settings, 12498 collection_formats=_collection_formats, 12499 _host=_host, 12500 _request_auth=_request_auth, 12501 ) 12502 12503 @validate_call 12504 def delete_user( 12505 self, 12506 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 12507 _request_timeout: Union[ 12508 None, 12509 Annotated[StrictFloat, Field(gt=0)], 12510 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12511 ] = None, 12512 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12513 _content_type: Optional[StrictStr] = None, 12514 _headers: Optional[Dict[StrictStr, Any]] = None, 12515 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12516 ) -> None: 12517 """Delete user 12518 12519 Deletes a single user from the organization.<br><br> Note: A user who is the last admin in the team or the last admin in the organization cannot be deleted. User must be a member in the organization to be deleted. Users that have guest role in the organization cannot be deleted. <br><br> After a user is deleted, the ownership of all the boards that belong to the deleted user is transferred to the oldest team member who currently has an admin role. 12520 12521 :param id: User ID. A server-assigned, unique identifier for this user. (required) 12522 :type id: str 12523 :param _request_timeout: timeout setting for this request. If one 12524 number provided, it will be total request 12525 timeout. It can also be a pair (tuple) of 12526 (connection, read) timeouts. 12527 :type _request_timeout: int, tuple(int, int), optional 12528 :param _request_auth: set to override the auth_settings for an a single 12529 request; this effectively ignores the 12530 authentication in the spec for a single request. 12531 :type _request_auth: dict, optional 12532 :param _content_type: force content-type for the request. 12533 :type _content_type: str, Optional 12534 :param _headers: set to override the headers for a single 12535 request; this effectively ignores the headers 12536 in the spec for a single request. 12537 :type _headers: dict, optional 12538 :param _host_index: set to override the host_index for a single 12539 request; this effectively ignores the host_index 12540 in the spec for a single request. 12541 :type _host_index: int, optional 12542 :return: Returns the result object. 12543 """ # noqa: E501 12544 12545 _param = self._delete_user_serialize( 12546 id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 12547 ) 12548 12549 _response_types_map: Dict[str, Optional[str]] = { 12550 "204": None, 12551 "400": None, 12552 "401": None, 12553 "403": None, 12554 "404": None, 12555 "409": None, 12556 "429": None, 12557 "500": None, 12558 } 12559 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12560 response_data.read() 12561 return self.api_client.response_deserialize( 12562 response_data=response_data, 12563 response_types_map=_response_types_map, 12564 ).data 12565 12566 def _delete_user_serialize( 12567 self, 12568 id, 12569 _request_auth, 12570 _content_type, 12571 _headers, 12572 _host_index, 12573 ) -> RequestSerialized: 12574 12575 _host = None 12576 12577 _collection_formats: Dict[str, str] = {} 12578 12579 _path_params: Dict[str, str] = {} 12580 _query_params: List[Tuple[str, str]] = [] 12581 _header_params: Dict[str, Optional[str]] = _headers or {} 12582 _form_params: List[Tuple[str, str]] = [] 12583 _files: Dict[str, str] = {} 12584 _body_params: Optional[bytes] = None 12585 12586 # process the path parameters 12587 if id is not None: 12588 _path_params["id"] = id 12589 # process the query parameters 12590 # process the header parameters 12591 # process the form parameters 12592 # process the body parameter 12593 12594 # authentication setting 12595 _auth_settings: List[str] = [] 12596 12597 return self.api_client.param_serialize( 12598 method="DELETE", 12599 resource_path="/Users/{id}", 12600 path_params=_path_params, 12601 query_params=_query_params, 12602 header_params=_header_params, 12603 body=_body_params, 12604 post_params=_form_params, 12605 files=_files, 12606 auth_settings=_auth_settings, 12607 collection_formats=_collection_formats, 12608 _host=_host, 12609 _request_auth=_request_auth, 12610 ) 12611 12612 @validate_call 12613 def get_user( 12614 self, 12615 id: Annotated[StrictStr, Field(description="User ID of the user to be retrieved")], 12616 attributes: Annotated[ 12617 Optional[StrictStr], 12618 Field( 12619 description="A comma-separated list of attribute names to return in the response. <br><br> <br>Example attributes</b> - id, userName, displayName, name, userType, active, emails, photos, groups, roles. <br><br> <br>Note</b>: It is also possible to fetch attributes within complex attributes, for Example: emails.value" 12620 ), 12621 ] = None, 12622 _request_timeout: Union[ 12623 None, 12624 Annotated[StrictFloat, Field(gt=0)], 12625 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12626 ] = None, 12627 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12628 _content_type: Optional[StrictStr] = None, 12629 _headers: Optional[Dict[StrictStr, Any]] = None, 12630 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12631 ) -> UserResource: 12632 """Get user 12633 12634 Retrieves a single user resource. <br><b> <br>Note</b>: Returns only users that are members in the organization. It does not return users that are added in the organization as guests. 12635 12636 :param id: User ID of the user to be retrieved (required) 12637 :type id: str 12638 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> <br>Example attributes</b> - id, userName, displayName, name, userType, active, emails, photos, groups, roles. <br><br> <br>Note</b>: It is also possible to fetch attributes within complex attributes, for Example: emails.value 12639 :type attributes: str 12640 :param _request_timeout: timeout setting for this request. If one 12641 number provided, it will be total request 12642 timeout. It can also be a pair (tuple) of 12643 (connection, read) timeouts. 12644 :type _request_timeout: int, tuple(int, int), optional 12645 :param _request_auth: set to override the auth_settings for an a single 12646 request; this effectively ignores the 12647 authentication in the spec for a single request. 12648 :type _request_auth: dict, optional 12649 :param _content_type: force content-type for the request. 12650 :type _content_type: str, Optional 12651 :param _headers: set to override the headers for a single 12652 request; this effectively ignores the headers 12653 in the spec for a single request. 12654 :type _headers: dict, optional 12655 :param _host_index: set to override the host_index for a single 12656 request; this effectively ignores the host_index 12657 in the spec for a single request. 12658 :type _host_index: int, optional 12659 :return: Returns the result object. 12660 """ # noqa: E501 12661 12662 _param = self._get_user_serialize( 12663 id=id, 12664 attributes=attributes, 12665 _request_auth=_request_auth, 12666 _content_type=_content_type, 12667 _headers=_headers, 12668 _host_index=_host_index, 12669 ) 12670 12671 _response_types_map: Dict[str, Optional[str]] = { 12672 "200": "UserResource", 12673 "400": None, 12674 "401": None, 12675 "403": None, 12676 "404": None, 12677 "429": None, 12678 "500": None, 12679 } 12680 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12681 response_data.read() 12682 return self.api_client.response_deserialize( 12683 response_data=response_data, 12684 response_types_map=_response_types_map, 12685 ).data 12686 12687 def _get_user_serialize( 12688 self, 12689 id, 12690 attributes, 12691 _request_auth, 12692 _content_type, 12693 _headers, 12694 _host_index, 12695 ) -> RequestSerialized: 12696 12697 _host = None 12698 12699 _collection_formats: Dict[str, str] = {} 12700 12701 _path_params: Dict[str, str] = {} 12702 _query_params: List[Tuple[str, str]] = [] 12703 _header_params: Dict[str, Optional[str]] = _headers or {} 12704 _form_params: List[Tuple[str, str]] = [] 12705 _files: Dict[str, str] = {} 12706 _body_params: Optional[bytes] = None 12707 12708 # process the path parameters 12709 if id is not None: 12710 _path_params["id"] = id 12711 # process the query parameters 12712 if attributes is not None: 12713 12714 _query_params.append(("attributes", attributes)) 12715 12716 # process the header parameters 12717 # process the form parameters 12718 # process the body parameter 12719 12720 # set the HTTP header `Accept` 12721 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 12722 12723 # authentication setting 12724 _auth_settings: List[str] = [] 12725 12726 return self.api_client.param_serialize( 12727 method="GET", 12728 resource_path="/Users/{id}", 12729 path_params=_path_params, 12730 query_params=_query_params, 12731 header_params=_header_params, 12732 body=_body_params, 12733 post_params=_form_params, 12734 files=_files, 12735 auth_settings=_auth_settings, 12736 collection_formats=_collection_formats, 12737 _host=_host, 12738 _request_auth=_request_auth, 12739 ) 12740 12741 @validate_call 12742 def list_users( 12743 self, 12744 attributes: Annotated[ 12745 Optional[StrictStr], 12746 Field( 12747 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter." 12748 ), 12749 ] = None, 12750 filter: Annotated[ 12751 Optional[StrictStr], 12752 Field( 12753 description='You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical "and"<br> or = Logical "or"<br> not = "Not" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br> <u>Example filters</u>:<br><br> For fetching users with user name as user@miro.com: userName eq "user@miro.com" <br><br> For fetching all active users in the organization: active eq true <br><br> For fetching users with "user" in their displayName: displayName co "user" <br><br> For fetching users that are member of a specific group (team): groups.value eq "3458764577585056871" <br><br> For fetching users that are not of userType Full: userType ne "Full"' 12754 ), 12755 ] = None, 12756 start_index: Annotated[ 12757 Optional[StrictInt], 12758 Field( 12759 description="Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1" 12760 ), 12761 ] = None, 12762 count: Annotated[ 12763 Optional[StrictInt], 12764 Field( 12765 description="Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12" 12766 ), 12767 ] = None, 12768 sort_by: Annotated[ 12769 Optional[StrictStr], 12770 Field( 12771 description="Specifies the attribute whose value will be used to order the response. <br><br> Example: sortBy=userName, sortBy=emails.value" 12772 ), 12773 ] = None, 12774 sort_order: Annotated[ 12775 Optional[StrictStr], 12776 Field( 12777 description="Defines the order in which the sortBy parameter is applied. <br><br> Example: sortOrder=ascending" 12778 ), 12779 ] = None, 12780 _request_timeout: Union[ 12781 None, 12782 Annotated[StrictFloat, Field(gt=0)], 12783 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12784 ] = None, 12785 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12786 _content_type: Optional[StrictStr] = None, 12787 _headers: Optional[Dict[StrictStr, Any]] = None, 12788 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12789 ) -> UserListResponse: 12790 """List users 12791 12792 Retrieves the list of users in your organization. <br><b> <br>Note</b>: The API returns users that are members in the organization, it does not return users that are added in the organization as guests. 12793 12794 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter. 12795 :type attributes: str 12796 :param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical \"and\"<br> or = Logical \"or\"<br> not = \"Not\" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br> <u>Example filters</u>:<br><br> For fetching users with user name as user@miro.com: userName eq \"user@miro.com\" <br><br> For fetching all active users in the organization: active eq true <br><br> For fetching users with \"user\" in their displayName: displayName co \"user\" <br><br> For fetching users that are member of a specific group (team): groups.value eq \"3458764577585056871\" <br><br> For fetching users that are not of userType Full: userType ne \"Full\" 12797 :type filter: str 12798 :param start_index: Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1 12799 :type start_index: int 12800 :param count: Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12 12801 :type count: int 12802 :param sort_by: Specifies the attribute whose value will be used to order the response. <br><br> Example: sortBy=userName, sortBy=emails.value 12803 :type sort_by: str 12804 :param sort_order: Defines the order in which the sortBy parameter is applied. <br><br> Example: sortOrder=ascending 12805 :type sort_order: str 12806 :param _request_timeout: timeout setting for this request. If one 12807 number provided, it will be total request 12808 timeout. It can also be a pair (tuple) of 12809 (connection, read) timeouts. 12810 :type _request_timeout: int, tuple(int, int), optional 12811 :param _request_auth: set to override the auth_settings for an a single 12812 request; this effectively ignores the 12813 authentication in the spec for a single request. 12814 :type _request_auth: dict, optional 12815 :param _content_type: force content-type for the request. 12816 :type _content_type: str, Optional 12817 :param _headers: set to override the headers for a single 12818 request; this effectively ignores the headers 12819 in the spec for a single request. 12820 :type _headers: dict, optional 12821 :param _host_index: set to override the host_index for a single 12822 request; this effectively ignores the host_index 12823 in the spec for a single request. 12824 :type _host_index: int, optional 12825 :return: Returns the result object. 12826 """ # noqa: E501 12827 12828 _param = self._list_users_serialize( 12829 attributes=attributes, 12830 filter=filter, 12831 start_index=start_index, 12832 count=count, 12833 sort_by=sort_by, 12834 sort_order=sort_order, 12835 _request_auth=_request_auth, 12836 _content_type=_content_type, 12837 _headers=_headers, 12838 _host_index=_host_index, 12839 ) 12840 12841 _response_types_map: Dict[str, Optional[str]] = { 12842 "200": "UserListResponse", 12843 "400": None, 12844 "401": None, 12845 "403": None, 12846 "404": None, 12847 "429": None, 12848 "500": None, 12849 } 12850 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12851 response_data.read() 12852 return self.api_client.response_deserialize( 12853 response_data=response_data, 12854 response_types_map=_response_types_map, 12855 ).data 12856 12857 def _list_users_serialize( 12858 self, 12859 attributes, 12860 filter, 12861 start_index, 12862 count, 12863 sort_by, 12864 sort_order, 12865 _request_auth, 12866 _content_type, 12867 _headers, 12868 _host_index, 12869 ) -> RequestSerialized: 12870 12871 _host = None 12872 12873 _collection_formats: Dict[str, str] = {} 12874 12875 _path_params: Dict[str, str] = {} 12876 _query_params: List[Tuple[str, str]] = [] 12877 _header_params: Dict[str, Optional[str]] = _headers or {} 12878 _form_params: List[Tuple[str, str]] = [] 12879 _files: Dict[str, str] = {} 12880 _body_params: Optional[bytes] = None 12881 12882 # process the path parameters 12883 # process the query parameters 12884 if attributes is not None: 12885 12886 _query_params.append(("attributes", attributes)) 12887 12888 if filter is not None: 12889 12890 _query_params.append(("filter", filter)) 12891 12892 if start_index is not None: 12893 12894 _query_params.append(("startIndex", start_index)) 12895 12896 if count is not None: 12897 12898 _query_params.append(("count", count)) 12899 12900 if sort_by is not None: 12901 12902 _query_params.append(("sortBy", sort_by)) 12903 12904 if sort_order is not None: 12905 12906 _query_params.append(("sortOrder", sort_order)) 12907 12908 # process the header parameters 12909 # process the form parameters 12910 # process the body parameter 12911 12912 # set the HTTP header `Accept` 12913 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 12914 12915 # authentication setting 12916 _auth_settings: List[str] = [] 12917 12918 return self.api_client.param_serialize( 12919 method="GET", 12920 resource_path="/Users", 12921 path_params=_path_params, 12922 query_params=_query_params, 12923 header_params=_header_params, 12924 body=_body_params, 12925 post_params=_form_params, 12926 files=_files, 12927 auth_settings=_auth_settings, 12928 collection_formats=_collection_formats, 12929 _host=_host, 12930 _request_auth=_request_auth, 12931 ) 12932 12933 @validate_call 12934 def patch_user( 12935 self, 12936 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 12937 patch_user_resource: Annotated[ 12938 PatchUserResource, 12939 Field( 12940 description='Payload to update user information. <br><br> The body of a PATCH request must contain the attribute `Operations`, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one "op" member.' 12941 ), 12942 ], 12943 _request_timeout: Union[ 12944 None, 12945 Annotated[StrictFloat, Field(gt=0)], 12946 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12947 ] = None, 12948 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12949 _content_type: Optional[StrictStr] = None, 12950 _headers: Optional[Dict[StrictStr, Any]] = None, 12951 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12952 ) -> UserResource: 12953 """Patch user 12954 12955 Updates an existing user resource, overwriting values for specified attributes. Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided. <br><br> Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated. 12956 12957 :param id: User ID. A server-assigned, unique identifier for this user. (required) 12958 :type id: str 12959 :param patch_user_resource: Payload to update user information. <br><br> The body of a PATCH request must contain the attribute `Operations`, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one \"op\" member. (required) 12960 :type patch_user_resource: PatchUserResource 12961 :param _request_timeout: timeout setting for this request. If one 12962 number provided, it will be total request 12963 timeout. It can also be a pair (tuple) of 12964 (connection, read) timeouts. 12965 :type _request_timeout: int, tuple(int, int), optional 12966 :param _request_auth: set to override the auth_settings for an a single 12967 request; this effectively ignores the 12968 authentication in the spec for a single request. 12969 :type _request_auth: dict, optional 12970 :param _content_type: force content-type for the request. 12971 :type _content_type: str, Optional 12972 :param _headers: set to override the headers for a single 12973 request; this effectively ignores the headers 12974 in the spec for a single request. 12975 :type _headers: dict, optional 12976 :param _host_index: set to override the host_index for a single 12977 request; this effectively ignores the host_index 12978 in the spec for a single request. 12979 :type _host_index: int, optional 12980 :return: Returns the result object. 12981 """ # noqa: E501 12982 12983 _param = self._patch_user_serialize( 12984 id=id, 12985 patch_user_resource=patch_user_resource, 12986 _request_auth=_request_auth, 12987 _content_type=_content_type, 12988 _headers=_headers, 12989 _host_index=_host_index, 12990 ) 12991 12992 _response_types_map: Dict[str, Optional[str]] = { 12993 "200": "UserResource", 12994 "400": None, 12995 "401": None, 12996 "403": None, 12997 "404": None, 12998 "409": None, 12999 "429": None, 13000 "500": None, 13001 } 13002 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13003 response_data.read() 13004 return self.api_client.response_deserialize( 13005 response_data=response_data, 13006 response_types_map=_response_types_map, 13007 ).data 13008 13009 def _patch_user_serialize( 13010 self, 13011 id, 13012 patch_user_resource, 13013 _request_auth, 13014 _content_type, 13015 _headers, 13016 _host_index, 13017 ) -> RequestSerialized: 13018 13019 _host = None 13020 13021 _collection_formats: Dict[str, str] = {} 13022 13023 _path_params: Dict[str, str] = {} 13024 _query_params: List[Tuple[str, str]] = [] 13025 _header_params: Dict[str, Optional[str]] = _headers or {} 13026 _form_params: List[Tuple[str, str]] = [] 13027 _files: Dict[str, str] = {} 13028 _body_params: Optional[bytes] = None 13029 13030 # process the path parameters 13031 if id is not None: 13032 _path_params["id"] = id 13033 # process the query parameters 13034 # process the header parameters 13035 # process the form parameters 13036 # process the body parameter 13037 if patch_user_resource is not None: 13038 _body_params = patch_user_resource 13039 13040 # set the HTTP header `Accept` 13041 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 13042 13043 # set the HTTP header `Content-Type` 13044 if _content_type: 13045 _header_params["Content-Type"] = _content_type 13046 else: 13047 _default_content_type = self.api_client.select_header_content_type( 13048 ["application/scim+json", "application/json"] 13049 ) 13050 if _default_content_type is not None: 13051 _header_params["Content-Type"] = _default_content_type 13052 13053 # authentication setting 13054 _auth_settings: List[str] = [] 13055 13056 return self.api_client.param_serialize( 13057 method="PATCH", 13058 resource_path="/Users/{id}", 13059 path_params=_path_params, 13060 query_params=_query_params, 13061 header_params=_header_params, 13062 body=_body_params, 13063 post_params=_form_params, 13064 files=_files, 13065 auth_settings=_auth_settings, 13066 collection_formats=_collection_formats, 13067 _host=_host, 13068 _request_auth=_request_auth, 13069 ) 13070 13071 @validate_call 13072 def replace_user( 13073 self, 13074 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 13075 user_resource: Annotated[UserResource, Field(description="Payload to update user information.")], 13076 _request_timeout: Union[ 13077 None, 13078 Annotated[StrictFloat, Field(gt=0)], 13079 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13080 ] = None, 13081 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13082 _content_type: Optional[StrictStr] = None, 13083 _headers: Optional[Dict[StrictStr, Any]] = None, 13084 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13085 ) -> UserResource: 13086 """Replace user 13087 13088 Updates an existing user resource. This is the easiest way to replace user information. <br><br> If the user is deactivated, <br> userName, userType, and roles.value cannot be updated. <br> emails.value, emails.display, emails.primary get ignored and do not return any error. <br><br> Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated. 13089 13090 :param id: User ID. A server-assigned, unique identifier for this user. (required) 13091 :type id: str 13092 :param user_resource: Payload to update user information. (required) 13093 :type user_resource: UserResource 13094 :param _request_timeout: timeout setting for this request. If one 13095 number provided, it will be total request 13096 timeout. It can also be a pair (tuple) of 13097 (connection, read) timeouts. 13098 :type _request_timeout: int, tuple(int, int), optional 13099 :param _request_auth: set to override the auth_settings for an a single 13100 request; this effectively ignores the 13101 authentication in the spec for a single request. 13102 :type _request_auth: dict, optional 13103 :param _content_type: force content-type for the request. 13104 :type _content_type: str, Optional 13105 :param _headers: set to override the headers for a single 13106 request; this effectively ignores the headers 13107 in the spec for a single request. 13108 :type _headers: dict, optional 13109 :param _host_index: set to override the host_index for a single 13110 request; this effectively ignores the host_index 13111 in the spec for a single request. 13112 :type _host_index: int, optional 13113 :return: Returns the result object. 13114 """ # noqa: E501 13115 13116 _param = self._replace_user_serialize( 13117 id=id, 13118 user_resource=user_resource, 13119 _request_auth=_request_auth, 13120 _content_type=_content_type, 13121 _headers=_headers, 13122 _host_index=_host_index, 13123 ) 13124 13125 _response_types_map: Dict[str, Optional[str]] = { 13126 "200": "UserResource", 13127 "400": None, 13128 "401": None, 13129 "403": None, 13130 "404": None, 13131 "409": None, 13132 "429": None, 13133 "500": None, 13134 } 13135 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13136 response_data.read() 13137 return self.api_client.response_deserialize( 13138 response_data=response_data, 13139 response_types_map=_response_types_map, 13140 ).data 13141 13142 def _replace_user_serialize( 13143 self, 13144 id, 13145 user_resource, 13146 _request_auth, 13147 _content_type, 13148 _headers, 13149 _host_index, 13150 ) -> RequestSerialized: 13151 13152 _host = None 13153 13154 _collection_formats: Dict[str, str] = {} 13155 13156 _path_params: Dict[str, str] = {} 13157 _query_params: List[Tuple[str, str]] = [] 13158 _header_params: Dict[str, Optional[str]] = _headers or {} 13159 _form_params: List[Tuple[str, str]] = [] 13160 _files: Dict[str, str] = {} 13161 _body_params: Optional[bytes] = None 13162 13163 # process the path parameters 13164 if id is not None: 13165 _path_params["id"] = id 13166 # process the query parameters 13167 # process the header parameters 13168 # process the form parameters 13169 # process the body parameter 13170 if user_resource is not None: 13171 _body_params = user_resource 13172 13173 # set the HTTP header `Accept` 13174 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 13175 13176 # set the HTTP header `Content-Type` 13177 if _content_type: 13178 _header_params["Content-Type"] = _content_type 13179 else: 13180 _default_content_type = self.api_client.select_header_content_type( 13181 ["application/scim+json", "application/json"] 13182 ) 13183 if _default_content_type is not None: 13184 _header_params["Content-Type"] = _default_content_type 13185 13186 # authentication setting 13187 _auth_settings: List[str] = [] 13188 13189 return self.api_client.param_serialize( 13190 method="PUT", 13191 resource_path="/Users/{id}", 13192 path_params=_path_params, 13193 query_params=_query_params, 13194 header_params=_header_params, 13195 body=_body_params, 13196 post_params=_form_params, 13197 files=_files, 13198 auth_settings=_auth_settings, 13199 collection_formats=_collection_formats, 13200 _host=_host, 13201 _request_auth=_request_auth, 13202 ) 13203 13204 @validate_call 13205 def enterprise_create_group_member( 13206 self, 13207 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13208 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13209 create_group_member_request: CreateGroupMemberRequest, 13210 _request_timeout: Union[ 13211 None, 13212 Annotated[StrictFloat, Field(gt=0)], 13213 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13214 ] = None, 13215 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13216 _content_type: Optional[StrictStr] = None, 13217 _headers: Optional[Dict[StrictStr, Any]] = None, 13218 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13219 ) -> GroupMember: 13220 """Create user group member 13221 13222 Adds a member to a user group in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13223 13224 :param org_id: The ID of an organization. (required) 13225 :type org_id: str 13226 :param group_id: The ID of a user group. (required) 13227 :type group_id: str 13228 :param create_group_member_request: (required) 13229 :type create_group_member_request: CreateGroupMemberRequest 13230 :param _request_timeout: timeout setting for this request. If one 13231 number provided, it will be total request 13232 timeout. It can also be a pair (tuple) of 13233 (connection, read) timeouts. 13234 :type _request_timeout: int, tuple(int, int), optional 13235 :param _request_auth: set to override the auth_settings for an a single 13236 request; this effectively ignores the 13237 authentication in the spec for a single request. 13238 :type _request_auth: dict, optional 13239 :param _content_type: force content-type for the request. 13240 :type _content_type: str, Optional 13241 :param _headers: set to override the headers for a single 13242 request; this effectively ignores the headers 13243 in the spec for a single request. 13244 :type _headers: dict, optional 13245 :param _host_index: set to override the host_index for a single 13246 request; this effectively ignores the host_index 13247 in the spec for a single request. 13248 :type _host_index: int, optional 13249 :return: Returns the result object. 13250 """ # noqa: E501 13251 13252 _param = self._enterprise_create_group_member_serialize( 13253 org_id=org_id, 13254 group_id=group_id, 13255 create_group_member_request=create_group_member_request, 13256 _request_auth=_request_auth, 13257 _content_type=_content_type, 13258 _headers=_headers, 13259 _host_index=_host_index, 13260 ) 13261 13262 _response_types_map: Dict[str, Optional[str]] = { 13263 "201": "GroupMember", 13264 "400": None, 13265 "401": None, 13266 "403": None, 13267 "409": None, 13268 "429": None, 13269 } 13270 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13271 response_data.read() 13272 return self.api_client.response_deserialize( 13273 response_data=response_data, 13274 response_types_map=_response_types_map, 13275 ).data 13276 13277 def _enterprise_create_group_member_serialize( 13278 self, 13279 org_id, 13280 group_id, 13281 create_group_member_request, 13282 _request_auth, 13283 _content_type, 13284 _headers, 13285 _host_index, 13286 ) -> RequestSerialized: 13287 13288 _host = None 13289 13290 _collection_formats: Dict[str, str] = {} 13291 13292 _path_params: Dict[str, str] = {} 13293 _query_params: List[Tuple[str, str]] = [] 13294 _header_params: Dict[str, Optional[str]] = _headers or {} 13295 _form_params: List[Tuple[str, str]] = [] 13296 _files: Dict[str, str] = {} 13297 _body_params: Optional[bytes] = None 13298 13299 # process the path parameters 13300 if org_id is not None: 13301 _path_params["org_id"] = org_id 13302 if group_id is not None: 13303 _path_params["group_id"] = group_id 13304 # process the query parameters 13305 # process the header parameters 13306 # process the form parameters 13307 # process the body parameter 13308 if create_group_member_request is not None: 13309 _body_params = create_group_member_request 13310 13311 # set the HTTP header `Accept` 13312 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13313 13314 # set the HTTP header `Content-Type` 13315 if _content_type: 13316 _header_params["Content-Type"] = _content_type 13317 else: 13318 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 13319 if _default_content_type is not None: 13320 _header_params["Content-Type"] = _default_content_type 13321 13322 # authentication setting 13323 _auth_settings: List[str] = [] 13324 13325 return self.api_client.param_serialize( 13326 method="POST", 13327 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members", 13328 path_params=_path_params, 13329 query_params=_query_params, 13330 header_params=_header_params, 13331 body=_body_params, 13332 post_params=_form_params, 13333 files=_files, 13334 auth_settings=_auth_settings, 13335 collection_formats=_collection_formats, 13336 _host=_host, 13337 _request_auth=_request_auth, 13338 ) 13339 13340 @validate_call 13341 def enterprise_delete_group_member( 13342 self, 13343 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13344 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13345 member_id: Annotated[StrictStr, Field(description="The ID of a group member.")], 13346 _request_timeout: Union[ 13347 None, 13348 Annotated[StrictFloat, Field(gt=0)], 13349 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13350 ] = None, 13351 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13352 _content_type: Optional[StrictStr] = None, 13353 _headers: Optional[Dict[StrictStr, Any]] = None, 13354 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13355 ) -> None: 13356 """Delete user group member 13357 13358 Removes a member from a user group in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13359 13360 :param org_id: The ID of an organization. (required) 13361 :type org_id: str 13362 :param group_id: The ID of a user group. (required) 13363 :type group_id: str 13364 :param member_id: The ID of a group member. (required) 13365 :type member_id: str 13366 :param _request_timeout: timeout setting for this request. If one 13367 number provided, it will be total request 13368 timeout. It can also be a pair (tuple) of 13369 (connection, read) timeouts. 13370 :type _request_timeout: int, tuple(int, int), optional 13371 :param _request_auth: set to override the auth_settings for an a single 13372 request; this effectively ignores the 13373 authentication in the spec for a single request. 13374 :type _request_auth: dict, optional 13375 :param _content_type: force content-type for the request. 13376 :type _content_type: str, Optional 13377 :param _headers: set to override the headers for a single 13378 request; this effectively ignores the headers 13379 in the spec for a single request. 13380 :type _headers: dict, optional 13381 :param _host_index: set to override the host_index for a single 13382 request; this effectively ignores the host_index 13383 in the spec for a single request. 13384 :type _host_index: int, optional 13385 :return: Returns the result object. 13386 """ # noqa: E501 13387 13388 _param = self._enterprise_delete_group_member_serialize( 13389 org_id=org_id, 13390 group_id=group_id, 13391 member_id=member_id, 13392 _request_auth=_request_auth, 13393 _content_type=_content_type, 13394 _headers=_headers, 13395 _host_index=_host_index, 13396 ) 13397 13398 _response_types_map: Dict[str, Optional[str]] = { 13399 "204": None, 13400 "400": None, 13401 "401": None, 13402 "403": None, 13403 "404": None, 13404 "429": None, 13405 } 13406 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13407 response_data.read() 13408 return self.api_client.response_deserialize( 13409 response_data=response_data, 13410 response_types_map=_response_types_map, 13411 ).data 13412 13413 def _enterprise_delete_group_member_serialize( 13414 self, 13415 org_id, 13416 group_id, 13417 member_id, 13418 _request_auth, 13419 _content_type, 13420 _headers, 13421 _host_index, 13422 ) -> RequestSerialized: 13423 13424 _host = None 13425 13426 _collection_formats: Dict[str, str] = {} 13427 13428 _path_params: Dict[str, str] = {} 13429 _query_params: List[Tuple[str, str]] = [] 13430 _header_params: Dict[str, Optional[str]] = _headers or {} 13431 _form_params: List[Tuple[str, str]] = [] 13432 _files: Dict[str, str] = {} 13433 _body_params: Optional[bytes] = None 13434 13435 # process the path parameters 13436 if org_id is not None: 13437 _path_params["org_id"] = org_id 13438 if group_id is not None: 13439 _path_params["group_id"] = group_id 13440 if member_id is not None: 13441 _path_params["member_id"] = member_id 13442 # process the query parameters 13443 # process the header parameters 13444 # process the form parameters 13445 # process the body parameter 13446 13447 # authentication setting 13448 _auth_settings: List[str] = [] 13449 13450 return self.api_client.param_serialize( 13451 method="DELETE", 13452 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members/{member_id}", 13453 path_params=_path_params, 13454 query_params=_query_params, 13455 header_params=_header_params, 13456 body=_body_params, 13457 post_params=_form_params, 13458 files=_files, 13459 auth_settings=_auth_settings, 13460 collection_formats=_collection_formats, 13461 _host=_host, 13462 _request_auth=_request_auth, 13463 ) 13464 13465 @validate_call 13466 def enterprise_get_group_member( 13467 self, 13468 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13469 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13470 member_id: Annotated[StrictStr, Field(description="The ID of a group member.")], 13471 _request_timeout: Union[ 13472 None, 13473 Annotated[StrictFloat, Field(gt=0)], 13474 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13475 ] = None, 13476 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13477 _content_type: Optional[StrictStr] = None, 13478 _headers: Optional[Dict[StrictStr, Any]] = None, 13479 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13480 ) -> GroupMember: 13481 """Get user group member 13482 13483 Retrieves information about a user group member in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13484 13485 :param org_id: The ID of an organization. (required) 13486 :type org_id: str 13487 :param group_id: The ID of a user group. (required) 13488 :type group_id: str 13489 :param member_id: The ID of a group member. (required) 13490 :type member_id: str 13491 :param _request_timeout: timeout setting for this request. If one 13492 number provided, it will be total request 13493 timeout. It can also be a pair (tuple) of 13494 (connection, read) timeouts. 13495 :type _request_timeout: int, tuple(int, int), optional 13496 :param _request_auth: set to override the auth_settings for an a single 13497 request; this effectively ignores the 13498 authentication in the spec for a single request. 13499 :type _request_auth: dict, optional 13500 :param _content_type: force content-type for the request. 13501 :type _content_type: str, Optional 13502 :param _headers: set to override the headers for a single 13503 request; this effectively ignores the headers 13504 in the spec for a single request. 13505 :type _headers: dict, optional 13506 :param _host_index: set to override the host_index for a single 13507 request; this effectively ignores the host_index 13508 in the spec for a single request. 13509 :type _host_index: int, optional 13510 :return: Returns the result object. 13511 """ # noqa: E501 13512 13513 _param = self._enterprise_get_group_member_serialize( 13514 org_id=org_id, 13515 group_id=group_id, 13516 member_id=member_id, 13517 _request_auth=_request_auth, 13518 _content_type=_content_type, 13519 _headers=_headers, 13520 _host_index=_host_index, 13521 ) 13522 13523 _response_types_map: Dict[str, Optional[str]] = { 13524 "200": "GroupMember", 13525 "400": None, 13526 "401": None, 13527 "403": None, 13528 "404": None, 13529 "429": None, 13530 } 13531 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13532 response_data.read() 13533 return self.api_client.response_deserialize( 13534 response_data=response_data, 13535 response_types_map=_response_types_map, 13536 ).data 13537 13538 def _enterprise_get_group_member_serialize( 13539 self, 13540 org_id, 13541 group_id, 13542 member_id, 13543 _request_auth, 13544 _content_type, 13545 _headers, 13546 _host_index, 13547 ) -> RequestSerialized: 13548 13549 _host = None 13550 13551 _collection_formats: Dict[str, str] = {} 13552 13553 _path_params: Dict[str, str] = {} 13554 _query_params: List[Tuple[str, str]] = [] 13555 _header_params: Dict[str, Optional[str]] = _headers or {} 13556 _form_params: List[Tuple[str, str]] = [] 13557 _files: Dict[str, str] = {} 13558 _body_params: Optional[bytes] = None 13559 13560 # process the path parameters 13561 if org_id is not None: 13562 _path_params["org_id"] = org_id 13563 if group_id is not None: 13564 _path_params["group_id"] = group_id 13565 if member_id is not None: 13566 _path_params["member_id"] = member_id 13567 # process the query parameters 13568 # process the header parameters 13569 # process the form parameters 13570 # process the body parameter 13571 13572 # set the HTTP header `Accept` 13573 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13574 13575 # authentication setting 13576 _auth_settings: List[str] = [] 13577 13578 return self.api_client.param_serialize( 13579 method="GET", 13580 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members/{member_id}", 13581 path_params=_path_params, 13582 query_params=_query_params, 13583 header_params=_header_params, 13584 body=_body_params, 13585 post_params=_form_params, 13586 files=_files, 13587 auth_settings=_auth_settings, 13588 collection_formats=_collection_formats, 13589 _host=_host, 13590 _request_auth=_request_auth, 13591 ) 13592 13593 @validate_call 13594 def enterprise_get_group_members( 13595 self, 13596 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13597 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13598 limit: Annotated[ 13599 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 13600 Field(description="The maximum number of members in the result list."), 13601 ] = None, 13602 cursor: Annotated[ 13603 Optional[StrictStr], 13604 Field( 13605 description="A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 13606 ), 13607 ] = None, 13608 _request_timeout: Union[ 13609 None, 13610 Annotated[StrictFloat, Field(gt=0)], 13611 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13612 ] = None, 13613 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13614 _content_type: Optional[StrictStr] = None, 13615 _headers: Optional[Dict[StrictStr, Any]] = None, 13616 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13617 ) -> GroupMembersPage: 13618 """List of user group members 13619 13620 Retrieves the list of members who are part of a team in an existing organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13621 13622 :param org_id: The ID of an organization. (required) 13623 :type org_id: str 13624 :param group_id: The ID of a user group. (required) 13625 :type group_id: str 13626 :param limit: The maximum number of members in the result list. 13627 :type limit: int 13628 :param cursor: A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 13629 :type cursor: str 13630 :param _request_timeout: timeout setting for this request. If one 13631 number provided, it will be total request 13632 timeout. It can also be a pair (tuple) of 13633 (connection, read) timeouts. 13634 :type _request_timeout: int, tuple(int, int), optional 13635 :param _request_auth: set to override the auth_settings for an a single 13636 request; this effectively ignores the 13637 authentication in the spec for a single request. 13638 :type _request_auth: dict, optional 13639 :param _content_type: force content-type for the request. 13640 :type _content_type: str, Optional 13641 :param _headers: set to override the headers for a single 13642 request; this effectively ignores the headers 13643 in the spec for a single request. 13644 :type _headers: dict, optional 13645 :param _host_index: set to override the host_index for a single 13646 request; this effectively ignores the host_index 13647 in the spec for a single request. 13648 :type _host_index: int, optional 13649 :return: Returns the result object. 13650 """ # noqa: E501 13651 13652 _param = self._enterprise_get_group_members_serialize( 13653 org_id=org_id, 13654 group_id=group_id, 13655 limit=limit, 13656 cursor=cursor, 13657 _request_auth=_request_auth, 13658 _content_type=_content_type, 13659 _headers=_headers, 13660 _host_index=_host_index, 13661 ) 13662 13663 _response_types_map: Dict[str, Optional[str]] = { 13664 "200": "GroupMembersPage", 13665 "400": None, 13666 "401": None, 13667 "403": None, 13668 "429": None, 13669 } 13670 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13671 response_data.read() 13672 return self.api_client.response_deserialize( 13673 response_data=response_data, 13674 response_types_map=_response_types_map, 13675 ).data 13676 13677 def _enterprise_get_group_members_serialize( 13678 self, 13679 org_id, 13680 group_id, 13681 limit, 13682 cursor, 13683 _request_auth, 13684 _content_type, 13685 _headers, 13686 _host_index, 13687 ) -> RequestSerialized: 13688 13689 _host = None 13690 13691 _collection_formats: Dict[str, str] = {} 13692 13693 _path_params: Dict[str, str] = {} 13694 _query_params: List[Tuple[str, str]] = [] 13695 _header_params: Dict[str, Optional[str]] = _headers or {} 13696 _form_params: List[Tuple[str, str]] = [] 13697 _files: Dict[str, str] = {} 13698 _body_params: Optional[bytes] = None 13699 13700 # process the path parameters 13701 if org_id is not None: 13702 _path_params["org_id"] = org_id 13703 if group_id is not None: 13704 _path_params["group_id"] = group_id 13705 # process the query parameters 13706 if limit is not None: 13707 13708 _query_params.append(("limit", limit)) 13709 13710 if cursor is not None: 13711 13712 _query_params.append(("cursor", cursor)) 13713 13714 # process the header parameters 13715 # process the form parameters 13716 # process the body parameter 13717 13718 # set the HTTP header `Accept` 13719 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13720 13721 # authentication setting 13722 _auth_settings: List[str] = [] 13723 13724 return self.api_client.param_serialize( 13725 method="GET", 13726 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members", 13727 path_params=_path_params, 13728 query_params=_query_params, 13729 header_params=_header_params, 13730 body=_body_params, 13731 post_params=_form_params, 13732 files=_files, 13733 auth_settings=_auth_settings, 13734 collection_formats=_collection_formats, 13735 _host=_host, 13736 _request_auth=_request_auth, 13737 ) 13738 13739 @validate_call 13740 def enterprise_update_group_members( 13741 self, 13742 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13743 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13744 update_user_group_members_request: UpdateUserGroupMembersRequest, 13745 _request_timeout: Union[ 13746 None, 13747 Annotated[StrictFloat, Field(gt=0)], 13748 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13749 ] = None, 13750 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13751 _content_type: Optional[StrictStr] = None, 13752 _headers: Optional[Dict[StrictStr, Any]] = None, 13753 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13754 ) -> List[UpdateUserGroupMembersResultInner]: 13755 """Bulk edit of membership in user group 13756 13757 Add and remove members in one request. For example, remove user A and add user B.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> per item. For example, if you want to add 10 users and remove 5, the rate limiting applicable will be 750 credits. This is because each user addition or deletion takes Level 1 rate limiting of 50 credits, so 15 * 50 = 750.<br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13758 13759 :param org_id: The ID of an organization. (required) 13760 :type org_id: str 13761 :param group_id: The ID of a user group. (required) 13762 :type group_id: str 13763 :param update_user_group_members_request: (required) 13764 :type update_user_group_members_request: UpdateUserGroupMembersRequest 13765 :param _request_timeout: timeout setting for this request. If one 13766 number provided, it will be total request 13767 timeout. It can also be a pair (tuple) of 13768 (connection, read) timeouts. 13769 :type _request_timeout: int, tuple(int, int), optional 13770 :param _request_auth: set to override the auth_settings for an a single 13771 request; this effectively ignores the 13772 authentication in the spec for a single request. 13773 :type _request_auth: dict, optional 13774 :param _content_type: force content-type for the request. 13775 :type _content_type: str, Optional 13776 :param _headers: set to override the headers for a single 13777 request; this effectively ignores the headers 13778 in the spec for a single request. 13779 :type _headers: dict, optional 13780 :param _host_index: set to override the host_index for a single 13781 request; this effectively ignores the host_index 13782 in the spec for a single request. 13783 :type _host_index: int, optional 13784 :return: Returns the result object. 13785 """ # noqa: E501 13786 13787 _param = self._enterprise_update_group_members_serialize( 13788 org_id=org_id, 13789 group_id=group_id, 13790 update_user_group_members_request=update_user_group_members_request, 13791 _request_auth=_request_auth, 13792 _content_type=_content_type, 13793 _headers=_headers, 13794 _host_index=_host_index, 13795 ) 13796 13797 _response_types_map: Dict[str, Optional[str]] = { 13798 "207": "List[UpdateUserGroupMembersResultInner]", 13799 "400": None, 13800 "401": None, 13801 "403": None, 13802 "404": None, 13803 "409": None, 13804 "413": None, 13805 "429": None, 13806 } 13807 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13808 response_data.read() 13809 return self.api_client.response_deserialize( 13810 response_data=response_data, 13811 response_types_map=_response_types_map, 13812 ).data 13813 13814 def _enterprise_update_group_members_serialize( 13815 self, 13816 org_id, 13817 group_id, 13818 update_user_group_members_request, 13819 _request_auth, 13820 _content_type, 13821 _headers, 13822 _host_index, 13823 ) -> RequestSerialized: 13824 13825 _host = None 13826 13827 _collection_formats: Dict[str, str] = {} 13828 13829 _path_params: Dict[str, str] = {} 13830 _query_params: List[Tuple[str, str]] = [] 13831 _header_params: Dict[str, Optional[str]] = _headers or {} 13832 _form_params: List[Tuple[str, str]] = [] 13833 _files: Dict[str, str] = {} 13834 _body_params: Optional[bytes] = None 13835 13836 # process the path parameters 13837 if org_id is not None: 13838 _path_params["org_id"] = org_id 13839 if group_id is not None: 13840 _path_params["group_id"] = group_id 13841 # process the query parameters 13842 # process the header parameters 13843 # process the form parameters 13844 # process the body parameter 13845 if update_user_group_members_request is not None: 13846 _body_params = update_user_group_members_request 13847 13848 # set the HTTP header `Accept` 13849 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13850 13851 # set the HTTP header `Content-Type` 13852 if _content_type: 13853 _header_params["Content-Type"] = _content_type 13854 else: 13855 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 13856 if _default_content_type is not None: 13857 _header_params["Content-Type"] = _default_content_type 13858 13859 # authentication setting 13860 _auth_settings: List[str] = [] 13861 13862 return self.api_client.param_serialize( 13863 method="PATCH", 13864 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members", 13865 path_params=_path_params, 13866 query_params=_query_params, 13867 header_params=_header_params, 13868 body=_body_params, 13869 post_params=_form_params, 13870 files=_files, 13871 auth_settings=_auth_settings, 13872 collection_formats=_collection_formats, 13873 _host=_host, 13874 _request_auth=_request_auth, 13875 ) 13876 13877 @validate_call 13878 def enterprise_groups_get_team( 13879 self, 13880 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13881 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13882 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 13883 _request_timeout: Union[ 13884 None, 13885 Annotated[StrictFloat, Field(gt=0)], 13886 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13887 ] = None, 13888 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13889 _content_type: Optional[StrictStr] = None, 13890 _headers: Optional[Dict[StrictStr, Any]] = None, 13891 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13892 ) -> GroupTeam: 13893 """Get user group team 13894 13895 Retrieves information of a team that the user group is a part of in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13896 13897 :param org_id: The ID of an organization. (required) 13898 :type org_id: str 13899 :param group_id: The ID of a user group. (required) 13900 :type group_id: str 13901 :param team_id: The ID of a team. (required) 13902 :type team_id: str 13903 :param _request_timeout: timeout setting for this request. If one 13904 number provided, it will be total request 13905 timeout. It can also be a pair (tuple) of 13906 (connection, read) timeouts. 13907 :type _request_timeout: int, tuple(int, int), optional 13908 :param _request_auth: set to override the auth_settings for an a single 13909 request; this effectively ignores the 13910 authentication in the spec for a single request. 13911 :type _request_auth: dict, optional 13912 :param _content_type: force content-type for the request. 13913 :type _content_type: str, Optional 13914 :param _headers: set to override the headers for a single 13915 request; this effectively ignores the headers 13916 in the spec for a single request. 13917 :type _headers: dict, optional 13918 :param _host_index: set to override the host_index for a single 13919 request; this effectively ignores the host_index 13920 in the spec for a single request. 13921 :type _host_index: int, optional 13922 :return: Returns the result object. 13923 """ # noqa: E501 13924 13925 _param = self._enterprise_groups_get_team_serialize( 13926 org_id=org_id, 13927 group_id=group_id, 13928 team_id=team_id, 13929 _request_auth=_request_auth, 13930 _content_type=_content_type, 13931 _headers=_headers, 13932 _host_index=_host_index, 13933 ) 13934 13935 _response_types_map: Dict[str, Optional[str]] = { 13936 "200": "GroupTeam", 13937 "400": None, 13938 "401": None, 13939 "403": None, 13940 "429": None, 13941 } 13942 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13943 response_data.read() 13944 return self.api_client.response_deserialize( 13945 response_data=response_data, 13946 response_types_map=_response_types_map, 13947 ).data 13948 13949 def _enterprise_groups_get_team_serialize( 13950 self, 13951 org_id, 13952 group_id, 13953 team_id, 13954 _request_auth, 13955 _content_type, 13956 _headers, 13957 _host_index, 13958 ) -> RequestSerialized: 13959 13960 _host = None 13961 13962 _collection_formats: Dict[str, str] = {} 13963 13964 _path_params: Dict[str, str] = {} 13965 _query_params: List[Tuple[str, str]] = [] 13966 _header_params: Dict[str, Optional[str]] = _headers or {} 13967 _form_params: List[Tuple[str, str]] = [] 13968 _files: Dict[str, str] = {} 13969 _body_params: Optional[bytes] = None 13970 13971 # process the path parameters 13972 if org_id is not None: 13973 _path_params["org_id"] = org_id 13974 if group_id is not None: 13975 _path_params["group_id"] = group_id 13976 if team_id is not None: 13977 _path_params["team_id"] = team_id 13978 # process the query parameters 13979 # process the header parameters 13980 # process the form parameters 13981 # process the body parameter 13982 13983 # set the HTTP header `Accept` 13984 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13985 13986 # authentication setting 13987 _auth_settings: List[str] = [] 13988 13989 return self.api_client.param_serialize( 13990 method="GET", 13991 resource_path="/v2/orgs/{org_id}/groups/{group_id}/teams/{team_id}", 13992 path_params=_path_params, 13993 query_params=_query_params, 13994 header_params=_header_params, 13995 body=_body_params, 13996 post_params=_form_params, 13997 files=_files, 13998 auth_settings=_auth_settings, 13999 collection_formats=_collection_formats, 14000 _host=_host, 14001 _request_auth=_request_auth, 14002 ) 14003 14004 @validate_call 14005 def enterprise_groups_get_teams( 14006 self, 14007 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14008 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14009 limit: Annotated[ 14010 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 14011 Field(description="The maximum number of teams in the result list."), 14012 ] = None, 14013 cursor: Annotated[ 14014 Optional[StrictStr], 14015 Field( 14016 description="A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 14017 ), 14018 ] = None, 14019 _request_timeout: Union[ 14020 None, 14021 Annotated[StrictFloat, Field(gt=0)], 14022 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14023 ] = None, 14024 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14025 _content_type: Optional[StrictStr] = None, 14026 _headers: Optional[Dict[StrictStr, Any]] = None, 14027 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14028 ) -> GroupTeamsPage: 14029 """Get teams of a user group 14030 14031 Retrieves the list of teams that the user group is a part of.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14032 14033 :param org_id: The ID of an organization. (required) 14034 :type org_id: str 14035 :param group_id: The ID of a user group. (required) 14036 :type group_id: str 14037 :param limit: The maximum number of teams in the result list. 14038 :type limit: int 14039 :param cursor: A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 14040 :type cursor: str 14041 :param _request_timeout: timeout setting for this request. If one 14042 number provided, it will be total request 14043 timeout. It can also be a pair (tuple) of 14044 (connection, read) timeouts. 14045 :type _request_timeout: int, tuple(int, int), optional 14046 :param _request_auth: set to override the auth_settings for an a single 14047 request; this effectively ignores the 14048 authentication in the spec for a single request. 14049 :type _request_auth: dict, optional 14050 :param _content_type: force content-type for the request. 14051 :type _content_type: str, Optional 14052 :param _headers: set to override the headers for a single 14053 request; this effectively ignores the headers 14054 in the spec for a single request. 14055 :type _headers: dict, optional 14056 :param _host_index: set to override the host_index for a single 14057 request; this effectively ignores the host_index 14058 in the spec for a single request. 14059 :type _host_index: int, optional 14060 :return: Returns the result object. 14061 """ # noqa: E501 14062 14063 _param = self._enterprise_groups_get_teams_serialize( 14064 org_id=org_id, 14065 group_id=group_id, 14066 limit=limit, 14067 cursor=cursor, 14068 _request_auth=_request_auth, 14069 _content_type=_content_type, 14070 _headers=_headers, 14071 _host_index=_host_index, 14072 ) 14073 14074 _response_types_map: Dict[str, Optional[str]] = { 14075 "200": "GroupTeamsPage", 14076 "400": None, 14077 "401": None, 14078 "403": None, 14079 "429": None, 14080 } 14081 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14082 response_data.read() 14083 return self.api_client.response_deserialize( 14084 response_data=response_data, 14085 response_types_map=_response_types_map, 14086 ).data 14087 14088 def _enterprise_groups_get_teams_serialize( 14089 self, 14090 org_id, 14091 group_id, 14092 limit, 14093 cursor, 14094 _request_auth, 14095 _content_type, 14096 _headers, 14097 _host_index, 14098 ) -> RequestSerialized: 14099 14100 _host = None 14101 14102 _collection_formats: Dict[str, str] = {} 14103 14104 _path_params: Dict[str, str] = {} 14105 _query_params: List[Tuple[str, str]] = [] 14106 _header_params: Dict[str, Optional[str]] = _headers or {} 14107 _form_params: List[Tuple[str, str]] = [] 14108 _files: Dict[str, str] = {} 14109 _body_params: Optional[bytes] = None 14110 14111 # process the path parameters 14112 if org_id is not None: 14113 _path_params["org_id"] = org_id 14114 if group_id is not None: 14115 _path_params["group_id"] = group_id 14116 # process the query parameters 14117 if limit is not None: 14118 14119 _query_params.append(("limit", limit)) 14120 14121 if cursor is not None: 14122 14123 _query_params.append(("cursor", cursor)) 14124 14125 # process the header parameters 14126 # process the form parameters 14127 # process the body parameter 14128 14129 # set the HTTP header `Accept` 14130 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14131 14132 # authentication setting 14133 _auth_settings: List[str] = [] 14134 14135 return self.api_client.param_serialize( 14136 method="GET", 14137 resource_path="/v2/orgs/{org_id}/groups/{group_id}/teams", 14138 path_params=_path_params, 14139 query_params=_query_params, 14140 header_params=_header_params, 14141 body=_body_params, 14142 post_params=_form_params, 14143 files=_files, 14144 auth_settings=_auth_settings, 14145 collection_formats=_collection_formats, 14146 _host=_host, 14147 _request_auth=_request_auth, 14148 ) 14149 14150 @validate_call 14151 def enterprise_create_group( 14152 self, 14153 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14154 create_group_request: CreateGroupRequest, 14155 _request_timeout: Union[ 14156 None, 14157 Annotated[StrictFloat, Field(gt=0)], 14158 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14159 ] = None, 14160 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14161 _content_type: Optional[StrictStr] = None, 14162 _headers: Optional[Dict[StrictStr, Any]] = None, 14163 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14164 ) -> Group: 14165 """Create user group 14166 14167 Creates a new user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14168 14169 :param org_id: The ID of an organization. (required) 14170 :type org_id: str 14171 :param create_group_request: (required) 14172 :type create_group_request: CreateGroupRequest 14173 :param _request_timeout: timeout setting for this request. If one 14174 number provided, it will be total request 14175 timeout. It can also be a pair (tuple) of 14176 (connection, read) timeouts. 14177 :type _request_timeout: int, tuple(int, int), optional 14178 :param _request_auth: set to override the auth_settings for an a single 14179 request; this effectively ignores the 14180 authentication in the spec for a single request. 14181 :type _request_auth: dict, optional 14182 :param _content_type: force content-type for the request. 14183 :type _content_type: str, Optional 14184 :param _headers: set to override the headers for a single 14185 request; this effectively ignores the headers 14186 in the spec for a single request. 14187 :type _headers: dict, optional 14188 :param _host_index: set to override the host_index for a single 14189 request; this effectively ignores the host_index 14190 in the spec for a single request. 14191 :type _host_index: int, optional 14192 :return: Returns the result object. 14193 """ # noqa: E501 14194 14195 _param = self._enterprise_create_group_serialize( 14196 org_id=org_id, 14197 create_group_request=create_group_request, 14198 _request_auth=_request_auth, 14199 _content_type=_content_type, 14200 _headers=_headers, 14201 _host_index=_host_index, 14202 ) 14203 14204 _response_types_map: Dict[str, Optional[str]] = { 14205 "201": "Group", 14206 "400": None, 14207 "401": None, 14208 "403": None, 14209 "409": None, 14210 "429": None, 14211 } 14212 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14213 response_data.read() 14214 return self.api_client.response_deserialize( 14215 response_data=response_data, 14216 response_types_map=_response_types_map, 14217 ).data 14218 14219 def _enterprise_create_group_serialize( 14220 self, 14221 org_id, 14222 create_group_request, 14223 _request_auth, 14224 _content_type, 14225 _headers, 14226 _host_index, 14227 ) -> RequestSerialized: 14228 14229 _host = None 14230 14231 _collection_formats: Dict[str, str] = {} 14232 14233 _path_params: Dict[str, str] = {} 14234 _query_params: List[Tuple[str, str]] = [] 14235 _header_params: Dict[str, Optional[str]] = _headers or {} 14236 _form_params: List[Tuple[str, str]] = [] 14237 _files: Dict[str, str] = {} 14238 _body_params: Optional[bytes] = None 14239 14240 # process the path parameters 14241 if org_id is not None: 14242 _path_params["org_id"] = org_id 14243 # process the query parameters 14244 # process the header parameters 14245 # process the form parameters 14246 # process the body parameter 14247 if create_group_request is not None: 14248 _body_params = create_group_request 14249 14250 # set the HTTP header `Accept` 14251 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14252 14253 # set the HTTP header `Content-Type` 14254 if _content_type: 14255 _header_params["Content-Type"] = _content_type 14256 else: 14257 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 14258 if _default_content_type is not None: 14259 _header_params["Content-Type"] = _default_content_type 14260 14261 # authentication setting 14262 _auth_settings: List[str] = [] 14263 14264 return self.api_client.param_serialize( 14265 method="POST", 14266 resource_path="/v2/orgs/{org_id}/groups", 14267 path_params=_path_params, 14268 query_params=_query_params, 14269 header_params=_header_params, 14270 body=_body_params, 14271 post_params=_form_params, 14272 files=_files, 14273 auth_settings=_auth_settings, 14274 collection_formats=_collection_formats, 14275 _host=_host, 14276 _request_auth=_request_auth, 14277 ) 14278 14279 @validate_call 14280 def enterprise_delete_group( 14281 self, 14282 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14283 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14284 _request_timeout: Union[ 14285 None, 14286 Annotated[StrictFloat, Field(gt=0)], 14287 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14288 ] = None, 14289 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14290 _content_type: Optional[StrictStr] = None, 14291 _headers: Optional[Dict[StrictStr, Any]] = None, 14292 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14293 ) -> None: 14294 """Delete user group 14295 14296 Deletes a user group from an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14297 14298 :param org_id: The ID of an organization. (required) 14299 :type org_id: str 14300 :param group_id: The ID of a user group. (required) 14301 :type group_id: str 14302 :param _request_timeout: timeout setting for this request. If one 14303 number provided, it will be total request 14304 timeout. It can also be a pair (tuple) of 14305 (connection, read) timeouts. 14306 :type _request_timeout: int, tuple(int, int), optional 14307 :param _request_auth: set to override the auth_settings for an a single 14308 request; this effectively ignores the 14309 authentication in the spec for a single request. 14310 :type _request_auth: dict, optional 14311 :param _content_type: force content-type for the request. 14312 :type _content_type: str, Optional 14313 :param _headers: set to override the headers for a single 14314 request; this effectively ignores the headers 14315 in the spec for a single request. 14316 :type _headers: dict, optional 14317 :param _host_index: set to override the host_index for a single 14318 request; this effectively ignores the host_index 14319 in the spec for a single request. 14320 :type _host_index: int, optional 14321 :return: Returns the result object. 14322 """ # noqa: E501 14323 14324 _param = self._enterprise_delete_group_serialize( 14325 org_id=org_id, 14326 group_id=group_id, 14327 _request_auth=_request_auth, 14328 _content_type=_content_type, 14329 _headers=_headers, 14330 _host_index=_host_index, 14331 ) 14332 14333 _response_types_map: Dict[str, Optional[str]] = { 14334 "204": None, 14335 "400": None, 14336 "401": None, 14337 "403": None, 14338 "404": None, 14339 "429": None, 14340 } 14341 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14342 response_data.read() 14343 return self.api_client.response_deserialize( 14344 response_data=response_data, 14345 response_types_map=_response_types_map, 14346 ).data 14347 14348 def _enterprise_delete_group_serialize( 14349 self, 14350 org_id, 14351 group_id, 14352 _request_auth, 14353 _content_type, 14354 _headers, 14355 _host_index, 14356 ) -> RequestSerialized: 14357 14358 _host = None 14359 14360 _collection_formats: Dict[str, str] = {} 14361 14362 _path_params: Dict[str, str] = {} 14363 _query_params: List[Tuple[str, str]] = [] 14364 _header_params: Dict[str, Optional[str]] = _headers or {} 14365 _form_params: List[Tuple[str, str]] = [] 14366 _files: Dict[str, str] = {} 14367 _body_params: Optional[bytes] = None 14368 14369 # process the path parameters 14370 if org_id is not None: 14371 _path_params["org_id"] = org_id 14372 if group_id is not None: 14373 _path_params["group_id"] = group_id 14374 # process the query parameters 14375 # process the header parameters 14376 # process the form parameters 14377 # process the body parameter 14378 14379 # authentication setting 14380 _auth_settings: List[str] = [] 14381 14382 return self.api_client.param_serialize( 14383 method="DELETE", 14384 resource_path="/v2/orgs/{org_id}/groups/{group_id}", 14385 path_params=_path_params, 14386 query_params=_query_params, 14387 header_params=_header_params, 14388 body=_body_params, 14389 post_params=_form_params, 14390 files=_files, 14391 auth_settings=_auth_settings, 14392 collection_formats=_collection_formats, 14393 _host=_host, 14394 _request_auth=_request_auth, 14395 ) 14396 14397 @validate_call 14398 def enterprise_get_group( 14399 self, 14400 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14401 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14402 _request_timeout: Union[ 14403 None, 14404 Annotated[StrictFloat, Field(gt=0)], 14405 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14406 ] = None, 14407 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14408 _content_type: Optional[StrictStr] = None, 14409 _headers: Optional[Dict[StrictStr, Any]] = None, 14410 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14411 ) -> Group: 14412 """Get user group 14413 14414 Retrieves a user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14415 14416 :param org_id: The ID of an organization. (required) 14417 :type org_id: str 14418 :param group_id: The ID of a user group. (required) 14419 :type group_id: str 14420 :param _request_timeout: timeout setting for this request. If one 14421 number provided, it will be total request 14422 timeout. It can also be a pair (tuple) of 14423 (connection, read) timeouts. 14424 :type _request_timeout: int, tuple(int, int), optional 14425 :param _request_auth: set to override the auth_settings for an a single 14426 request; this effectively ignores the 14427 authentication in the spec for a single request. 14428 :type _request_auth: dict, optional 14429 :param _content_type: force content-type for the request. 14430 :type _content_type: str, Optional 14431 :param _headers: set to override the headers for a single 14432 request; this effectively ignores the headers 14433 in the spec for a single request. 14434 :type _headers: dict, optional 14435 :param _host_index: set to override the host_index for a single 14436 request; this effectively ignores the host_index 14437 in the spec for a single request. 14438 :type _host_index: int, optional 14439 :return: Returns the result object. 14440 """ # noqa: E501 14441 14442 _param = self._enterprise_get_group_serialize( 14443 org_id=org_id, 14444 group_id=group_id, 14445 _request_auth=_request_auth, 14446 _content_type=_content_type, 14447 _headers=_headers, 14448 _host_index=_host_index, 14449 ) 14450 14451 _response_types_map: Dict[str, Optional[str]] = { 14452 "200": "Group", 14453 "400": None, 14454 "401": None, 14455 "403": None, 14456 "404": None, 14457 "429": None, 14458 } 14459 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14460 response_data.read() 14461 return self.api_client.response_deserialize( 14462 response_data=response_data, 14463 response_types_map=_response_types_map, 14464 ).data 14465 14466 def _enterprise_get_group_serialize( 14467 self, 14468 org_id, 14469 group_id, 14470 _request_auth, 14471 _content_type, 14472 _headers, 14473 _host_index, 14474 ) -> RequestSerialized: 14475 14476 _host = None 14477 14478 _collection_formats: Dict[str, str] = {} 14479 14480 _path_params: Dict[str, str] = {} 14481 _query_params: List[Tuple[str, str]] = [] 14482 _header_params: Dict[str, Optional[str]] = _headers or {} 14483 _form_params: List[Tuple[str, str]] = [] 14484 _files: Dict[str, str] = {} 14485 _body_params: Optional[bytes] = None 14486 14487 # process the path parameters 14488 if org_id is not None: 14489 _path_params["org_id"] = org_id 14490 if group_id is not None: 14491 _path_params["group_id"] = group_id 14492 # process the query parameters 14493 # process the header parameters 14494 # process the form parameters 14495 # process the body parameter 14496 14497 # set the HTTP header `Accept` 14498 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14499 14500 # authentication setting 14501 _auth_settings: List[str] = [] 14502 14503 return self.api_client.param_serialize( 14504 method="GET", 14505 resource_path="/v2/orgs/{org_id}/groups/{group_id}", 14506 path_params=_path_params, 14507 query_params=_query_params, 14508 header_params=_header_params, 14509 body=_body_params, 14510 post_params=_form_params, 14511 files=_files, 14512 auth_settings=_auth_settings, 14513 collection_formats=_collection_formats, 14514 _host=_host, 14515 _request_auth=_request_auth, 14516 ) 14517 14518 @validate_call 14519 def enterprise_get_groups( 14520 self, 14521 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14522 limit: Annotated[ 14523 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 14524 Field(description="The maximum number of user groups in the result list."), 14525 ] = None, 14526 cursor: Annotated[ 14527 Optional[StrictStr], 14528 Field( 14529 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 14530 ), 14531 ] = None, 14532 _request_timeout: Union[ 14533 None, 14534 Annotated[StrictFloat, Field(gt=0)], 14535 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14536 ] = None, 14537 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14538 _content_type: Optional[StrictStr] = None, 14539 _headers: Optional[Dict[StrictStr, Any]] = None, 14540 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14541 ) -> GroupsPage: 14542 """List of user groups 14543 14544 Retrieves the list of user groups in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14545 14546 :param org_id: The ID of an organization. (required) 14547 :type org_id: str 14548 :param limit: The maximum number of user groups in the result list. 14549 :type limit: int 14550 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 14551 :type cursor: str 14552 :param _request_timeout: timeout setting for this request. If one 14553 number provided, it will be total request 14554 timeout. It can also be a pair (tuple) of 14555 (connection, read) timeouts. 14556 :type _request_timeout: int, tuple(int, int), optional 14557 :param _request_auth: set to override the auth_settings for an a single 14558 request; this effectively ignores the 14559 authentication in the spec for a single request. 14560 :type _request_auth: dict, optional 14561 :param _content_type: force content-type for the request. 14562 :type _content_type: str, Optional 14563 :param _headers: set to override the headers for a single 14564 request; this effectively ignores the headers 14565 in the spec for a single request. 14566 :type _headers: dict, optional 14567 :param _host_index: set to override the host_index for a single 14568 request; this effectively ignores the host_index 14569 in the spec for a single request. 14570 :type _host_index: int, optional 14571 :return: Returns the result object. 14572 """ # noqa: E501 14573 14574 _param = self._enterprise_get_groups_serialize( 14575 org_id=org_id, 14576 limit=limit, 14577 cursor=cursor, 14578 _request_auth=_request_auth, 14579 _content_type=_content_type, 14580 _headers=_headers, 14581 _host_index=_host_index, 14582 ) 14583 14584 _response_types_map: Dict[str, Optional[str]] = { 14585 "200": "GroupsPage", 14586 "400": None, 14587 "401": None, 14588 "403": None, 14589 "429": None, 14590 } 14591 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14592 response_data.read() 14593 return self.api_client.response_deserialize( 14594 response_data=response_data, 14595 response_types_map=_response_types_map, 14596 ).data 14597 14598 def _enterprise_get_groups_serialize( 14599 self, 14600 org_id, 14601 limit, 14602 cursor, 14603 _request_auth, 14604 _content_type, 14605 _headers, 14606 _host_index, 14607 ) -> RequestSerialized: 14608 14609 _host = None 14610 14611 _collection_formats: Dict[str, str] = {} 14612 14613 _path_params: Dict[str, str] = {} 14614 _query_params: List[Tuple[str, str]] = [] 14615 _header_params: Dict[str, Optional[str]] = _headers or {} 14616 _form_params: List[Tuple[str, str]] = [] 14617 _files: Dict[str, str] = {} 14618 _body_params: Optional[bytes] = None 14619 14620 # process the path parameters 14621 if org_id is not None: 14622 _path_params["org_id"] = org_id 14623 # process the query parameters 14624 if limit is not None: 14625 14626 _query_params.append(("limit", limit)) 14627 14628 if cursor is not None: 14629 14630 _query_params.append(("cursor", cursor)) 14631 14632 # process the header parameters 14633 # process the form parameters 14634 # process the body parameter 14635 14636 # set the HTTP header `Accept` 14637 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14638 14639 # authentication setting 14640 _auth_settings: List[str] = [] 14641 14642 return self.api_client.param_serialize( 14643 method="GET", 14644 resource_path="/v2/orgs/{org_id}/groups", 14645 path_params=_path_params, 14646 query_params=_query_params, 14647 header_params=_header_params, 14648 body=_body_params, 14649 post_params=_form_params, 14650 files=_files, 14651 auth_settings=_auth_settings, 14652 collection_formats=_collection_formats, 14653 _host=_host, 14654 _request_auth=_request_auth, 14655 ) 14656 14657 @validate_call 14658 def enterprise_update_group( 14659 self, 14660 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14661 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14662 update_group_request: UpdateGroupRequest, 14663 _request_timeout: Union[ 14664 None, 14665 Annotated[StrictFloat, Field(gt=0)], 14666 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14667 ] = None, 14668 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14669 _content_type: Optional[StrictStr] = None, 14670 _headers: Optional[Dict[StrictStr, Any]] = None, 14671 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14672 ) -> Group: 14673 """Update user group 14674 14675 Updates a user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14676 14677 :param org_id: The ID of an organization. (required) 14678 :type org_id: str 14679 :param group_id: The ID of a user group. (required) 14680 :type group_id: str 14681 :param update_group_request: (required) 14682 :type update_group_request: UpdateGroupRequest 14683 :param _request_timeout: timeout setting for this request. If one 14684 number provided, it will be total request 14685 timeout. It can also be a pair (tuple) of 14686 (connection, read) timeouts. 14687 :type _request_timeout: int, tuple(int, int), optional 14688 :param _request_auth: set to override the auth_settings for an a single 14689 request; this effectively ignores the 14690 authentication in the spec for a single request. 14691 :type _request_auth: dict, optional 14692 :param _content_type: force content-type for the request. 14693 :type _content_type: str, Optional 14694 :param _headers: set to override the headers for a single 14695 request; this effectively ignores the headers 14696 in the spec for a single request. 14697 :type _headers: dict, optional 14698 :param _host_index: set to override the host_index for a single 14699 request; this effectively ignores the host_index 14700 in the spec for a single request. 14701 :type _host_index: int, optional 14702 :return: Returns the result object. 14703 """ # noqa: E501 14704 14705 _param = self._enterprise_update_group_serialize( 14706 org_id=org_id, 14707 group_id=group_id, 14708 update_group_request=update_group_request, 14709 _request_auth=_request_auth, 14710 _content_type=_content_type, 14711 _headers=_headers, 14712 _host_index=_host_index, 14713 ) 14714 14715 _response_types_map: Dict[str, Optional[str]] = { 14716 "200": "Group", 14717 "400": None, 14718 "401": None, 14719 "403": None, 14720 "404": None, 14721 "409": None, 14722 "429": None, 14723 } 14724 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14725 response_data.read() 14726 return self.api_client.response_deserialize( 14727 response_data=response_data, 14728 response_types_map=_response_types_map, 14729 ).data 14730 14731 def _enterprise_update_group_serialize( 14732 self, 14733 org_id, 14734 group_id, 14735 update_group_request, 14736 _request_auth, 14737 _content_type, 14738 _headers, 14739 _host_index, 14740 ) -> RequestSerialized: 14741 14742 _host = None 14743 14744 _collection_formats: Dict[str, str] = {} 14745 14746 _path_params: Dict[str, str] = {} 14747 _query_params: List[Tuple[str, str]] = [] 14748 _header_params: Dict[str, Optional[str]] = _headers or {} 14749 _form_params: List[Tuple[str, str]] = [] 14750 _files: Dict[str, str] = {} 14751 _body_params: Optional[bytes] = None 14752 14753 # process the path parameters 14754 if org_id is not None: 14755 _path_params["org_id"] = org_id 14756 if group_id is not None: 14757 _path_params["group_id"] = group_id 14758 # process the query parameters 14759 # process the header parameters 14760 # process the form parameters 14761 # process the body parameter 14762 if update_group_request is not None: 14763 _body_params = update_group_request 14764 14765 # set the HTTP header `Accept` 14766 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14767 14768 # set the HTTP header `Content-Type` 14769 if _content_type: 14770 _header_params["Content-Type"] = _content_type 14771 else: 14772 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 14773 if _default_content_type is not None: 14774 _header_params["Content-Type"] = _default_content_type 14775 14776 # authentication setting 14777 _auth_settings: List[str] = [] 14778 14779 return self.api_client.param_serialize( 14780 method="PATCH", 14781 resource_path="/v2/orgs/{org_id}/groups/{group_id}", 14782 path_params=_path_params, 14783 query_params=_query_params, 14784 header_params=_header_params, 14785 body=_body_params, 14786 post_params=_form_params, 14787 files=_files, 14788 auth_settings=_auth_settings, 14789 collection_formats=_collection_formats, 14790 _host=_host, 14791 _request_auth=_request_auth, 14792 ) 14793 14794 @validate_call 14795 def create_app_card_item( 14796 self, 14797 board_id: Annotated[ 14798 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 14799 ], 14800 app_card_create_request: AppCardCreateRequest, 14801 _request_timeout: Union[ 14802 None, 14803 Annotated[StrictFloat, Field(gt=0)], 14804 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14805 ] = None, 14806 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14807 _content_type: Optional[StrictStr] = None, 14808 _headers: Optional[Dict[StrictStr, Any]] = None, 14809 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14810 ) -> AppCardItem: 14811 """Create app card item 14812 14813 Adds an app card item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 14814 14815 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 14816 :type board_id: str 14817 :param app_card_create_request: (required) 14818 :type app_card_create_request: AppCardCreateRequest 14819 :param _request_timeout: timeout setting for this request. If one 14820 number provided, it will be total request 14821 timeout. It can also be a pair (tuple) of 14822 (connection, read) timeouts. 14823 :type _request_timeout: int, tuple(int, int), optional 14824 :param _request_auth: set to override the auth_settings for an a single 14825 request; this effectively ignores the 14826 authentication in the spec for a single request. 14827 :type _request_auth: dict, optional 14828 :param _content_type: force content-type for the request. 14829 :type _content_type: str, Optional 14830 :param _headers: set to override the headers for a single 14831 request; this effectively ignores the headers 14832 in the spec for a single request. 14833 :type _headers: dict, optional 14834 :param _host_index: set to override the host_index for a single 14835 request; this effectively ignores the host_index 14836 in the spec for a single request. 14837 :type _host_index: int, optional 14838 :return: Returns the result object. 14839 """ # noqa: E501 14840 14841 _param = self._create_app_card_item_serialize( 14842 board_id=board_id, 14843 app_card_create_request=app_card_create_request, 14844 _request_auth=_request_auth, 14845 _content_type=_content_type, 14846 _headers=_headers, 14847 _host_index=_host_index, 14848 ) 14849 14850 _response_types_map: Dict[str, Optional[str]] = { 14851 "201": "AppCardItem", 14852 "400": None, 14853 "404": None, 14854 "429": None, 14855 } 14856 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14857 response_data.read() 14858 return self.api_client.response_deserialize( 14859 response_data=response_data, 14860 response_types_map=_response_types_map, 14861 ).data 14862 14863 def _create_app_card_item_serialize( 14864 self, 14865 board_id, 14866 app_card_create_request, 14867 _request_auth, 14868 _content_type, 14869 _headers, 14870 _host_index, 14871 ) -> RequestSerialized: 14872 14873 _host = None 14874 14875 _collection_formats: Dict[str, str] = {} 14876 14877 _path_params: Dict[str, str] = {} 14878 _query_params: List[Tuple[str, str]] = [] 14879 _header_params: Dict[str, Optional[str]] = _headers or {} 14880 _form_params: List[Tuple[str, str]] = [] 14881 _files: Dict[str, str] = {} 14882 _body_params: Optional[bytes] = None 14883 14884 # process the path parameters 14885 if board_id is not None: 14886 _path_params["board_id"] = board_id 14887 # process the query parameters 14888 # process the header parameters 14889 # process the form parameters 14890 # process the body parameter 14891 if app_card_create_request is not None: 14892 _body_params = app_card_create_request 14893 14894 # set the HTTP header `Accept` 14895 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14896 14897 # set the HTTP header `Content-Type` 14898 if _content_type: 14899 _header_params["Content-Type"] = _content_type 14900 else: 14901 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 14902 if _default_content_type is not None: 14903 _header_params["Content-Type"] = _default_content_type 14904 14905 # authentication setting 14906 _auth_settings: List[str] = [] 14907 14908 return self.api_client.param_serialize( 14909 method="POST", 14910 resource_path="/v2/boards/{board_id}/app_cards", 14911 path_params=_path_params, 14912 query_params=_query_params, 14913 header_params=_header_params, 14914 body=_body_params, 14915 post_params=_form_params, 14916 files=_files, 14917 auth_settings=_auth_settings, 14918 collection_formats=_collection_formats, 14919 _host=_host, 14920 _request_auth=_request_auth, 14921 ) 14922 14923 @validate_call 14924 def delete_app_card_item( 14925 self, 14926 board_id: Annotated[ 14927 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete an item.") 14928 ], 14929 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 14930 _request_timeout: Union[ 14931 None, 14932 Annotated[StrictFloat, Field(gt=0)], 14933 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14934 ] = None, 14935 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14936 _content_type: Optional[StrictStr] = None, 14937 _headers: Optional[Dict[StrictStr, Any]] = None, 14938 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14939 ) -> object: 14940 """Delete app card item 14941 14942 Deletes an app card item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 14943 14944 :param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) 14945 :type board_id: str 14946 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 14947 :type item_id: str 14948 :param _request_timeout: timeout setting for this request. If one 14949 number provided, it will be total request 14950 timeout. It can also be a pair (tuple) of 14951 (connection, read) timeouts. 14952 :type _request_timeout: int, tuple(int, int), optional 14953 :param _request_auth: set to override the auth_settings for an a single 14954 request; this effectively ignores the 14955 authentication in the spec for a single request. 14956 :type _request_auth: dict, optional 14957 :param _content_type: force content-type for the request. 14958 :type _content_type: str, Optional 14959 :param _headers: set to override the headers for a single 14960 request; this effectively ignores the headers 14961 in the spec for a single request. 14962 :type _headers: dict, optional 14963 :param _host_index: set to override the host_index for a single 14964 request; this effectively ignores the host_index 14965 in the spec for a single request. 14966 :type _host_index: int, optional 14967 :return: Returns the result object. 14968 """ # noqa: E501 14969 14970 _param = self._delete_app_card_item_serialize( 14971 board_id=board_id, 14972 item_id=item_id, 14973 _request_auth=_request_auth, 14974 _content_type=_content_type, 14975 _headers=_headers, 14976 _host_index=_host_index, 14977 ) 14978 14979 _response_types_map: Dict[str, Optional[str]] = { 14980 "204": "object", 14981 "400": None, 14982 "404": None, 14983 "429": None, 14984 } 14985 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14986 response_data.read() 14987 return self.api_client.response_deserialize( 14988 response_data=response_data, 14989 response_types_map=_response_types_map, 14990 ).data 14991 14992 def _delete_app_card_item_serialize( 14993 self, 14994 board_id, 14995 item_id, 14996 _request_auth, 14997 _content_type, 14998 _headers, 14999 _host_index, 15000 ) -> RequestSerialized: 15001 15002 _host = None 15003 15004 _collection_formats: Dict[str, str] = {} 15005 15006 _path_params: Dict[str, str] = {} 15007 _query_params: List[Tuple[str, str]] = [] 15008 _header_params: Dict[str, Optional[str]] = _headers or {} 15009 _form_params: List[Tuple[str, str]] = [] 15010 _files: Dict[str, str] = {} 15011 _body_params: Optional[bytes] = None 15012 15013 # process the path parameters 15014 if board_id is not None: 15015 _path_params["board_id"] = board_id 15016 if item_id is not None: 15017 _path_params["item_id"] = item_id 15018 # process the query parameters 15019 # process the header parameters 15020 # process the form parameters 15021 # process the body parameter 15022 15023 # set the HTTP header `Accept` 15024 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15025 15026 # authentication setting 15027 _auth_settings: List[str] = [] 15028 15029 return self.api_client.param_serialize( 15030 method="DELETE", 15031 resource_path="/v2/boards/{board_id}/app_cards/{item_id}", 15032 path_params=_path_params, 15033 query_params=_query_params, 15034 header_params=_header_params, 15035 body=_body_params, 15036 post_params=_form_params, 15037 files=_files, 15038 auth_settings=_auth_settings, 15039 collection_formats=_collection_formats, 15040 _host=_host, 15041 _request_auth=_request_auth, 15042 ) 15043 15044 @validate_call 15045 def get_app_card_item( 15046 self, 15047 board_id: Annotated[ 15048 StrictStr, 15049 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 15050 ], 15051 item_id: Annotated[ 15052 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 15053 ], 15054 _request_timeout: Union[ 15055 None, 15056 Annotated[StrictFloat, Field(gt=0)], 15057 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15058 ] = None, 15059 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15060 _content_type: Optional[StrictStr] = None, 15061 _headers: Optional[Dict[StrictStr, Any]] = None, 15062 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15063 ) -> AppCardItem: 15064 """Get app card item 15065 15066 Retrieves information for a specific app card item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15067 15068 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 15069 :type board_id: str 15070 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 15071 :type item_id: str 15072 :param _request_timeout: timeout setting for this request. If one 15073 number provided, it will be total request 15074 timeout. It can also be a pair (tuple) of 15075 (connection, read) timeouts. 15076 :type _request_timeout: int, tuple(int, int), optional 15077 :param _request_auth: set to override the auth_settings for an a single 15078 request; this effectively ignores the 15079 authentication in the spec for a single request. 15080 :type _request_auth: dict, optional 15081 :param _content_type: force content-type for the request. 15082 :type _content_type: str, Optional 15083 :param _headers: set to override the headers for a single 15084 request; this effectively ignores the headers 15085 in the spec for a single request. 15086 :type _headers: dict, optional 15087 :param _host_index: set to override the host_index for a single 15088 request; this effectively ignores the host_index 15089 in the spec for a single request. 15090 :type _host_index: int, optional 15091 :return: Returns the result object. 15092 """ # noqa: E501 15093 15094 _param = self._get_app_card_item_serialize( 15095 board_id=board_id, 15096 item_id=item_id, 15097 _request_auth=_request_auth, 15098 _content_type=_content_type, 15099 _headers=_headers, 15100 _host_index=_host_index, 15101 ) 15102 15103 _response_types_map: Dict[str, Optional[str]] = { 15104 "200": "AppCardItem", 15105 "400": None, 15106 "404": None, 15107 "429": None, 15108 } 15109 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15110 response_data.read() 15111 return self.api_client.response_deserialize( 15112 response_data=response_data, 15113 response_types_map=_response_types_map, 15114 ).data 15115 15116 def _get_app_card_item_serialize( 15117 self, 15118 board_id, 15119 item_id, 15120 _request_auth, 15121 _content_type, 15122 _headers, 15123 _host_index, 15124 ) -> RequestSerialized: 15125 15126 _host = None 15127 15128 _collection_formats: Dict[str, str] = {} 15129 15130 _path_params: Dict[str, str] = {} 15131 _query_params: List[Tuple[str, str]] = [] 15132 _header_params: Dict[str, Optional[str]] = _headers or {} 15133 _form_params: List[Tuple[str, str]] = [] 15134 _files: Dict[str, str] = {} 15135 _body_params: Optional[bytes] = None 15136 15137 # process the path parameters 15138 if board_id is not None: 15139 _path_params["board_id"] = board_id 15140 if item_id is not None: 15141 _path_params["item_id"] = item_id 15142 # process the query parameters 15143 # process the header parameters 15144 # process the form parameters 15145 # process the body parameter 15146 15147 # set the HTTP header `Accept` 15148 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15149 15150 # authentication setting 15151 _auth_settings: List[str] = [] 15152 15153 return self.api_client.param_serialize( 15154 method="GET", 15155 resource_path="/v2/boards/{board_id}/app_cards/{item_id}", 15156 path_params=_path_params, 15157 query_params=_query_params, 15158 header_params=_header_params, 15159 body=_body_params, 15160 post_params=_form_params, 15161 files=_files, 15162 auth_settings=_auth_settings, 15163 collection_formats=_collection_formats, 15164 _host=_host, 15165 _request_auth=_request_auth, 15166 ) 15167 15168 @validate_call 15169 def update_app_card_item( 15170 self, 15171 board_id: Annotated[ 15172 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 15173 ], 15174 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 15175 app_card_update_request: AppCardUpdateRequest, 15176 _request_timeout: Union[ 15177 None, 15178 Annotated[StrictFloat, Field(gt=0)], 15179 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15180 ] = None, 15181 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15182 _content_type: Optional[StrictStr] = None, 15183 _headers: Optional[Dict[StrictStr, Any]] = None, 15184 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15185 ) -> AppCardItem: 15186 """Update app card item 15187 15188 Updates an app card item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15189 15190 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 15191 :type board_id: str 15192 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 15193 :type item_id: str 15194 :param app_card_update_request: (required) 15195 :type app_card_update_request: AppCardUpdateRequest 15196 :param _request_timeout: timeout setting for this request. If one 15197 number provided, it will be total request 15198 timeout. It can also be a pair (tuple) of 15199 (connection, read) timeouts. 15200 :type _request_timeout: int, tuple(int, int), optional 15201 :param _request_auth: set to override the auth_settings for an a single 15202 request; this effectively ignores the 15203 authentication in the spec for a single request. 15204 :type _request_auth: dict, optional 15205 :param _content_type: force content-type for the request. 15206 :type _content_type: str, Optional 15207 :param _headers: set to override the headers for a single 15208 request; this effectively ignores the headers 15209 in the spec for a single request. 15210 :type _headers: dict, optional 15211 :param _host_index: set to override the host_index for a single 15212 request; this effectively ignores the host_index 15213 in the spec for a single request. 15214 :type _host_index: int, optional 15215 :return: Returns the result object. 15216 """ # noqa: E501 15217 15218 _param = self._update_app_card_item_serialize( 15219 board_id=board_id, 15220 item_id=item_id, 15221 app_card_update_request=app_card_update_request, 15222 _request_auth=_request_auth, 15223 _content_type=_content_type, 15224 _headers=_headers, 15225 _host_index=_host_index, 15226 ) 15227 15228 _response_types_map: Dict[str, Optional[str]] = { 15229 "200": "AppCardItem", 15230 "400": None, 15231 "404": None, 15232 "409": None, 15233 "429": None, 15234 } 15235 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15236 response_data.read() 15237 return self.api_client.response_deserialize( 15238 response_data=response_data, 15239 response_types_map=_response_types_map, 15240 ).data 15241 15242 def _update_app_card_item_serialize( 15243 self, 15244 board_id, 15245 item_id, 15246 app_card_update_request, 15247 _request_auth, 15248 _content_type, 15249 _headers, 15250 _host_index, 15251 ) -> RequestSerialized: 15252 15253 _host = None 15254 15255 _collection_formats: Dict[str, str] = {} 15256 15257 _path_params: Dict[str, str] = {} 15258 _query_params: List[Tuple[str, str]] = [] 15259 _header_params: Dict[str, Optional[str]] = _headers or {} 15260 _form_params: List[Tuple[str, str]] = [] 15261 _files: Dict[str, str] = {} 15262 _body_params: Optional[bytes] = None 15263 15264 # process the path parameters 15265 if board_id is not None: 15266 _path_params["board_id"] = board_id 15267 if item_id is not None: 15268 _path_params["item_id"] = item_id 15269 # process the query parameters 15270 # process the header parameters 15271 # process the form parameters 15272 # process the body parameter 15273 if app_card_update_request is not None: 15274 _body_params = app_card_update_request 15275 15276 # set the HTTP header `Accept` 15277 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15278 15279 # set the HTTP header `Content-Type` 15280 if _content_type: 15281 _header_params["Content-Type"] = _content_type 15282 else: 15283 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 15284 if _default_content_type is not None: 15285 _header_params["Content-Type"] = _default_content_type 15286 15287 # authentication setting 15288 _auth_settings: List[str] = [] 15289 15290 return self.api_client.param_serialize( 15291 method="PATCH", 15292 resource_path="/v2/boards/{board_id}/app_cards/{item_id}", 15293 path_params=_path_params, 15294 query_params=_query_params, 15295 header_params=_header_params, 15296 body=_body_params, 15297 post_params=_form_params, 15298 files=_files, 15299 auth_settings=_auth_settings, 15300 collection_formats=_collection_formats, 15301 _host=_host, 15302 _request_auth=_request_auth, 15303 ) 15304 15305 @validate_call 15306 def get_board_members( 15307 self, 15308 board_id: Annotated[ 15309 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15310 ], 15311 limit: Optional[Annotated[str, Field(strict=True)]] = None, 15312 offset: Optional[StrictStr] = None, 15313 _request_timeout: Union[ 15314 None, 15315 Annotated[StrictFloat, Field(gt=0)], 15316 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15317 ] = None, 15318 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15319 _content_type: Optional[StrictStr] = None, 15320 _headers: Optional[Dict[StrictStr, Any]] = None, 15321 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15322 ) -> BoardMembersPagedResponse: 15323 """Get all board members 15324 15325 Retrieves a pageable list of members for a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15326 15327 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15328 :type board_id: str 15329 :param limit: 15330 :type limit: str 15331 :param offset: 15332 :type offset: str 15333 :param _request_timeout: timeout setting for this request. If one 15334 number provided, it will be total request 15335 timeout. It can also be a pair (tuple) of 15336 (connection, read) timeouts. 15337 :type _request_timeout: int, tuple(int, int), optional 15338 :param _request_auth: set to override the auth_settings for an a single 15339 request; this effectively ignores the 15340 authentication in the spec for a single request. 15341 :type _request_auth: dict, optional 15342 :param _content_type: force content-type for the request. 15343 :type _content_type: str, Optional 15344 :param _headers: set to override the headers for a single 15345 request; this effectively ignores the headers 15346 in the spec for a single request. 15347 :type _headers: dict, optional 15348 :param _host_index: set to override the host_index for a single 15349 request; this effectively ignores the host_index 15350 in the spec for a single request. 15351 :type _host_index: int, optional 15352 :return: Returns the result object. 15353 """ # noqa: E501 15354 15355 _param = self._get_board_members_serialize( 15356 board_id=board_id, 15357 limit=limit, 15358 offset=offset, 15359 _request_auth=_request_auth, 15360 _content_type=_content_type, 15361 _headers=_headers, 15362 _host_index=_host_index, 15363 ) 15364 15365 _response_types_map: Dict[str, Optional[str]] = { 15366 "200": "BoardMembersPagedResponse", 15367 "400": None, 15368 "404": None, 15369 "429": None, 15370 } 15371 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15372 response_data.read() 15373 return self.api_client.response_deserialize( 15374 response_data=response_data, 15375 response_types_map=_response_types_map, 15376 ).data 15377 15378 def _get_board_members_serialize( 15379 self, 15380 board_id, 15381 limit, 15382 offset, 15383 _request_auth, 15384 _content_type, 15385 _headers, 15386 _host_index, 15387 ) -> RequestSerialized: 15388 15389 _host = None 15390 15391 _collection_formats: Dict[str, str] = {} 15392 15393 _path_params: Dict[str, str] = {} 15394 _query_params: List[Tuple[str, str]] = [] 15395 _header_params: Dict[str, Optional[str]] = _headers or {} 15396 _form_params: List[Tuple[str, str]] = [] 15397 _files: Dict[str, str] = {} 15398 _body_params: Optional[bytes] = None 15399 15400 # process the path parameters 15401 if board_id is not None: 15402 _path_params["board_id"] = board_id 15403 # process the query parameters 15404 if limit is not None: 15405 15406 _query_params.append(("limit", limit)) 15407 15408 if offset is not None: 15409 15410 _query_params.append(("offset", offset)) 15411 15412 # process the header parameters 15413 # process the form parameters 15414 # process the body parameter 15415 15416 # set the HTTP header `Accept` 15417 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15418 15419 # authentication setting 15420 _auth_settings: List[str] = [] 15421 15422 return self.api_client.param_serialize( 15423 method="GET", 15424 resource_path="/v2/boards/{board_id}/members", 15425 path_params=_path_params, 15426 query_params=_query_params, 15427 header_params=_header_params, 15428 body=_body_params, 15429 post_params=_form_params, 15430 files=_files, 15431 auth_settings=_auth_settings, 15432 collection_formats=_collection_formats, 15433 _host=_host, 15434 _request_auth=_request_auth, 15435 ) 15436 15437 @validate_call 15438 def get_specific_board_member( 15439 self, 15440 board_id: Annotated[ 15441 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15442 ], 15443 board_member_id: Annotated[ 15444 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to retrieve.") 15445 ], 15446 _request_timeout: Union[ 15447 None, 15448 Annotated[StrictFloat, Field(gt=0)], 15449 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15450 ] = None, 15451 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15452 _content_type: Optional[StrictStr] = None, 15453 _headers: Optional[Dict[StrictStr, Any]] = None, 15454 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15455 ) -> BoardMemberWithLinks: 15456 """Get specific board member 15457 15458 Retrieves information for a board member.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15459 15460 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15461 :type board_id: str 15462 :param board_member_id: Unique identifier (ID) of the board member whose role you want to retrieve. (required) 15463 :type board_member_id: str 15464 :param _request_timeout: timeout setting for this request. If one 15465 number provided, it will be total request 15466 timeout. It can also be a pair (tuple) of 15467 (connection, read) timeouts. 15468 :type _request_timeout: int, tuple(int, int), optional 15469 :param _request_auth: set to override the auth_settings for an a single 15470 request; this effectively ignores the 15471 authentication in the spec for a single request. 15472 :type _request_auth: dict, optional 15473 :param _content_type: force content-type for the request. 15474 :type _content_type: str, Optional 15475 :param _headers: set to override the headers for a single 15476 request; this effectively ignores the headers 15477 in the spec for a single request. 15478 :type _headers: dict, optional 15479 :param _host_index: set to override the host_index for a single 15480 request; this effectively ignores the host_index 15481 in the spec for a single request. 15482 :type _host_index: int, optional 15483 :return: Returns the result object. 15484 """ # noqa: E501 15485 15486 _param = self._get_specific_board_member_serialize( 15487 board_id=board_id, 15488 board_member_id=board_member_id, 15489 _request_auth=_request_auth, 15490 _content_type=_content_type, 15491 _headers=_headers, 15492 _host_index=_host_index, 15493 ) 15494 15495 _response_types_map: Dict[str, Optional[str]] = { 15496 "200": "BoardMemberWithLinks", 15497 "400": None, 15498 "404": None, 15499 "429": None, 15500 } 15501 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15502 response_data.read() 15503 return self.api_client.response_deserialize( 15504 response_data=response_data, 15505 response_types_map=_response_types_map, 15506 ).data 15507 15508 def _get_specific_board_member_serialize( 15509 self, 15510 board_id, 15511 board_member_id, 15512 _request_auth, 15513 _content_type, 15514 _headers, 15515 _host_index, 15516 ) -> RequestSerialized: 15517 15518 _host = None 15519 15520 _collection_formats: Dict[str, str] = {} 15521 15522 _path_params: Dict[str, str] = {} 15523 _query_params: List[Tuple[str, str]] = [] 15524 _header_params: Dict[str, Optional[str]] = _headers or {} 15525 _form_params: List[Tuple[str, str]] = [] 15526 _files: Dict[str, str] = {} 15527 _body_params: Optional[bytes] = None 15528 15529 # process the path parameters 15530 if board_id is not None: 15531 _path_params["board_id"] = board_id 15532 if board_member_id is not None: 15533 _path_params["board_member_id"] = board_member_id 15534 # process the query parameters 15535 # process the header parameters 15536 # process the form parameters 15537 # process the body parameter 15538 15539 # set the HTTP header `Accept` 15540 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15541 15542 # authentication setting 15543 _auth_settings: List[str] = [] 15544 15545 return self.api_client.param_serialize( 15546 method="GET", 15547 resource_path="/v2/boards/{board_id}/members/{board_member_id}", 15548 path_params=_path_params, 15549 query_params=_query_params, 15550 header_params=_header_params, 15551 body=_body_params, 15552 post_params=_form_params, 15553 files=_files, 15554 auth_settings=_auth_settings, 15555 collection_formats=_collection_formats, 15556 _host=_host, 15557 _request_auth=_request_auth, 15558 ) 15559 15560 @validate_call 15561 def remove_board_member( 15562 self, 15563 board_id: Annotated[ 15564 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete an item.") 15565 ], 15566 board_member_id: Annotated[ 15567 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to delete.") 15568 ], 15569 _request_timeout: Union[ 15570 None, 15571 Annotated[StrictFloat, Field(gt=0)], 15572 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15573 ] = None, 15574 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15575 _content_type: Optional[StrictStr] = None, 15576 _headers: Optional[Dict[StrictStr, Any]] = None, 15577 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15578 ) -> object: 15579 """Remove board member 15580 15581 Removes a board member from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15582 15583 :param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) 15584 :type board_id: str 15585 :param board_member_id: Unique identifier (ID) of the board member whose role you want to delete. (required) 15586 :type board_member_id: str 15587 :param _request_timeout: timeout setting for this request. If one 15588 number provided, it will be total request 15589 timeout. It can also be a pair (tuple) of 15590 (connection, read) timeouts. 15591 :type _request_timeout: int, tuple(int, int), optional 15592 :param _request_auth: set to override the auth_settings for an a single 15593 request; this effectively ignores the 15594 authentication in the spec for a single request. 15595 :type _request_auth: dict, optional 15596 :param _content_type: force content-type for the request. 15597 :type _content_type: str, Optional 15598 :param _headers: set to override the headers for a single 15599 request; this effectively ignores the headers 15600 in the spec for a single request. 15601 :type _headers: dict, optional 15602 :param _host_index: set to override the host_index for a single 15603 request; this effectively ignores the host_index 15604 in the spec for a single request. 15605 :type _host_index: int, optional 15606 :return: Returns the result object. 15607 """ # noqa: E501 15608 15609 _param = self._remove_board_member_serialize( 15610 board_id=board_id, 15611 board_member_id=board_member_id, 15612 _request_auth=_request_auth, 15613 _content_type=_content_type, 15614 _headers=_headers, 15615 _host_index=_host_index, 15616 ) 15617 15618 _response_types_map: Dict[str, Optional[str]] = { 15619 "204": "object", 15620 "400": None, 15621 "404": None, 15622 "429": None, 15623 } 15624 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15625 response_data.read() 15626 return self.api_client.response_deserialize( 15627 response_data=response_data, 15628 response_types_map=_response_types_map, 15629 ).data 15630 15631 def _remove_board_member_serialize( 15632 self, 15633 board_id, 15634 board_member_id, 15635 _request_auth, 15636 _content_type, 15637 _headers, 15638 _host_index, 15639 ) -> RequestSerialized: 15640 15641 _host = None 15642 15643 _collection_formats: Dict[str, str] = {} 15644 15645 _path_params: Dict[str, str] = {} 15646 _query_params: List[Tuple[str, str]] = [] 15647 _header_params: Dict[str, Optional[str]] = _headers or {} 15648 _form_params: List[Tuple[str, str]] = [] 15649 _files: Dict[str, str] = {} 15650 _body_params: Optional[bytes] = None 15651 15652 # process the path parameters 15653 if board_id is not None: 15654 _path_params["board_id"] = board_id 15655 if board_member_id is not None: 15656 _path_params["board_member_id"] = board_member_id 15657 # process the query parameters 15658 # process the header parameters 15659 # process the form parameters 15660 # process the body parameter 15661 15662 # set the HTTP header `Accept` 15663 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15664 15665 # authentication setting 15666 _auth_settings: List[str] = [] 15667 15668 return self.api_client.param_serialize( 15669 method="DELETE", 15670 resource_path="/v2/boards/{board_id}/members/{board_member_id}", 15671 path_params=_path_params, 15672 query_params=_query_params, 15673 header_params=_header_params, 15674 body=_body_params, 15675 post_params=_form_params, 15676 files=_files, 15677 auth_settings=_auth_settings, 15678 collection_formats=_collection_formats, 15679 _host=_host, 15680 _request_auth=_request_auth, 15681 ) 15682 15683 @validate_call 15684 def share_board( 15685 self, 15686 board_id: Annotated[ 15687 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15688 ], 15689 board_members_invite: BoardMembersInvite, 15690 _request_timeout: Union[ 15691 None, 15692 Annotated[StrictFloat, Field(gt=0)], 15693 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15694 ] = None, 15695 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15696 _content_type: Optional[StrictStr] = None, 15697 _headers: Optional[Dict[StrictStr, Any]] = None, 15698 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15699 ) -> InvitationResult: 15700 """Share board 15701 15702 Shares the board and Invites new members to collaborate on a board by sending an invitation email. Depending on the board's Sharing policy, there might be various scenarios where membership in the team is required in order to share the board with a user.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 15703 15704 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15705 :type board_id: str 15706 :param board_members_invite: (required) 15707 :type board_members_invite: BoardMembersInvite 15708 :param _request_timeout: timeout setting for this request. If one 15709 number provided, it will be total request 15710 timeout. It can also be a pair (tuple) of 15711 (connection, read) timeouts. 15712 :type _request_timeout: int, tuple(int, int), optional 15713 :param _request_auth: set to override the auth_settings for an a single 15714 request; this effectively ignores the 15715 authentication in the spec for a single request. 15716 :type _request_auth: dict, optional 15717 :param _content_type: force content-type for the request. 15718 :type _content_type: str, Optional 15719 :param _headers: set to override the headers for a single 15720 request; this effectively ignores the headers 15721 in the spec for a single request. 15722 :type _headers: dict, optional 15723 :param _host_index: set to override the host_index for a single 15724 request; this effectively ignores the host_index 15725 in the spec for a single request. 15726 :type _host_index: int, optional 15727 :return: Returns the result object. 15728 """ # noqa: E501 15729 15730 _param = self._share_board_serialize( 15731 board_id=board_id, 15732 board_members_invite=board_members_invite, 15733 _request_auth=_request_auth, 15734 _content_type=_content_type, 15735 _headers=_headers, 15736 _host_index=_host_index, 15737 ) 15738 15739 _response_types_map: Dict[str, Optional[str]] = { 15740 "201": "InvitationResult", 15741 "400": None, 15742 "404": None, 15743 "429": None, 15744 } 15745 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15746 response_data.read() 15747 return self.api_client.response_deserialize( 15748 response_data=response_data, 15749 response_types_map=_response_types_map, 15750 ).data 15751 15752 def _share_board_serialize( 15753 self, 15754 board_id, 15755 board_members_invite, 15756 _request_auth, 15757 _content_type, 15758 _headers, 15759 _host_index, 15760 ) -> RequestSerialized: 15761 15762 _host = None 15763 15764 _collection_formats: Dict[str, str] = {} 15765 15766 _path_params: Dict[str, str] = {} 15767 _query_params: List[Tuple[str, str]] = [] 15768 _header_params: Dict[str, Optional[str]] = _headers or {} 15769 _form_params: List[Tuple[str, str]] = [] 15770 _files: Dict[str, str] = {} 15771 _body_params: Optional[bytes] = None 15772 15773 # process the path parameters 15774 if board_id is not None: 15775 _path_params["board_id"] = board_id 15776 # process the query parameters 15777 # process the header parameters 15778 # process the form parameters 15779 # process the body parameter 15780 if board_members_invite is not None: 15781 _body_params = board_members_invite 15782 15783 # set the HTTP header `Accept` 15784 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15785 15786 # set the HTTP header `Content-Type` 15787 if _content_type: 15788 _header_params["Content-Type"] = _content_type 15789 else: 15790 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 15791 if _default_content_type is not None: 15792 _header_params["Content-Type"] = _default_content_type 15793 15794 # authentication setting 15795 _auth_settings: List[str] = [] 15796 15797 return self.api_client.param_serialize( 15798 method="POST", 15799 resource_path="/v2/boards/{board_id}/members", 15800 path_params=_path_params, 15801 query_params=_query_params, 15802 header_params=_header_params, 15803 body=_body_params, 15804 post_params=_form_params, 15805 files=_files, 15806 auth_settings=_auth_settings, 15807 collection_formats=_collection_formats, 15808 _host=_host, 15809 _request_auth=_request_auth, 15810 ) 15811 15812 @validate_call 15813 def update_board_member( 15814 self, 15815 board_id: Annotated[ 15816 StrictStr, 15817 Field( 15818 description="Unique identifier (ID) of the board for which you want to update the role of the board member." 15819 ), 15820 ], 15821 board_member_id: Annotated[ 15822 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to update.") 15823 ], 15824 board_member_changes: BoardMemberChanges, 15825 _request_timeout: Union[ 15826 None, 15827 Annotated[StrictFloat, Field(gt=0)], 15828 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15829 ] = None, 15830 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15831 _content_type: Optional[StrictStr] = None, 15832 _headers: Optional[Dict[StrictStr, Any]] = None, 15833 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15834 ) -> BoardMemberWithLinks: 15835 """Update board member 15836 15837 Updates the role of a board member.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15838 15839 :param board_id: Unique identifier (ID) of the board for which you want to update the role of the board member. (required) 15840 :type board_id: str 15841 :param board_member_id: Unique identifier (ID) of the board member whose role you want to update. (required) 15842 :type board_member_id: str 15843 :param board_member_changes: (required) 15844 :type board_member_changes: BoardMemberChanges 15845 :param _request_timeout: timeout setting for this request. If one 15846 number provided, it will be total request 15847 timeout. It can also be a pair (tuple) of 15848 (connection, read) timeouts. 15849 :type _request_timeout: int, tuple(int, int), optional 15850 :param _request_auth: set to override the auth_settings for an a single 15851 request; this effectively ignores the 15852 authentication in the spec for a single request. 15853 :type _request_auth: dict, optional 15854 :param _content_type: force content-type for the request. 15855 :type _content_type: str, Optional 15856 :param _headers: set to override the headers for a single 15857 request; this effectively ignores the headers 15858 in the spec for a single request. 15859 :type _headers: dict, optional 15860 :param _host_index: set to override the host_index for a single 15861 request; this effectively ignores the host_index 15862 in the spec for a single request. 15863 :type _host_index: int, optional 15864 :return: Returns the result object. 15865 """ # noqa: E501 15866 15867 _param = self._update_board_member_serialize( 15868 board_id=board_id, 15869 board_member_id=board_member_id, 15870 board_member_changes=board_member_changes, 15871 _request_auth=_request_auth, 15872 _content_type=_content_type, 15873 _headers=_headers, 15874 _host_index=_host_index, 15875 ) 15876 15877 _response_types_map: Dict[str, Optional[str]] = { 15878 "200": "BoardMemberWithLinks", 15879 "400": None, 15880 "404": None, 15881 "429": None, 15882 } 15883 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15884 response_data.read() 15885 return self.api_client.response_deserialize( 15886 response_data=response_data, 15887 response_types_map=_response_types_map, 15888 ).data 15889 15890 def _update_board_member_serialize( 15891 self, 15892 board_id, 15893 board_member_id, 15894 board_member_changes, 15895 _request_auth, 15896 _content_type, 15897 _headers, 15898 _host_index, 15899 ) -> RequestSerialized: 15900 15901 _host = None 15902 15903 _collection_formats: Dict[str, str] = {} 15904 15905 _path_params: Dict[str, str] = {} 15906 _query_params: List[Tuple[str, str]] = [] 15907 _header_params: Dict[str, Optional[str]] = _headers or {} 15908 _form_params: List[Tuple[str, str]] = [] 15909 _files: Dict[str, str] = {} 15910 _body_params: Optional[bytes] = None 15911 15912 # process the path parameters 15913 if board_id is not None: 15914 _path_params["board_id"] = board_id 15915 if board_member_id is not None: 15916 _path_params["board_member_id"] = board_member_id 15917 # process the query parameters 15918 # process the header parameters 15919 # process the form parameters 15920 # process the body parameter 15921 if board_member_changes is not None: 15922 _body_params = board_member_changes 15923 15924 # set the HTTP header `Accept` 15925 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15926 15927 # set the HTTP header `Content-Type` 15928 if _content_type: 15929 _header_params["Content-Type"] = _content_type 15930 else: 15931 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 15932 if _default_content_type is not None: 15933 _header_params["Content-Type"] = _default_content_type 15934 15935 # authentication setting 15936 _auth_settings: List[str] = [] 15937 15938 return self.api_client.param_serialize( 15939 method="PATCH", 15940 resource_path="/v2/boards/{board_id}/members/{board_member_id}", 15941 path_params=_path_params, 15942 query_params=_query_params, 15943 header_params=_header_params, 15944 body=_body_params, 15945 post_params=_form_params, 15946 files=_files, 15947 auth_settings=_auth_settings, 15948 collection_formats=_collection_formats, 15949 _host=_host, 15950 _request_auth=_request_auth, 15951 ) 15952 15953 @validate_call 15954 def copy_board( 15955 self, 15956 copy_from: Annotated[ 15957 StrictStr, Field(description="Unique identifier (ID) of the board that you want to copy.") 15958 ], 15959 copy_board_changes: Optional[CopyBoardChanges] = None, 15960 _request_timeout: Union[ 15961 None, 15962 Annotated[StrictFloat, Field(gt=0)], 15963 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15964 ] = None, 15965 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15966 _content_type: Optional[StrictStr] = None, 15967 _headers: Optional[Dict[StrictStr, Any]] = None, 15968 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15969 ) -> BoardWithLinksAndWithoutProject: 15970 """Copy board 15971 15972 Creates a copy of an existing board. You can also update the name, description, sharing policy, and permissions policy for the new board in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a><br/> 15973 15974 :param copy_from: Unique identifier (ID) of the board that you want to copy. (required) 15975 :type copy_from: str 15976 :param copy_board_changes: 15977 :type copy_board_changes: CopyBoardChanges 15978 :param _request_timeout: timeout setting for this request. If one 15979 number provided, it will be total request 15980 timeout. It can also be a pair (tuple) of 15981 (connection, read) timeouts. 15982 :type _request_timeout: int, tuple(int, int), optional 15983 :param _request_auth: set to override the auth_settings for an a single 15984 request; this effectively ignores the 15985 authentication in the spec for a single request. 15986 :type _request_auth: dict, optional 15987 :param _content_type: force content-type for the request. 15988 :type _content_type: str, Optional 15989 :param _headers: set to override the headers for a single 15990 request; this effectively ignores the headers 15991 in the spec for a single request. 15992 :type _headers: dict, optional 15993 :param _host_index: set to override the host_index for a single 15994 request; this effectively ignores the host_index 15995 in the spec for a single request. 15996 :type _host_index: int, optional 15997 :return: Returns the result object. 15998 """ # noqa: E501 15999 16000 _param = self._copy_board_serialize( 16001 copy_from=copy_from, 16002 copy_board_changes=copy_board_changes, 16003 _request_auth=_request_auth, 16004 _content_type=_content_type, 16005 _headers=_headers, 16006 _host_index=_host_index, 16007 ) 16008 16009 _response_types_map: Dict[str, Optional[str]] = { 16010 "201": "BoardWithLinksAndWithoutProject", 16011 "400": None, 16012 "404": None, 16013 "409": None, 16014 "429": None, 16015 } 16016 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16017 response_data.read() 16018 return self.api_client.response_deserialize( 16019 response_data=response_data, 16020 response_types_map=_response_types_map, 16021 ).data 16022 16023 def _copy_board_serialize( 16024 self, 16025 copy_from, 16026 copy_board_changes, 16027 _request_auth, 16028 _content_type, 16029 _headers, 16030 _host_index, 16031 ) -> RequestSerialized: 16032 16033 _host = None 16034 16035 _collection_formats: Dict[str, str] = {} 16036 16037 _path_params: Dict[str, str] = {} 16038 _query_params: List[Tuple[str, str]] = [] 16039 _header_params: Dict[str, Optional[str]] = _headers or {} 16040 _form_params: List[Tuple[str, str]] = [] 16041 _files: Dict[str, str] = {} 16042 _body_params: Optional[bytes] = None 16043 16044 # process the path parameters 16045 # process the query parameters 16046 if copy_from is not None: 16047 16048 _query_params.append(("copy_from", copy_from)) 16049 16050 # process the header parameters 16051 # process the form parameters 16052 # process the body parameter 16053 if copy_board_changes is not None: 16054 _body_params = copy_board_changes 16055 16056 # set the HTTP header `Accept` 16057 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16058 16059 # set the HTTP header `Content-Type` 16060 if _content_type: 16061 _header_params["Content-Type"] = _content_type 16062 else: 16063 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16064 if _default_content_type is not None: 16065 _header_params["Content-Type"] = _default_content_type 16066 16067 # authentication setting 16068 _auth_settings: List[str] = [] 16069 16070 return self.api_client.param_serialize( 16071 method="PUT", 16072 resource_path="/v2/boards", 16073 path_params=_path_params, 16074 query_params=_query_params, 16075 header_params=_header_params, 16076 body=_body_params, 16077 post_params=_form_params, 16078 files=_files, 16079 auth_settings=_auth_settings, 16080 collection_formats=_collection_formats, 16081 _host=_host, 16082 _request_auth=_request_auth, 16083 ) 16084 16085 @validate_call 16086 def create_board( 16087 self, 16088 board_changes: Optional[BoardChanges] = None, 16089 _request_timeout: Union[ 16090 None, 16091 Annotated[StrictFloat, Field(gt=0)], 16092 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16093 ] = None, 16094 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16095 _content_type: Optional[StrictStr] = None, 16096 _headers: Optional[Dict[StrictStr, Any]] = None, 16097 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16098 ) -> BoardWithLinks: 16099 """Create board 16100 16101 Creates a board with the specified name and sharing policies.<br/><h4>Note</h4> You can only create up to 3 team boards with the free plan.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16102 16103 :param board_changes: 16104 :type board_changes: BoardChanges 16105 :param _request_timeout: timeout setting for this request. If one 16106 number provided, it will be total request 16107 timeout. It can also be a pair (tuple) of 16108 (connection, read) timeouts. 16109 :type _request_timeout: int, tuple(int, int), optional 16110 :param _request_auth: set to override the auth_settings for an a single 16111 request; this effectively ignores the 16112 authentication in the spec for a single request. 16113 :type _request_auth: dict, optional 16114 :param _content_type: force content-type for the request. 16115 :type _content_type: str, Optional 16116 :param _headers: set to override the headers for a single 16117 request; this effectively ignores the headers 16118 in the spec for a single request. 16119 :type _headers: dict, optional 16120 :param _host_index: set to override the host_index for a single 16121 request; this effectively ignores the host_index 16122 in the spec for a single request. 16123 :type _host_index: int, optional 16124 :return: Returns the result object. 16125 """ # noqa: E501 16126 16127 _param = self._create_board_serialize( 16128 board_changes=board_changes, 16129 _request_auth=_request_auth, 16130 _content_type=_content_type, 16131 _headers=_headers, 16132 _host_index=_host_index, 16133 ) 16134 16135 _response_types_map: Dict[str, Optional[str]] = { 16136 "201": "BoardWithLinks", 16137 "400": None, 16138 "404": None, 16139 "409": None, 16140 "429": None, 16141 } 16142 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16143 response_data.read() 16144 return self.api_client.response_deserialize( 16145 response_data=response_data, 16146 response_types_map=_response_types_map, 16147 ).data 16148 16149 def _create_board_serialize( 16150 self, 16151 board_changes, 16152 _request_auth, 16153 _content_type, 16154 _headers, 16155 _host_index, 16156 ) -> RequestSerialized: 16157 16158 _host = None 16159 16160 _collection_formats: Dict[str, str] = {} 16161 16162 _path_params: Dict[str, str] = {} 16163 _query_params: List[Tuple[str, str]] = [] 16164 _header_params: Dict[str, Optional[str]] = _headers or {} 16165 _form_params: List[Tuple[str, str]] = [] 16166 _files: Dict[str, str] = {} 16167 _body_params: Optional[bytes] = None 16168 16169 # process the path parameters 16170 # process the query parameters 16171 # process the header parameters 16172 # process the form parameters 16173 # process the body parameter 16174 if board_changes is not None: 16175 _body_params = board_changes 16176 16177 # set the HTTP header `Accept` 16178 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16179 16180 # set the HTTP header `Content-Type` 16181 if _content_type: 16182 _header_params["Content-Type"] = _content_type 16183 else: 16184 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16185 if _default_content_type is not None: 16186 _header_params["Content-Type"] = _default_content_type 16187 16188 # authentication setting 16189 _auth_settings: List[str] = [] 16190 16191 return self.api_client.param_serialize( 16192 method="POST", 16193 resource_path="/v2/boards", 16194 path_params=_path_params, 16195 query_params=_query_params, 16196 header_params=_header_params, 16197 body=_body_params, 16198 post_params=_form_params, 16199 files=_files, 16200 auth_settings=_auth_settings, 16201 collection_formats=_collection_formats, 16202 _host=_host, 16203 _request_auth=_request_auth, 16204 ) 16205 16206 @validate_call 16207 def delete_board( 16208 self, 16209 board_id: Annotated[ 16210 StrictStr, Field(description="Unique identifier (ID) of the board that you want to delete.") 16211 ], 16212 _request_timeout: Union[ 16213 None, 16214 Annotated[StrictFloat, Field(gt=0)], 16215 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16216 ] = None, 16217 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16218 _content_type: Optional[StrictStr] = None, 16219 _headers: Optional[Dict[StrictStr, Any]] = None, 16220 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16221 ) -> object: 16222 """Delete board 16223 16224 Deletes a board. Deleted boards go to Trash (on paid plans) and can be restored via UI within 90 days after deletion.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16225 16226 :param board_id: Unique identifier (ID) of the board that you want to delete. (required) 16227 :type board_id: str 16228 :param _request_timeout: timeout setting for this request. If one 16229 number provided, it will be total request 16230 timeout. It can also be a pair (tuple) of 16231 (connection, read) timeouts. 16232 :type _request_timeout: int, tuple(int, int), optional 16233 :param _request_auth: set to override the auth_settings for an a single 16234 request; this effectively ignores the 16235 authentication in the spec for a single request. 16236 :type _request_auth: dict, optional 16237 :param _content_type: force content-type for the request. 16238 :type _content_type: str, Optional 16239 :param _headers: set to override the headers for a single 16240 request; this effectively ignores the headers 16241 in the spec for a single request. 16242 :type _headers: dict, optional 16243 :param _host_index: set to override the host_index for a single 16244 request; this effectively ignores the host_index 16245 in the spec for a single request. 16246 :type _host_index: int, optional 16247 :return: Returns the result object. 16248 """ # noqa: E501 16249 16250 _param = self._delete_board_serialize( 16251 board_id=board_id, 16252 _request_auth=_request_auth, 16253 _content_type=_content_type, 16254 _headers=_headers, 16255 _host_index=_host_index, 16256 ) 16257 16258 _response_types_map: Dict[str, Optional[str]] = { 16259 "204": "object", 16260 "400": None, 16261 "404": None, 16262 "409": None, 16263 "429": None, 16264 } 16265 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16266 response_data.read() 16267 return self.api_client.response_deserialize( 16268 response_data=response_data, 16269 response_types_map=_response_types_map, 16270 ).data 16271 16272 def _delete_board_serialize( 16273 self, 16274 board_id, 16275 _request_auth, 16276 _content_type, 16277 _headers, 16278 _host_index, 16279 ) -> RequestSerialized: 16280 16281 _host = None 16282 16283 _collection_formats: Dict[str, str] = {} 16284 16285 _path_params: Dict[str, str] = {} 16286 _query_params: List[Tuple[str, str]] = [] 16287 _header_params: Dict[str, Optional[str]] = _headers or {} 16288 _form_params: List[Tuple[str, str]] = [] 16289 _files: Dict[str, str] = {} 16290 _body_params: Optional[bytes] = None 16291 16292 # process the path parameters 16293 if board_id is not None: 16294 _path_params["board_id"] = board_id 16295 # process the query parameters 16296 # process the header parameters 16297 # process the form parameters 16298 # process the body parameter 16299 16300 # set the HTTP header `Accept` 16301 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16302 16303 # authentication setting 16304 _auth_settings: List[str] = [] 16305 16306 return self.api_client.param_serialize( 16307 method="DELETE", 16308 resource_path="/v2/boards/{board_id}", 16309 path_params=_path_params, 16310 query_params=_query_params, 16311 header_params=_header_params, 16312 body=_body_params, 16313 post_params=_form_params, 16314 files=_files, 16315 auth_settings=_auth_settings, 16316 collection_formats=_collection_formats, 16317 _host=_host, 16318 _request_auth=_request_auth, 16319 ) 16320 16321 @validate_call 16322 def get_boards( 16323 self, 16324 team_id: Optional[StrictStr] = None, 16325 project_id: Optional[StrictStr] = None, 16326 query: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None, 16327 owner: Optional[StrictStr] = None, 16328 limit: Optional[Annotated[str, Field(strict=True)]] = None, 16329 offset: Optional[StrictStr] = None, 16330 sort: Optional[StrictStr] = None, 16331 _request_timeout: Union[ 16332 None, 16333 Annotated[StrictFloat, Field(gt=0)], 16334 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16335 ] = None, 16336 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16337 _content_type: Optional[StrictStr] = None, 16338 _headers: Optional[Dict[StrictStr, Any]] = None, 16339 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16340 ) -> BoardsPagedResponse: 16341 """Get boards 16342 16343 Retrieves a list of boards accessible to the user associated with the provided access token. This endpoint supports filtering and sorting through URL query parameters. Customize the response by specifying `team_id`, `project_id`, or other query parameters. Filtering by `team_id` or `project_id` (or both) returns results instantly. For other filters, allow a few seconds for indexing of newly created boards. If you're an Enterprise customer with Company Admin permissions: - Enable **Content Admin** permissions to retrieve all boards, including private boards (those not explicitly shared with you). For details, see the [Content Admin Permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins). - Note that **Private board contents remain inaccessible**. The API allows you to verify their existence but prevents viewing their contents to uphold security best practices. Unauthorized access attempts will return an error. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 16344 16345 :param team_id: 16346 :type team_id: str 16347 :param project_id: 16348 :type project_id: str 16349 :param query: 16350 :type query: str 16351 :param owner: 16352 :type owner: str 16353 :param limit: 16354 :type limit: str 16355 :param offset: 16356 :type offset: str 16357 :param sort: 16358 :type sort: str 16359 :param _request_timeout: timeout setting for this request. If one 16360 number provided, it will be total request 16361 timeout. It can also be a pair (tuple) of 16362 (connection, read) timeouts. 16363 :type _request_timeout: int, tuple(int, int), optional 16364 :param _request_auth: set to override the auth_settings for an a single 16365 request; this effectively ignores the 16366 authentication in the spec for a single request. 16367 :type _request_auth: dict, optional 16368 :param _content_type: force content-type for the request. 16369 :type _content_type: str, Optional 16370 :param _headers: set to override the headers for a single 16371 request; this effectively ignores the headers 16372 in the spec for a single request. 16373 :type _headers: dict, optional 16374 :param _host_index: set to override the host_index for a single 16375 request; this effectively ignores the host_index 16376 in the spec for a single request. 16377 :type _host_index: int, optional 16378 :return: Returns the result object. 16379 """ # noqa: E501 16380 16381 _param = self._get_boards_serialize( 16382 team_id=team_id, 16383 project_id=project_id, 16384 query=query, 16385 owner=owner, 16386 limit=limit, 16387 offset=offset, 16388 sort=sort, 16389 _request_auth=_request_auth, 16390 _content_type=_content_type, 16391 _headers=_headers, 16392 _host_index=_host_index, 16393 ) 16394 16395 _response_types_map: Dict[str, Optional[str]] = { 16396 "200": "BoardsPagedResponse", 16397 "400": None, 16398 "404": None, 16399 "429": None, 16400 } 16401 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16402 response_data.read() 16403 return self.api_client.response_deserialize( 16404 response_data=response_data, 16405 response_types_map=_response_types_map, 16406 ).data 16407 16408 def _get_boards_serialize( 16409 self, 16410 team_id, 16411 project_id, 16412 query, 16413 owner, 16414 limit, 16415 offset, 16416 sort, 16417 _request_auth, 16418 _content_type, 16419 _headers, 16420 _host_index, 16421 ) -> RequestSerialized: 16422 16423 _host = None 16424 16425 _collection_formats: Dict[str, str] = {} 16426 16427 _path_params: Dict[str, str] = {} 16428 _query_params: List[Tuple[str, str]] = [] 16429 _header_params: Dict[str, Optional[str]] = _headers or {} 16430 _form_params: List[Tuple[str, str]] = [] 16431 _files: Dict[str, str] = {} 16432 _body_params: Optional[bytes] = None 16433 16434 # process the path parameters 16435 # process the query parameters 16436 if team_id is not None: 16437 16438 _query_params.append(("team_id", team_id)) 16439 16440 if project_id is not None: 16441 16442 _query_params.append(("project_id", project_id)) 16443 16444 if query is not None: 16445 16446 _query_params.append(("query", query)) 16447 16448 if owner is not None: 16449 16450 _query_params.append(("owner", owner)) 16451 16452 if limit is not None: 16453 16454 _query_params.append(("limit", limit)) 16455 16456 if offset is not None: 16457 16458 _query_params.append(("offset", offset)) 16459 16460 if sort is not None: 16461 16462 _query_params.append(("sort", sort)) 16463 16464 # process the header parameters 16465 # process the form parameters 16466 # process the body parameter 16467 16468 # set the HTTP header `Accept` 16469 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16470 16471 # authentication setting 16472 _auth_settings: List[str] = [] 16473 16474 return self.api_client.param_serialize( 16475 method="GET", 16476 resource_path="/v2/boards", 16477 path_params=_path_params, 16478 query_params=_query_params, 16479 header_params=_header_params, 16480 body=_body_params, 16481 post_params=_form_params, 16482 files=_files, 16483 auth_settings=_auth_settings, 16484 collection_formats=_collection_formats, 16485 _host=_host, 16486 _request_auth=_request_auth, 16487 ) 16488 16489 @validate_call 16490 def get_specific_board( 16491 self, 16492 board_id: Annotated[ 16493 StrictStr, Field(description="Unique identifier (ID) of the board that you want to retrieve.") 16494 ], 16495 _request_timeout: Union[ 16496 None, 16497 Annotated[StrictFloat, Field(gt=0)], 16498 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16499 ] = None, 16500 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16501 _content_type: Optional[StrictStr] = None, 16502 _headers: Optional[Dict[StrictStr, Any]] = None, 16503 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16504 ) -> BoardWithLinksAndLastOpened: 16505 """Get specific board 16506 16507 Retrieves information about a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 16508 16509 :param board_id: Unique identifier (ID) of the board that you want to retrieve. (required) 16510 :type board_id: str 16511 :param _request_timeout: timeout setting for this request. If one 16512 number provided, it will be total request 16513 timeout. It can also be a pair (tuple) of 16514 (connection, read) timeouts. 16515 :type _request_timeout: int, tuple(int, int), optional 16516 :param _request_auth: set to override the auth_settings for an a single 16517 request; this effectively ignores the 16518 authentication in the spec for a single request. 16519 :type _request_auth: dict, optional 16520 :param _content_type: force content-type for the request. 16521 :type _content_type: str, Optional 16522 :param _headers: set to override the headers for a single 16523 request; this effectively ignores the headers 16524 in the spec for a single request. 16525 :type _headers: dict, optional 16526 :param _host_index: set to override the host_index for a single 16527 request; this effectively ignores the host_index 16528 in the spec for a single request. 16529 :type _host_index: int, optional 16530 :return: Returns the result object. 16531 """ # noqa: E501 16532 16533 _param = self._get_specific_board_serialize( 16534 board_id=board_id, 16535 _request_auth=_request_auth, 16536 _content_type=_content_type, 16537 _headers=_headers, 16538 _host_index=_host_index, 16539 ) 16540 16541 _response_types_map: Dict[str, Optional[str]] = { 16542 "200": "BoardWithLinksAndLastOpened", 16543 "400": None, 16544 "404": None, 16545 "429": None, 16546 } 16547 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16548 response_data.read() 16549 return self.api_client.response_deserialize( 16550 response_data=response_data, 16551 response_types_map=_response_types_map, 16552 ).data 16553 16554 def _get_specific_board_serialize( 16555 self, 16556 board_id, 16557 _request_auth, 16558 _content_type, 16559 _headers, 16560 _host_index, 16561 ) -> RequestSerialized: 16562 16563 _host = None 16564 16565 _collection_formats: Dict[str, str] = {} 16566 16567 _path_params: Dict[str, str] = {} 16568 _query_params: List[Tuple[str, str]] = [] 16569 _header_params: Dict[str, Optional[str]] = _headers or {} 16570 _form_params: List[Tuple[str, str]] = [] 16571 _files: Dict[str, str] = {} 16572 _body_params: Optional[bytes] = None 16573 16574 # process the path parameters 16575 if board_id is not None: 16576 _path_params["board_id"] = board_id 16577 # process the query parameters 16578 # process the header parameters 16579 # process the form parameters 16580 # process the body parameter 16581 16582 # set the HTTP header `Accept` 16583 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16584 16585 # authentication setting 16586 _auth_settings: List[str] = [] 16587 16588 return self.api_client.param_serialize( 16589 method="GET", 16590 resource_path="/v2/boards/{board_id}", 16591 path_params=_path_params, 16592 query_params=_query_params, 16593 header_params=_header_params, 16594 body=_body_params, 16595 post_params=_form_params, 16596 files=_files, 16597 auth_settings=_auth_settings, 16598 collection_formats=_collection_formats, 16599 _host=_host, 16600 _request_auth=_request_auth, 16601 ) 16602 16603 @validate_call 16604 def update_board( 16605 self, 16606 board_id: Annotated[ 16607 StrictStr, Field(description="Unique identifier (ID) of the board that you want to update.") 16608 ], 16609 board_changes: BoardChanges, 16610 _request_timeout: Union[ 16611 None, 16612 Annotated[StrictFloat, Field(gt=0)], 16613 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16614 ] = None, 16615 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16616 _content_type: Optional[StrictStr] = None, 16617 _headers: Optional[Dict[StrictStr, Any]] = None, 16618 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16619 ) -> BoardWithLinks: 16620 """Update board 16621 16622 Updates a specific board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 16623 16624 :param board_id: Unique identifier (ID) of the board that you want to update. (required) 16625 :type board_id: str 16626 :param board_changes: (required) 16627 :type board_changes: BoardChanges 16628 :param _request_timeout: timeout setting for this request. If one 16629 number provided, it will be total request 16630 timeout. It can also be a pair (tuple) of 16631 (connection, read) timeouts. 16632 :type _request_timeout: int, tuple(int, int), optional 16633 :param _request_auth: set to override the auth_settings for an a single 16634 request; this effectively ignores the 16635 authentication in the spec for a single request. 16636 :type _request_auth: dict, optional 16637 :param _content_type: force content-type for the request. 16638 :type _content_type: str, Optional 16639 :param _headers: set to override the headers for a single 16640 request; this effectively ignores the headers 16641 in the spec for a single request. 16642 :type _headers: dict, optional 16643 :param _host_index: set to override the host_index for a single 16644 request; this effectively ignores the host_index 16645 in the spec for a single request. 16646 :type _host_index: int, optional 16647 :return: Returns the result object. 16648 """ # noqa: E501 16649 16650 _param = self._update_board_serialize( 16651 board_id=board_id, 16652 board_changes=board_changes, 16653 _request_auth=_request_auth, 16654 _content_type=_content_type, 16655 _headers=_headers, 16656 _host_index=_host_index, 16657 ) 16658 16659 _response_types_map: Dict[str, Optional[str]] = { 16660 "200": "BoardWithLinks", 16661 "202": None, 16662 "400": None, 16663 "404": None, 16664 "409": None, 16665 "429": None, 16666 } 16667 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16668 response_data.read() 16669 return self.api_client.response_deserialize( 16670 response_data=response_data, 16671 response_types_map=_response_types_map, 16672 ).data 16673 16674 def _update_board_serialize( 16675 self, 16676 board_id, 16677 board_changes, 16678 _request_auth, 16679 _content_type, 16680 _headers, 16681 _host_index, 16682 ) -> RequestSerialized: 16683 16684 _host = None 16685 16686 _collection_formats: Dict[str, str] = {} 16687 16688 _path_params: Dict[str, str] = {} 16689 _query_params: List[Tuple[str, str]] = [] 16690 _header_params: Dict[str, Optional[str]] = _headers or {} 16691 _form_params: List[Tuple[str, str]] = [] 16692 _files: Dict[str, str] = {} 16693 _body_params: Optional[bytes] = None 16694 16695 # process the path parameters 16696 if board_id is not None: 16697 _path_params["board_id"] = board_id 16698 # process the query parameters 16699 # process the header parameters 16700 # process the form parameters 16701 # process the body parameter 16702 if board_changes is not None: 16703 _body_params = board_changes 16704 16705 # set the HTTP header `Accept` 16706 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16707 16708 # set the HTTP header `Content-Type` 16709 if _content_type: 16710 _header_params["Content-Type"] = _content_type 16711 else: 16712 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16713 if _default_content_type is not None: 16714 _header_params["Content-Type"] = _default_content_type 16715 16716 # authentication setting 16717 _auth_settings: List[str] = [] 16718 16719 return self.api_client.param_serialize( 16720 method="PATCH", 16721 resource_path="/v2/boards/{board_id}", 16722 path_params=_path_params, 16723 query_params=_query_params, 16724 header_params=_header_params, 16725 body=_body_params, 16726 post_params=_form_params, 16727 files=_files, 16728 auth_settings=_auth_settings, 16729 collection_formats=_collection_formats, 16730 _host=_host, 16731 _request_auth=_request_auth, 16732 ) 16733 16734 @validate_call 16735 def create_card_item( 16736 self, 16737 board_id: Annotated[ 16738 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 16739 ], 16740 card_create_request: CardCreateRequest, 16741 _request_timeout: Union[ 16742 None, 16743 Annotated[StrictFloat, Field(gt=0)], 16744 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16745 ] = None, 16746 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16747 _content_type: Optional[StrictStr] = None, 16748 _headers: Optional[Dict[StrictStr, Any]] = None, 16749 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16750 ) -> CardItem: 16751 """Create card item 16752 16753 Adds a card item to a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 16754 16755 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 16756 :type board_id: str 16757 :param card_create_request: (required) 16758 :type card_create_request: CardCreateRequest 16759 :param _request_timeout: timeout setting for this request. If one 16760 number provided, it will be total request 16761 timeout. It can also be a pair (tuple) of 16762 (connection, read) timeouts. 16763 :type _request_timeout: int, tuple(int, int), optional 16764 :param _request_auth: set to override the auth_settings for an a single 16765 request; this effectively ignores the 16766 authentication in the spec for a single request. 16767 :type _request_auth: dict, optional 16768 :param _content_type: force content-type for the request. 16769 :type _content_type: str, Optional 16770 :param _headers: set to override the headers for a single 16771 request; this effectively ignores the headers 16772 in the spec for a single request. 16773 :type _headers: dict, optional 16774 :param _host_index: set to override the host_index for a single 16775 request; this effectively ignores the host_index 16776 in the spec for a single request. 16777 :type _host_index: int, optional 16778 :return: Returns the result object. 16779 """ # noqa: E501 16780 16781 _param = self._create_card_item_serialize( 16782 board_id=board_id, 16783 card_create_request=card_create_request, 16784 _request_auth=_request_auth, 16785 _content_type=_content_type, 16786 _headers=_headers, 16787 _host_index=_host_index, 16788 ) 16789 16790 _response_types_map: Dict[str, Optional[str]] = { 16791 "201": "CardItem", 16792 "400": None, 16793 "404": None, 16794 "429": None, 16795 } 16796 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16797 response_data.read() 16798 return self.api_client.response_deserialize( 16799 response_data=response_data, 16800 response_types_map=_response_types_map, 16801 ).data 16802 16803 def _create_card_item_serialize( 16804 self, 16805 board_id, 16806 card_create_request, 16807 _request_auth, 16808 _content_type, 16809 _headers, 16810 _host_index, 16811 ) -> RequestSerialized: 16812 16813 _host = None 16814 16815 _collection_formats: Dict[str, str] = {} 16816 16817 _path_params: Dict[str, str] = {} 16818 _query_params: List[Tuple[str, str]] = [] 16819 _header_params: Dict[str, Optional[str]] = _headers or {} 16820 _form_params: List[Tuple[str, str]] = [] 16821 _files: Dict[str, str] = {} 16822 _body_params: Optional[bytes] = None 16823 16824 # process the path parameters 16825 if board_id is not None: 16826 _path_params["board_id"] = board_id 16827 # process the query parameters 16828 # process the header parameters 16829 # process the form parameters 16830 # process the body parameter 16831 if card_create_request is not None: 16832 _body_params = card_create_request 16833 16834 # set the HTTP header `Accept` 16835 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16836 16837 # set the HTTP header `Content-Type` 16838 if _content_type: 16839 _header_params["Content-Type"] = _content_type 16840 else: 16841 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16842 if _default_content_type is not None: 16843 _header_params["Content-Type"] = _default_content_type 16844 16845 # authentication setting 16846 _auth_settings: List[str] = [] 16847 16848 return self.api_client.param_serialize( 16849 method="POST", 16850 resource_path="/v2/boards/{board_id}/cards", 16851 path_params=_path_params, 16852 query_params=_query_params, 16853 header_params=_header_params, 16854 body=_body_params, 16855 post_params=_form_params, 16856 files=_files, 16857 auth_settings=_auth_settings, 16858 collection_formats=_collection_formats, 16859 _host=_host, 16860 _request_auth=_request_auth, 16861 ) 16862 16863 @validate_call 16864 def delete_card_item( 16865 self, 16866 board_id: Annotated[ 16867 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 16868 ], 16869 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 16870 _request_timeout: Union[ 16871 None, 16872 Annotated[StrictFloat, Field(gt=0)], 16873 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16874 ] = None, 16875 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16876 _content_type: Optional[StrictStr] = None, 16877 _headers: Optional[Dict[StrictStr, Any]] = None, 16878 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16879 ) -> object: 16880 """Delete card item 16881 16882 Deletes a card item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16883 16884 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 16885 :type board_id: str 16886 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 16887 :type item_id: str 16888 :param _request_timeout: timeout setting for this request. If one 16889 number provided, it will be total request 16890 timeout. It can also be a pair (tuple) of 16891 (connection, read) timeouts. 16892 :type _request_timeout: int, tuple(int, int), optional 16893 :param _request_auth: set to override the auth_settings for an a single 16894 request; this effectively ignores the 16895 authentication in the spec for a single request. 16896 :type _request_auth: dict, optional 16897 :param _content_type: force content-type for the request. 16898 :type _content_type: str, Optional 16899 :param _headers: set to override the headers for a single 16900 request; this effectively ignores the headers 16901 in the spec for a single request. 16902 :type _headers: dict, optional 16903 :param _host_index: set to override the host_index for a single 16904 request; this effectively ignores the host_index 16905 in the spec for a single request. 16906 :type _host_index: int, optional 16907 :return: Returns the result object. 16908 """ # noqa: E501 16909 16910 _param = self._delete_card_item_serialize( 16911 board_id=board_id, 16912 item_id=item_id, 16913 _request_auth=_request_auth, 16914 _content_type=_content_type, 16915 _headers=_headers, 16916 _host_index=_host_index, 16917 ) 16918 16919 _response_types_map: Dict[str, Optional[str]] = { 16920 "204": "object", 16921 "400": None, 16922 "404": None, 16923 "429": None, 16924 } 16925 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16926 response_data.read() 16927 return self.api_client.response_deserialize( 16928 response_data=response_data, 16929 response_types_map=_response_types_map, 16930 ).data 16931 16932 def _delete_card_item_serialize( 16933 self, 16934 board_id, 16935 item_id, 16936 _request_auth, 16937 _content_type, 16938 _headers, 16939 _host_index, 16940 ) -> RequestSerialized: 16941 16942 _host = None 16943 16944 _collection_formats: Dict[str, str] = {} 16945 16946 _path_params: Dict[str, str] = {} 16947 _query_params: List[Tuple[str, str]] = [] 16948 _header_params: Dict[str, Optional[str]] = _headers or {} 16949 _form_params: List[Tuple[str, str]] = [] 16950 _files: Dict[str, str] = {} 16951 _body_params: Optional[bytes] = None 16952 16953 # process the path parameters 16954 if board_id is not None: 16955 _path_params["board_id"] = board_id 16956 if item_id is not None: 16957 _path_params["item_id"] = item_id 16958 # process the query parameters 16959 # process the header parameters 16960 # process the form parameters 16961 # process the body parameter 16962 16963 # set the HTTP header `Accept` 16964 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16965 16966 # authentication setting 16967 _auth_settings: List[str] = [] 16968 16969 return self.api_client.param_serialize( 16970 method="DELETE", 16971 resource_path="/v2/boards/{board_id}/cards/{item_id}", 16972 path_params=_path_params, 16973 query_params=_query_params, 16974 header_params=_header_params, 16975 body=_body_params, 16976 post_params=_form_params, 16977 files=_files, 16978 auth_settings=_auth_settings, 16979 collection_formats=_collection_formats, 16980 _host=_host, 16981 _request_auth=_request_auth, 16982 ) 16983 16984 @validate_call 16985 def get_card_item( 16986 self, 16987 board_id: Annotated[ 16988 StrictStr, 16989 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 16990 ], 16991 item_id: Annotated[ 16992 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 16993 ], 16994 _request_timeout: Union[ 16995 None, 16996 Annotated[StrictFloat, Field(gt=0)], 16997 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16998 ] = None, 16999 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17000 _content_type: Optional[StrictStr] = None, 17001 _headers: Optional[Dict[StrictStr, Any]] = None, 17002 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17003 ) -> CardItem: 17004 """Get card item 17005 17006 Retrieves information for a specific card item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 17007 17008 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 17009 :type board_id: str 17010 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 17011 :type item_id: str 17012 :param _request_timeout: timeout setting for this request. If one 17013 number provided, it will be total request 17014 timeout. It can also be a pair (tuple) of 17015 (connection, read) timeouts. 17016 :type _request_timeout: int, tuple(int, int), optional 17017 :param _request_auth: set to override the auth_settings for an a single 17018 request; this effectively ignores the 17019 authentication in the spec for a single request. 17020 :type _request_auth: dict, optional 17021 :param _content_type: force content-type for the request. 17022 :type _content_type: str, Optional 17023 :param _headers: set to override the headers for a single 17024 request; this effectively ignores the headers 17025 in the spec for a single request. 17026 :type _headers: dict, optional 17027 :param _host_index: set to override the host_index for a single 17028 request; this effectively ignores the host_index 17029 in the spec for a single request. 17030 :type _host_index: int, optional 17031 :return: Returns the result object. 17032 """ # noqa: E501 17033 17034 _param = self._get_card_item_serialize( 17035 board_id=board_id, 17036 item_id=item_id, 17037 _request_auth=_request_auth, 17038 _content_type=_content_type, 17039 _headers=_headers, 17040 _host_index=_host_index, 17041 ) 17042 17043 _response_types_map: Dict[str, Optional[str]] = { 17044 "200": "CardItem", 17045 "400": None, 17046 "404": None, 17047 "429": None, 17048 } 17049 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17050 response_data.read() 17051 return self.api_client.response_deserialize( 17052 response_data=response_data, 17053 response_types_map=_response_types_map, 17054 ).data 17055 17056 def _get_card_item_serialize( 17057 self, 17058 board_id, 17059 item_id, 17060 _request_auth, 17061 _content_type, 17062 _headers, 17063 _host_index, 17064 ) -> RequestSerialized: 17065 17066 _host = None 17067 17068 _collection_formats: Dict[str, str] = {} 17069 17070 _path_params: Dict[str, str] = {} 17071 _query_params: List[Tuple[str, str]] = [] 17072 _header_params: Dict[str, Optional[str]] = _headers or {} 17073 _form_params: List[Tuple[str, str]] = [] 17074 _files: Dict[str, str] = {} 17075 _body_params: Optional[bytes] = None 17076 17077 # process the path parameters 17078 if board_id is not None: 17079 _path_params["board_id"] = board_id 17080 if item_id is not None: 17081 _path_params["item_id"] = item_id 17082 # process the query parameters 17083 # process the header parameters 17084 # process the form parameters 17085 # process the body parameter 17086 17087 # set the HTTP header `Accept` 17088 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17089 17090 # authentication setting 17091 _auth_settings: List[str] = [] 17092 17093 return self.api_client.param_serialize( 17094 method="GET", 17095 resource_path="/v2/boards/{board_id}/cards/{item_id}", 17096 path_params=_path_params, 17097 query_params=_query_params, 17098 header_params=_header_params, 17099 body=_body_params, 17100 post_params=_form_params, 17101 files=_files, 17102 auth_settings=_auth_settings, 17103 collection_formats=_collection_formats, 17104 _host=_host, 17105 _request_auth=_request_auth, 17106 ) 17107 17108 @validate_call 17109 def update_card_item( 17110 self, 17111 board_id: Annotated[ 17112 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 17113 ], 17114 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 17115 card_update_request: CardUpdateRequest, 17116 _request_timeout: Union[ 17117 None, 17118 Annotated[StrictFloat, Field(gt=0)], 17119 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17120 ] = None, 17121 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17122 _content_type: Optional[StrictStr] = None, 17123 _headers: Optional[Dict[StrictStr, Any]] = None, 17124 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17125 ) -> CardItem: 17126 """Update card item 17127 17128 Updates a card item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17129 17130 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 17131 :type board_id: str 17132 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 17133 :type item_id: str 17134 :param card_update_request: (required) 17135 :type card_update_request: CardUpdateRequest 17136 :param _request_timeout: timeout setting for this request. If one 17137 number provided, it will be total request 17138 timeout. It can also be a pair (tuple) of 17139 (connection, read) timeouts. 17140 :type _request_timeout: int, tuple(int, int), optional 17141 :param _request_auth: set to override the auth_settings for an a single 17142 request; this effectively ignores the 17143 authentication in the spec for a single request. 17144 :type _request_auth: dict, optional 17145 :param _content_type: force content-type for the request. 17146 :type _content_type: str, Optional 17147 :param _headers: set to override the headers for a single 17148 request; this effectively ignores the headers 17149 in the spec for a single request. 17150 :type _headers: dict, optional 17151 :param _host_index: set to override the host_index for a single 17152 request; this effectively ignores the host_index 17153 in the spec for a single request. 17154 :type _host_index: int, optional 17155 :return: Returns the result object. 17156 """ # noqa: E501 17157 17158 _param = self._update_card_item_serialize( 17159 board_id=board_id, 17160 item_id=item_id, 17161 card_update_request=card_update_request, 17162 _request_auth=_request_auth, 17163 _content_type=_content_type, 17164 _headers=_headers, 17165 _host_index=_host_index, 17166 ) 17167 17168 _response_types_map: Dict[str, Optional[str]] = { 17169 "200": "CardItem", 17170 "400": None, 17171 "404": None, 17172 "409": None, 17173 "429": None, 17174 } 17175 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17176 response_data.read() 17177 return self.api_client.response_deserialize( 17178 response_data=response_data, 17179 response_types_map=_response_types_map, 17180 ).data 17181 17182 def _update_card_item_serialize( 17183 self, 17184 board_id, 17185 item_id, 17186 card_update_request, 17187 _request_auth, 17188 _content_type, 17189 _headers, 17190 _host_index, 17191 ) -> RequestSerialized: 17192 17193 _host = None 17194 17195 _collection_formats: Dict[str, str] = {} 17196 17197 _path_params: Dict[str, str] = {} 17198 _query_params: List[Tuple[str, str]] = [] 17199 _header_params: Dict[str, Optional[str]] = _headers or {} 17200 _form_params: List[Tuple[str, str]] = [] 17201 _files: Dict[str, str] = {} 17202 _body_params: Optional[bytes] = None 17203 17204 # process the path parameters 17205 if board_id is not None: 17206 _path_params["board_id"] = board_id 17207 if item_id is not None: 17208 _path_params["item_id"] = item_id 17209 # process the query parameters 17210 # process the header parameters 17211 # process the form parameters 17212 # process the body parameter 17213 if card_update_request is not None: 17214 _body_params = card_update_request 17215 17216 # set the HTTP header `Accept` 17217 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17218 17219 # set the HTTP header `Content-Type` 17220 if _content_type: 17221 _header_params["Content-Type"] = _content_type 17222 else: 17223 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 17224 if _default_content_type is not None: 17225 _header_params["Content-Type"] = _default_content_type 17226 17227 # authentication setting 17228 _auth_settings: List[str] = [] 17229 17230 return self.api_client.param_serialize( 17231 method="PATCH", 17232 resource_path="/v2/boards/{board_id}/cards/{item_id}", 17233 path_params=_path_params, 17234 query_params=_query_params, 17235 header_params=_header_params, 17236 body=_body_params, 17237 post_params=_form_params, 17238 files=_files, 17239 auth_settings=_auth_settings, 17240 collection_formats=_collection_formats, 17241 _host=_host, 17242 _request_auth=_request_auth, 17243 ) 17244 17245 @validate_call 17246 def create_connector( 17247 self, 17248 board_id: Annotated[ 17249 StrictStr, 17250 Field(description="Unique identifier (ID) of the board for which you want to create the connector."), 17251 ], 17252 connector_creation_data: ConnectorCreationData, 17253 _request_timeout: Union[ 17254 None, 17255 Annotated[StrictFloat, Field(gt=0)], 17256 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17257 ] = None, 17258 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17259 _content_type: Optional[StrictStr] = None, 17260 _headers: Optional[Dict[StrictStr, Any]] = None, 17261 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17262 ) -> ConnectorWithLinks: 17263 """Create connector 17264 17265 Adds a connector to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17266 17267 :param board_id: Unique identifier (ID) of the board for which you want to create the connector. (required) 17268 :type board_id: str 17269 :param connector_creation_data: (required) 17270 :type connector_creation_data: ConnectorCreationData 17271 :param _request_timeout: timeout setting for this request. If one 17272 number provided, it will be total request 17273 timeout. It can also be a pair (tuple) of 17274 (connection, read) timeouts. 17275 :type _request_timeout: int, tuple(int, int), optional 17276 :param _request_auth: set to override the auth_settings for an a single 17277 request; this effectively ignores the 17278 authentication in the spec for a single request. 17279 :type _request_auth: dict, optional 17280 :param _content_type: force content-type for the request. 17281 :type _content_type: str, Optional 17282 :param _headers: set to override the headers for a single 17283 request; this effectively ignores the headers 17284 in the spec for a single request. 17285 :type _headers: dict, optional 17286 :param _host_index: set to override the host_index for a single 17287 request; this effectively ignores the host_index 17288 in the spec for a single request. 17289 :type _host_index: int, optional 17290 :return: Returns the result object. 17291 """ # noqa: E501 17292 17293 _param = self._create_connector_serialize( 17294 board_id=board_id, 17295 connector_creation_data=connector_creation_data, 17296 _request_auth=_request_auth, 17297 _content_type=_content_type, 17298 _headers=_headers, 17299 _host_index=_host_index, 17300 ) 17301 17302 _response_types_map: Dict[str, Optional[str]] = { 17303 "200": "ConnectorWithLinks", 17304 "400": None, 17305 "404": None, 17306 "429": None, 17307 } 17308 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17309 response_data.read() 17310 return self.api_client.response_deserialize( 17311 response_data=response_data, 17312 response_types_map=_response_types_map, 17313 ).data 17314 17315 def _create_connector_serialize( 17316 self, 17317 board_id, 17318 connector_creation_data, 17319 _request_auth, 17320 _content_type, 17321 _headers, 17322 _host_index, 17323 ) -> RequestSerialized: 17324 17325 _host = None 17326 17327 _collection_formats: Dict[str, str] = {} 17328 17329 _path_params: Dict[str, str] = {} 17330 _query_params: List[Tuple[str, str]] = [] 17331 _header_params: Dict[str, Optional[str]] = _headers or {} 17332 _form_params: List[Tuple[str, str]] = [] 17333 _files: Dict[str, str] = {} 17334 _body_params: Optional[bytes] = None 17335 17336 # process the path parameters 17337 if board_id is not None: 17338 _path_params["board_id"] = board_id 17339 # process the query parameters 17340 # process the header parameters 17341 # process the form parameters 17342 # process the body parameter 17343 if connector_creation_data is not None: 17344 _body_params = connector_creation_data 17345 17346 # set the HTTP header `Accept` 17347 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17348 17349 # set the HTTP header `Content-Type` 17350 if _content_type: 17351 _header_params["Content-Type"] = _content_type 17352 else: 17353 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 17354 if _default_content_type is not None: 17355 _header_params["Content-Type"] = _default_content_type 17356 17357 # authentication setting 17358 _auth_settings: List[str] = [] 17359 17360 return self.api_client.param_serialize( 17361 method="POST", 17362 resource_path="/v2/boards/{board_id}/connectors", 17363 path_params=_path_params, 17364 query_params=_query_params, 17365 header_params=_header_params, 17366 body=_body_params, 17367 post_params=_form_params, 17368 files=_files, 17369 auth_settings=_auth_settings, 17370 collection_formats=_collection_formats, 17371 _host=_host, 17372 _request_auth=_request_auth, 17373 ) 17374 17375 @validate_call 17376 def delete_connector( 17377 self, 17378 board_id: Annotated[ 17379 StrictStr, 17380 Field(description="Unique identifier (ID) of the board from which you want to delete the connector."), 17381 ], 17382 connector_id: Annotated[ 17383 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to delete.") 17384 ], 17385 _request_timeout: Union[ 17386 None, 17387 Annotated[StrictFloat, Field(gt=0)], 17388 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17389 ] = None, 17390 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17391 _content_type: Optional[StrictStr] = None, 17392 _headers: Optional[Dict[StrictStr, Any]] = None, 17393 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17394 ) -> object: 17395 """Delete connector 17396 17397 Deletes the specified connector from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 17398 17399 :param board_id: Unique identifier (ID) of the board from which you want to delete the connector. (required) 17400 :type board_id: str 17401 :param connector_id: Unique identifier (ID) of the connector that you want to delete. (required) 17402 :type connector_id: str 17403 :param _request_timeout: timeout setting for this request. If one 17404 number provided, it will be total request 17405 timeout. It can also be a pair (tuple) of 17406 (connection, read) timeouts. 17407 :type _request_timeout: int, tuple(int, int), optional 17408 :param _request_auth: set to override the auth_settings for an a single 17409 request; this effectively ignores the 17410 authentication in the spec for a single request. 17411 :type _request_auth: dict, optional 17412 :param _content_type: force content-type for the request. 17413 :type _content_type: str, Optional 17414 :param _headers: set to override the headers for a single 17415 request; this effectively ignores the headers 17416 in the spec for a single request. 17417 :type _headers: dict, optional 17418 :param _host_index: set to override the host_index for a single 17419 request; this effectively ignores the host_index 17420 in the spec for a single request. 17421 :type _host_index: int, optional 17422 :return: Returns the result object. 17423 """ # noqa: E501 17424 17425 _param = self._delete_connector_serialize( 17426 board_id=board_id, 17427 connector_id=connector_id, 17428 _request_auth=_request_auth, 17429 _content_type=_content_type, 17430 _headers=_headers, 17431 _host_index=_host_index, 17432 ) 17433 17434 _response_types_map: Dict[str, Optional[str]] = { 17435 "204": "object", 17436 "400": None, 17437 "404": None, 17438 "429": None, 17439 } 17440 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17441 response_data.read() 17442 return self.api_client.response_deserialize( 17443 response_data=response_data, 17444 response_types_map=_response_types_map, 17445 ).data 17446 17447 def _delete_connector_serialize( 17448 self, 17449 board_id, 17450 connector_id, 17451 _request_auth, 17452 _content_type, 17453 _headers, 17454 _host_index, 17455 ) -> RequestSerialized: 17456 17457 _host = None 17458 17459 _collection_formats: Dict[str, str] = {} 17460 17461 _path_params: Dict[str, str] = {} 17462 _query_params: List[Tuple[str, str]] = [] 17463 _header_params: Dict[str, Optional[str]] = _headers or {} 17464 _form_params: List[Tuple[str, str]] = [] 17465 _files: Dict[str, str] = {} 17466 _body_params: Optional[bytes] = None 17467 17468 # process the path parameters 17469 if board_id is not None: 17470 _path_params["board_id"] = board_id 17471 if connector_id is not None: 17472 _path_params["connector_id"] = connector_id 17473 # process the query parameters 17474 # process the header parameters 17475 # process the form parameters 17476 # process the body parameter 17477 17478 # set the HTTP header `Accept` 17479 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17480 17481 # authentication setting 17482 _auth_settings: List[str] = [] 17483 17484 return self.api_client.param_serialize( 17485 method="DELETE", 17486 resource_path="/v2/boards/{board_id}/connectors/{connector_id}", 17487 path_params=_path_params, 17488 query_params=_query_params, 17489 header_params=_header_params, 17490 body=_body_params, 17491 post_params=_form_params, 17492 files=_files, 17493 auth_settings=_auth_settings, 17494 collection_formats=_collection_formats, 17495 _host=_host, 17496 _request_auth=_request_auth, 17497 ) 17498 17499 @validate_call 17500 def get_connector( 17501 self, 17502 board_id: Annotated[ 17503 StrictStr, 17504 Field( 17505 description="Unique identifier (ID) of the board from which you want to retrieve a specific connector." 17506 ), 17507 ], 17508 connector_id: Annotated[ 17509 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to retrieve.") 17510 ], 17511 _request_timeout: Union[ 17512 None, 17513 Annotated[StrictFloat, Field(gt=0)], 17514 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17515 ] = None, 17516 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17517 _content_type: Optional[StrictStr] = None, 17518 _headers: Optional[Dict[StrictStr, Any]] = None, 17519 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17520 ) -> ConnectorWithLinks: 17521 """Get specific connector 17522 17523 Retrieves information for a specific connector on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 17524 17525 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific connector. (required) 17526 :type board_id: str 17527 :param connector_id: Unique identifier (ID) of the connector that you want to retrieve. (required) 17528 :type connector_id: str 17529 :param _request_timeout: timeout setting for this request. If one 17530 number provided, it will be total request 17531 timeout. It can also be a pair (tuple) of 17532 (connection, read) timeouts. 17533 :type _request_timeout: int, tuple(int, int), optional 17534 :param _request_auth: set to override the auth_settings for an a single 17535 request; this effectively ignores the 17536 authentication in the spec for a single request. 17537 :type _request_auth: dict, optional 17538 :param _content_type: force content-type for the request. 17539 :type _content_type: str, Optional 17540 :param _headers: set to override the headers for a single 17541 request; this effectively ignores the headers 17542 in the spec for a single request. 17543 :type _headers: dict, optional 17544 :param _host_index: set to override the host_index for a single 17545 request; this effectively ignores the host_index 17546 in the spec for a single request. 17547 :type _host_index: int, optional 17548 :return: Returns the result object. 17549 """ # noqa: E501 17550 17551 _param = self._get_connector_serialize( 17552 board_id=board_id, 17553 connector_id=connector_id, 17554 _request_auth=_request_auth, 17555 _content_type=_content_type, 17556 _headers=_headers, 17557 _host_index=_host_index, 17558 ) 17559 17560 _response_types_map: Dict[str, Optional[str]] = { 17561 "200": "ConnectorWithLinks", 17562 "400": None, 17563 "404": None, 17564 "429": None, 17565 } 17566 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17567 response_data.read() 17568 return self.api_client.response_deserialize( 17569 response_data=response_data, 17570 response_types_map=_response_types_map, 17571 ).data 17572 17573 def _get_connector_serialize( 17574 self, 17575 board_id, 17576 connector_id, 17577 _request_auth, 17578 _content_type, 17579 _headers, 17580 _host_index, 17581 ) -> RequestSerialized: 17582 17583 _host = None 17584 17585 _collection_formats: Dict[str, str] = {} 17586 17587 _path_params: Dict[str, str] = {} 17588 _query_params: List[Tuple[str, str]] = [] 17589 _header_params: Dict[str, Optional[str]] = _headers or {} 17590 _form_params: List[Tuple[str, str]] = [] 17591 _files: Dict[str, str] = {} 17592 _body_params: Optional[bytes] = None 17593 17594 # process the path parameters 17595 if board_id is not None: 17596 _path_params["board_id"] = board_id 17597 if connector_id is not None: 17598 _path_params["connector_id"] = connector_id 17599 # process the query parameters 17600 # process the header parameters 17601 # process the form parameters 17602 # process the body parameter 17603 17604 # set the HTTP header `Accept` 17605 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17606 17607 # authentication setting 17608 _auth_settings: List[str] = [] 17609 17610 return self.api_client.param_serialize( 17611 method="GET", 17612 resource_path="/v2/boards/{board_id}/connectors/{connector_id}", 17613 path_params=_path_params, 17614 query_params=_query_params, 17615 header_params=_header_params, 17616 body=_body_params, 17617 post_params=_form_params, 17618 files=_files, 17619 auth_settings=_auth_settings, 17620 collection_formats=_collection_formats, 17621 _host=_host, 17622 _request_auth=_request_auth, 17623 ) 17624 17625 @validate_call 17626 def get_connectors( 17627 self, 17628 board_id: Annotated[ 17629 StrictStr, 17630 Field( 17631 description="Unique identifier (ID) of the board from which you want to retrieve a list of connectors." 17632 ), 17633 ], 17634 limit: Optional[Annotated[str, Field(strict=True)]] = None, 17635 cursor: Optional[StrictStr] = None, 17636 _request_timeout: Union[ 17637 None, 17638 Annotated[StrictFloat, Field(gt=0)], 17639 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17640 ] = None, 17641 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17642 _content_type: Optional[StrictStr] = None, 17643 _headers: Optional[Dict[StrictStr, Any]] = None, 17644 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17645 ) -> ConnectorsCursorPaged: 17646 """Get connectors 17647 17648 Retrieves a list of connectors for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17649 17650 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a list of connectors. (required) 17651 :type board_id: str 17652 :param limit: 17653 :type limit: str 17654 :param cursor: 17655 :type cursor: str 17656 :param _request_timeout: timeout setting for this request. If one 17657 number provided, it will be total request 17658 timeout. It can also be a pair (tuple) of 17659 (connection, read) timeouts. 17660 :type _request_timeout: int, tuple(int, int), optional 17661 :param _request_auth: set to override the auth_settings for an a single 17662 request; this effectively ignores the 17663 authentication in the spec for a single request. 17664 :type _request_auth: dict, optional 17665 :param _content_type: force content-type for the request. 17666 :type _content_type: str, Optional 17667 :param _headers: set to override the headers for a single 17668 request; this effectively ignores the headers 17669 in the spec for a single request. 17670 :type _headers: dict, optional 17671 :param _host_index: set to override the host_index for a single 17672 request; this effectively ignores the host_index 17673 in the spec for a single request. 17674 :type _host_index: int, optional 17675 :return: Returns the result object. 17676 """ # noqa: E501 17677 17678 _param = self._get_connectors_serialize( 17679 board_id=board_id, 17680 limit=limit, 17681 cursor=cursor, 17682 _request_auth=_request_auth, 17683 _content_type=_content_type, 17684 _headers=_headers, 17685 _host_index=_host_index, 17686 ) 17687 17688 _response_types_map: Dict[str, Optional[str]] = { 17689 "200": "ConnectorsCursorPaged", 17690 "400": None, 17691 "404": None, 17692 "429": None, 17693 } 17694 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17695 response_data.read() 17696 return self.api_client.response_deserialize( 17697 response_data=response_data, 17698 response_types_map=_response_types_map, 17699 ).data 17700 17701 def _get_connectors_serialize( 17702 self, 17703 board_id, 17704 limit, 17705 cursor, 17706 _request_auth, 17707 _content_type, 17708 _headers, 17709 _host_index, 17710 ) -> RequestSerialized: 17711 17712 _host = None 17713 17714 _collection_formats: Dict[str, str] = {} 17715 17716 _path_params: Dict[str, str] = {} 17717 _query_params: List[Tuple[str, str]] = [] 17718 _header_params: Dict[str, Optional[str]] = _headers or {} 17719 _form_params: List[Tuple[str, str]] = [] 17720 _files: Dict[str, str] = {} 17721 _body_params: Optional[bytes] = None 17722 17723 # process the path parameters 17724 if board_id is not None: 17725 _path_params["board_id"] = board_id 17726 # process the query parameters 17727 if limit is not None: 17728 17729 _query_params.append(("limit", limit)) 17730 17731 if cursor is not None: 17732 17733 _query_params.append(("cursor", cursor)) 17734 17735 # process the header parameters 17736 # process the form parameters 17737 # process the body parameter 17738 17739 # set the HTTP header `Accept` 17740 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17741 17742 # authentication setting 17743 _auth_settings: List[str] = [] 17744 17745 return self.api_client.param_serialize( 17746 method="GET", 17747 resource_path="/v2/boards/{board_id}/connectors", 17748 path_params=_path_params, 17749 query_params=_query_params, 17750 header_params=_header_params, 17751 body=_body_params, 17752 post_params=_form_params, 17753 files=_files, 17754 auth_settings=_auth_settings, 17755 collection_formats=_collection_formats, 17756 _host=_host, 17757 _request_auth=_request_auth, 17758 ) 17759 17760 @validate_call 17761 def update_connector( 17762 self, 17763 board_id: Annotated[ 17764 StrictStr, 17765 Field(description="Unique identifier (ID) of the board for which you want to update the connector."), 17766 ], 17767 connector_id: Annotated[ 17768 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to update.") 17769 ], 17770 connector_changes_data: ConnectorChangesData, 17771 _request_timeout: Union[ 17772 None, 17773 Annotated[StrictFloat, Field(gt=0)], 17774 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17775 ] = None, 17776 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17777 _content_type: Optional[StrictStr] = None, 17778 _headers: Optional[Dict[StrictStr, Any]] = None, 17779 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17780 ) -> ConnectorWithLinks: 17781 """Update connector 17782 17783 Updates a connector on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17784 17785 :param board_id: Unique identifier (ID) of the board for which you want to update the connector. (required) 17786 :type board_id: str 17787 :param connector_id: Unique identifier (ID) of the connector that you want to update. (required) 17788 :type connector_id: str 17789 :param connector_changes_data: (required) 17790 :type connector_changes_data: ConnectorChangesData 17791 :param _request_timeout: timeout setting for this request. If one 17792 number provided, it will be total request 17793 timeout. It can also be a pair (tuple) of 17794 (connection, read) timeouts. 17795 :type _request_timeout: int, tuple(int, int), optional 17796 :param _request_auth: set to override the auth_settings for an a single 17797 request; this effectively ignores the 17798 authentication in the spec for a single request. 17799 :type _request_auth: dict, optional 17800 :param _content_type: force content-type for the request. 17801 :type _content_type: str, Optional 17802 :param _headers: set to override the headers for a single 17803 request; this effectively ignores the headers 17804 in the spec for a single request. 17805 :type _headers: dict, optional 17806 :param _host_index: set to override the host_index for a single 17807 request; this effectively ignores the host_index 17808 in the spec for a single request. 17809 :type _host_index: int, optional 17810 :return: Returns the result object. 17811 """ # noqa: E501 17812 17813 _param = self._update_connector_serialize( 17814 board_id=board_id, 17815 connector_id=connector_id, 17816 connector_changes_data=connector_changes_data, 17817 _request_auth=_request_auth, 17818 _content_type=_content_type, 17819 _headers=_headers, 17820 _host_index=_host_index, 17821 ) 17822 17823 _response_types_map: Dict[str, Optional[str]] = { 17824 "200": "ConnectorWithLinks", 17825 "400": None, 17826 "404": None, 17827 "409": None, 17828 "429": None, 17829 } 17830 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17831 response_data.read() 17832 return self.api_client.response_deserialize( 17833 response_data=response_data, 17834 response_types_map=_response_types_map, 17835 ).data 17836 17837 def _update_connector_serialize( 17838 self, 17839 board_id, 17840 connector_id, 17841 connector_changes_data, 17842 _request_auth, 17843 _content_type, 17844 _headers, 17845 _host_index, 17846 ) -> RequestSerialized: 17847 17848 _host = None 17849 17850 _collection_formats: Dict[str, str] = {} 17851 17852 _path_params: Dict[str, str] = {} 17853 _query_params: List[Tuple[str, str]] = [] 17854 _header_params: Dict[str, Optional[str]] = _headers or {} 17855 _form_params: List[Tuple[str, str]] = [] 17856 _files: Dict[str, str] = {} 17857 _body_params: Optional[bytes] = None 17858 17859 # process the path parameters 17860 if board_id is not None: 17861 _path_params["board_id"] = board_id 17862 if connector_id is not None: 17863 _path_params["connector_id"] = connector_id 17864 # process the query parameters 17865 # process the header parameters 17866 # process the form parameters 17867 # process the body parameter 17868 if connector_changes_data is not None: 17869 _body_params = connector_changes_data 17870 17871 # set the HTTP header `Accept` 17872 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17873 17874 # set the HTTP header `Content-Type` 17875 if _content_type: 17876 _header_params["Content-Type"] = _content_type 17877 else: 17878 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 17879 if _default_content_type is not None: 17880 _header_params["Content-Type"] = _default_content_type 17881 17882 # authentication setting 17883 _auth_settings: List[str] = [] 17884 17885 return self.api_client.param_serialize( 17886 method="PATCH", 17887 resource_path="/v2/boards/{board_id}/connectors/{connector_id}", 17888 path_params=_path_params, 17889 query_params=_query_params, 17890 header_params=_header_params, 17891 body=_body_params, 17892 post_params=_form_params, 17893 files=_files, 17894 auth_settings=_auth_settings, 17895 collection_formats=_collection_formats, 17896 _host=_host, 17897 _request_auth=_request_auth, 17898 ) 17899 17900 @validate_call 17901 def create_doc_format_item( 17902 self, 17903 board_id: Annotated[ 17904 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 17905 ], 17906 doc_format_create_request: DocFormatCreateRequest, 17907 _request_timeout: Union[ 17908 None, 17909 Annotated[StrictFloat, Field(gt=0)], 17910 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17911 ] = None, 17912 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17913 _content_type: Optional[StrictStr] = None, 17914 _headers: Optional[Dict[StrictStr, Any]] = None, 17915 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17916 ) -> DocFormatItem: 17917 """Create doc format item 17918 17919 Adds a doc format item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17920 17921 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 17922 :type board_id: str 17923 :param doc_format_create_request: (required) 17924 :type doc_format_create_request: DocFormatCreateRequest 17925 :param _request_timeout: timeout setting for this request. If one 17926 number provided, it will be total request 17927 timeout. It can also be a pair (tuple) of 17928 (connection, read) timeouts. 17929 :type _request_timeout: int, tuple(int, int), optional 17930 :param _request_auth: set to override the auth_settings for an a single 17931 request; this effectively ignores the 17932 authentication in the spec for a single request. 17933 :type _request_auth: dict, optional 17934 :param _content_type: force content-type for the request. 17935 :type _content_type: str, Optional 17936 :param _headers: set to override the headers for a single 17937 request; this effectively ignores the headers 17938 in the spec for a single request. 17939 :type _headers: dict, optional 17940 :param _host_index: set to override the host_index for a single 17941 request; this effectively ignores the host_index 17942 in the spec for a single request. 17943 :type _host_index: int, optional 17944 :return: Returns the result object. 17945 """ # noqa: E501 17946 17947 _param = self._create_doc_format_item_serialize( 17948 board_id=board_id, 17949 doc_format_create_request=doc_format_create_request, 17950 _request_auth=_request_auth, 17951 _content_type=_content_type, 17952 _headers=_headers, 17953 _host_index=_host_index, 17954 ) 17955 17956 _response_types_map: Dict[str, Optional[str]] = { 17957 "201": "DocFormatItem", 17958 "400": None, 17959 "404": None, 17960 "429": None, 17961 } 17962 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17963 response_data.read() 17964 return self.api_client.response_deserialize( 17965 response_data=response_data, 17966 response_types_map=_response_types_map, 17967 ).data 17968 17969 def _create_doc_format_item_serialize( 17970 self, 17971 board_id, 17972 doc_format_create_request, 17973 _request_auth, 17974 _content_type, 17975 _headers, 17976 _host_index, 17977 ) -> RequestSerialized: 17978 17979 _host = None 17980 17981 _collection_formats: Dict[str, str] = {} 17982 17983 _path_params: Dict[str, str] = {} 17984 _query_params: List[Tuple[str, str]] = [] 17985 _header_params: Dict[str, Optional[str]] = _headers or {} 17986 _form_params: List[Tuple[str, str]] = [] 17987 _files: Dict[str, str] = {} 17988 _body_params: Optional[bytes] = None 17989 17990 # process the path parameters 17991 if board_id is not None: 17992 _path_params["board_id"] = board_id 17993 # process the query parameters 17994 # process the header parameters 17995 # process the form parameters 17996 # process the body parameter 17997 if doc_format_create_request is not None: 17998 _body_params = doc_format_create_request 17999 18000 # set the HTTP header `Accept` 18001 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18002 18003 # set the HTTP header `Content-Type` 18004 if _content_type: 18005 _header_params["Content-Type"] = _content_type 18006 else: 18007 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 18008 if _default_content_type is not None: 18009 _header_params["Content-Type"] = _default_content_type 18010 18011 # authentication setting 18012 _auth_settings: List[str] = [] 18013 18014 return self.api_client.param_serialize( 18015 method="POST", 18016 resource_path="/v2/boards/{board_id}/docs", 18017 path_params=_path_params, 18018 query_params=_query_params, 18019 header_params=_header_params, 18020 body=_body_params, 18021 post_params=_form_params, 18022 files=_files, 18023 auth_settings=_auth_settings, 18024 collection_formats=_collection_formats, 18025 _host=_host, 18026 _request_auth=_request_auth, 18027 ) 18028 18029 @validate_call 18030 def delete_doc_format_item( 18031 self, 18032 board_id: Annotated[ 18033 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 18034 ], 18035 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 18036 _request_timeout: Union[ 18037 None, 18038 Annotated[StrictFloat, Field(gt=0)], 18039 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18040 ] = None, 18041 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18042 _content_type: Optional[StrictStr] = None, 18043 _headers: Optional[Dict[StrictStr, Any]] = None, 18044 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18045 ) -> object: 18046 """Delete doc format item 18047 18048 Deletes a doc format item from the board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 18049 18050 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 18051 :type board_id: str 18052 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 18053 :type item_id: str 18054 :param _request_timeout: timeout setting for this request. If one 18055 number provided, it will be total request 18056 timeout. It can also be a pair (tuple) of 18057 (connection, read) timeouts. 18058 :type _request_timeout: int, tuple(int, int), optional 18059 :param _request_auth: set to override the auth_settings for an a single 18060 request; this effectively ignores the 18061 authentication in the spec for a single request. 18062 :type _request_auth: dict, optional 18063 :param _content_type: force content-type for the request. 18064 :type _content_type: str, Optional 18065 :param _headers: set to override the headers for a single 18066 request; this effectively ignores the headers 18067 in the spec for a single request. 18068 :type _headers: dict, optional 18069 :param _host_index: set to override the host_index for a single 18070 request; this effectively ignores the host_index 18071 in the spec for a single request. 18072 :type _host_index: int, optional 18073 :return: Returns the result object. 18074 """ # noqa: E501 18075 18076 _param = self._delete_doc_format_item_serialize( 18077 board_id=board_id, 18078 item_id=item_id, 18079 _request_auth=_request_auth, 18080 _content_type=_content_type, 18081 _headers=_headers, 18082 _host_index=_host_index, 18083 ) 18084 18085 _response_types_map: Dict[str, Optional[str]] = { 18086 "204": "object", 18087 "400": None, 18088 "404": None, 18089 "429": None, 18090 } 18091 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18092 response_data.read() 18093 return self.api_client.response_deserialize( 18094 response_data=response_data, 18095 response_types_map=_response_types_map, 18096 ).data 18097 18098 def _delete_doc_format_item_serialize( 18099 self, 18100 board_id, 18101 item_id, 18102 _request_auth, 18103 _content_type, 18104 _headers, 18105 _host_index, 18106 ) -> RequestSerialized: 18107 18108 _host = None 18109 18110 _collection_formats: Dict[str, str] = {} 18111 18112 _path_params: Dict[str, str] = {} 18113 _query_params: List[Tuple[str, str]] = [] 18114 _header_params: Dict[str, Optional[str]] = _headers or {} 18115 _form_params: List[Tuple[str, str]] = [] 18116 _files: Dict[str, str] = {} 18117 _body_params: Optional[bytes] = None 18118 18119 # process the path parameters 18120 if board_id is not None: 18121 _path_params["board_id"] = board_id 18122 if item_id is not None: 18123 _path_params["item_id"] = item_id 18124 # process the query parameters 18125 # process the header parameters 18126 # process the form parameters 18127 # process the body parameter 18128 18129 # set the HTTP header `Accept` 18130 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18131 18132 # authentication setting 18133 _auth_settings: List[str] = [] 18134 18135 return self.api_client.param_serialize( 18136 method="DELETE", 18137 resource_path="/v2/boards/{board_id}/docs/{item_id}", 18138 path_params=_path_params, 18139 query_params=_query_params, 18140 header_params=_header_params, 18141 body=_body_params, 18142 post_params=_form_params, 18143 files=_files, 18144 auth_settings=_auth_settings, 18145 collection_formats=_collection_formats, 18146 _host=_host, 18147 _request_auth=_request_auth, 18148 ) 18149 18150 @validate_call 18151 def get_doc_format_item( 18152 self, 18153 board_id: Annotated[ 18154 StrictStr, 18155 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 18156 ], 18157 item_id: Annotated[ 18158 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 18159 ], 18160 text_content_type: Annotated[ 18161 Optional[StrictStr], Field(description="Controls the contentType of the returned doc's content.") 18162 ] = None, 18163 _request_timeout: Union[ 18164 None, 18165 Annotated[StrictFloat, Field(gt=0)], 18166 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18167 ] = None, 18168 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18169 _content_type: Optional[StrictStr] = None, 18170 _headers: Optional[Dict[StrictStr, Any]] = None, 18171 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18172 ) -> DocFormatItem: 18173 """Get doc format item 18174 18175 Retrieves information for a specific doc format item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 18176 18177 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 18178 :type board_id: str 18179 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 18180 :type item_id: str 18181 :param text_content_type: Controls the contentType of the returned doc's content. 18182 :type text_content_type: str 18183 :param _request_timeout: timeout setting for this request. If one 18184 number provided, it will be total request 18185 timeout. It can also be a pair (tuple) of 18186 (connection, read) timeouts. 18187 :type _request_timeout: int, tuple(int, int), optional 18188 :param _request_auth: set to override the auth_settings for an a single 18189 request; this effectively ignores the 18190 authentication in the spec for a single request. 18191 :type _request_auth: dict, optional 18192 :param _content_type: force content-type for the request. 18193 :type _content_type: str, Optional 18194 :param _headers: set to override the headers for a single 18195 request; this effectively ignores the headers 18196 in the spec for a single request. 18197 :type _headers: dict, optional 18198 :param _host_index: set to override the host_index for a single 18199 request; this effectively ignores the host_index 18200 in the spec for a single request. 18201 :type _host_index: int, optional 18202 :return: Returns the result object. 18203 """ # noqa: E501 18204 18205 _param = self._get_doc_format_item_serialize( 18206 board_id=board_id, 18207 item_id=item_id, 18208 text_content_type=text_content_type, 18209 _request_auth=_request_auth, 18210 _content_type=_content_type, 18211 _headers=_headers, 18212 _host_index=_host_index, 18213 ) 18214 18215 _response_types_map: Dict[str, Optional[str]] = { 18216 "200": "DocFormatItem", 18217 "400": None, 18218 "404": None, 18219 "429": None, 18220 } 18221 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18222 response_data.read() 18223 return self.api_client.response_deserialize( 18224 response_data=response_data, 18225 response_types_map=_response_types_map, 18226 ).data 18227 18228 def _get_doc_format_item_serialize( 18229 self, 18230 board_id, 18231 item_id, 18232 text_content_type, 18233 _request_auth, 18234 _content_type, 18235 _headers, 18236 _host_index, 18237 ) -> RequestSerialized: 18238 18239 _host = None 18240 18241 _collection_formats: Dict[str, str] = {} 18242 18243 _path_params: Dict[str, str] = {} 18244 _query_params: List[Tuple[str, str]] = [] 18245 _header_params: Dict[str, Optional[str]] = _headers or {} 18246 _form_params: List[Tuple[str, str]] = [] 18247 _files: Dict[str, str] = {} 18248 _body_params: Optional[bytes] = None 18249 18250 # process the path parameters 18251 if board_id is not None: 18252 _path_params["board_id"] = board_id 18253 if item_id is not None: 18254 _path_params["item_id"] = item_id 18255 # process the query parameters 18256 if text_content_type is not None: 18257 18258 _query_params.append(("textContentType", text_content_type)) 18259 18260 # process the header parameters 18261 # process the form parameters 18262 # process the body parameter 18263 18264 # set the HTTP header `Accept` 18265 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18266 18267 # authentication setting 18268 _auth_settings: List[str] = [] 18269 18270 return self.api_client.param_serialize( 18271 method="GET", 18272 resource_path="/v2/boards/{board_id}/docs/{item_id}", 18273 path_params=_path_params, 18274 query_params=_query_params, 18275 header_params=_header_params, 18276 body=_body_params, 18277 post_params=_form_params, 18278 files=_files, 18279 auth_settings=_auth_settings, 18280 collection_formats=_collection_formats, 18281 _host=_host, 18282 _request_auth=_request_auth, 18283 ) 18284 18285 @validate_call 18286 def create_document_item_using_file_from_device( 18287 self, 18288 board_id_platform_file_upload: Annotated[ 18289 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 18290 ], 18291 resource: Annotated[ 18292 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 18293 ], 18294 data: Optional[CreateDocumentItemUsingFileFromDeviceRequestData] = None, 18295 _request_timeout: Union[ 18296 None, 18297 Annotated[StrictFloat, Field(gt=0)], 18298 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18299 ] = None, 18300 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18301 _content_type: Optional[StrictStr] = None, 18302 _headers: Optional[Dict[StrictStr, Any]] = None, 18303 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18304 ) -> DocumentItem: 18305 """Create document item using file from device 18306 18307 Adds a document item to a board by selecting file from device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18308 18309 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) 18310 :type board_id_platform_file_upload: str 18311 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 18312 :type resource: bytearray 18313 :param data: 18314 :type data: CreateDocumentItemUsingFileFromDeviceRequestData 18315 :param _request_timeout: timeout setting for this request. If one 18316 number provided, it will be total request 18317 timeout. It can also be a pair (tuple) of 18318 (connection, read) timeouts. 18319 :type _request_timeout: int, tuple(int, int), optional 18320 :param _request_auth: set to override the auth_settings for an a single 18321 request; this effectively ignores the 18322 authentication in the spec for a single request. 18323 :type _request_auth: dict, optional 18324 :param _content_type: force content-type for the request. 18325 :type _content_type: str, Optional 18326 :param _headers: set to override the headers for a single 18327 request; this effectively ignores the headers 18328 in the spec for a single request. 18329 :type _headers: dict, optional 18330 :param _host_index: set to override the host_index for a single 18331 request; this effectively ignores the host_index 18332 in the spec for a single request. 18333 :type _host_index: int, optional 18334 :return: Returns the result object. 18335 """ # noqa: E501 18336 18337 _param = self._create_document_item_using_file_from_device_serialize( 18338 board_id_platform_file_upload=board_id_platform_file_upload, 18339 resource=resource, 18340 data=data, 18341 _request_auth=_request_auth, 18342 _content_type=_content_type, 18343 _headers=_headers, 18344 _host_index=_host_index, 18345 ) 18346 18347 _response_types_map: Dict[str, Optional[str]] = { 18348 "201": "DocumentItem", 18349 } 18350 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18351 response_data.read() 18352 return self.api_client.response_deserialize( 18353 response_data=response_data, 18354 response_types_map=_response_types_map, 18355 ).data 18356 18357 def _create_document_item_using_file_from_device_serialize( 18358 self, 18359 board_id_platform_file_upload, 18360 resource, 18361 data, 18362 _request_auth, 18363 _content_type, 18364 _headers, 18365 _host_index, 18366 ) -> RequestSerialized: 18367 18368 _host = None 18369 18370 _collection_formats: Dict[str, str] = {} 18371 18372 _path_params: Dict[str, str] = {} 18373 _query_params: List[Tuple[str, str]] = [] 18374 _header_params: Dict[str, Optional[str]] = _headers or {} 18375 _form_params: List[Tuple[str, str]] = [] 18376 _files: Dict[str, str] = {} 18377 _body_params: Optional[bytes] = None 18378 18379 # process the path parameters 18380 if board_id_platform_file_upload is not None: 18381 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 18382 # process the query parameters 18383 # process the header parameters 18384 # process the form parameters 18385 if data is not None: 18386 _form_params.append(("data", data)) 18387 if resource is not None: 18388 _files["resource"] = resource 18389 # process the body parameter 18390 18391 # set the HTTP header `Accept` 18392 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18393 18394 # set the HTTP header `Content-Type` 18395 if _content_type: 18396 _header_params["Content-Type"] = _content_type 18397 else: 18398 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 18399 if _default_content_type is not None: 18400 _header_params["Content-Type"] = _default_content_type 18401 18402 # authentication setting 18403 _auth_settings: List[str] = [] 18404 18405 return self.api_client.param_serialize( 18406 method="POST", 18407 resource_path="/v2/boards/{board_id_PlatformFileUpload}/documents", 18408 path_params=_path_params, 18409 query_params=_query_params, 18410 header_params=_header_params, 18411 body=_body_params, 18412 post_params=_form_params, 18413 files=_files, 18414 auth_settings=_auth_settings, 18415 collection_formats=_collection_formats, 18416 _host=_host, 18417 _request_auth=_request_auth, 18418 ) 18419 18420 @validate_call 18421 def create_document_item_using_url( 18422 self, 18423 board_id: Annotated[ 18424 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 18425 ], 18426 document_create_request: DocumentCreateRequest, 18427 _request_timeout: Union[ 18428 None, 18429 Annotated[StrictFloat, Field(gt=0)], 18430 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18431 ] = None, 18432 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18433 _content_type: Optional[StrictStr] = None, 18434 _headers: Optional[Dict[StrictStr, Any]] = None, 18435 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18436 ) -> DocumentItem: 18437 """Create document item using URL 18438 18439 Adds a document item to a board by specifying the URL where the document is hosted.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18440 18441 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 18442 :type board_id: str 18443 :param document_create_request: (required) 18444 :type document_create_request: DocumentCreateRequest 18445 :param _request_timeout: timeout setting for this request. If one 18446 number provided, it will be total request 18447 timeout. It can also be a pair (tuple) of 18448 (connection, read) timeouts. 18449 :type _request_timeout: int, tuple(int, int), optional 18450 :param _request_auth: set to override the auth_settings for an a single 18451 request; this effectively ignores the 18452 authentication in the spec for a single request. 18453 :type _request_auth: dict, optional 18454 :param _content_type: force content-type for the request. 18455 :type _content_type: str, Optional 18456 :param _headers: set to override the headers for a single 18457 request; this effectively ignores the headers 18458 in the spec for a single request. 18459 :type _headers: dict, optional 18460 :param _host_index: set to override the host_index for a single 18461 request; this effectively ignores the host_index 18462 in the spec for a single request. 18463 :type _host_index: int, optional 18464 :return: Returns the result object. 18465 """ # noqa: E501 18466 18467 _param = self._create_document_item_using_url_serialize( 18468 board_id=board_id, 18469 document_create_request=document_create_request, 18470 _request_auth=_request_auth, 18471 _content_type=_content_type, 18472 _headers=_headers, 18473 _host_index=_host_index, 18474 ) 18475 18476 _response_types_map: Dict[str, Optional[str]] = { 18477 "201": "DocumentItem", 18478 "400": None, 18479 "404": None, 18480 "429": None, 18481 } 18482 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18483 response_data.read() 18484 return self.api_client.response_deserialize( 18485 response_data=response_data, 18486 response_types_map=_response_types_map, 18487 ).data 18488 18489 def _create_document_item_using_url_serialize( 18490 self, 18491 board_id, 18492 document_create_request, 18493 _request_auth, 18494 _content_type, 18495 _headers, 18496 _host_index, 18497 ) -> RequestSerialized: 18498 18499 _host = None 18500 18501 _collection_formats: Dict[str, str] = {} 18502 18503 _path_params: Dict[str, str] = {} 18504 _query_params: List[Tuple[str, str]] = [] 18505 _header_params: Dict[str, Optional[str]] = _headers or {} 18506 _form_params: List[Tuple[str, str]] = [] 18507 _files: Dict[str, str] = {} 18508 _body_params: Optional[bytes] = None 18509 18510 # process the path parameters 18511 if board_id is not None: 18512 _path_params["board_id"] = board_id 18513 # process the query parameters 18514 # process the header parameters 18515 # process the form parameters 18516 # process the body parameter 18517 if document_create_request is not None: 18518 _body_params = document_create_request 18519 18520 # set the HTTP header `Accept` 18521 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18522 18523 # set the HTTP header `Content-Type` 18524 if _content_type: 18525 _header_params["Content-Type"] = _content_type 18526 else: 18527 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 18528 if _default_content_type is not None: 18529 _header_params["Content-Type"] = _default_content_type 18530 18531 # authentication setting 18532 _auth_settings: List[str] = [] 18533 18534 return self.api_client.param_serialize( 18535 method="POST", 18536 resource_path="/v2/boards/{board_id}/documents", 18537 path_params=_path_params, 18538 query_params=_query_params, 18539 header_params=_header_params, 18540 body=_body_params, 18541 post_params=_form_params, 18542 files=_files, 18543 auth_settings=_auth_settings, 18544 collection_formats=_collection_formats, 18545 _host=_host, 18546 _request_auth=_request_auth, 18547 ) 18548 18549 @validate_call 18550 def delete_document_item( 18551 self, 18552 board_id: Annotated[ 18553 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 18554 ], 18555 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 18556 _request_timeout: Union[ 18557 None, 18558 Annotated[StrictFloat, Field(gt=0)], 18559 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18560 ] = None, 18561 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18562 _content_type: Optional[StrictStr] = None, 18563 _headers: Optional[Dict[StrictStr, Any]] = None, 18564 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18565 ) -> object: 18566 """Delete document item 18567 18568 Deletes a document item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 18569 18570 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 18571 :type board_id: str 18572 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 18573 :type item_id: str 18574 :param _request_timeout: timeout setting for this request. If one 18575 number provided, it will be total request 18576 timeout. It can also be a pair (tuple) of 18577 (connection, read) timeouts. 18578 :type _request_timeout: int, tuple(int, int), optional 18579 :param _request_auth: set to override the auth_settings for an a single 18580 request; this effectively ignores the 18581 authentication in the spec for a single request. 18582 :type _request_auth: dict, optional 18583 :param _content_type: force content-type for the request. 18584 :type _content_type: str, Optional 18585 :param _headers: set to override the headers for a single 18586 request; this effectively ignores the headers 18587 in the spec for a single request. 18588 :type _headers: dict, optional 18589 :param _host_index: set to override the host_index for a single 18590 request; this effectively ignores the host_index 18591 in the spec for a single request. 18592 :type _host_index: int, optional 18593 :return: Returns the result object. 18594 """ # noqa: E501 18595 18596 _param = self._delete_document_item_serialize( 18597 board_id=board_id, 18598 item_id=item_id, 18599 _request_auth=_request_auth, 18600 _content_type=_content_type, 18601 _headers=_headers, 18602 _host_index=_host_index, 18603 ) 18604 18605 _response_types_map: Dict[str, Optional[str]] = { 18606 "204": "object", 18607 "400": None, 18608 "404": None, 18609 "429": None, 18610 } 18611 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18612 response_data.read() 18613 return self.api_client.response_deserialize( 18614 response_data=response_data, 18615 response_types_map=_response_types_map, 18616 ).data 18617 18618 def _delete_document_item_serialize( 18619 self, 18620 board_id, 18621 item_id, 18622 _request_auth, 18623 _content_type, 18624 _headers, 18625 _host_index, 18626 ) -> RequestSerialized: 18627 18628 _host = None 18629 18630 _collection_formats: Dict[str, str] = {} 18631 18632 _path_params: Dict[str, str] = {} 18633 _query_params: List[Tuple[str, str]] = [] 18634 _header_params: Dict[str, Optional[str]] = _headers or {} 18635 _form_params: List[Tuple[str, str]] = [] 18636 _files: Dict[str, str] = {} 18637 _body_params: Optional[bytes] = None 18638 18639 # process the path parameters 18640 if board_id is not None: 18641 _path_params["board_id"] = board_id 18642 if item_id is not None: 18643 _path_params["item_id"] = item_id 18644 # process the query parameters 18645 # process the header parameters 18646 # process the form parameters 18647 # process the body parameter 18648 18649 # set the HTTP header `Accept` 18650 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18651 18652 # authentication setting 18653 _auth_settings: List[str] = [] 18654 18655 return self.api_client.param_serialize( 18656 method="DELETE", 18657 resource_path="/v2/boards/{board_id}/documents/{item_id}", 18658 path_params=_path_params, 18659 query_params=_query_params, 18660 header_params=_header_params, 18661 body=_body_params, 18662 post_params=_form_params, 18663 files=_files, 18664 auth_settings=_auth_settings, 18665 collection_formats=_collection_formats, 18666 _host=_host, 18667 _request_auth=_request_auth, 18668 ) 18669 18670 @validate_call 18671 def get_document_item( 18672 self, 18673 board_id: Annotated[ 18674 StrictStr, 18675 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 18676 ], 18677 item_id: Annotated[ 18678 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 18679 ], 18680 _request_timeout: Union[ 18681 None, 18682 Annotated[StrictFloat, Field(gt=0)], 18683 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18684 ] = None, 18685 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18686 _content_type: Optional[StrictStr] = None, 18687 _headers: Optional[Dict[StrictStr, Any]] = None, 18688 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18689 ) -> DocumentItem: 18690 """Get document item 18691 18692 Retrieves information for a specific document item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 18693 18694 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 18695 :type board_id: str 18696 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 18697 :type item_id: str 18698 :param _request_timeout: timeout setting for this request. If one 18699 number provided, it will be total request 18700 timeout. It can also be a pair (tuple) of 18701 (connection, read) timeouts. 18702 :type _request_timeout: int, tuple(int, int), optional 18703 :param _request_auth: set to override the auth_settings for an a single 18704 request; this effectively ignores the 18705 authentication in the spec for a single request. 18706 :type _request_auth: dict, optional 18707 :param _content_type: force content-type for the request. 18708 :type _content_type: str, Optional 18709 :param _headers: set to override the headers for a single 18710 request; this effectively ignores the headers 18711 in the spec for a single request. 18712 :type _headers: dict, optional 18713 :param _host_index: set to override the host_index for a single 18714 request; this effectively ignores the host_index 18715 in the spec for a single request. 18716 :type _host_index: int, optional 18717 :return: Returns the result object. 18718 """ # noqa: E501 18719 18720 _param = self._get_document_item_serialize( 18721 board_id=board_id, 18722 item_id=item_id, 18723 _request_auth=_request_auth, 18724 _content_type=_content_type, 18725 _headers=_headers, 18726 _host_index=_host_index, 18727 ) 18728 18729 _response_types_map: Dict[str, Optional[str]] = { 18730 "200": "DocumentItem", 18731 "400": None, 18732 "404": None, 18733 "429": None, 18734 } 18735 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18736 response_data.read() 18737 return self.api_client.response_deserialize( 18738 response_data=response_data, 18739 response_types_map=_response_types_map, 18740 ).data 18741 18742 def _get_document_item_serialize( 18743 self, 18744 board_id, 18745 item_id, 18746 _request_auth, 18747 _content_type, 18748 _headers, 18749 _host_index, 18750 ) -> RequestSerialized: 18751 18752 _host = None 18753 18754 _collection_formats: Dict[str, str] = {} 18755 18756 _path_params: Dict[str, str] = {} 18757 _query_params: List[Tuple[str, str]] = [] 18758 _header_params: Dict[str, Optional[str]] = _headers or {} 18759 _form_params: List[Tuple[str, str]] = [] 18760 _files: Dict[str, str] = {} 18761 _body_params: Optional[bytes] = None 18762 18763 # process the path parameters 18764 if board_id is not None: 18765 _path_params["board_id"] = board_id 18766 if item_id is not None: 18767 _path_params["item_id"] = item_id 18768 # process the query parameters 18769 # process the header parameters 18770 # process the form parameters 18771 # process the body parameter 18772 18773 # set the HTTP header `Accept` 18774 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18775 18776 # authentication setting 18777 _auth_settings: List[str] = [] 18778 18779 return self.api_client.param_serialize( 18780 method="GET", 18781 resource_path="/v2/boards/{board_id}/documents/{item_id}", 18782 path_params=_path_params, 18783 query_params=_query_params, 18784 header_params=_header_params, 18785 body=_body_params, 18786 post_params=_form_params, 18787 files=_files, 18788 auth_settings=_auth_settings, 18789 collection_formats=_collection_formats, 18790 _host=_host, 18791 _request_auth=_request_auth, 18792 ) 18793 18794 @validate_call 18795 def update_document_item_using_file_from_device( 18796 self, 18797 board_id_platform_file_upload: Annotated[ 18798 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 18799 ], 18800 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 18801 resource: Annotated[ 18802 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 18803 ], 18804 data: Optional[UploadFileFromDeviceData] = None, 18805 _request_timeout: Union[ 18806 None, 18807 Annotated[StrictFloat, Field(gt=0)], 18808 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18809 ] = None, 18810 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18811 _content_type: Optional[StrictStr] = None, 18812 _headers: Optional[Dict[StrictStr, Any]] = None, 18813 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18814 ) -> DocumentItem: 18815 """Update document item using file from device 18816 18817 Updates a document item on a board by using file from a device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18818 18819 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) 18820 :type board_id_platform_file_upload: str 18821 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 18822 :type item_id: str 18823 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 18824 :type resource: bytearray 18825 :param data: 18826 :type data: UploadFileFromDeviceData 18827 :param _request_timeout: timeout setting for this request. If one 18828 number provided, it will be total request 18829 timeout. It can also be a pair (tuple) of 18830 (connection, read) timeouts. 18831 :type _request_timeout: int, tuple(int, int), optional 18832 :param _request_auth: set to override the auth_settings for an a single 18833 request; this effectively ignores the 18834 authentication in the spec for a single request. 18835 :type _request_auth: dict, optional 18836 :param _content_type: force content-type for the request. 18837 :type _content_type: str, Optional 18838 :param _headers: set to override the headers for a single 18839 request; this effectively ignores the headers 18840 in the spec for a single request. 18841 :type _headers: dict, optional 18842 :param _host_index: set to override the host_index for a single 18843 request; this effectively ignores the host_index 18844 in the spec for a single request. 18845 :type _host_index: int, optional 18846 :return: Returns the result object. 18847 """ # noqa: E501 18848 18849 _param = self._update_document_item_using_file_from_device_serialize( 18850 board_id_platform_file_upload=board_id_platform_file_upload, 18851 item_id=item_id, 18852 resource=resource, 18853 data=data, 18854 _request_auth=_request_auth, 18855 _content_type=_content_type, 18856 _headers=_headers, 18857 _host_index=_host_index, 18858 ) 18859 18860 _response_types_map: Dict[str, Optional[str]] = { 18861 "200": "DocumentItem", 18862 } 18863 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18864 response_data.read() 18865 return self.api_client.response_deserialize( 18866 response_data=response_data, 18867 response_types_map=_response_types_map, 18868 ).data 18869 18870 def _update_document_item_using_file_from_device_serialize( 18871 self, 18872 board_id_platform_file_upload, 18873 item_id, 18874 resource, 18875 data, 18876 _request_auth, 18877 _content_type, 18878 _headers, 18879 _host_index, 18880 ) -> RequestSerialized: 18881 18882 _host = None 18883 18884 _collection_formats: Dict[str, str] = {} 18885 18886 _path_params: Dict[str, str] = {} 18887 _query_params: List[Tuple[str, str]] = [] 18888 _header_params: Dict[str, Optional[str]] = _headers or {} 18889 _form_params: List[Tuple[str, str]] = [] 18890 _files: Dict[str, str] = {} 18891 _body_params: Optional[bytes] = None 18892 18893 # process the path parameters 18894 if board_id_platform_file_upload is not None: 18895 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 18896 if item_id is not None: 18897 _path_params["item_id"] = item_id 18898 # process the query parameters 18899 # process the header parameters 18900 # process the form parameters 18901 if data is not None: 18902 _form_params.append(("data", data)) 18903 if resource is not None: 18904 _files["resource"] = resource 18905 # process the body parameter 18906 18907 # set the HTTP header `Accept` 18908 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18909 18910 # set the HTTP header `Content-Type` 18911 if _content_type: 18912 _header_params["Content-Type"] = _content_type 18913 else: 18914 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 18915 if _default_content_type is not None: 18916 _header_params["Content-Type"] = _default_content_type 18917 18918 # authentication setting 18919 _auth_settings: List[str] = [] 18920 18921 return self.api_client.param_serialize( 18922 method="PATCH", 18923 resource_path="/v2/boards/{board_id_PlatformFileUpload}/documents/{item_id}", 18924 path_params=_path_params, 18925 query_params=_query_params, 18926 header_params=_header_params, 18927 body=_body_params, 18928 post_params=_form_params, 18929 files=_files, 18930 auth_settings=_auth_settings, 18931 collection_formats=_collection_formats, 18932 _host=_host, 18933 _request_auth=_request_auth, 18934 ) 18935 18936 @validate_call 18937 def update_document_item_using_url( 18938 self, 18939 board_id: Annotated[ 18940 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 18941 ], 18942 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 18943 document_update_request: DocumentUpdateRequest, 18944 _request_timeout: Union[ 18945 None, 18946 Annotated[StrictFloat, Field(gt=0)], 18947 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18948 ] = None, 18949 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18950 _content_type: Optional[StrictStr] = None, 18951 _headers: Optional[Dict[StrictStr, Any]] = None, 18952 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18953 ) -> DocumentItem: 18954 """Update document item using URL 18955 18956 Updates a document item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18957 18958 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 18959 :type board_id: str 18960 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 18961 :type item_id: str 18962 :param document_update_request: (required) 18963 :type document_update_request: DocumentUpdateRequest 18964 :param _request_timeout: timeout setting for this request. If one 18965 number provided, it will be total request 18966 timeout. It can also be a pair (tuple) of 18967 (connection, read) timeouts. 18968 :type _request_timeout: int, tuple(int, int), optional 18969 :param _request_auth: set to override the auth_settings for an a single 18970 request; this effectively ignores the 18971 authentication in the spec for a single request. 18972 :type _request_auth: dict, optional 18973 :param _content_type: force content-type for the request. 18974 :type _content_type: str, Optional 18975 :param _headers: set to override the headers for a single 18976 request; this effectively ignores the headers 18977 in the spec for a single request. 18978 :type _headers: dict, optional 18979 :param _host_index: set to override the host_index for a single 18980 request; this effectively ignores the host_index 18981 in the spec for a single request. 18982 :type _host_index: int, optional 18983 :return: Returns the result object. 18984 """ # noqa: E501 18985 18986 _param = self._update_document_item_using_url_serialize( 18987 board_id=board_id, 18988 item_id=item_id, 18989 document_update_request=document_update_request, 18990 _request_auth=_request_auth, 18991 _content_type=_content_type, 18992 _headers=_headers, 18993 _host_index=_host_index, 18994 ) 18995 18996 _response_types_map: Dict[str, Optional[str]] = { 18997 "200": "DocumentItem", 18998 "400": None, 18999 "404": None, 19000 "409": None, 19001 "429": None, 19002 } 19003 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19004 response_data.read() 19005 return self.api_client.response_deserialize( 19006 response_data=response_data, 19007 response_types_map=_response_types_map, 19008 ).data 19009 19010 def _update_document_item_using_url_serialize( 19011 self, 19012 board_id, 19013 item_id, 19014 document_update_request, 19015 _request_auth, 19016 _content_type, 19017 _headers, 19018 _host_index, 19019 ) -> RequestSerialized: 19020 19021 _host = None 19022 19023 _collection_formats: Dict[str, str] = {} 19024 19025 _path_params: Dict[str, str] = {} 19026 _query_params: List[Tuple[str, str]] = [] 19027 _header_params: Dict[str, Optional[str]] = _headers or {} 19028 _form_params: List[Tuple[str, str]] = [] 19029 _files: Dict[str, str] = {} 19030 _body_params: Optional[bytes] = None 19031 19032 # process the path parameters 19033 if board_id is not None: 19034 _path_params["board_id"] = board_id 19035 if item_id is not None: 19036 _path_params["item_id"] = item_id 19037 # process the query parameters 19038 # process the header parameters 19039 # process the form parameters 19040 # process the body parameter 19041 if document_update_request is not None: 19042 _body_params = document_update_request 19043 19044 # set the HTTP header `Accept` 19045 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19046 19047 # set the HTTP header `Content-Type` 19048 if _content_type: 19049 _header_params["Content-Type"] = _content_type 19050 else: 19051 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19052 if _default_content_type is not None: 19053 _header_params["Content-Type"] = _default_content_type 19054 19055 # authentication setting 19056 _auth_settings: List[str] = [] 19057 19058 return self.api_client.param_serialize( 19059 method="PATCH", 19060 resource_path="/v2/boards/{board_id}/documents/{item_id}", 19061 path_params=_path_params, 19062 query_params=_query_params, 19063 header_params=_header_params, 19064 body=_body_params, 19065 post_params=_form_params, 19066 files=_files, 19067 auth_settings=_auth_settings, 19068 collection_formats=_collection_formats, 19069 _host=_host, 19070 _request_auth=_request_auth, 19071 ) 19072 19073 @validate_call 19074 def create_embed_item( 19075 self, 19076 board_id: Annotated[ 19077 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 19078 ], 19079 embed_create_request: EmbedCreateRequest, 19080 _request_timeout: Union[ 19081 None, 19082 Annotated[StrictFloat, Field(gt=0)], 19083 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19084 ] = None, 19085 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19086 _content_type: Optional[StrictStr] = None, 19087 _headers: Optional[Dict[StrictStr, Any]] = None, 19088 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19089 ) -> EmbedItem: 19090 """Create embed item 19091 19092 Adds an embed item containing external content to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19093 19094 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 19095 :type board_id: str 19096 :param embed_create_request: (required) 19097 :type embed_create_request: EmbedCreateRequest 19098 :param _request_timeout: timeout setting for this request. If one 19099 number provided, it will be total request 19100 timeout. It can also be a pair (tuple) of 19101 (connection, read) timeouts. 19102 :type _request_timeout: int, tuple(int, int), optional 19103 :param _request_auth: set to override the auth_settings for an a single 19104 request; this effectively ignores the 19105 authentication in the spec for a single request. 19106 :type _request_auth: dict, optional 19107 :param _content_type: force content-type for the request. 19108 :type _content_type: str, Optional 19109 :param _headers: set to override the headers for a single 19110 request; this effectively ignores the headers 19111 in the spec for a single request. 19112 :type _headers: dict, optional 19113 :param _host_index: set to override the host_index for a single 19114 request; this effectively ignores the host_index 19115 in the spec for a single request. 19116 :type _host_index: int, optional 19117 :return: Returns the result object. 19118 """ # noqa: E501 19119 19120 _param = self._create_embed_item_serialize( 19121 board_id=board_id, 19122 embed_create_request=embed_create_request, 19123 _request_auth=_request_auth, 19124 _content_type=_content_type, 19125 _headers=_headers, 19126 _host_index=_host_index, 19127 ) 19128 19129 _response_types_map: Dict[str, Optional[str]] = { 19130 "201": "EmbedItem", 19131 "400": None, 19132 "404": None, 19133 "429": None, 19134 } 19135 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19136 response_data.read() 19137 return self.api_client.response_deserialize( 19138 response_data=response_data, 19139 response_types_map=_response_types_map, 19140 ).data 19141 19142 def _create_embed_item_serialize( 19143 self, 19144 board_id, 19145 embed_create_request, 19146 _request_auth, 19147 _content_type, 19148 _headers, 19149 _host_index, 19150 ) -> RequestSerialized: 19151 19152 _host = None 19153 19154 _collection_formats: Dict[str, str] = {} 19155 19156 _path_params: Dict[str, str] = {} 19157 _query_params: List[Tuple[str, str]] = [] 19158 _header_params: Dict[str, Optional[str]] = _headers or {} 19159 _form_params: List[Tuple[str, str]] = [] 19160 _files: Dict[str, str] = {} 19161 _body_params: Optional[bytes] = None 19162 19163 # process the path parameters 19164 if board_id is not None: 19165 _path_params["board_id"] = board_id 19166 # process the query parameters 19167 # process the header parameters 19168 # process the form parameters 19169 # process the body parameter 19170 if embed_create_request is not None: 19171 _body_params = embed_create_request 19172 19173 # set the HTTP header `Accept` 19174 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19175 19176 # set the HTTP header `Content-Type` 19177 if _content_type: 19178 _header_params["Content-Type"] = _content_type 19179 else: 19180 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19181 if _default_content_type is not None: 19182 _header_params["Content-Type"] = _default_content_type 19183 19184 # authentication setting 19185 _auth_settings: List[str] = [] 19186 19187 return self.api_client.param_serialize( 19188 method="POST", 19189 resource_path="/v2/boards/{board_id}/embeds", 19190 path_params=_path_params, 19191 query_params=_query_params, 19192 header_params=_header_params, 19193 body=_body_params, 19194 post_params=_form_params, 19195 files=_files, 19196 auth_settings=_auth_settings, 19197 collection_formats=_collection_formats, 19198 _host=_host, 19199 _request_auth=_request_auth, 19200 ) 19201 19202 @validate_call 19203 def delete_embed_item( 19204 self, 19205 board_id: Annotated[ 19206 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 19207 ], 19208 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 19209 _request_timeout: Union[ 19210 None, 19211 Annotated[StrictFloat, Field(gt=0)], 19212 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19213 ] = None, 19214 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19215 _content_type: Optional[StrictStr] = None, 19216 _headers: Optional[Dict[StrictStr, Any]] = None, 19217 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19218 ) -> object: 19219 """Delete embed item 19220 19221 Deletes an embed item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 19222 19223 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 19224 :type board_id: str 19225 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 19226 :type item_id: str 19227 :param _request_timeout: timeout setting for this request. If one 19228 number provided, it will be total request 19229 timeout. It can also be a pair (tuple) of 19230 (connection, read) timeouts. 19231 :type _request_timeout: int, tuple(int, int), optional 19232 :param _request_auth: set to override the auth_settings for an a single 19233 request; this effectively ignores the 19234 authentication in the spec for a single request. 19235 :type _request_auth: dict, optional 19236 :param _content_type: force content-type for the request. 19237 :type _content_type: str, Optional 19238 :param _headers: set to override the headers for a single 19239 request; this effectively ignores the headers 19240 in the spec for a single request. 19241 :type _headers: dict, optional 19242 :param _host_index: set to override the host_index for a single 19243 request; this effectively ignores the host_index 19244 in the spec for a single request. 19245 :type _host_index: int, optional 19246 :return: Returns the result object. 19247 """ # noqa: E501 19248 19249 _param = self._delete_embed_item_serialize( 19250 board_id=board_id, 19251 item_id=item_id, 19252 _request_auth=_request_auth, 19253 _content_type=_content_type, 19254 _headers=_headers, 19255 _host_index=_host_index, 19256 ) 19257 19258 _response_types_map: Dict[str, Optional[str]] = { 19259 "204": "object", 19260 "400": None, 19261 "404": None, 19262 "429": None, 19263 } 19264 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19265 response_data.read() 19266 return self.api_client.response_deserialize( 19267 response_data=response_data, 19268 response_types_map=_response_types_map, 19269 ).data 19270 19271 def _delete_embed_item_serialize( 19272 self, 19273 board_id, 19274 item_id, 19275 _request_auth, 19276 _content_type, 19277 _headers, 19278 _host_index, 19279 ) -> RequestSerialized: 19280 19281 _host = None 19282 19283 _collection_formats: Dict[str, str] = {} 19284 19285 _path_params: Dict[str, str] = {} 19286 _query_params: List[Tuple[str, str]] = [] 19287 _header_params: Dict[str, Optional[str]] = _headers or {} 19288 _form_params: List[Tuple[str, str]] = [] 19289 _files: Dict[str, str] = {} 19290 _body_params: Optional[bytes] = None 19291 19292 # process the path parameters 19293 if board_id is not None: 19294 _path_params["board_id"] = board_id 19295 if item_id is not None: 19296 _path_params["item_id"] = item_id 19297 # process the query parameters 19298 # process the header parameters 19299 # process the form parameters 19300 # process the body parameter 19301 19302 # set the HTTP header `Accept` 19303 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19304 19305 # authentication setting 19306 _auth_settings: List[str] = [] 19307 19308 return self.api_client.param_serialize( 19309 method="DELETE", 19310 resource_path="/v2/boards/{board_id}/embeds/{item_id}", 19311 path_params=_path_params, 19312 query_params=_query_params, 19313 header_params=_header_params, 19314 body=_body_params, 19315 post_params=_form_params, 19316 files=_files, 19317 auth_settings=_auth_settings, 19318 collection_formats=_collection_formats, 19319 _host=_host, 19320 _request_auth=_request_auth, 19321 ) 19322 19323 @validate_call 19324 def get_embed_item( 19325 self, 19326 board_id: Annotated[ 19327 StrictStr, 19328 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 19329 ], 19330 item_id: Annotated[ 19331 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 19332 ], 19333 _request_timeout: Union[ 19334 None, 19335 Annotated[StrictFloat, Field(gt=0)], 19336 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19337 ] = None, 19338 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19339 _content_type: Optional[StrictStr] = None, 19340 _headers: Optional[Dict[StrictStr, Any]] = None, 19341 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19342 ) -> EmbedItem: 19343 """Get embed item 19344 19345 Retrieves information for a specific embed item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 19346 19347 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 19348 :type board_id: str 19349 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 19350 :type item_id: str 19351 :param _request_timeout: timeout setting for this request. If one 19352 number provided, it will be total request 19353 timeout. It can also be a pair (tuple) of 19354 (connection, read) timeouts. 19355 :type _request_timeout: int, tuple(int, int), optional 19356 :param _request_auth: set to override the auth_settings for an a single 19357 request; this effectively ignores the 19358 authentication in the spec for a single request. 19359 :type _request_auth: dict, optional 19360 :param _content_type: force content-type for the request. 19361 :type _content_type: str, Optional 19362 :param _headers: set to override the headers for a single 19363 request; this effectively ignores the headers 19364 in the spec for a single request. 19365 :type _headers: dict, optional 19366 :param _host_index: set to override the host_index for a single 19367 request; this effectively ignores the host_index 19368 in the spec for a single request. 19369 :type _host_index: int, optional 19370 :return: Returns the result object. 19371 """ # noqa: E501 19372 19373 _param = self._get_embed_item_serialize( 19374 board_id=board_id, 19375 item_id=item_id, 19376 _request_auth=_request_auth, 19377 _content_type=_content_type, 19378 _headers=_headers, 19379 _host_index=_host_index, 19380 ) 19381 19382 _response_types_map: Dict[str, Optional[str]] = { 19383 "200": "EmbedItem", 19384 "400": None, 19385 "404": None, 19386 "429": None, 19387 } 19388 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19389 response_data.read() 19390 return self.api_client.response_deserialize( 19391 response_data=response_data, 19392 response_types_map=_response_types_map, 19393 ).data 19394 19395 def _get_embed_item_serialize( 19396 self, 19397 board_id, 19398 item_id, 19399 _request_auth, 19400 _content_type, 19401 _headers, 19402 _host_index, 19403 ) -> RequestSerialized: 19404 19405 _host = None 19406 19407 _collection_formats: Dict[str, str] = {} 19408 19409 _path_params: Dict[str, str] = {} 19410 _query_params: List[Tuple[str, str]] = [] 19411 _header_params: Dict[str, Optional[str]] = _headers or {} 19412 _form_params: List[Tuple[str, str]] = [] 19413 _files: Dict[str, str] = {} 19414 _body_params: Optional[bytes] = None 19415 19416 # process the path parameters 19417 if board_id is not None: 19418 _path_params["board_id"] = board_id 19419 if item_id is not None: 19420 _path_params["item_id"] = item_id 19421 # process the query parameters 19422 # process the header parameters 19423 # process the form parameters 19424 # process the body parameter 19425 19426 # set the HTTP header `Accept` 19427 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19428 19429 # authentication setting 19430 _auth_settings: List[str] = [] 19431 19432 return self.api_client.param_serialize( 19433 method="GET", 19434 resource_path="/v2/boards/{board_id}/embeds/{item_id}", 19435 path_params=_path_params, 19436 query_params=_query_params, 19437 header_params=_header_params, 19438 body=_body_params, 19439 post_params=_form_params, 19440 files=_files, 19441 auth_settings=_auth_settings, 19442 collection_formats=_collection_formats, 19443 _host=_host, 19444 _request_auth=_request_auth, 19445 ) 19446 19447 @validate_call 19448 def update_embed_item( 19449 self, 19450 board_id: Annotated[ 19451 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 19452 ], 19453 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 19454 embed_update_request: EmbedUpdateRequest, 19455 _request_timeout: Union[ 19456 None, 19457 Annotated[StrictFloat, Field(gt=0)], 19458 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19459 ] = None, 19460 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19461 _content_type: Optional[StrictStr] = None, 19462 _headers: Optional[Dict[StrictStr, Any]] = None, 19463 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19464 ) -> EmbedItem: 19465 """Update embed item 19466 19467 Updates an embed item on a board based on the data properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19468 19469 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 19470 :type board_id: str 19471 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 19472 :type item_id: str 19473 :param embed_update_request: (required) 19474 :type embed_update_request: EmbedUpdateRequest 19475 :param _request_timeout: timeout setting for this request. If one 19476 number provided, it will be total request 19477 timeout. It can also be a pair (tuple) of 19478 (connection, read) timeouts. 19479 :type _request_timeout: int, tuple(int, int), optional 19480 :param _request_auth: set to override the auth_settings for an a single 19481 request; this effectively ignores the 19482 authentication in the spec for a single request. 19483 :type _request_auth: dict, optional 19484 :param _content_type: force content-type for the request. 19485 :type _content_type: str, Optional 19486 :param _headers: set to override the headers for a single 19487 request; this effectively ignores the headers 19488 in the spec for a single request. 19489 :type _headers: dict, optional 19490 :param _host_index: set to override the host_index for a single 19491 request; this effectively ignores the host_index 19492 in the spec for a single request. 19493 :type _host_index: int, optional 19494 :return: Returns the result object. 19495 """ # noqa: E501 19496 19497 _param = self._update_embed_item_serialize( 19498 board_id=board_id, 19499 item_id=item_id, 19500 embed_update_request=embed_update_request, 19501 _request_auth=_request_auth, 19502 _content_type=_content_type, 19503 _headers=_headers, 19504 _host_index=_host_index, 19505 ) 19506 19507 _response_types_map: Dict[str, Optional[str]] = { 19508 "200": "EmbedItem", 19509 "400": None, 19510 "404": None, 19511 "409": None, 19512 "429": None, 19513 } 19514 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19515 response_data.read() 19516 return self.api_client.response_deserialize( 19517 response_data=response_data, 19518 response_types_map=_response_types_map, 19519 ).data 19520 19521 def _update_embed_item_serialize( 19522 self, 19523 board_id, 19524 item_id, 19525 embed_update_request, 19526 _request_auth, 19527 _content_type, 19528 _headers, 19529 _host_index, 19530 ) -> RequestSerialized: 19531 19532 _host = None 19533 19534 _collection_formats: Dict[str, str] = {} 19535 19536 _path_params: Dict[str, str] = {} 19537 _query_params: List[Tuple[str, str]] = [] 19538 _header_params: Dict[str, Optional[str]] = _headers or {} 19539 _form_params: List[Tuple[str, str]] = [] 19540 _files: Dict[str, str] = {} 19541 _body_params: Optional[bytes] = None 19542 19543 # process the path parameters 19544 if board_id is not None: 19545 _path_params["board_id"] = board_id 19546 if item_id is not None: 19547 _path_params["item_id"] = item_id 19548 # process the query parameters 19549 # process the header parameters 19550 # process the form parameters 19551 # process the body parameter 19552 if embed_update_request is not None: 19553 _body_params = embed_update_request 19554 19555 # set the HTTP header `Accept` 19556 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19557 19558 # set the HTTP header `Content-Type` 19559 if _content_type: 19560 _header_params["Content-Type"] = _content_type 19561 else: 19562 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19563 if _default_content_type is not None: 19564 _header_params["Content-Type"] = _default_content_type 19565 19566 # authentication setting 19567 _auth_settings: List[str] = [] 19568 19569 return self.api_client.param_serialize( 19570 method="PATCH", 19571 resource_path="/v2/boards/{board_id}/embeds/{item_id}", 19572 path_params=_path_params, 19573 query_params=_query_params, 19574 header_params=_header_params, 19575 body=_body_params, 19576 post_params=_form_params, 19577 files=_files, 19578 auth_settings=_auth_settings, 19579 collection_formats=_collection_formats, 19580 _host=_host, 19581 _request_auth=_request_auth, 19582 ) 19583 19584 @validate_call 19585 def create_frame_item( 19586 self, 19587 board_id: Annotated[ 19588 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create a frame.") 19589 ], 19590 frame_create_request: FrameCreateRequest, 19591 _request_timeout: Union[ 19592 None, 19593 Annotated[StrictFloat, Field(gt=0)], 19594 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19595 ] = None, 19596 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19597 _content_type: Optional[StrictStr] = None, 19598 _headers: Optional[Dict[StrictStr, Any]] = None, 19599 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19600 ) -> FrameItem: 19601 """Create frame 19602 19603 Adds a frame to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19604 19605 :param board_id: Unique identifier (ID) of the board where you want to create a frame. (required) 19606 :type board_id: str 19607 :param frame_create_request: (required) 19608 :type frame_create_request: FrameCreateRequest 19609 :param _request_timeout: timeout setting for this request. If one 19610 number provided, it will be total request 19611 timeout. It can also be a pair (tuple) of 19612 (connection, read) timeouts. 19613 :type _request_timeout: int, tuple(int, int), optional 19614 :param _request_auth: set to override the auth_settings for an a single 19615 request; this effectively ignores the 19616 authentication in the spec for a single request. 19617 :type _request_auth: dict, optional 19618 :param _content_type: force content-type for the request. 19619 :type _content_type: str, Optional 19620 :param _headers: set to override the headers for a single 19621 request; this effectively ignores the headers 19622 in the spec for a single request. 19623 :type _headers: dict, optional 19624 :param _host_index: set to override the host_index for a single 19625 request; this effectively ignores the host_index 19626 in the spec for a single request. 19627 :type _host_index: int, optional 19628 :return: Returns the result object. 19629 """ # noqa: E501 19630 19631 _param = self._create_frame_item_serialize( 19632 board_id=board_id, 19633 frame_create_request=frame_create_request, 19634 _request_auth=_request_auth, 19635 _content_type=_content_type, 19636 _headers=_headers, 19637 _host_index=_host_index, 19638 ) 19639 19640 _response_types_map: Dict[str, Optional[str]] = { 19641 "201": "FrameItem", 19642 "400": "CreateFrameItem400Response", 19643 "404": "CreateFrameItem400Response", 19644 "429": "CreateFrameItem400Response", 19645 } 19646 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19647 response_data.read() 19648 return self.api_client.response_deserialize( 19649 response_data=response_data, 19650 response_types_map=_response_types_map, 19651 ).data 19652 19653 def _create_frame_item_serialize( 19654 self, 19655 board_id, 19656 frame_create_request, 19657 _request_auth, 19658 _content_type, 19659 _headers, 19660 _host_index, 19661 ) -> RequestSerialized: 19662 19663 _host = None 19664 19665 _collection_formats: Dict[str, str] = {} 19666 19667 _path_params: Dict[str, str] = {} 19668 _query_params: List[Tuple[str, str]] = [] 19669 _header_params: Dict[str, Optional[str]] = _headers or {} 19670 _form_params: List[Tuple[str, str]] = [] 19671 _files: Dict[str, str] = {} 19672 _body_params: Optional[bytes] = None 19673 19674 # process the path parameters 19675 if board_id is not None: 19676 _path_params["board_id"] = board_id 19677 # process the query parameters 19678 # process the header parameters 19679 # process the form parameters 19680 # process the body parameter 19681 if frame_create_request is not None: 19682 _body_params = frame_create_request 19683 19684 # set the HTTP header `Accept` 19685 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19686 19687 # set the HTTP header `Content-Type` 19688 if _content_type: 19689 _header_params["Content-Type"] = _content_type 19690 else: 19691 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19692 if _default_content_type is not None: 19693 _header_params["Content-Type"] = _default_content_type 19694 19695 # authentication setting 19696 _auth_settings: List[str] = [] 19697 19698 return self.api_client.param_serialize( 19699 method="POST", 19700 resource_path="/v2/boards/{board_id}/frames", 19701 path_params=_path_params, 19702 query_params=_query_params, 19703 header_params=_header_params, 19704 body=_body_params, 19705 post_params=_form_params, 19706 files=_files, 19707 auth_settings=_auth_settings, 19708 collection_formats=_collection_formats, 19709 _host=_host, 19710 _request_auth=_request_auth, 19711 ) 19712 19713 @validate_call 19714 def delete_frame_item( 19715 self, 19716 board_id: Annotated[ 19717 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the frame.") 19718 ], 19719 item_id: Annotated[ 19720 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to delete.") 19721 ], 19722 _request_timeout: Union[ 19723 None, 19724 Annotated[StrictFloat, Field(gt=0)], 19725 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19726 ] = None, 19727 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19728 _content_type: Optional[StrictStr] = None, 19729 _headers: Optional[Dict[StrictStr, Any]] = None, 19730 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19731 ) -> object: 19732 """Delete frame 19733 19734 Deletes a frame from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 19735 19736 :param board_id: Unique identifier (ID) of the board from which you want to delete the frame. (required) 19737 :type board_id: str 19738 :param item_id: Unique identifier (ID) of the frame that you want to delete. (required) 19739 :type item_id: str 19740 :param _request_timeout: timeout setting for this request. If one 19741 number provided, it will be total request 19742 timeout. It can also be a pair (tuple) of 19743 (connection, read) timeouts. 19744 :type _request_timeout: int, tuple(int, int), optional 19745 :param _request_auth: set to override the auth_settings for an a single 19746 request; this effectively ignores the 19747 authentication in the spec for a single request. 19748 :type _request_auth: dict, optional 19749 :param _content_type: force content-type for the request. 19750 :type _content_type: str, Optional 19751 :param _headers: set to override the headers for a single 19752 request; this effectively ignores the headers 19753 in the spec for a single request. 19754 :type _headers: dict, optional 19755 :param _host_index: set to override the host_index for a single 19756 request; this effectively ignores the host_index 19757 in the spec for a single request. 19758 :type _host_index: int, optional 19759 :return: Returns the result object. 19760 """ # noqa: E501 19761 19762 _param = self._delete_frame_item_serialize( 19763 board_id=board_id, 19764 item_id=item_id, 19765 _request_auth=_request_auth, 19766 _content_type=_content_type, 19767 _headers=_headers, 19768 _host_index=_host_index, 19769 ) 19770 19771 _response_types_map: Dict[str, Optional[str]] = { 19772 "204": "object", 19773 "400": "CreateFrameItem400Response", 19774 "404": "CreateFrameItem400Response", 19775 "429": "CreateFrameItem400Response", 19776 } 19777 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19778 response_data.read() 19779 return self.api_client.response_deserialize( 19780 response_data=response_data, 19781 response_types_map=_response_types_map, 19782 ).data 19783 19784 def _delete_frame_item_serialize( 19785 self, 19786 board_id, 19787 item_id, 19788 _request_auth, 19789 _content_type, 19790 _headers, 19791 _host_index, 19792 ) -> RequestSerialized: 19793 19794 _host = None 19795 19796 _collection_formats: Dict[str, str] = {} 19797 19798 _path_params: Dict[str, str] = {} 19799 _query_params: List[Tuple[str, str]] = [] 19800 _header_params: Dict[str, Optional[str]] = _headers or {} 19801 _form_params: List[Tuple[str, str]] = [] 19802 _files: Dict[str, str] = {} 19803 _body_params: Optional[bytes] = None 19804 19805 # process the path parameters 19806 if board_id is not None: 19807 _path_params["board_id"] = board_id 19808 if item_id is not None: 19809 _path_params["item_id"] = item_id 19810 # process the query parameters 19811 # process the header parameters 19812 # process the form parameters 19813 # process the body parameter 19814 19815 # set the HTTP header `Accept` 19816 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19817 19818 # authentication setting 19819 _auth_settings: List[str] = [] 19820 19821 return self.api_client.param_serialize( 19822 method="DELETE", 19823 resource_path="/v2/boards/{board_id}/frames/{item_id}", 19824 path_params=_path_params, 19825 query_params=_query_params, 19826 header_params=_header_params, 19827 body=_body_params, 19828 post_params=_form_params, 19829 files=_files, 19830 auth_settings=_auth_settings, 19831 collection_formats=_collection_formats, 19832 _host=_host, 19833 _request_auth=_request_auth, 19834 ) 19835 19836 @validate_call 19837 def get_frame_item( 19838 self, 19839 board_id: Annotated[ 19840 StrictStr, 19841 Field(description="Unique identifier (ID) of the board that contains the frame that you want to retrieve"), 19842 ], 19843 item_id: Annotated[ 19844 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to retrieve.") 19845 ], 19846 _request_timeout: Union[ 19847 None, 19848 Annotated[StrictFloat, Field(gt=0)], 19849 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19850 ] = None, 19851 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19852 _content_type: Optional[StrictStr] = None, 19853 _headers: Optional[Dict[StrictStr, Any]] = None, 19854 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19855 ) -> FrameItem: 19856 """Get frame 19857 19858 Retrieves information for a specific frame on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 19859 19860 :param board_id: Unique identifier (ID) of the board that contains the frame that you want to retrieve (required) 19861 :type board_id: str 19862 :param item_id: Unique identifier (ID) of the frame that you want to retrieve. (required) 19863 :type item_id: str 19864 :param _request_timeout: timeout setting for this request. If one 19865 number provided, it will be total request 19866 timeout. It can also be a pair (tuple) of 19867 (connection, read) timeouts. 19868 :type _request_timeout: int, tuple(int, int), optional 19869 :param _request_auth: set to override the auth_settings for an a single 19870 request; this effectively ignores the 19871 authentication in the spec for a single request. 19872 :type _request_auth: dict, optional 19873 :param _content_type: force content-type for the request. 19874 :type _content_type: str, Optional 19875 :param _headers: set to override the headers for a single 19876 request; this effectively ignores the headers 19877 in the spec for a single request. 19878 :type _headers: dict, optional 19879 :param _host_index: set to override the host_index for a single 19880 request; this effectively ignores the host_index 19881 in the spec for a single request. 19882 :type _host_index: int, optional 19883 :return: Returns the result object. 19884 """ # noqa: E501 19885 19886 _param = self._get_frame_item_serialize( 19887 board_id=board_id, 19888 item_id=item_id, 19889 _request_auth=_request_auth, 19890 _content_type=_content_type, 19891 _headers=_headers, 19892 _host_index=_host_index, 19893 ) 19894 19895 _response_types_map: Dict[str, Optional[str]] = { 19896 "200": "FrameItem", 19897 "400": "CreateFrameItem400Response", 19898 "404": "CreateFrameItem400Response", 19899 "429": "CreateFrameItem400Response", 19900 } 19901 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19902 response_data.read() 19903 return self.api_client.response_deserialize( 19904 response_data=response_data, 19905 response_types_map=_response_types_map, 19906 ).data 19907 19908 def _get_frame_item_serialize( 19909 self, 19910 board_id, 19911 item_id, 19912 _request_auth, 19913 _content_type, 19914 _headers, 19915 _host_index, 19916 ) -> RequestSerialized: 19917 19918 _host = None 19919 19920 _collection_formats: Dict[str, str] = {} 19921 19922 _path_params: Dict[str, str] = {} 19923 _query_params: List[Tuple[str, str]] = [] 19924 _header_params: Dict[str, Optional[str]] = _headers or {} 19925 _form_params: List[Tuple[str, str]] = [] 19926 _files: Dict[str, str] = {} 19927 _body_params: Optional[bytes] = None 19928 19929 # process the path parameters 19930 if board_id is not None: 19931 _path_params["board_id"] = board_id 19932 if item_id is not None: 19933 _path_params["item_id"] = item_id 19934 # process the query parameters 19935 # process the header parameters 19936 # process the form parameters 19937 # process the body parameter 19938 19939 # set the HTTP header `Accept` 19940 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19941 19942 # authentication setting 19943 _auth_settings: List[str] = [] 19944 19945 return self.api_client.param_serialize( 19946 method="GET", 19947 resource_path="/v2/boards/{board_id}/frames/{item_id}", 19948 path_params=_path_params, 19949 query_params=_query_params, 19950 header_params=_header_params, 19951 body=_body_params, 19952 post_params=_form_params, 19953 files=_files, 19954 auth_settings=_auth_settings, 19955 collection_formats=_collection_formats, 19956 _host=_host, 19957 _request_auth=_request_auth, 19958 ) 19959 19960 @validate_call 19961 def update_frame_item( 19962 self, 19963 board_id: Annotated[ 19964 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the frame.") 19965 ], 19966 item_id: Annotated[ 19967 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to update.") 19968 ], 19969 frame_update_request: FrameUpdateRequest, 19970 _request_timeout: Union[ 19971 None, 19972 Annotated[StrictFloat, Field(gt=0)], 19973 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19974 ] = None, 19975 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19976 _content_type: Optional[StrictStr] = None, 19977 _headers: Optional[Dict[StrictStr, Any]] = None, 19978 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19979 ) -> FrameItem: 19980 """Update frame 19981 19982 Updates a frame on a board based on the data, style, or geometry properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19983 19984 :param board_id: Unique identifier (ID) of the board where you want to update the frame. (required) 19985 :type board_id: str 19986 :param item_id: Unique identifier (ID) of the frame that you want to update. (required) 19987 :type item_id: str 19988 :param frame_update_request: (required) 19989 :type frame_update_request: FrameUpdateRequest 19990 :param _request_timeout: timeout setting for this request. If one 19991 number provided, it will be total request 19992 timeout. It can also be a pair (tuple) of 19993 (connection, read) timeouts. 19994 :type _request_timeout: int, tuple(int, int), optional 19995 :param _request_auth: set to override the auth_settings for an a single 19996 request; this effectively ignores the 19997 authentication in the spec for a single request. 19998 :type _request_auth: dict, optional 19999 :param _content_type: force content-type for the request. 20000 :type _content_type: str, Optional 20001 :param _headers: set to override the headers for a single 20002 request; this effectively ignores the headers 20003 in the spec for a single request. 20004 :type _headers: dict, optional 20005 :param _host_index: set to override the host_index for a single 20006 request; this effectively ignores the host_index 20007 in the spec for a single request. 20008 :type _host_index: int, optional 20009 :return: Returns the result object. 20010 """ # noqa: E501 20011 20012 _param = self._update_frame_item_serialize( 20013 board_id=board_id, 20014 item_id=item_id, 20015 frame_update_request=frame_update_request, 20016 _request_auth=_request_auth, 20017 _content_type=_content_type, 20018 _headers=_headers, 20019 _host_index=_host_index, 20020 ) 20021 20022 _response_types_map: Dict[str, Optional[str]] = { 20023 "200": "FrameItem", 20024 "400": "CreateFrameItem400Response", 20025 "404": "CreateFrameItem400Response", 20026 "409": "UpdateFrameItem409Response", 20027 "429": "CreateFrameItem400Response", 20028 } 20029 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20030 response_data.read() 20031 return self.api_client.response_deserialize( 20032 response_data=response_data, 20033 response_types_map=_response_types_map, 20034 ).data 20035 20036 def _update_frame_item_serialize( 20037 self, 20038 board_id, 20039 item_id, 20040 frame_update_request, 20041 _request_auth, 20042 _content_type, 20043 _headers, 20044 _host_index, 20045 ) -> RequestSerialized: 20046 20047 _host = None 20048 20049 _collection_formats: Dict[str, str] = {} 20050 20051 _path_params: Dict[str, str] = {} 20052 _query_params: List[Tuple[str, str]] = [] 20053 _header_params: Dict[str, Optional[str]] = _headers or {} 20054 _form_params: List[Tuple[str, str]] = [] 20055 _files: Dict[str, str] = {} 20056 _body_params: Optional[bytes] = None 20057 20058 # process the path parameters 20059 if board_id is not None: 20060 _path_params["board_id"] = board_id 20061 if item_id is not None: 20062 _path_params["item_id"] = item_id 20063 # process the query parameters 20064 # process the header parameters 20065 # process the form parameters 20066 # process the body parameter 20067 if frame_update_request is not None: 20068 _body_params = frame_update_request 20069 20070 # set the HTTP header `Accept` 20071 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20072 20073 # set the HTTP header `Content-Type` 20074 if _content_type: 20075 _header_params["Content-Type"] = _content_type 20076 else: 20077 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 20078 if _default_content_type is not None: 20079 _header_params["Content-Type"] = _default_content_type 20080 20081 # authentication setting 20082 _auth_settings: List[str] = [] 20083 20084 return self.api_client.param_serialize( 20085 method="PATCH", 20086 resource_path="/v2/boards/{board_id}/frames/{item_id}", 20087 path_params=_path_params, 20088 query_params=_query_params, 20089 header_params=_header_params, 20090 body=_body_params, 20091 post_params=_form_params, 20092 files=_files, 20093 auth_settings=_auth_settings, 20094 collection_formats=_collection_formats, 20095 _host=_host, 20096 _request_auth=_request_auth, 20097 ) 20098 20099 @validate_call 20100 def create_group( 20101 self, 20102 board_id: StrictStr, 20103 group: Group, 20104 _request_timeout: Union[ 20105 None, 20106 Annotated[StrictFloat, Field(gt=0)], 20107 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20108 ] = None, 20109 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20110 _content_type: Optional[StrictStr] = None, 20111 _headers: Optional[Dict[StrictStr, Any]] = None, 20112 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20113 ) -> GroupResponseShort: 20114 """Create group 20115 20116 Creates a group of items on a board. The group is created with the items that are passed in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20117 20118 :param board_id: (required) 20119 :type board_id: str 20120 :param group: (required) 20121 :type group: Group 20122 :param _request_timeout: timeout setting for this request. If one 20123 number provided, it will be total request 20124 timeout. It can also be a pair (tuple) of 20125 (connection, read) timeouts. 20126 :type _request_timeout: int, tuple(int, int), optional 20127 :param _request_auth: set to override the auth_settings for an a single 20128 request; this effectively ignores the 20129 authentication in the spec for a single request. 20130 :type _request_auth: dict, optional 20131 :param _content_type: force content-type for the request. 20132 :type _content_type: str, Optional 20133 :param _headers: set to override the headers for a single 20134 request; this effectively ignores the headers 20135 in the spec for a single request. 20136 :type _headers: dict, optional 20137 :param _host_index: set to override the host_index for a single 20138 request; this effectively ignores the host_index 20139 in the spec for a single request. 20140 :type _host_index: int, optional 20141 :return: Returns the result object. 20142 """ # noqa: E501 20143 20144 _param = self._create_group_serialize( 20145 board_id=board_id, 20146 group=group, 20147 _request_auth=_request_auth, 20148 _content_type=_content_type, 20149 _headers=_headers, 20150 _host_index=_host_index, 20151 ) 20152 20153 _response_types_map: Dict[str, Optional[str]] = { 20154 "201": "GroupResponseShort", 20155 "400": "GetAllGroups400Response", 20156 "404": "GetAllGroups404Response", 20157 "429": "GetAllGroups429Response", 20158 } 20159 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20160 response_data.read() 20161 return self.api_client.response_deserialize( 20162 response_data=response_data, 20163 response_types_map=_response_types_map, 20164 ).data 20165 20166 def _create_group_serialize( 20167 self, 20168 board_id, 20169 group, 20170 _request_auth, 20171 _content_type, 20172 _headers, 20173 _host_index, 20174 ) -> RequestSerialized: 20175 20176 _host = None 20177 20178 _collection_formats: Dict[str, str] = {} 20179 20180 _path_params: Dict[str, str] = {} 20181 _query_params: List[Tuple[str, str]] = [] 20182 _header_params: Dict[str, Optional[str]] = _headers or {} 20183 _form_params: List[Tuple[str, str]] = [] 20184 _files: Dict[str, str] = {} 20185 _body_params: Optional[bytes] = None 20186 20187 # process the path parameters 20188 if board_id is not None: 20189 _path_params["board_id"] = board_id 20190 # process the query parameters 20191 # process the header parameters 20192 # process the form parameters 20193 # process the body parameter 20194 if group is not None: 20195 _body_params = group 20196 20197 # set the HTTP header `Accept` 20198 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20199 20200 # set the HTTP header `Content-Type` 20201 if _content_type: 20202 _header_params["Content-Type"] = _content_type 20203 else: 20204 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 20205 if _default_content_type is not None: 20206 _header_params["Content-Type"] = _default_content_type 20207 20208 # authentication setting 20209 _auth_settings: List[str] = [] 20210 20211 return self.api_client.param_serialize( 20212 method="POST", 20213 resource_path="/v2/boards/{board_id}/groups", 20214 path_params=_path_params, 20215 query_params=_query_params, 20216 header_params=_header_params, 20217 body=_body_params, 20218 post_params=_form_params, 20219 files=_files, 20220 auth_settings=_auth_settings, 20221 collection_formats=_collection_formats, 20222 _host=_host, 20223 _request_auth=_request_auth, 20224 ) 20225 20226 @validate_call 20227 def delete_group( 20228 self, 20229 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20230 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20231 delete_items: Annotated[ 20232 StrictBool, 20233 Field( 20234 description="Indicates whether the items should be removed. Set to `true` to delete items in the group." 20235 ), 20236 ], 20237 _request_timeout: Union[ 20238 None, 20239 Annotated[StrictFloat, Field(gt=0)], 20240 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20241 ] = None, 20242 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20243 _content_type: Optional[StrictStr] = None, 20244 _headers: Optional[Dict[StrictStr, Any]] = None, 20245 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20246 ) -> object: 20247 """Deletes the group 20248 20249 Deletes a group from a board. All the items in the group are deleted along with the group. <b>Note - this endpoint will delete items which are locked as well. </b> <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 20250 20251 :param board_id: Unique identifier (ID) of the board. (required) 20252 :type board_id: str 20253 :param group_id: Unique identifier (ID) of the group. (required) 20254 :type group_id: str 20255 :param delete_items: Indicates whether the items should be removed. Set to `true` to delete items in the group. (required) 20256 :type delete_items: bool 20257 :param _request_timeout: timeout setting for this request. If one 20258 number provided, it will be total request 20259 timeout. It can also be a pair (tuple) of 20260 (connection, read) timeouts. 20261 :type _request_timeout: int, tuple(int, int), optional 20262 :param _request_auth: set to override the auth_settings for an a single 20263 request; this effectively ignores the 20264 authentication in the spec for a single request. 20265 :type _request_auth: dict, optional 20266 :param _content_type: force content-type for the request. 20267 :type _content_type: str, Optional 20268 :param _headers: set to override the headers for a single 20269 request; this effectively ignores the headers 20270 in the spec for a single request. 20271 :type _headers: dict, optional 20272 :param _host_index: set to override the host_index for a single 20273 request; this effectively ignores the host_index 20274 in the spec for a single request. 20275 :type _host_index: int, optional 20276 :return: Returns the result object. 20277 """ # noqa: E501 20278 20279 _param = self._delete_group_serialize( 20280 board_id=board_id, 20281 group_id=group_id, 20282 delete_items=delete_items, 20283 _request_auth=_request_auth, 20284 _content_type=_content_type, 20285 _headers=_headers, 20286 _host_index=_host_index, 20287 ) 20288 20289 _response_types_map: Dict[str, Optional[str]] = { 20290 "204": "object", 20291 "400": "UnGroup400Response", 20292 "404": "UnGroup404Response", 20293 "429": "UnGroup429Response", 20294 } 20295 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20296 response_data.read() 20297 return self.api_client.response_deserialize( 20298 response_data=response_data, 20299 response_types_map=_response_types_map, 20300 ).data 20301 20302 def _delete_group_serialize( 20303 self, 20304 board_id, 20305 group_id, 20306 delete_items, 20307 _request_auth, 20308 _content_type, 20309 _headers, 20310 _host_index, 20311 ) -> RequestSerialized: 20312 20313 _host = None 20314 20315 _collection_formats: Dict[str, str] = {} 20316 20317 _path_params: Dict[str, str] = {} 20318 _query_params: List[Tuple[str, str]] = [] 20319 _header_params: Dict[str, Optional[str]] = _headers or {} 20320 _form_params: List[Tuple[str, str]] = [] 20321 _files: Dict[str, str] = {} 20322 _body_params: Optional[bytes] = None 20323 20324 # process the path parameters 20325 if board_id is not None: 20326 _path_params["board_id"] = board_id 20327 if group_id is not None: 20328 _path_params["group_id"] = group_id 20329 # process the query parameters 20330 if delete_items is not None: 20331 20332 _query_params.append(("delete_items", delete_items)) 20333 20334 # process the header parameters 20335 # process the form parameters 20336 # process the body parameter 20337 20338 # set the HTTP header `Accept` 20339 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20340 20341 # authentication setting 20342 _auth_settings: List[str] = [] 20343 20344 return self.api_client.param_serialize( 20345 method="DELETE", 20346 resource_path="/v2/boards/{board_id}/groups/{group_id}?", 20347 path_params=_path_params, 20348 query_params=_query_params, 20349 header_params=_header_params, 20350 body=_body_params, 20351 post_params=_form_params, 20352 files=_files, 20353 auth_settings=_auth_settings, 20354 collection_formats=_collection_formats, 20355 _host=_host, 20356 _request_auth=_request_auth, 20357 ) 20358 20359 @validate_call 20360 def get_all_groups( 20361 self, 20362 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20363 limit: Annotated[ 20364 Optional[Annotated[int, Field(le=50, strict=True, ge=10)]], 20365 Field(description="The maximum number of items to return at one time, default is 10, maximum is 50."), 20366 ] = None, 20367 cursor: Optional[StrictStr] = None, 20368 _request_timeout: Union[ 20369 None, 20370 Annotated[StrictFloat, Field(gt=0)], 20371 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20372 ] = None, 20373 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20374 _content_type: Optional[StrictStr] = None, 20375 _headers: Optional[Dict[StrictStr, Any]] = None, 20376 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20377 ) -> GetAllGroups200Response: 20378 """Get all groups on a board 20379 20380 Returns all the groups and the items of the respective groups within a specific board.<br/> This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request.<br/> For example, if you set the `limit` query parameter to `10` and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20381 20382 :param board_id: Unique identifier (ID) of the board. (required) 20383 :type board_id: str 20384 :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. 20385 :type limit: int 20386 :param cursor: 20387 :type cursor: str 20388 :param _request_timeout: timeout setting for this request. If one 20389 number provided, it will be total request 20390 timeout. It can also be a pair (tuple) of 20391 (connection, read) timeouts. 20392 :type _request_timeout: int, tuple(int, int), optional 20393 :param _request_auth: set to override the auth_settings for an a single 20394 request; this effectively ignores the 20395 authentication in the spec for a single request. 20396 :type _request_auth: dict, optional 20397 :param _content_type: force content-type for the request. 20398 :type _content_type: str, Optional 20399 :param _headers: set to override the headers for a single 20400 request; this effectively ignores the headers 20401 in the spec for a single request. 20402 :type _headers: dict, optional 20403 :param _host_index: set to override the host_index for a single 20404 request; this effectively ignores the host_index 20405 in the spec for a single request. 20406 :type _host_index: int, optional 20407 :return: Returns the result object. 20408 """ # noqa: E501 20409 20410 _param = self._get_all_groups_serialize( 20411 board_id=board_id, 20412 limit=limit, 20413 cursor=cursor, 20414 _request_auth=_request_auth, 20415 _content_type=_content_type, 20416 _headers=_headers, 20417 _host_index=_host_index, 20418 ) 20419 20420 _response_types_map: Dict[str, Optional[str]] = { 20421 "200": "GetAllGroups200Response", 20422 "400": "GetAllGroups400Response", 20423 "404": "GetAllGroups404Response", 20424 "429": "GetAllGroups429Response", 20425 } 20426 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20427 response_data.read() 20428 return self.api_client.response_deserialize( 20429 response_data=response_data, 20430 response_types_map=_response_types_map, 20431 ).data 20432 20433 def _get_all_groups_serialize( 20434 self, 20435 board_id, 20436 limit, 20437 cursor, 20438 _request_auth, 20439 _content_type, 20440 _headers, 20441 _host_index, 20442 ) -> RequestSerialized: 20443 20444 _host = None 20445 20446 _collection_formats: Dict[str, str] = {} 20447 20448 _path_params: Dict[str, str] = {} 20449 _query_params: List[Tuple[str, str]] = [] 20450 _header_params: Dict[str, Optional[str]] = _headers or {} 20451 _form_params: List[Tuple[str, str]] = [] 20452 _files: Dict[str, str] = {} 20453 _body_params: Optional[bytes] = None 20454 20455 # process the path parameters 20456 if board_id is not None: 20457 _path_params["board_id"] = board_id 20458 # process the query parameters 20459 if limit is not None: 20460 20461 _query_params.append(("limit", limit)) 20462 20463 if cursor is not None: 20464 20465 _query_params.append(("cursor", cursor)) 20466 20467 # process the header parameters 20468 # process the form parameters 20469 # process the body parameter 20470 20471 # set the HTTP header `Accept` 20472 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20473 20474 # authentication setting 20475 _auth_settings: List[str] = [] 20476 20477 return self.api_client.param_serialize( 20478 method="GET", 20479 resource_path="/v2/boards/{board_id}/groups", 20480 path_params=_path_params, 20481 query_params=_query_params, 20482 header_params=_header_params, 20483 body=_body_params, 20484 post_params=_form_params, 20485 files=_files, 20486 auth_settings=_auth_settings, 20487 collection_formats=_collection_formats, 20488 _host=_host, 20489 _request_auth=_request_auth, 20490 ) 20491 20492 @validate_call 20493 def get_group_by_id( 20494 self, 20495 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20496 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20497 _request_timeout: Union[ 20498 None, 20499 Annotated[StrictFloat, Field(gt=0)], 20500 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20501 ] = None, 20502 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20503 _content_type: Optional[StrictStr] = None, 20504 _headers: Optional[Dict[StrictStr, Any]] = None, 20505 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20506 ) -> GroupResponseShort: 20507 """Get a group by its ID 20508 20509 Returns a list of items in a specific group. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item ID 20510 20511 :param board_id: Unique identifier (ID) of the board. (required) 20512 :type board_id: str 20513 :param group_id: Unique identifier (ID) of the group. (required) 20514 :type group_id: str 20515 :param _request_timeout: timeout setting for this request. If one 20516 number provided, it will be total request 20517 timeout. It can also be a pair (tuple) of 20518 (connection, read) timeouts. 20519 :type _request_timeout: int, tuple(int, int), optional 20520 :param _request_auth: set to override the auth_settings for an a single 20521 request; this effectively ignores the 20522 authentication in the spec for a single request. 20523 :type _request_auth: dict, optional 20524 :param _content_type: force content-type for the request. 20525 :type _content_type: str, Optional 20526 :param _headers: set to override the headers for a single 20527 request; this effectively ignores the headers 20528 in the spec for a single request. 20529 :type _headers: dict, optional 20530 :param _host_index: set to override the host_index for a single 20531 request; this effectively ignores the host_index 20532 in the spec for a single request. 20533 :type _host_index: int, optional 20534 :return: Returns the result object. 20535 """ # noqa: E501 20536 20537 _param = self._get_group_by_id_serialize( 20538 board_id=board_id, 20539 group_id=group_id, 20540 _request_auth=_request_auth, 20541 _content_type=_content_type, 20542 _headers=_headers, 20543 _host_index=_host_index, 20544 ) 20545 20546 _response_types_map: Dict[str, Optional[str]] = { 20547 "200": "GroupResponseShort", 20548 "400": "GetAllGroups400Response", 20549 "404": "GetAllGroups404Response", 20550 "429": "GetAllGroups429Response", 20551 } 20552 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20553 response_data.read() 20554 return self.api_client.response_deserialize( 20555 response_data=response_data, 20556 response_types_map=_response_types_map, 20557 ).data 20558 20559 def _get_group_by_id_serialize( 20560 self, 20561 board_id, 20562 group_id, 20563 _request_auth, 20564 _content_type, 20565 _headers, 20566 _host_index, 20567 ) -> RequestSerialized: 20568 20569 _host = None 20570 20571 _collection_formats: Dict[str, str] = {} 20572 20573 _path_params: Dict[str, str] = {} 20574 _query_params: List[Tuple[str, str]] = [] 20575 _header_params: Dict[str, Optional[str]] = _headers or {} 20576 _form_params: List[Tuple[str, str]] = [] 20577 _files: Dict[str, str] = {} 20578 _body_params: Optional[bytes] = None 20579 20580 # process the path parameters 20581 if board_id is not None: 20582 _path_params["board_id"] = board_id 20583 if group_id is not None: 20584 _path_params["group_id"] = group_id 20585 # process the query parameters 20586 # process the header parameters 20587 # process the form parameters 20588 # process the body parameter 20589 20590 # set the HTTP header `Accept` 20591 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20592 20593 # authentication setting 20594 _auth_settings: List[str] = [] 20595 20596 return self.api_client.param_serialize( 20597 method="GET", 20598 resource_path="/v2/boards/{board_id}/groups/{group_id}", 20599 path_params=_path_params, 20600 query_params=_query_params, 20601 header_params=_header_params, 20602 body=_body_params, 20603 post_params=_form_params, 20604 files=_files, 20605 auth_settings=_auth_settings, 20606 collection_formats=_collection_formats, 20607 _host=_host, 20608 _request_auth=_request_auth, 20609 ) 20610 20611 @validate_call 20612 def get_items_by_group_id( 20613 self, 20614 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20615 group_item_id: Annotated[StrictStr, Field(description="The ID of the group item to retrieve.")], 20616 limit: Annotated[ 20617 Optional[Annotated[int, Field(le=50, strict=True, ge=10)]], 20618 Field(description="The maximum number of items to return at one time, default is 10, maximum is 50."), 20619 ] = None, 20620 cursor: Optional[StrictStr] = None, 20621 _request_timeout: Union[ 20622 None, 20623 Annotated[StrictFloat, Field(gt=0)], 20624 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20625 ] = None, 20626 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20627 _content_type: Optional[StrictStr] = None, 20628 _headers: Optional[Dict[StrictStr, Any]] = None, 20629 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20630 ) -> GetItemsByGroupId200Response: 20631 """Get items of a group by ID 20632 20633 Returns a list of items that are a part of any group, within a specific board.<br/> This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request.<br/> For example, if you set the `limit` query parameter to `10` and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items (not 10 groups) in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20634 20635 :param board_id: Unique identifier (ID) of the board. (required) 20636 :type board_id: str 20637 :param group_item_id: The ID of the group item to retrieve. (required) 20638 :type group_item_id: str 20639 :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. 20640 :type limit: int 20641 :param cursor: 20642 :type cursor: str 20643 :param _request_timeout: timeout setting for this request. If one 20644 number provided, it will be total request 20645 timeout. It can also be a pair (tuple) of 20646 (connection, read) timeouts. 20647 :type _request_timeout: int, tuple(int, int), optional 20648 :param _request_auth: set to override the auth_settings for an a single 20649 request; this effectively ignores the 20650 authentication in the spec for a single request. 20651 :type _request_auth: dict, optional 20652 :param _content_type: force content-type for the request. 20653 :type _content_type: str, Optional 20654 :param _headers: set to override the headers for a single 20655 request; this effectively ignores the headers 20656 in the spec for a single request. 20657 :type _headers: dict, optional 20658 :param _host_index: set to override the host_index for a single 20659 request; this effectively ignores the host_index 20660 in the spec for a single request. 20661 :type _host_index: int, optional 20662 :return: Returns the result object. 20663 """ # noqa: E501 20664 20665 _param = self._get_items_by_group_id_serialize( 20666 board_id=board_id, 20667 group_item_id=group_item_id, 20668 limit=limit, 20669 cursor=cursor, 20670 _request_auth=_request_auth, 20671 _content_type=_content_type, 20672 _headers=_headers, 20673 _host_index=_host_index, 20674 ) 20675 20676 _response_types_map: Dict[str, Optional[str]] = { 20677 "200": "GetItemsByGroupId200Response", 20678 "400": "GetAllGroups400Response", 20679 "404": "GetAllGroups404Response", 20680 "429": "GetAllGroups429Response", 20681 } 20682 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20683 response_data.read() 20684 return self.api_client.response_deserialize( 20685 response_data=response_data, 20686 response_types_map=_response_types_map, 20687 ).data 20688 20689 def _get_items_by_group_id_serialize( 20690 self, 20691 board_id, 20692 group_item_id, 20693 limit, 20694 cursor, 20695 _request_auth, 20696 _content_type, 20697 _headers, 20698 _host_index, 20699 ) -> RequestSerialized: 20700 20701 _host = None 20702 20703 _collection_formats: Dict[str, str] = {} 20704 20705 _path_params: Dict[str, str] = {} 20706 _query_params: List[Tuple[str, str]] = [] 20707 _header_params: Dict[str, Optional[str]] = _headers or {} 20708 _form_params: List[Tuple[str, str]] = [] 20709 _files: Dict[str, str] = {} 20710 _body_params: Optional[bytes] = None 20711 20712 # process the path parameters 20713 if board_id is not None: 20714 _path_params["board_id"] = board_id 20715 # process the query parameters 20716 if limit is not None: 20717 20718 _query_params.append(("limit", limit)) 20719 20720 if cursor is not None: 20721 20722 _query_params.append(("cursor", cursor)) 20723 20724 if group_item_id is not None: 20725 20726 _query_params.append(("group_item_id", group_item_id)) 20727 20728 # process the header parameters 20729 # process the form parameters 20730 # process the body parameter 20731 20732 # set the HTTP header `Accept` 20733 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20734 20735 # authentication setting 20736 _auth_settings: List[str] = [] 20737 20738 return self.api_client.param_serialize( 20739 method="GET", 20740 resource_path="/v2/boards/{board_id}/groups/items", 20741 path_params=_path_params, 20742 query_params=_query_params, 20743 header_params=_header_params, 20744 body=_body_params, 20745 post_params=_form_params, 20746 files=_files, 20747 auth_settings=_auth_settings, 20748 collection_formats=_collection_formats, 20749 _host=_host, 20750 _request_auth=_request_auth, 20751 ) 20752 20753 @validate_call 20754 def un_group( 20755 self, 20756 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20757 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20758 delete_items: Annotated[ 20759 Optional[StrictBool], Field(description="Indicates whether the items should be removed. By default, false.") 20760 ] = None, 20761 _request_timeout: Union[ 20762 None, 20763 Annotated[StrictFloat, Field(gt=0)], 20764 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20765 ] = None, 20766 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20767 _content_type: Optional[StrictStr] = None, 20768 _headers: Optional[Dict[StrictStr, Any]] = None, 20769 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20770 ) -> object: 20771 """Ungroup items 20772 20773 Ungroups items from a group.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 20774 20775 :param board_id: Unique identifier (ID) of the board. (required) 20776 :type board_id: str 20777 :param group_id: Unique identifier (ID) of the group. (required) 20778 :type group_id: str 20779 :param delete_items: Indicates whether the items should be removed. By default, false. 20780 :type delete_items: bool 20781 :param _request_timeout: timeout setting for this request. If one 20782 number provided, it will be total request 20783 timeout. It can also be a pair (tuple) of 20784 (connection, read) timeouts. 20785 :type _request_timeout: int, tuple(int, int), optional 20786 :param _request_auth: set to override the auth_settings for an a single 20787 request; this effectively ignores the 20788 authentication in the spec for a single request. 20789 :type _request_auth: dict, optional 20790 :param _content_type: force content-type for the request. 20791 :type _content_type: str, Optional 20792 :param _headers: set to override the headers for a single 20793 request; this effectively ignores the headers 20794 in the spec for a single request. 20795 :type _headers: dict, optional 20796 :param _host_index: set to override the host_index for a single 20797 request; this effectively ignores the host_index 20798 in the spec for a single request. 20799 :type _host_index: int, optional 20800 :return: Returns the result object. 20801 """ # noqa: E501 20802 20803 _param = self._un_group_serialize( 20804 board_id=board_id, 20805 group_id=group_id, 20806 delete_items=delete_items, 20807 _request_auth=_request_auth, 20808 _content_type=_content_type, 20809 _headers=_headers, 20810 _host_index=_host_index, 20811 ) 20812 20813 _response_types_map: Dict[str, Optional[str]] = { 20814 "204": "object", 20815 "400": "UnGroup400Response", 20816 "404": "UnGroup404Response", 20817 "429": "UnGroup429Response", 20818 } 20819 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20820 response_data.read() 20821 return self.api_client.response_deserialize( 20822 response_data=response_data, 20823 response_types_map=_response_types_map, 20824 ).data 20825 20826 def _un_group_serialize( 20827 self, 20828 board_id, 20829 group_id, 20830 delete_items, 20831 _request_auth, 20832 _content_type, 20833 _headers, 20834 _host_index, 20835 ) -> RequestSerialized: 20836 20837 _host = None 20838 20839 _collection_formats: Dict[str, str] = {} 20840 20841 _path_params: Dict[str, str] = {} 20842 _query_params: List[Tuple[str, str]] = [] 20843 _header_params: Dict[str, Optional[str]] = _headers or {} 20844 _form_params: List[Tuple[str, str]] = [] 20845 _files: Dict[str, str] = {} 20846 _body_params: Optional[bytes] = None 20847 20848 # process the path parameters 20849 if board_id is not None: 20850 _path_params["board_id"] = board_id 20851 if group_id is not None: 20852 _path_params["group_id"] = group_id 20853 # process the query parameters 20854 if delete_items is not None: 20855 20856 _query_params.append(("delete_items", delete_items)) 20857 20858 # process the header parameters 20859 # process the form parameters 20860 # process the body parameter 20861 20862 # set the HTTP header `Accept` 20863 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20864 20865 # authentication setting 20866 _auth_settings: List[str] = [] 20867 20868 return self.api_client.param_serialize( 20869 method="DELETE", 20870 resource_path="/v2/boards/{board_id}/groups/{group_id}", 20871 path_params=_path_params, 20872 query_params=_query_params, 20873 header_params=_header_params, 20874 body=_body_params, 20875 post_params=_form_params, 20876 files=_files, 20877 auth_settings=_auth_settings, 20878 collection_formats=_collection_formats, 20879 _host=_host, 20880 _request_auth=_request_auth, 20881 ) 20882 20883 @validate_call 20884 def update_group( 20885 self, 20886 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20887 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20888 group: Group, 20889 _request_timeout: Union[ 20890 None, 20891 Annotated[StrictFloat, Field(gt=0)], 20892 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20893 ] = None, 20894 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20895 _content_type: Optional[StrictStr] = None, 20896 _headers: Optional[Dict[StrictStr, Any]] = None, 20897 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20898 ) -> GroupResponseShort: 20899 """Updates a group with new items 20900 20901 This endpoint updates an existing group by replacing it entirely with a new group. When the update is made, the original group is completely replaced, and a new group ID is assigned. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20902 20903 :param board_id: Unique identifier (ID) of the board. (required) 20904 :type board_id: str 20905 :param group_id: Unique identifier (ID) of the group. (required) 20906 :type group_id: str 20907 :param group: (required) 20908 :type group: Group 20909 :param _request_timeout: timeout setting for this request. If one 20910 number provided, it will be total request 20911 timeout. It can also be a pair (tuple) of 20912 (connection, read) timeouts. 20913 :type _request_timeout: int, tuple(int, int), optional 20914 :param _request_auth: set to override the auth_settings for an a single 20915 request; this effectively ignores the 20916 authentication in the spec for a single request. 20917 :type _request_auth: dict, optional 20918 :param _content_type: force content-type for the request. 20919 :type _content_type: str, Optional 20920 :param _headers: set to override the headers for a single 20921 request; this effectively ignores the headers 20922 in the spec for a single request. 20923 :type _headers: dict, optional 20924 :param _host_index: set to override the host_index for a single 20925 request; this effectively ignores the host_index 20926 in the spec for a single request. 20927 :type _host_index: int, optional 20928 :return: Returns the result object. 20929 """ # noqa: E501 20930 20931 _param = self._update_group_serialize( 20932 board_id=board_id, 20933 group_id=group_id, 20934 group=group, 20935 _request_auth=_request_auth, 20936 _content_type=_content_type, 20937 _headers=_headers, 20938 _host_index=_host_index, 20939 ) 20940 20941 _response_types_map: Dict[str, Optional[str]] = { 20942 "200": "GroupResponseShort", 20943 "400": "GetAllGroups400Response", 20944 "404": "GetAllGroups404Response", 20945 "429": "GetAllGroups429Response", 20946 } 20947 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20948 response_data.read() 20949 return self.api_client.response_deserialize( 20950 response_data=response_data, 20951 response_types_map=_response_types_map, 20952 ).data 20953 20954 def _update_group_serialize( 20955 self, 20956 board_id, 20957 group_id, 20958 group, 20959 _request_auth, 20960 _content_type, 20961 _headers, 20962 _host_index, 20963 ) -> RequestSerialized: 20964 20965 _host = None 20966 20967 _collection_formats: Dict[str, str] = {} 20968 20969 _path_params: Dict[str, str] = {} 20970 _query_params: List[Tuple[str, str]] = [] 20971 _header_params: Dict[str, Optional[str]] = _headers or {} 20972 _form_params: List[Tuple[str, str]] = [] 20973 _files: Dict[str, str] = {} 20974 _body_params: Optional[bytes] = None 20975 20976 # process the path parameters 20977 if board_id is not None: 20978 _path_params["board_id"] = board_id 20979 if group_id is not None: 20980 _path_params["group_id"] = group_id 20981 # process the query parameters 20982 # process the header parameters 20983 # process the form parameters 20984 # process the body parameter 20985 if group is not None: 20986 _body_params = group 20987 20988 # set the HTTP header `Accept` 20989 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20990 20991 # set the HTTP header `Content-Type` 20992 if _content_type: 20993 _header_params["Content-Type"] = _content_type 20994 else: 20995 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 20996 if _default_content_type is not None: 20997 _header_params["Content-Type"] = _default_content_type 20998 20999 # authentication setting 21000 _auth_settings: List[str] = [] 21001 21002 return self.api_client.param_serialize( 21003 method="PUT", 21004 resource_path="/v2/boards/{board_id}/groups/{group_id}", 21005 path_params=_path_params, 21006 query_params=_query_params, 21007 header_params=_header_params, 21008 body=_body_params, 21009 post_params=_form_params, 21010 files=_files, 21011 auth_settings=_auth_settings, 21012 collection_formats=_collection_formats, 21013 _host=_host, 21014 _request_auth=_request_auth, 21015 ) 21016 21017 @validate_call 21018 def create_image_item_using_local_file( 21019 self, 21020 board_id_platform_file_upload: Annotated[ 21021 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 21022 ], 21023 resource: Annotated[ 21024 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 21025 ], 21026 data: Optional[UploadFileFromDeviceData] = None, 21027 _request_timeout: Union[ 21028 None, 21029 Annotated[StrictFloat, Field(gt=0)], 21030 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21031 ] = None, 21032 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21033 _content_type: Optional[StrictStr] = None, 21034 _headers: Optional[Dict[StrictStr, Any]] = None, 21035 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21036 ) -> ImageItem: 21037 """Create image item using file from device 21038 21039 Adds an image item to a board by specifying a file from device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21040 21041 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) 21042 :type board_id_platform_file_upload: str 21043 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 21044 :type resource: bytearray 21045 :param data: 21046 :type data: UploadFileFromDeviceData 21047 :param _request_timeout: timeout setting for this request. If one 21048 number provided, it will be total request 21049 timeout. It can also be a pair (tuple) of 21050 (connection, read) timeouts. 21051 :type _request_timeout: int, tuple(int, int), optional 21052 :param _request_auth: set to override the auth_settings for an a single 21053 request; this effectively ignores the 21054 authentication in the spec for a single request. 21055 :type _request_auth: dict, optional 21056 :param _content_type: force content-type for the request. 21057 :type _content_type: str, Optional 21058 :param _headers: set to override the headers for a single 21059 request; this effectively ignores the headers 21060 in the spec for a single request. 21061 :type _headers: dict, optional 21062 :param _host_index: set to override the host_index for a single 21063 request; this effectively ignores the host_index 21064 in the spec for a single request. 21065 :type _host_index: int, optional 21066 :return: Returns the result object. 21067 """ # noqa: E501 21068 21069 _param = self._create_image_item_using_local_file_serialize( 21070 board_id_platform_file_upload=board_id_platform_file_upload, 21071 resource=resource, 21072 data=data, 21073 _request_auth=_request_auth, 21074 _content_type=_content_type, 21075 _headers=_headers, 21076 _host_index=_host_index, 21077 ) 21078 21079 _response_types_map: Dict[str, Optional[str]] = { 21080 "201": "ImageItem", 21081 } 21082 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21083 response_data.read() 21084 return self.api_client.response_deserialize( 21085 response_data=response_data, 21086 response_types_map=_response_types_map, 21087 ).data 21088 21089 def _create_image_item_using_local_file_serialize( 21090 self, 21091 board_id_platform_file_upload, 21092 resource, 21093 data, 21094 _request_auth, 21095 _content_type, 21096 _headers, 21097 _host_index, 21098 ) -> RequestSerialized: 21099 21100 _host = None 21101 21102 _collection_formats: Dict[str, str] = {} 21103 21104 _path_params: Dict[str, str] = {} 21105 _query_params: List[Tuple[str, str]] = [] 21106 _header_params: Dict[str, Optional[str]] = _headers or {} 21107 _form_params: List[Tuple[str, str]] = [] 21108 _files: Dict[str, str] = {} 21109 _body_params: Optional[bytes] = None 21110 21111 # process the path parameters 21112 if board_id_platform_file_upload is not None: 21113 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 21114 # process the query parameters 21115 # process the header parameters 21116 # process the form parameters 21117 if data is not None: 21118 _form_params.append(("data", data)) 21119 if resource is not None: 21120 _files["resource"] = resource 21121 # process the body parameter 21122 21123 # set the HTTP header `Accept` 21124 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21125 21126 # set the HTTP header `Content-Type` 21127 if _content_type: 21128 _header_params["Content-Type"] = _content_type 21129 else: 21130 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 21131 if _default_content_type is not None: 21132 _header_params["Content-Type"] = _default_content_type 21133 21134 # authentication setting 21135 _auth_settings: List[str] = [] 21136 21137 return self.api_client.param_serialize( 21138 method="POST", 21139 resource_path="/v2/boards/{board_id_PlatformFileUpload}/images", 21140 path_params=_path_params, 21141 query_params=_query_params, 21142 header_params=_header_params, 21143 body=_body_params, 21144 post_params=_form_params, 21145 files=_files, 21146 auth_settings=_auth_settings, 21147 collection_formats=_collection_formats, 21148 _host=_host, 21149 _request_auth=_request_auth, 21150 ) 21151 21152 @validate_call 21153 def create_image_item_using_url( 21154 self, 21155 board_id: Annotated[ 21156 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 21157 ], 21158 image_create_request: ImageCreateRequest, 21159 _request_timeout: Union[ 21160 None, 21161 Annotated[StrictFloat, Field(gt=0)], 21162 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21163 ] = None, 21164 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21165 _content_type: Optional[StrictStr] = None, 21166 _headers: Optional[Dict[StrictStr, Any]] = None, 21167 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21168 ) -> ImageItem: 21169 """Create image item using URL 21170 21171 Adds an image item to a board by specifying an image URL.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21172 21173 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 21174 :type board_id: str 21175 :param image_create_request: (required) 21176 :type image_create_request: ImageCreateRequest 21177 :param _request_timeout: timeout setting for this request. If one 21178 number provided, it will be total request 21179 timeout. It can also be a pair (tuple) of 21180 (connection, read) timeouts. 21181 :type _request_timeout: int, tuple(int, int), optional 21182 :param _request_auth: set to override the auth_settings for an a single 21183 request; this effectively ignores the 21184 authentication in the spec for a single request. 21185 :type _request_auth: dict, optional 21186 :param _content_type: force content-type for the request. 21187 :type _content_type: str, Optional 21188 :param _headers: set to override the headers for a single 21189 request; this effectively ignores the headers 21190 in the spec for a single request. 21191 :type _headers: dict, optional 21192 :param _host_index: set to override the host_index for a single 21193 request; this effectively ignores the host_index 21194 in the spec for a single request. 21195 :type _host_index: int, optional 21196 :return: Returns the result object. 21197 """ # noqa: E501 21198 21199 _param = self._create_image_item_using_url_serialize( 21200 board_id=board_id, 21201 image_create_request=image_create_request, 21202 _request_auth=_request_auth, 21203 _content_type=_content_type, 21204 _headers=_headers, 21205 _host_index=_host_index, 21206 ) 21207 21208 _response_types_map: Dict[str, Optional[str]] = { 21209 "201": "ImageItem", 21210 "400": None, 21211 "404": None, 21212 "429": None, 21213 } 21214 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21215 response_data.read() 21216 return self.api_client.response_deserialize( 21217 response_data=response_data, 21218 response_types_map=_response_types_map, 21219 ).data 21220 21221 def _create_image_item_using_url_serialize( 21222 self, 21223 board_id, 21224 image_create_request, 21225 _request_auth, 21226 _content_type, 21227 _headers, 21228 _host_index, 21229 ) -> RequestSerialized: 21230 21231 _host = None 21232 21233 _collection_formats: Dict[str, str] = {} 21234 21235 _path_params: Dict[str, str] = {} 21236 _query_params: List[Tuple[str, str]] = [] 21237 _header_params: Dict[str, Optional[str]] = _headers or {} 21238 _form_params: List[Tuple[str, str]] = [] 21239 _files: Dict[str, str] = {} 21240 _body_params: Optional[bytes] = None 21241 21242 # process the path parameters 21243 if board_id is not None: 21244 _path_params["board_id"] = board_id 21245 # process the query parameters 21246 # process the header parameters 21247 # process the form parameters 21248 # process the body parameter 21249 if image_create_request is not None: 21250 _body_params = image_create_request 21251 21252 # set the HTTP header `Accept` 21253 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21254 21255 # set the HTTP header `Content-Type` 21256 if _content_type: 21257 _header_params["Content-Type"] = _content_type 21258 else: 21259 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 21260 if _default_content_type is not None: 21261 _header_params["Content-Type"] = _default_content_type 21262 21263 # authentication setting 21264 _auth_settings: List[str] = [] 21265 21266 return self.api_client.param_serialize( 21267 method="POST", 21268 resource_path="/v2/boards/{board_id}/images", 21269 path_params=_path_params, 21270 query_params=_query_params, 21271 header_params=_header_params, 21272 body=_body_params, 21273 post_params=_form_params, 21274 files=_files, 21275 auth_settings=_auth_settings, 21276 collection_formats=_collection_formats, 21277 _host=_host, 21278 _request_auth=_request_auth, 21279 ) 21280 21281 @validate_call 21282 def delete_image_item( 21283 self, 21284 board_id: Annotated[ 21285 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21286 ], 21287 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21288 _request_timeout: Union[ 21289 None, 21290 Annotated[StrictFloat, Field(gt=0)], 21291 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21292 ] = None, 21293 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21294 _content_type: Optional[StrictStr] = None, 21295 _headers: Optional[Dict[StrictStr, Any]] = None, 21296 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21297 ) -> object: 21298 """Delete image item 21299 21300 Deletes an image item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21301 21302 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21303 :type board_id: str 21304 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21305 :type item_id: str 21306 :param _request_timeout: timeout setting for this request. If one 21307 number provided, it will be total request 21308 timeout. It can also be a pair (tuple) of 21309 (connection, read) timeouts. 21310 :type _request_timeout: int, tuple(int, int), optional 21311 :param _request_auth: set to override the auth_settings for an a single 21312 request; this effectively ignores the 21313 authentication in the spec for a single request. 21314 :type _request_auth: dict, optional 21315 :param _content_type: force content-type for the request. 21316 :type _content_type: str, Optional 21317 :param _headers: set to override the headers for a single 21318 request; this effectively ignores the headers 21319 in the spec for a single request. 21320 :type _headers: dict, optional 21321 :param _host_index: set to override the host_index for a single 21322 request; this effectively ignores the host_index 21323 in the spec for a single request. 21324 :type _host_index: int, optional 21325 :return: Returns the result object. 21326 """ # noqa: E501 21327 21328 _param = self._delete_image_item_serialize( 21329 board_id=board_id, 21330 item_id=item_id, 21331 _request_auth=_request_auth, 21332 _content_type=_content_type, 21333 _headers=_headers, 21334 _host_index=_host_index, 21335 ) 21336 21337 _response_types_map: Dict[str, Optional[str]] = { 21338 "204": "object", 21339 "400": None, 21340 "404": None, 21341 "429": None, 21342 } 21343 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21344 response_data.read() 21345 return self.api_client.response_deserialize( 21346 response_data=response_data, 21347 response_types_map=_response_types_map, 21348 ).data 21349 21350 def _delete_image_item_serialize( 21351 self, 21352 board_id, 21353 item_id, 21354 _request_auth, 21355 _content_type, 21356 _headers, 21357 _host_index, 21358 ) -> RequestSerialized: 21359 21360 _host = None 21361 21362 _collection_formats: Dict[str, str] = {} 21363 21364 _path_params: Dict[str, str] = {} 21365 _query_params: List[Tuple[str, str]] = [] 21366 _header_params: Dict[str, Optional[str]] = _headers or {} 21367 _form_params: List[Tuple[str, str]] = [] 21368 _files: Dict[str, str] = {} 21369 _body_params: Optional[bytes] = None 21370 21371 # process the path parameters 21372 if board_id is not None: 21373 _path_params["board_id"] = board_id 21374 if item_id is not None: 21375 _path_params["item_id"] = item_id 21376 # process the query parameters 21377 # process the header parameters 21378 # process the form parameters 21379 # process the body parameter 21380 21381 # set the HTTP header `Accept` 21382 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21383 21384 # authentication setting 21385 _auth_settings: List[str] = [] 21386 21387 return self.api_client.param_serialize( 21388 method="DELETE", 21389 resource_path="/v2/boards/{board_id}/images/{item_id}", 21390 path_params=_path_params, 21391 query_params=_query_params, 21392 header_params=_header_params, 21393 body=_body_params, 21394 post_params=_form_params, 21395 files=_files, 21396 auth_settings=_auth_settings, 21397 collection_formats=_collection_formats, 21398 _host=_host, 21399 _request_auth=_request_auth, 21400 ) 21401 21402 @validate_call 21403 def get_image_item( 21404 self, 21405 board_id: Annotated[ 21406 StrictStr, 21407 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 21408 ], 21409 item_id: Annotated[ 21410 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 21411 ], 21412 _request_timeout: Union[ 21413 None, 21414 Annotated[StrictFloat, Field(gt=0)], 21415 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21416 ] = None, 21417 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21418 _content_type: Optional[StrictStr] = None, 21419 _headers: Optional[Dict[StrictStr, Any]] = None, 21420 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21421 ) -> ImageItem: 21422 """Get image item 21423 21424 Retrieves information for a specific image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 21425 21426 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 21427 :type board_id: str 21428 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 21429 :type item_id: str 21430 :param _request_timeout: timeout setting for this request. If one 21431 number provided, it will be total request 21432 timeout. It can also be a pair (tuple) of 21433 (connection, read) timeouts. 21434 :type _request_timeout: int, tuple(int, int), optional 21435 :param _request_auth: set to override the auth_settings for an a single 21436 request; this effectively ignores the 21437 authentication in the spec for a single request. 21438 :type _request_auth: dict, optional 21439 :param _content_type: force content-type for the request. 21440 :type _content_type: str, Optional 21441 :param _headers: set to override the headers for a single 21442 request; this effectively ignores the headers 21443 in the spec for a single request. 21444 :type _headers: dict, optional 21445 :param _host_index: set to override the host_index for a single 21446 request; this effectively ignores the host_index 21447 in the spec for a single request. 21448 :type _host_index: int, optional 21449 :return: Returns the result object. 21450 """ # noqa: E501 21451 21452 _param = self._get_image_item_serialize( 21453 board_id=board_id, 21454 item_id=item_id, 21455 _request_auth=_request_auth, 21456 _content_type=_content_type, 21457 _headers=_headers, 21458 _host_index=_host_index, 21459 ) 21460 21461 _response_types_map: Dict[str, Optional[str]] = { 21462 "200": "ImageItem", 21463 "400": None, 21464 "404": None, 21465 "429": None, 21466 } 21467 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21468 response_data.read() 21469 return self.api_client.response_deserialize( 21470 response_data=response_data, 21471 response_types_map=_response_types_map, 21472 ).data 21473 21474 def _get_image_item_serialize( 21475 self, 21476 board_id, 21477 item_id, 21478 _request_auth, 21479 _content_type, 21480 _headers, 21481 _host_index, 21482 ) -> RequestSerialized: 21483 21484 _host = None 21485 21486 _collection_formats: Dict[str, str] = {} 21487 21488 _path_params: Dict[str, str] = {} 21489 _query_params: List[Tuple[str, str]] = [] 21490 _header_params: Dict[str, Optional[str]] = _headers or {} 21491 _form_params: List[Tuple[str, str]] = [] 21492 _files: Dict[str, str] = {} 21493 _body_params: Optional[bytes] = None 21494 21495 # process the path parameters 21496 if board_id is not None: 21497 _path_params["board_id"] = board_id 21498 if item_id is not None: 21499 _path_params["item_id"] = item_id 21500 # process the query parameters 21501 # process the header parameters 21502 # process the form parameters 21503 # process the body parameter 21504 21505 # set the HTTP header `Accept` 21506 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21507 21508 # authentication setting 21509 _auth_settings: List[str] = [] 21510 21511 return self.api_client.param_serialize( 21512 method="GET", 21513 resource_path="/v2/boards/{board_id}/images/{item_id}", 21514 path_params=_path_params, 21515 query_params=_query_params, 21516 header_params=_header_params, 21517 body=_body_params, 21518 post_params=_form_params, 21519 files=_files, 21520 auth_settings=_auth_settings, 21521 collection_formats=_collection_formats, 21522 _host=_host, 21523 _request_auth=_request_auth, 21524 ) 21525 21526 @validate_call 21527 def update_image_item_using_file_from_device( 21528 self, 21529 board_id_platform_file_upload: Annotated[ 21530 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 21531 ], 21532 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 21533 resource: Annotated[ 21534 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 21535 ], 21536 data: Optional[UploadFileFromDeviceData] = None, 21537 _request_timeout: Union[ 21538 None, 21539 Annotated[StrictFloat, Field(gt=0)], 21540 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21541 ] = None, 21542 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21543 _content_type: Optional[StrictStr] = None, 21544 _headers: Optional[Dict[StrictStr, Any]] = None, 21545 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21546 ) -> ImageItem: 21547 """Update image item using file from device 21548 21549 Updates an image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21550 21551 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) 21552 :type board_id_platform_file_upload: str 21553 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 21554 :type item_id: str 21555 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 21556 :type resource: bytearray 21557 :param data: 21558 :type data: UploadFileFromDeviceData 21559 :param _request_timeout: timeout setting for this request. If one 21560 number provided, it will be total request 21561 timeout. It can also be a pair (tuple) of 21562 (connection, read) timeouts. 21563 :type _request_timeout: int, tuple(int, int), optional 21564 :param _request_auth: set to override the auth_settings for an a single 21565 request; this effectively ignores the 21566 authentication in the spec for a single request. 21567 :type _request_auth: dict, optional 21568 :param _content_type: force content-type for the request. 21569 :type _content_type: str, Optional 21570 :param _headers: set to override the headers for a single 21571 request; this effectively ignores the headers 21572 in the spec for a single request. 21573 :type _headers: dict, optional 21574 :param _host_index: set to override the host_index for a single 21575 request; this effectively ignores the host_index 21576 in the spec for a single request. 21577 :type _host_index: int, optional 21578 :return: Returns the result object. 21579 """ # noqa: E501 21580 21581 _param = self._update_image_item_using_file_from_device_serialize( 21582 board_id_platform_file_upload=board_id_platform_file_upload, 21583 item_id=item_id, 21584 resource=resource, 21585 data=data, 21586 _request_auth=_request_auth, 21587 _content_type=_content_type, 21588 _headers=_headers, 21589 _host_index=_host_index, 21590 ) 21591 21592 _response_types_map: Dict[str, Optional[str]] = { 21593 "200": "ImageItem", 21594 } 21595 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21596 response_data.read() 21597 return self.api_client.response_deserialize( 21598 response_data=response_data, 21599 response_types_map=_response_types_map, 21600 ).data 21601 21602 def _update_image_item_using_file_from_device_serialize( 21603 self, 21604 board_id_platform_file_upload, 21605 item_id, 21606 resource, 21607 data, 21608 _request_auth, 21609 _content_type, 21610 _headers, 21611 _host_index, 21612 ) -> RequestSerialized: 21613 21614 _host = None 21615 21616 _collection_formats: Dict[str, str] = {} 21617 21618 _path_params: Dict[str, str] = {} 21619 _query_params: List[Tuple[str, str]] = [] 21620 _header_params: Dict[str, Optional[str]] = _headers or {} 21621 _form_params: List[Tuple[str, str]] = [] 21622 _files: Dict[str, str] = {} 21623 _body_params: Optional[bytes] = None 21624 21625 # process the path parameters 21626 if board_id_platform_file_upload is not None: 21627 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 21628 if item_id is not None: 21629 _path_params["item_id"] = item_id 21630 # process the query parameters 21631 # process the header parameters 21632 # process the form parameters 21633 if data is not None: 21634 _form_params.append(("data", data)) 21635 if resource is not None: 21636 _files["resource"] = resource 21637 # process the body parameter 21638 21639 # set the HTTP header `Accept` 21640 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21641 21642 # set the HTTP header `Content-Type` 21643 if _content_type: 21644 _header_params["Content-Type"] = _content_type 21645 else: 21646 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 21647 if _default_content_type is not None: 21648 _header_params["Content-Type"] = _default_content_type 21649 21650 # authentication setting 21651 _auth_settings: List[str] = [] 21652 21653 return self.api_client.param_serialize( 21654 method="PATCH", 21655 resource_path="/v2/boards/{board_id_PlatformFileUpload}/images/{item_id}", 21656 path_params=_path_params, 21657 query_params=_query_params, 21658 header_params=_header_params, 21659 body=_body_params, 21660 post_params=_form_params, 21661 files=_files, 21662 auth_settings=_auth_settings, 21663 collection_formats=_collection_formats, 21664 _host=_host, 21665 _request_auth=_request_auth, 21666 ) 21667 21668 @validate_call 21669 def update_image_item_using_url( 21670 self, 21671 board_id: Annotated[ 21672 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 21673 ], 21674 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 21675 image_update_request: ImageUpdateRequest, 21676 _request_timeout: Union[ 21677 None, 21678 Annotated[StrictFloat, Field(gt=0)], 21679 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21680 ] = None, 21681 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21682 _content_type: Optional[StrictStr] = None, 21683 _headers: Optional[Dict[StrictStr, Any]] = None, 21684 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21685 ) -> ImageItem: 21686 """Update image item using URL 21687 21688 Updates an image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21689 21690 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 21691 :type board_id: str 21692 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 21693 :type item_id: str 21694 :param image_update_request: (required) 21695 :type image_update_request: ImageUpdateRequest 21696 :param _request_timeout: timeout setting for this request. If one 21697 number provided, it will be total request 21698 timeout. It can also be a pair (tuple) of 21699 (connection, read) timeouts. 21700 :type _request_timeout: int, tuple(int, int), optional 21701 :param _request_auth: set to override the auth_settings for an a single 21702 request; this effectively ignores the 21703 authentication in the spec for a single request. 21704 :type _request_auth: dict, optional 21705 :param _content_type: force content-type for the request. 21706 :type _content_type: str, Optional 21707 :param _headers: set to override the headers for a single 21708 request; this effectively ignores the headers 21709 in the spec for a single request. 21710 :type _headers: dict, optional 21711 :param _host_index: set to override the host_index for a single 21712 request; this effectively ignores the host_index 21713 in the spec for a single request. 21714 :type _host_index: int, optional 21715 :return: Returns the result object. 21716 """ # noqa: E501 21717 21718 _param = self._update_image_item_using_url_serialize( 21719 board_id=board_id, 21720 item_id=item_id, 21721 image_update_request=image_update_request, 21722 _request_auth=_request_auth, 21723 _content_type=_content_type, 21724 _headers=_headers, 21725 _host_index=_host_index, 21726 ) 21727 21728 _response_types_map: Dict[str, Optional[str]] = { 21729 "200": "ImageItem", 21730 "400": None, 21731 "404": None, 21732 "409": None, 21733 "429": None, 21734 } 21735 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21736 response_data.read() 21737 return self.api_client.response_deserialize( 21738 response_data=response_data, 21739 response_types_map=_response_types_map, 21740 ).data 21741 21742 def _update_image_item_using_url_serialize( 21743 self, 21744 board_id, 21745 item_id, 21746 image_update_request, 21747 _request_auth, 21748 _content_type, 21749 _headers, 21750 _host_index, 21751 ) -> RequestSerialized: 21752 21753 _host = None 21754 21755 _collection_formats: Dict[str, str] = {} 21756 21757 _path_params: Dict[str, str] = {} 21758 _query_params: List[Tuple[str, str]] = [] 21759 _header_params: Dict[str, Optional[str]] = _headers or {} 21760 _form_params: List[Tuple[str, str]] = [] 21761 _files: Dict[str, str] = {} 21762 _body_params: Optional[bytes] = None 21763 21764 # process the path parameters 21765 if board_id is not None: 21766 _path_params["board_id"] = board_id 21767 if item_id is not None: 21768 _path_params["item_id"] = item_id 21769 # process the query parameters 21770 # process the header parameters 21771 # process the form parameters 21772 # process the body parameter 21773 if image_update_request is not None: 21774 _body_params = image_update_request 21775 21776 # set the HTTP header `Accept` 21777 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21778 21779 # set the HTTP header `Content-Type` 21780 if _content_type: 21781 _header_params["Content-Type"] = _content_type 21782 else: 21783 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 21784 if _default_content_type is not None: 21785 _header_params["Content-Type"] = _default_content_type 21786 21787 # authentication setting 21788 _auth_settings: List[str] = [] 21789 21790 return self.api_client.param_serialize( 21791 method="PATCH", 21792 resource_path="/v2/boards/{board_id}/images/{item_id}", 21793 path_params=_path_params, 21794 query_params=_query_params, 21795 header_params=_header_params, 21796 body=_body_params, 21797 post_params=_form_params, 21798 files=_files, 21799 auth_settings=_auth_settings, 21800 collection_formats=_collection_formats, 21801 _host=_host, 21802 _request_auth=_request_auth, 21803 ) 21804 21805 @validate_call 21806 def delete_item( 21807 self, 21808 board_id: Annotated[ 21809 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21810 ], 21811 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21812 _request_timeout: Union[ 21813 None, 21814 Annotated[StrictFloat, Field(gt=0)], 21815 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21816 ] = None, 21817 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21818 _content_type: Optional[StrictStr] = None, 21819 _headers: Optional[Dict[StrictStr, Any]] = None, 21820 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21821 ) -> object: 21822 """Delete item 21823 21824 Deletes an item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21825 21826 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21827 :type board_id: str 21828 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21829 :type item_id: str 21830 :param _request_timeout: timeout setting for this request. If one 21831 number provided, it will be total request 21832 timeout. It can also be a pair (tuple) of 21833 (connection, read) timeouts. 21834 :type _request_timeout: int, tuple(int, int), optional 21835 :param _request_auth: set to override the auth_settings for an a single 21836 request; this effectively ignores the 21837 authentication in the spec for a single request. 21838 :type _request_auth: dict, optional 21839 :param _content_type: force content-type for the request. 21840 :type _content_type: str, Optional 21841 :param _headers: set to override the headers for a single 21842 request; this effectively ignores the headers 21843 in the spec for a single request. 21844 :type _headers: dict, optional 21845 :param _host_index: set to override the host_index for a single 21846 request; this effectively ignores the host_index 21847 in the spec for a single request. 21848 :type _host_index: int, optional 21849 :return: Returns the result object. 21850 """ # noqa: E501 21851 21852 _param = self._delete_item_serialize( 21853 board_id=board_id, 21854 item_id=item_id, 21855 _request_auth=_request_auth, 21856 _content_type=_content_type, 21857 _headers=_headers, 21858 _host_index=_host_index, 21859 ) 21860 21861 _response_types_map: Dict[str, Optional[str]] = { 21862 "204": "object", 21863 "400": None, 21864 "404": None, 21865 "429": None, 21866 } 21867 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21868 response_data.read() 21869 return self.api_client.response_deserialize( 21870 response_data=response_data, 21871 response_types_map=_response_types_map, 21872 ).data 21873 21874 def _delete_item_serialize( 21875 self, 21876 board_id, 21877 item_id, 21878 _request_auth, 21879 _content_type, 21880 _headers, 21881 _host_index, 21882 ) -> RequestSerialized: 21883 21884 _host = None 21885 21886 _collection_formats: Dict[str, str] = {} 21887 21888 _path_params: Dict[str, str] = {} 21889 _query_params: List[Tuple[str, str]] = [] 21890 _header_params: Dict[str, Optional[str]] = _headers or {} 21891 _form_params: List[Tuple[str, str]] = [] 21892 _files: Dict[str, str] = {} 21893 _body_params: Optional[bytes] = None 21894 21895 # process the path parameters 21896 if board_id is not None: 21897 _path_params["board_id"] = board_id 21898 if item_id is not None: 21899 _path_params["item_id"] = item_id 21900 # process the query parameters 21901 # process the header parameters 21902 # process the form parameters 21903 # process the body parameter 21904 21905 # set the HTTP header `Accept` 21906 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21907 21908 # authentication setting 21909 _auth_settings: List[str] = [] 21910 21911 return self.api_client.param_serialize( 21912 method="DELETE", 21913 resource_path="/v2/boards/{board_id}/items/{item_id}", 21914 path_params=_path_params, 21915 query_params=_query_params, 21916 header_params=_header_params, 21917 body=_body_params, 21918 post_params=_form_params, 21919 files=_files, 21920 auth_settings=_auth_settings, 21921 collection_formats=_collection_formats, 21922 _host=_host, 21923 _request_auth=_request_auth, 21924 ) 21925 21926 @validate_call 21927 def delete_item_experimental( 21928 self, 21929 board_id: Annotated[ 21930 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21931 ], 21932 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21933 _request_timeout: Union[ 21934 None, 21935 Annotated[StrictFloat, Field(gt=0)], 21936 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21937 ] = None, 21938 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21939 _content_type: Optional[StrictStr] = None, 21940 _headers: Optional[Dict[StrictStr, Any]] = None, 21941 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21942 ) -> object: 21943 """Delete item 21944 21945 Deletes an item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21946 21947 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21948 :type board_id: str 21949 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21950 :type item_id: str 21951 :param _request_timeout: timeout setting for this request. If one 21952 number provided, it will be total request 21953 timeout. It can also be a pair (tuple) of 21954 (connection, read) timeouts. 21955 :type _request_timeout: int, tuple(int, int), optional 21956 :param _request_auth: set to override the auth_settings for an a single 21957 request; this effectively ignores the 21958 authentication in the spec for a single request. 21959 :type _request_auth: dict, optional 21960 :param _content_type: force content-type for the request. 21961 :type _content_type: str, Optional 21962 :param _headers: set to override the headers for a single 21963 request; this effectively ignores the headers 21964 in the spec for a single request. 21965 :type _headers: dict, optional 21966 :param _host_index: set to override the host_index for a single 21967 request; this effectively ignores the host_index 21968 in the spec for a single request. 21969 :type _host_index: int, optional 21970 :return: Returns the result object. 21971 """ # noqa: E501 21972 21973 _param = self._delete_item_experimental_serialize( 21974 board_id=board_id, 21975 item_id=item_id, 21976 _request_auth=_request_auth, 21977 _content_type=_content_type, 21978 _headers=_headers, 21979 _host_index=_host_index, 21980 ) 21981 21982 _response_types_map: Dict[str, Optional[str]] = { 21983 "204": "object", 21984 "400": "CreateFrameItem400Response", 21985 "404": "CreateFrameItem400Response", 21986 "429": "CreateFrameItem400Response", 21987 } 21988 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21989 response_data.read() 21990 return self.api_client.response_deserialize( 21991 response_data=response_data, 21992 response_types_map=_response_types_map, 21993 ).data 21994 21995 def _delete_item_experimental_serialize( 21996 self, 21997 board_id, 21998 item_id, 21999 _request_auth, 22000 _content_type, 22001 _headers, 22002 _host_index, 22003 ) -> RequestSerialized: 22004 22005 _host = None 22006 22007 _collection_formats: Dict[str, str] = {} 22008 22009 _path_params: Dict[str, str] = {} 22010 _query_params: List[Tuple[str, str]] = [] 22011 _header_params: Dict[str, Optional[str]] = _headers or {} 22012 _form_params: List[Tuple[str, str]] = [] 22013 _files: Dict[str, str] = {} 22014 _body_params: Optional[bytes] = None 22015 22016 # process the path parameters 22017 if board_id is not None: 22018 _path_params["board_id"] = board_id 22019 if item_id is not None: 22020 _path_params["item_id"] = item_id 22021 # process the query parameters 22022 # process the header parameters 22023 # process the form parameters 22024 # process the body parameter 22025 22026 # set the HTTP header `Accept` 22027 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22028 22029 # authentication setting 22030 _auth_settings: List[str] = [] 22031 22032 return self.api_client.param_serialize( 22033 method="DELETE", 22034 resource_path="/v2-experimental/boards/{board_id}/items/{item_id}", 22035 path_params=_path_params, 22036 query_params=_query_params, 22037 header_params=_header_params, 22038 body=_body_params, 22039 post_params=_form_params, 22040 files=_files, 22041 auth_settings=_auth_settings, 22042 collection_formats=_collection_formats, 22043 _host=_host, 22044 _request_auth=_request_auth, 22045 ) 22046 22047 @validate_call 22048 def get_items( 22049 self, 22050 board_id: Annotated[ 22051 StrictStr, 22052 Field( 22053 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 22054 ), 22055 ], 22056 limit: Optional[Annotated[str, Field(strict=True)]] = None, 22057 type: Optional[StrictStr] = None, 22058 cursor: Optional[StrictStr] = None, 22059 _request_timeout: Union[ 22060 None, 22061 Annotated[StrictFloat, Field(gt=0)], 22062 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22063 ] = None, 22064 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22065 _content_type: Optional[StrictStr] = None, 22066 _headers: Optional[Dict[StrictStr, Any]] = None, 22067 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22068 ) -> GenericItemCursorPaged: 22069 """Get items on board 22070 22071 Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22072 22073 :param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) 22074 :type board_id: str 22075 :param limit: 22076 :type limit: str 22077 :param type: 22078 :type type: str 22079 :param cursor: 22080 :type cursor: str 22081 :param _request_timeout: timeout setting for this request. If one 22082 number provided, it will be total request 22083 timeout. It can also be a pair (tuple) of 22084 (connection, read) timeouts. 22085 :type _request_timeout: int, tuple(int, int), optional 22086 :param _request_auth: set to override the auth_settings for an a single 22087 request; this effectively ignores the 22088 authentication in the spec for a single request. 22089 :type _request_auth: dict, optional 22090 :param _content_type: force content-type for the request. 22091 :type _content_type: str, Optional 22092 :param _headers: set to override the headers for a single 22093 request; this effectively ignores the headers 22094 in the spec for a single request. 22095 :type _headers: dict, optional 22096 :param _host_index: set to override the host_index for a single 22097 request; this effectively ignores the host_index 22098 in the spec for a single request. 22099 :type _host_index: int, optional 22100 :return: Returns the result object. 22101 """ # noqa: E501 22102 22103 _param = self._get_items_serialize( 22104 board_id=board_id, 22105 limit=limit, 22106 type=type, 22107 cursor=cursor, 22108 _request_auth=_request_auth, 22109 _content_type=_content_type, 22110 _headers=_headers, 22111 _host_index=_host_index, 22112 ) 22113 22114 _response_types_map: Dict[str, Optional[str]] = { 22115 "200": "GenericItemCursorPaged", 22116 "400": None, 22117 "404": None, 22118 "429": None, 22119 } 22120 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22121 response_data.read() 22122 return self.api_client.response_deserialize( 22123 response_data=response_data, 22124 response_types_map=_response_types_map, 22125 ).data 22126 22127 def _get_items_serialize( 22128 self, 22129 board_id, 22130 limit, 22131 type, 22132 cursor, 22133 _request_auth, 22134 _content_type, 22135 _headers, 22136 _host_index, 22137 ) -> RequestSerialized: 22138 22139 _host = None 22140 22141 _collection_formats: Dict[str, str] = {} 22142 22143 _path_params: Dict[str, str] = {} 22144 _query_params: List[Tuple[str, str]] = [] 22145 _header_params: Dict[str, Optional[str]] = _headers or {} 22146 _form_params: List[Tuple[str, str]] = [] 22147 _files: Dict[str, str] = {} 22148 _body_params: Optional[bytes] = None 22149 22150 # process the path parameters 22151 if board_id is not None: 22152 _path_params["board_id"] = board_id 22153 # process the query parameters 22154 if limit is not None: 22155 22156 _query_params.append(("limit", limit)) 22157 22158 if type is not None: 22159 22160 _query_params.append(("type", type)) 22161 22162 if cursor is not None: 22163 22164 _query_params.append(("cursor", cursor)) 22165 22166 # process the header parameters 22167 # process the form parameters 22168 # process the body parameter 22169 22170 # set the HTTP header `Accept` 22171 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22172 22173 # authentication setting 22174 _auth_settings: List[str] = [] 22175 22176 return self.api_client.param_serialize( 22177 method="GET", 22178 resource_path="/v2/boards/{board_id}/items", 22179 path_params=_path_params, 22180 query_params=_query_params, 22181 header_params=_header_params, 22182 body=_body_params, 22183 post_params=_form_params, 22184 files=_files, 22185 auth_settings=_auth_settings, 22186 collection_formats=_collection_formats, 22187 _host=_host, 22188 _request_auth=_request_auth, 22189 ) 22190 22191 @validate_call 22192 def get_items_within_frame( 22193 self, 22194 board_id_platform_containers: Annotated[ 22195 StrictStr, 22196 Field( 22197 description="Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items." 22198 ), 22199 ], 22200 parent_item_id: Annotated[ 22201 str, 22202 Field( 22203 strict=True, description="ID of the frame for which you want to retrieve the list of available items." 22204 ), 22205 ], 22206 limit: Optional[Annotated[str, Field(strict=True)]] = None, 22207 type: Optional[StrictStr] = None, 22208 cursor: Optional[StrictStr] = None, 22209 _request_timeout: Union[ 22210 None, 22211 Annotated[StrictFloat, Field(gt=0)], 22212 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22213 ] = None, 22214 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22215 _content_type: Optional[StrictStr] = None, 22216 _headers: Optional[Dict[StrictStr, Any]] = None, 22217 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22218 ) -> GenericItemCursorPaged: 22219 """Get items within frame 22220 22221 Retrieves a list of items within a specific frame. A frame is a parent item and all items within a frame are child items. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22222 22223 :param board_id_platform_containers: Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items. (required) 22224 :type board_id_platform_containers: str 22225 :param parent_item_id: ID of the frame for which you want to retrieve the list of available items. (required) 22226 :type parent_item_id: str 22227 :param limit: 22228 :type limit: str 22229 :param type: 22230 :type type: str 22231 :param cursor: 22232 :type cursor: str 22233 :param _request_timeout: timeout setting for this request. If one 22234 number provided, it will be total request 22235 timeout. It can also be a pair (tuple) of 22236 (connection, read) timeouts. 22237 :type _request_timeout: int, tuple(int, int), optional 22238 :param _request_auth: set to override the auth_settings for an a single 22239 request; this effectively ignores the 22240 authentication in the spec for a single request. 22241 :type _request_auth: dict, optional 22242 :param _content_type: force content-type for the request. 22243 :type _content_type: str, Optional 22244 :param _headers: set to override the headers for a single 22245 request; this effectively ignores the headers 22246 in the spec for a single request. 22247 :type _headers: dict, optional 22248 :param _host_index: set to override the host_index for a single 22249 request; this effectively ignores the host_index 22250 in the spec for a single request. 22251 :type _host_index: int, optional 22252 :return: Returns the result object. 22253 """ # noqa: E501 22254 22255 _param = self._get_items_within_frame_serialize( 22256 board_id_platform_containers=board_id_platform_containers, 22257 parent_item_id=parent_item_id, 22258 limit=limit, 22259 type=type, 22260 cursor=cursor, 22261 _request_auth=_request_auth, 22262 _content_type=_content_type, 22263 _headers=_headers, 22264 _host_index=_host_index, 22265 ) 22266 22267 _response_types_map: Dict[str, Optional[str]] = { 22268 "200": "GenericItemCursorPaged", 22269 "400": "CreateFrameItem400Response", 22270 "404": "CreateFrameItem400Response", 22271 "429": "CreateFrameItem400Response", 22272 } 22273 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22274 response_data.read() 22275 return self.api_client.response_deserialize( 22276 response_data=response_data, 22277 response_types_map=_response_types_map, 22278 ).data 22279 22280 def _get_items_within_frame_serialize( 22281 self, 22282 board_id_platform_containers, 22283 parent_item_id, 22284 limit, 22285 type, 22286 cursor, 22287 _request_auth, 22288 _content_type, 22289 _headers, 22290 _host_index, 22291 ) -> RequestSerialized: 22292 22293 _host = None 22294 22295 _collection_formats: Dict[str, str] = {} 22296 22297 _path_params: Dict[str, str] = {} 22298 _query_params: List[Tuple[str, str]] = [] 22299 _header_params: Dict[str, Optional[str]] = _headers or {} 22300 _form_params: List[Tuple[str, str]] = [] 22301 _files: Dict[str, str] = {} 22302 _body_params: Optional[bytes] = None 22303 22304 # process the path parameters 22305 if board_id_platform_containers is not None: 22306 _path_params["board_id_PlatformContainers"] = board_id_platform_containers 22307 # process the query parameters 22308 if parent_item_id is not None: 22309 22310 _query_params.append(("parent_item_id", parent_item_id)) 22311 22312 if limit is not None: 22313 22314 _query_params.append(("limit", limit)) 22315 22316 if type is not None: 22317 22318 _query_params.append(("type", type)) 22319 22320 if cursor is not None: 22321 22322 _query_params.append(("cursor", cursor)) 22323 22324 # process the header parameters 22325 # process the form parameters 22326 # process the body parameter 22327 22328 # set the HTTP header `Accept` 22329 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22330 22331 # authentication setting 22332 _auth_settings: List[str] = [] 22333 22334 return self.api_client.param_serialize( 22335 method="GET", 22336 resource_path="/v2/boards/{board_id_PlatformContainers}/items", 22337 path_params=_path_params, 22338 query_params=_query_params, 22339 header_params=_header_params, 22340 body=_body_params, 22341 post_params=_form_params, 22342 files=_files, 22343 auth_settings=_auth_settings, 22344 collection_formats=_collection_formats, 22345 _host=_host, 22346 _request_auth=_request_auth, 22347 ) 22348 22349 @validate_call 22350 def get_specific_item( 22351 self, 22352 board_id: Annotated[ 22353 StrictStr, 22354 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 22355 ], 22356 item_id: Annotated[ 22357 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 22358 ], 22359 _request_timeout: Union[ 22360 None, 22361 Annotated[StrictFloat, Field(gt=0)], 22362 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22363 ] = None, 22364 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22365 _content_type: Optional[StrictStr] = None, 22366 _headers: Optional[Dict[StrictStr, Any]] = None, 22367 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22368 ) -> GenericItem: 22369 """Get specific item on board 22370 22371 Retrieves information for a specific item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 22372 22373 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 22374 :type board_id: str 22375 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 22376 :type item_id: str 22377 :param _request_timeout: timeout setting for this request. If one 22378 number provided, it will be total request 22379 timeout. It can also be a pair (tuple) of 22380 (connection, read) timeouts. 22381 :type _request_timeout: int, tuple(int, int), optional 22382 :param _request_auth: set to override the auth_settings for an a single 22383 request; this effectively ignores the 22384 authentication in the spec for a single request. 22385 :type _request_auth: dict, optional 22386 :param _content_type: force content-type for the request. 22387 :type _content_type: str, Optional 22388 :param _headers: set to override the headers for a single 22389 request; this effectively ignores the headers 22390 in the spec for a single request. 22391 :type _headers: dict, optional 22392 :param _host_index: set to override the host_index for a single 22393 request; this effectively ignores the host_index 22394 in the spec for a single request. 22395 :type _host_index: int, optional 22396 :return: Returns the result object. 22397 """ # noqa: E501 22398 22399 _param = self._get_specific_item_serialize( 22400 board_id=board_id, 22401 item_id=item_id, 22402 _request_auth=_request_auth, 22403 _content_type=_content_type, 22404 _headers=_headers, 22405 _host_index=_host_index, 22406 ) 22407 22408 _response_types_map: Dict[str, Optional[str]] = { 22409 "200": "GenericItem", 22410 "400": None, 22411 "404": None, 22412 "429": None, 22413 } 22414 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22415 response_data.read() 22416 return self.api_client.response_deserialize( 22417 response_data=response_data, 22418 response_types_map=_response_types_map, 22419 ).data 22420 22421 def _get_specific_item_serialize( 22422 self, 22423 board_id, 22424 item_id, 22425 _request_auth, 22426 _content_type, 22427 _headers, 22428 _host_index, 22429 ) -> RequestSerialized: 22430 22431 _host = None 22432 22433 _collection_formats: Dict[str, str] = {} 22434 22435 _path_params: Dict[str, str] = {} 22436 _query_params: List[Tuple[str, str]] = [] 22437 _header_params: Dict[str, Optional[str]] = _headers or {} 22438 _form_params: List[Tuple[str, str]] = [] 22439 _files: Dict[str, str] = {} 22440 _body_params: Optional[bytes] = None 22441 22442 # process the path parameters 22443 if board_id is not None: 22444 _path_params["board_id"] = board_id 22445 if item_id is not None: 22446 _path_params["item_id"] = item_id 22447 # process the query parameters 22448 # process the header parameters 22449 # process the form parameters 22450 # process the body parameter 22451 22452 # set the HTTP header `Accept` 22453 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22454 22455 # authentication setting 22456 _auth_settings: List[str] = [] 22457 22458 return self.api_client.param_serialize( 22459 method="GET", 22460 resource_path="/v2/boards/{board_id}/items/{item_id}", 22461 path_params=_path_params, 22462 query_params=_query_params, 22463 header_params=_header_params, 22464 body=_body_params, 22465 post_params=_form_params, 22466 files=_files, 22467 auth_settings=_auth_settings, 22468 collection_formats=_collection_formats, 22469 _host=_host, 22470 _request_auth=_request_auth, 22471 ) 22472 22473 @validate_call 22474 def update_item_position_or_parent( 22475 self, 22476 board_id: Annotated[ 22477 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 22478 ], 22479 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 22480 generic_item_update: GenericItemUpdate, 22481 _request_timeout: Union[ 22482 None, 22483 Annotated[StrictFloat, Field(gt=0)], 22484 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22485 ] = None, 22486 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22487 _content_type: Optional[StrictStr] = None, 22488 _headers: Optional[Dict[StrictStr, Any]] = None, 22489 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22490 ) -> GenericItem: 22491 """Update item position or parent 22492 22493 Updates the position or the parent of an item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22494 22495 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 22496 :type board_id: str 22497 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 22498 :type item_id: str 22499 :param generic_item_update: (required) 22500 :type generic_item_update: GenericItemUpdate 22501 :param _request_timeout: timeout setting for this request. If one 22502 number provided, it will be total request 22503 timeout. It can also be a pair (tuple) of 22504 (connection, read) timeouts. 22505 :type _request_timeout: int, tuple(int, int), optional 22506 :param _request_auth: set to override the auth_settings for an a single 22507 request; this effectively ignores the 22508 authentication in the spec for a single request. 22509 :type _request_auth: dict, optional 22510 :param _content_type: force content-type for the request. 22511 :type _content_type: str, Optional 22512 :param _headers: set to override the headers for a single 22513 request; this effectively ignores the headers 22514 in the spec for a single request. 22515 :type _headers: dict, optional 22516 :param _host_index: set to override the host_index for a single 22517 request; this effectively ignores the host_index 22518 in the spec for a single request. 22519 :type _host_index: int, optional 22520 :return: Returns the result object. 22521 """ # noqa: E501 22522 22523 _param = self._update_item_position_or_parent_serialize( 22524 board_id=board_id, 22525 item_id=item_id, 22526 generic_item_update=generic_item_update, 22527 _request_auth=_request_auth, 22528 _content_type=_content_type, 22529 _headers=_headers, 22530 _host_index=_host_index, 22531 ) 22532 22533 _response_types_map: Dict[str, Optional[str]] = { 22534 "200": "GenericItem", 22535 "400": None, 22536 "404": None, 22537 "429": None, 22538 } 22539 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22540 response_data.read() 22541 return self.api_client.response_deserialize( 22542 response_data=response_data, 22543 response_types_map=_response_types_map, 22544 ).data 22545 22546 def _update_item_position_or_parent_serialize( 22547 self, 22548 board_id, 22549 item_id, 22550 generic_item_update, 22551 _request_auth, 22552 _content_type, 22553 _headers, 22554 _host_index, 22555 ) -> RequestSerialized: 22556 22557 _host = None 22558 22559 _collection_formats: Dict[str, str] = {} 22560 22561 _path_params: Dict[str, str] = {} 22562 _query_params: List[Tuple[str, str]] = [] 22563 _header_params: Dict[str, Optional[str]] = _headers or {} 22564 _form_params: List[Tuple[str, str]] = [] 22565 _files: Dict[str, str] = {} 22566 _body_params: Optional[bytes] = None 22567 22568 # process the path parameters 22569 if board_id is not None: 22570 _path_params["board_id"] = board_id 22571 if item_id is not None: 22572 _path_params["item_id"] = item_id 22573 # process the query parameters 22574 # process the header parameters 22575 # process the form parameters 22576 # process the body parameter 22577 if generic_item_update is not None: 22578 _body_params = generic_item_update 22579 22580 # set the HTTP header `Accept` 22581 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22582 22583 # set the HTTP header `Content-Type` 22584 if _content_type: 22585 _header_params["Content-Type"] = _content_type 22586 else: 22587 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 22588 if _default_content_type is not None: 22589 _header_params["Content-Type"] = _default_content_type 22590 22591 # authentication setting 22592 _auth_settings: List[str] = [] 22593 22594 return self.api_client.param_serialize( 22595 method="PATCH", 22596 resource_path="/v2/boards/{board_id}/items/{item_id}", 22597 path_params=_path_params, 22598 query_params=_query_params, 22599 header_params=_header_params, 22600 body=_body_params, 22601 post_params=_form_params, 22602 files=_files, 22603 auth_settings=_auth_settings, 22604 collection_formats=_collection_formats, 22605 _host=_host, 22606 _request_auth=_request_auth, 22607 ) 22608 22609 @validate_call 22610 def create_shape_item( 22611 self, 22612 board_id: Annotated[ 22613 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 22614 ], 22615 shape_create_request: ShapeCreateRequest, 22616 _request_timeout: Union[ 22617 None, 22618 Annotated[StrictFloat, Field(gt=0)], 22619 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22620 ] = None, 22621 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22622 _content_type: Optional[StrictStr] = None, 22623 _headers: Optional[Dict[StrictStr, Any]] = None, 22624 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22625 ) -> ShapeItem: 22626 """Create shape item 22627 22628 Adds a shape item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22629 22630 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 22631 :type board_id: str 22632 :param shape_create_request: (required) 22633 :type shape_create_request: ShapeCreateRequest 22634 :param _request_timeout: timeout setting for this request. If one 22635 number provided, it will be total request 22636 timeout. It can also be a pair (tuple) of 22637 (connection, read) timeouts. 22638 :type _request_timeout: int, tuple(int, int), optional 22639 :param _request_auth: set to override the auth_settings for an a single 22640 request; this effectively ignores the 22641 authentication in the spec for a single request. 22642 :type _request_auth: dict, optional 22643 :param _content_type: force content-type for the request. 22644 :type _content_type: str, Optional 22645 :param _headers: set to override the headers for a single 22646 request; this effectively ignores the headers 22647 in the spec for a single request. 22648 :type _headers: dict, optional 22649 :param _host_index: set to override the host_index for a single 22650 request; this effectively ignores the host_index 22651 in the spec for a single request. 22652 :type _host_index: int, optional 22653 :return: Returns the result object. 22654 """ # noqa: E501 22655 22656 _param = self._create_shape_item_serialize( 22657 board_id=board_id, 22658 shape_create_request=shape_create_request, 22659 _request_auth=_request_auth, 22660 _content_type=_content_type, 22661 _headers=_headers, 22662 _host_index=_host_index, 22663 ) 22664 22665 _response_types_map: Dict[str, Optional[str]] = { 22666 "201": "ShapeItem", 22667 "400": None, 22668 "404": None, 22669 "429": None, 22670 } 22671 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22672 response_data.read() 22673 return self.api_client.response_deserialize( 22674 response_data=response_data, 22675 response_types_map=_response_types_map, 22676 ).data 22677 22678 def _create_shape_item_serialize( 22679 self, 22680 board_id, 22681 shape_create_request, 22682 _request_auth, 22683 _content_type, 22684 _headers, 22685 _host_index, 22686 ) -> RequestSerialized: 22687 22688 _host = None 22689 22690 _collection_formats: Dict[str, str] = {} 22691 22692 _path_params: Dict[str, str] = {} 22693 _query_params: List[Tuple[str, str]] = [] 22694 _header_params: Dict[str, Optional[str]] = _headers or {} 22695 _form_params: List[Tuple[str, str]] = [] 22696 _files: Dict[str, str] = {} 22697 _body_params: Optional[bytes] = None 22698 22699 # process the path parameters 22700 if board_id is not None: 22701 _path_params["board_id"] = board_id 22702 # process the query parameters 22703 # process the header parameters 22704 # process the form parameters 22705 # process the body parameter 22706 if shape_create_request is not None: 22707 _body_params = shape_create_request 22708 22709 # set the HTTP header `Accept` 22710 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22711 22712 # set the HTTP header `Content-Type` 22713 if _content_type: 22714 _header_params["Content-Type"] = _content_type 22715 else: 22716 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 22717 if _default_content_type is not None: 22718 _header_params["Content-Type"] = _default_content_type 22719 22720 # authentication setting 22721 _auth_settings: List[str] = [] 22722 22723 return self.api_client.param_serialize( 22724 method="POST", 22725 resource_path="/v2/boards/{board_id}/shapes", 22726 path_params=_path_params, 22727 query_params=_query_params, 22728 header_params=_header_params, 22729 body=_body_params, 22730 post_params=_form_params, 22731 files=_files, 22732 auth_settings=_auth_settings, 22733 collection_formats=_collection_formats, 22734 _host=_host, 22735 _request_auth=_request_auth, 22736 ) 22737 22738 @validate_call 22739 def delete_shape_item( 22740 self, 22741 board_id: Annotated[ 22742 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 22743 ], 22744 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 22745 _request_timeout: Union[ 22746 None, 22747 Annotated[StrictFloat, Field(gt=0)], 22748 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22749 ] = None, 22750 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22751 _content_type: Optional[StrictStr] = None, 22752 _headers: Optional[Dict[StrictStr, Any]] = None, 22753 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22754 ) -> object: 22755 """Delete shape item 22756 22757 Deletes a shape item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 22758 22759 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 22760 :type board_id: str 22761 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 22762 :type item_id: str 22763 :param _request_timeout: timeout setting for this request. If one 22764 number provided, it will be total request 22765 timeout. It can also be a pair (tuple) of 22766 (connection, read) timeouts. 22767 :type _request_timeout: int, tuple(int, int), optional 22768 :param _request_auth: set to override the auth_settings for an a single 22769 request; this effectively ignores the 22770 authentication in the spec for a single request. 22771 :type _request_auth: dict, optional 22772 :param _content_type: force content-type for the request. 22773 :type _content_type: str, Optional 22774 :param _headers: set to override the headers for a single 22775 request; this effectively ignores the headers 22776 in the spec for a single request. 22777 :type _headers: dict, optional 22778 :param _host_index: set to override the host_index for a single 22779 request; this effectively ignores the host_index 22780 in the spec for a single request. 22781 :type _host_index: int, optional 22782 :return: Returns the result object. 22783 """ # noqa: E501 22784 22785 _param = self._delete_shape_item_serialize( 22786 board_id=board_id, 22787 item_id=item_id, 22788 _request_auth=_request_auth, 22789 _content_type=_content_type, 22790 _headers=_headers, 22791 _host_index=_host_index, 22792 ) 22793 22794 _response_types_map: Dict[str, Optional[str]] = { 22795 "204": "object", 22796 "400": None, 22797 "404": None, 22798 "429": None, 22799 } 22800 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22801 response_data.read() 22802 return self.api_client.response_deserialize( 22803 response_data=response_data, 22804 response_types_map=_response_types_map, 22805 ).data 22806 22807 def _delete_shape_item_serialize( 22808 self, 22809 board_id, 22810 item_id, 22811 _request_auth, 22812 _content_type, 22813 _headers, 22814 _host_index, 22815 ) -> RequestSerialized: 22816 22817 _host = None 22818 22819 _collection_formats: Dict[str, str] = {} 22820 22821 _path_params: Dict[str, str] = {} 22822 _query_params: List[Tuple[str, str]] = [] 22823 _header_params: Dict[str, Optional[str]] = _headers or {} 22824 _form_params: List[Tuple[str, str]] = [] 22825 _files: Dict[str, str] = {} 22826 _body_params: Optional[bytes] = None 22827 22828 # process the path parameters 22829 if board_id is not None: 22830 _path_params["board_id"] = board_id 22831 if item_id is not None: 22832 _path_params["item_id"] = item_id 22833 # process the query parameters 22834 # process the header parameters 22835 # process the form parameters 22836 # process the body parameter 22837 22838 # set the HTTP header `Accept` 22839 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22840 22841 # authentication setting 22842 _auth_settings: List[str] = [] 22843 22844 return self.api_client.param_serialize( 22845 method="DELETE", 22846 resource_path="/v2/boards/{board_id}/shapes/{item_id}", 22847 path_params=_path_params, 22848 query_params=_query_params, 22849 header_params=_header_params, 22850 body=_body_params, 22851 post_params=_form_params, 22852 files=_files, 22853 auth_settings=_auth_settings, 22854 collection_formats=_collection_formats, 22855 _host=_host, 22856 _request_auth=_request_auth, 22857 ) 22858 22859 @validate_call 22860 def get_shape_item( 22861 self, 22862 board_id: Annotated[ 22863 StrictStr, 22864 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 22865 ], 22866 item_id: Annotated[ 22867 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 22868 ], 22869 _request_timeout: Union[ 22870 None, 22871 Annotated[StrictFloat, Field(gt=0)], 22872 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22873 ] = None, 22874 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22875 _content_type: Optional[StrictStr] = None, 22876 _headers: Optional[Dict[StrictStr, Any]] = None, 22877 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22878 ) -> ShapeItem: 22879 """Get shape item 22880 22881 Retrieves information for a specific shape item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 22882 22883 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 22884 :type board_id: str 22885 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 22886 :type item_id: str 22887 :param _request_timeout: timeout setting for this request. If one 22888 number provided, it will be total request 22889 timeout. It can also be a pair (tuple) of 22890 (connection, read) timeouts. 22891 :type _request_timeout: int, tuple(int, int), optional 22892 :param _request_auth: set to override the auth_settings for an a single 22893 request; this effectively ignores the 22894 authentication in the spec for a single request. 22895 :type _request_auth: dict, optional 22896 :param _content_type: force content-type for the request. 22897 :type _content_type: str, Optional 22898 :param _headers: set to override the headers for a single 22899 request; this effectively ignores the headers 22900 in the spec for a single request. 22901 :type _headers: dict, optional 22902 :param _host_index: set to override the host_index for a single 22903 request; this effectively ignores the host_index 22904 in the spec for a single request. 22905 :type _host_index: int, optional 22906 :return: Returns the result object. 22907 """ # noqa: E501 22908 22909 _param = self._get_shape_item_serialize( 22910 board_id=board_id, 22911 item_id=item_id, 22912 _request_auth=_request_auth, 22913 _content_type=_content_type, 22914 _headers=_headers, 22915 _host_index=_host_index, 22916 ) 22917 22918 _response_types_map: Dict[str, Optional[str]] = { 22919 "200": "ShapeItem", 22920 "400": None, 22921 "404": None, 22922 "429": None, 22923 } 22924 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22925 response_data.read() 22926 return self.api_client.response_deserialize( 22927 response_data=response_data, 22928 response_types_map=_response_types_map, 22929 ).data 22930 22931 def _get_shape_item_serialize( 22932 self, 22933 board_id, 22934 item_id, 22935 _request_auth, 22936 _content_type, 22937 _headers, 22938 _host_index, 22939 ) -> RequestSerialized: 22940 22941 _host = None 22942 22943 _collection_formats: Dict[str, str] = {} 22944 22945 _path_params: Dict[str, str] = {} 22946 _query_params: List[Tuple[str, str]] = [] 22947 _header_params: Dict[str, Optional[str]] = _headers or {} 22948 _form_params: List[Tuple[str, str]] = [] 22949 _files: Dict[str, str] = {} 22950 _body_params: Optional[bytes] = None 22951 22952 # process the path parameters 22953 if board_id is not None: 22954 _path_params["board_id"] = board_id 22955 if item_id is not None: 22956 _path_params["item_id"] = item_id 22957 # process the query parameters 22958 # process the header parameters 22959 # process the form parameters 22960 # process the body parameter 22961 22962 # set the HTTP header `Accept` 22963 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22964 22965 # authentication setting 22966 _auth_settings: List[str] = [] 22967 22968 return self.api_client.param_serialize( 22969 method="GET", 22970 resource_path="/v2/boards/{board_id}/shapes/{item_id}", 22971 path_params=_path_params, 22972 query_params=_query_params, 22973 header_params=_header_params, 22974 body=_body_params, 22975 post_params=_form_params, 22976 files=_files, 22977 auth_settings=_auth_settings, 22978 collection_formats=_collection_formats, 22979 _host=_host, 22980 _request_auth=_request_auth, 22981 ) 22982 22983 @validate_call 22984 def update_shape_item( 22985 self, 22986 board_id: Annotated[ 22987 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 22988 ], 22989 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 22990 shape_update_request: ShapeUpdateRequest, 22991 _request_timeout: Union[ 22992 None, 22993 Annotated[StrictFloat, Field(gt=0)], 22994 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22995 ] = None, 22996 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22997 _content_type: Optional[StrictStr] = None, 22998 _headers: Optional[Dict[StrictStr, Any]] = None, 22999 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23000 ) -> ShapeItem: 23001 """Update shape item 23002 23003 Updates a shape item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23004 23005 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 23006 :type board_id: str 23007 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 23008 :type item_id: str 23009 :param shape_update_request: (required) 23010 :type shape_update_request: ShapeUpdateRequest 23011 :param _request_timeout: timeout setting for this request. If one 23012 number provided, it will be total request 23013 timeout. It can also be a pair (tuple) of 23014 (connection, read) timeouts. 23015 :type _request_timeout: int, tuple(int, int), optional 23016 :param _request_auth: set to override the auth_settings for an a single 23017 request; this effectively ignores the 23018 authentication in the spec for a single request. 23019 :type _request_auth: dict, optional 23020 :param _content_type: force content-type for the request. 23021 :type _content_type: str, Optional 23022 :param _headers: set to override the headers for a single 23023 request; this effectively ignores the headers 23024 in the spec for a single request. 23025 :type _headers: dict, optional 23026 :param _host_index: set to override the host_index for a single 23027 request; this effectively ignores the host_index 23028 in the spec for a single request. 23029 :type _host_index: int, optional 23030 :return: Returns the result object. 23031 """ # noqa: E501 23032 23033 _param = self._update_shape_item_serialize( 23034 board_id=board_id, 23035 item_id=item_id, 23036 shape_update_request=shape_update_request, 23037 _request_auth=_request_auth, 23038 _content_type=_content_type, 23039 _headers=_headers, 23040 _host_index=_host_index, 23041 ) 23042 23043 _response_types_map: Dict[str, Optional[str]] = { 23044 "200": "ShapeItem", 23045 "400": None, 23046 "404": None, 23047 "409": None, 23048 "429": None, 23049 } 23050 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23051 response_data.read() 23052 return self.api_client.response_deserialize( 23053 response_data=response_data, 23054 response_types_map=_response_types_map, 23055 ).data 23056 23057 def _update_shape_item_serialize( 23058 self, 23059 board_id, 23060 item_id, 23061 shape_update_request, 23062 _request_auth, 23063 _content_type, 23064 _headers, 23065 _host_index, 23066 ) -> RequestSerialized: 23067 23068 _host = None 23069 23070 _collection_formats: Dict[str, str] = {} 23071 23072 _path_params: Dict[str, str] = {} 23073 _query_params: List[Tuple[str, str]] = [] 23074 _header_params: Dict[str, Optional[str]] = _headers or {} 23075 _form_params: List[Tuple[str, str]] = [] 23076 _files: Dict[str, str] = {} 23077 _body_params: Optional[bytes] = None 23078 23079 # process the path parameters 23080 if board_id is not None: 23081 _path_params["board_id"] = board_id 23082 if item_id is not None: 23083 _path_params["item_id"] = item_id 23084 # process the query parameters 23085 # process the header parameters 23086 # process the form parameters 23087 # process the body parameter 23088 if shape_update_request is not None: 23089 _body_params = shape_update_request 23090 23091 # set the HTTP header `Accept` 23092 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23093 23094 # set the HTTP header `Content-Type` 23095 if _content_type: 23096 _header_params["Content-Type"] = _content_type 23097 else: 23098 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23099 if _default_content_type is not None: 23100 _header_params["Content-Type"] = _default_content_type 23101 23102 # authentication setting 23103 _auth_settings: List[str] = [] 23104 23105 return self.api_client.param_serialize( 23106 method="PATCH", 23107 resource_path="/v2/boards/{board_id}/shapes/{item_id}", 23108 path_params=_path_params, 23109 query_params=_query_params, 23110 header_params=_header_params, 23111 body=_body_params, 23112 post_params=_form_params, 23113 files=_files, 23114 auth_settings=_auth_settings, 23115 collection_formats=_collection_formats, 23116 _host=_host, 23117 _request_auth=_request_auth, 23118 ) 23119 23120 @validate_call 23121 def create_sticky_note_item( 23122 self, 23123 board_id: Annotated[ 23124 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 23125 ], 23126 sticky_note_create_request: StickyNoteCreateRequest, 23127 _request_timeout: Union[ 23128 None, 23129 Annotated[StrictFloat, Field(gt=0)], 23130 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23131 ] = None, 23132 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23133 _content_type: Optional[StrictStr] = None, 23134 _headers: Optional[Dict[StrictStr, Any]] = None, 23135 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23136 ) -> StickyNoteItem: 23137 """Create sticky note item 23138 23139 Adds a sticky note item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23140 23141 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 23142 :type board_id: str 23143 :param sticky_note_create_request: (required) 23144 :type sticky_note_create_request: StickyNoteCreateRequest 23145 :param _request_timeout: timeout setting for this request. If one 23146 number provided, it will be total request 23147 timeout. It can also be a pair (tuple) of 23148 (connection, read) timeouts. 23149 :type _request_timeout: int, tuple(int, int), optional 23150 :param _request_auth: set to override the auth_settings for an a single 23151 request; this effectively ignores the 23152 authentication in the spec for a single request. 23153 :type _request_auth: dict, optional 23154 :param _content_type: force content-type for the request. 23155 :type _content_type: str, Optional 23156 :param _headers: set to override the headers for a single 23157 request; this effectively ignores the headers 23158 in the spec for a single request. 23159 :type _headers: dict, optional 23160 :param _host_index: set to override the host_index for a single 23161 request; this effectively ignores the host_index 23162 in the spec for a single request. 23163 :type _host_index: int, optional 23164 :return: Returns the result object. 23165 """ # noqa: E501 23166 23167 _param = self._create_sticky_note_item_serialize( 23168 board_id=board_id, 23169 sticky_note_create_request=sticky_note_create_request, 23170 _request_auth=_request_auth, 23171 _content_type=_content_type, 23172 _headers=_headers, 23173 _host_index=_host_index, 23174 ) 23175 23176 _response_types_map: Dict[str, Optional[str]] = { 23177 "201": "StickyNoteItem", 23178 "400": None, 23179 "404": None, 23180 "429": None, 23181 } 23182 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23183 response_data.read() 23184 return self.api_client.response_deserialize( 23185 response_data=response_data, 23186 response_types_map=_response_types_map, 23187 ).data 23188 23189 def _create_sticky_note_item_serialize( 23190 self, 23191 board_id, 23192 sticky_note_create_request, 23193 _request_auth, 23194 _content_type, 23195 _headers, 23196 _host_index, 23197 ) -> RequestSerialized: 23198 23199 _host = None 23200 23201 _collection_formats: Dict[str, str] = {} 23202 23203 _path_params: Dict[str, str] = {} 23204 _query_params: List[Tuple[str, str]] = [] 23205 _header_params: Dict[str, Optional[str]] = _headers or {} 23206 _form_params: List[Tuple[str, str]] = [] 23207 _files: Dict[str, str] = {} 23208 _body_params: Optional[bytes] = None 23209 23210 # process the path parameters 23211 if board_id is not None: 23212 _path_params["board_id"] = board_id 23213 # process the query parameters 23214 # process the header parameters 23215 # process the form parameters 23216 # process the body parameter 23217 if sticky_note_create_request is not None: 23218 _body_params = sticky_note_create_request 23219 23220 # set the HTTP header `Accept` 23221 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23222 23223 # set the HTTP header `Content-Type` 23224 if _content_type: 23225 _header_params["Content-Type"] = _content_type 23226 else: 23227 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23228 if _default_content_type is not None: 23229 _header_params["Content-Type"] = _default_content_type 23230 23231 # authentication setting 23232 _auth_settings: List[str] = [] 23233 23234 return self.api_client.param_serialize( 23235 method="POST", 23236 resource_path="/v2/boards/{board_id}/sticky_notes", 23237 path_params=_path_params, 23238 query_params=_query_params, 23239 header_params=_header_params, 23240 body=_body_params, 23241 post_params=_form_params, 23242 files=_files, 23243 auth_settings=_auth_settings, 23244 collection_formats=_collection_formats, 23245 _host=_host, 23246 _request_auth=_request_auth, 23247 ) 23248 23249 @validate_call 23250 def delete_sticky_note_item( 23251 self, 23252 board_id: Annotated[ 23253 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 23254 ], 23255 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 23256 _request_timeout: Union[ 23257 None, 23258 Annotated[StrictFloat, Field(gt=0)], 23259 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23260 ] = None, 23261 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23262 _content_type: Optional[StrictStr] = None, 23263 _headers: Optional[Dict[StrictStr, Any]] = None, 23264 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23265 ) -> object: 23266 """Delete sticky note item 23267 23268 Deletes a sticky note item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 23269 23270 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 23271 :type board_id: str 23272 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 23273 :type item_id: str 23274 :param _request_timeout: timeout setting for this request. If one 23275 number provided, it will be total request 23276 timeout. It can also be a pair (tuple) of 23277 (connection, read) timeouts. 23278 :type _request_timeout: int, tuple(int, int), optional 23279 :param _request_auth: set to override the auth_settings for an a single 23280 request; this effectively ignores the 23281 authentication in the spec for a single request. 23282 :type _request_auth: dict, optional 23283 :param _content_type: force content-type for the request. 23284 :type _content_type: str, Optional 23285 :param _headers: set to override the headers for a single 23286 request; this effectively ignores the headers 23287 in the spec for a single request. 23288 :type _headers: dict, optional 23289 :param _host_index: set to override the host_index for a single 23290 request; this effectively ignores the host_index 23291 in the spec for a single request. 23292 :type _host_index: int, optional 23293 :return: Returns the result object. 23294 """ # noqa: E501 23295 23296 _param = self._delete_sticky_note_item_serialize( 23297 board_id=board_id, 23298 item_id=item_id, 23299 _request_auth=_request_auth, 23300 _content_type=_content_type, 23301 _headers=_headers, 23302 _host_index=_host_index, 23303 ) 23304 23305 _response_types_map: Dict[str, Optional[str]] = { 23306 "204": "object", 23307 "400": None, 23308 "404": None, 23309 "429": None, 23310 } 23311 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23312 response_data.read() 23313 return self.api_client.response_deserialize( 23314 response_data=response_data, 23315 response_types_map=_response_types_map, 23316 ).data 23317 23318 def _delete_sticky_note_item_serialize( 23319 self, 23320 board_id, 23321 item_id, 23322 _request_auth, 23323 _content_type, 23324 _headers, 23325 _host_index, 23326 ) -> RequestSerialized: 23327 23328 _host = None 23329 23330 _collection_formats: Dict[str, str] = {} 23331 23332 _path_params: Dict[str, str] = {} 23333 _query_params: List[Tuple[str, str]] = [] 23334 _header_params: Dict[str, Optional[str]] = _headers or {} 23335 _form_params: List[Tuple[str, str]] = [] 23336 _files: Dict[str, str] = {} 23337 _body_params: Optional[bytes] = None 23338 23339 # process the path parameters 23340 if board_id is not None: 23341 _path_params["board_id"] = board_id 23342 if item_id is not None: 23343 _path_params["item_id"] = item_id 23344 # process the query parameters 23345 # process the header parameters 23346 # process the form parameters 23347 # process the body parameter 23348 23349 # set the HTTP header `Accept` 23350 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23351 23352 # authentication setting 23353 _auth_settings: List[str] = [] 23354 23355 return self.api_client.param_serialize( 23356 method="DELETE", 23357 resource_path="/v2/boards/{board_id}/sticky_notes/{item_id}", 23358 path_params=_path_params, 23359 query_params=_query_params, 23360 header_params=_header_params, 23361 body=_body_params, 23362 post_params=_form_params, 23363 files=_files, 23364 auth_settings=_auth_settings, 23365 collection_formats=_collection_formats, 23366 _host=_host, 23367 _request_auth=_request_auth, 23368 ) 23369 23370 @validate_call 23371 def get_sticky_note_item( 23372 self, 23373 board_id: Annotated[ 23374 StrictStr, 23375 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 23376 ], 23377 item_id: Annotated[ 23378 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 23379 ], 23380 _request_timeout: Union[ 23381 None, 23382 Annotated[StrictFloat, Field(gt=0)], 23383 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23384 ] = None, 23385 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23386 _content_type: Optional[StrictStr] = None, 23387 _headers: Optional[Dict[StrictStr, Any]] = None, 23388 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23389 ) -> StickyNoteItem: 23390 """Get sticky note item 23391 23392 Retrieves information for a specific sticky note item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23393 23394 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 23395 :type board_id: str 23396 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 23397 :type item_id: str 23398 :param _request_timeout: timeout setting for this request. If one 23399 number provided, it will be total request 23400 timeout. It can also be a pair (tuple) of 23401 (connection, read) timeouts. 23402 :type _request_timeout: int, tuple(int, int), optional 23403 :param _request_auth: set to override the auth_settings for an a single 23404 request; this effectively ignores the 23405 authentication in the spec for a single request. 23406 :type _request_auth: dict, optional 23407 :param _content_type: force content-type for the request. 23408 :type _content_type: str, Optional 23409 :param _headers: set to override the headers for a single 23410 request; this effectively ignores the headers 23411 in the spec for a single request. 23412 :type _headers: dict, optional 23413 :param _host_index: set to override the host_index for a single 23414 request; this effectively ignores the host_index 23415 in the spec for a single request. 23416 :type _host_index: int, optional 23417 :return: Returns the result object. 23418 """ # noqa: E501 23419 23420 _param = self._get_sticky_note_item_serialize( 23421 board_id=board_id, 23422 item_id=item_id, 23423 _request_auth=_request_auth, 23424 _content_type=_content_type, 23425 _headers=_headers, 23426 _host_index=_host_index, 23427 ) 23428 23429 _response_types_map: Dict[str, Optional[str]] = { 23430 "200": "StickyNoteItem", 23431 "400": None, 23432 "404": None, 23433 "429": None, 23434 } 23435 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23436 response_data.read() 23437 return self.api_client.response_deserialize( 23438 response_data=response_data, 23439 response_types_map=_response_types_map, 23440 ).data 23441 23442 def _get_sticky_note_item_serialize( 23443 self, 23444 board_id, 23445 item_id, 23446 _request_auth, 23447 _content_type, 23448 _headers, 23449 _host_index, 23450 ) -> RequestSerialized: 23451 23452 _host = None 23453 23454 _collection_formats: Dict[str, str] = {} 23455 23456 _path_params: Dict[str, str] = {} 23457 _query_params: List[Tuple[str, str]] = [] 23458 _header_params: Dict[str, Optional[str]] = _headers or {} 23459 _form_params: List[Tuple[str, str]] = [] 23460 _files: Dict[str, str] = {} 23461 _body_params: Optional[bytes] = None 23462 23463 # process the path parameters 23464 if board_id is not None: 23465 _path_params["board_id"] = board_id 23466 if item_id is not None: 23467 _path_params["item_id"] = item_id 23468 # process the query parameters 23469 # process the header parameters 23470 # process the form parameters 23471 # process the body parameter 23472 23473 # set the HTTP header `Accept` 23474 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23475 23476 # authentication setting 23477 _auth_settings: List[str] = [] 23478 23479 return self.api_client.param_serialize( 23480 method="GET", 23481 resource_path="/v2/boards/{board_id}/sticky_notes/{item_id}", 23482 path_params=_path_params, 23483 query_params=_query_params, 23484 header_params=_header_params, 23485 body=_body_params, 23486 post_params=_form_params, 23487 files=_files, 23488 auth_settings=_auth_settings, 23489 collection_formats=_collection_formats, 23490 _host=_host, 23491 _request_auth=_request_auth, 23492 ) 23493 23494 @validate_call 23495 def update_sticky_note_item( 23496 self, 23497 board_id: Annotated[ 23498 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 23499 ], 23500 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 23501 sticky_note_update_request: StickyNoteUpdateRequest, 23502 _request_timeout: Union[ 23503 None, 23504 Annotated[StrictFloat, Field(gt=0)], 23505 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23506 ] = None, 23507 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23508 _content_type: Optional[StrictStr] = None, 23509 _headers: Optional[Dict[StrictStr, Any]] = None, 23510 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23511 ) -> StickyNoteItem: 23512 """Update sticky note item 23513 23514 Updates a sticky note item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23515 23516 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 23517 :type board_id: str 23518 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 23519 :type item_id: str 23520 :param sticky_note_update_request: (required) 23521 :type sticky_note_update_request: StickyNoteUpdateRequest 23522 :param _request_timeout: timeout setting for this request. If one 23523 number provided, it will be total request 23524 timeout. It can also be a pair (tuple) of 23525 (connection, read) timeouts. 23526 :type _request_timeout: int, tuple(int, int), optional 23527 :param _request_auth: set to override the auth_settings for an a single 23528 request; this effectively ignores the 23529 authentication in the spec for a single request. 23530 :type _request_auth: dict, optional 23531 :param _content_type: force content-type for the request. 23532 :type _content_type: str, Optional 23533 :param _headers: set to override the headers for a single 23534 request; this effectively ignores the headers 23535 in the spec for a single request. 23536 :type _headers: dict, optional 23537 :param _host_index: set to override the host_index for a single 23538 request; this effectively ignores the host_index 23539 in the spec for a single request. 23540 :type _host_index: int, optional 23541 :return: Returns the result object. 23542 """ # noqa: E501 23543 23544 _param = self._update_sticky_note_item_serialize( 23545 board_id=board_id, 23546 item_id=item_id, 23547 sticky_note_update_request=sticky_note_update_request, 23548 _request_auth=_request_auth, 23549 _content_type=_content_type, 23550 _headers=_headers, 23551 _host_index=_host_index, 23552 ) 23553 23554 _response_types_map: Dict[str, Optional[str]] = { 23555 "200": "StickyNoteItem", 23556 "400": None, 23557 "404": None, 23558 "409": None, 23559 "429": None, 23560 } 23561 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23562 response_data.read() 23563 return self.api_client.response_deserialize( 23564 response_data=response_data, 23565 response_types_map=_response_types_map, 23566 ).data 23567 23568 def _update_sticky_note_item_serialize( 23569 self, 23570 board_id, 23571 item_id, 23572 sticky_note_update_request, 23573 _request_auth, 23574 _content_type, 23575 _headers, 23576 _host_index, 23577 ) -> RequestSerialized: 23578 23579 _host = None 23580 23581 _collection_formats: Dict[str, str] = {} 23582 23583 _path_params: Dict[str, str] = {} 23584 _query_params: List[Tuple[str, str]] = [] 23585 _header_params: Dict[str, Optional[str]] = _headers or {} 23586 _form_params: List[Tuple[str, str]] = [] 23587 _files: Dict[str, str] = {} 23588 _body_params: Optional[bytes] = None 23589 23590 # process the path parameters 23591 if board_id is not None: 23592 _path_params["board_id"] = board_id 23593 if item_id is not None: 23594 _path_params["item_id"] = item_id 23595 # process the query parameters 23596 # process the header parameters 23597 # process the form parameters 23598 # process the body parameter 23599 if sticky_note_update_request is not None: 23600 _body_params = sticky_note_update_request 23601 23602 # set the HTTP header `Accept` 23603 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23604 23605 # set the HTTP header `Content-Type` 23606 if _content_type: 23607 _header_params["Content-Type"] = _content_type 23608 else: 23609 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23610 if _default_content_type is not None: 23611 _header_params["Content-Type"] = _default_content_type 23612 23613 # authentication setting 23614 _auth_settings: List[str] = [] 23615 23616 return self.api_client.param_serialize( 23617 method="PATCH", 23618 resource_path="/v2/boards/{board_id}/sticky_notes/{item_id}", 23619 path_params=_path_params, 23620 query_params=_query_params, 23621 header_params=_header_params, 23622 body=_body_params, 23623 post_params=_form_params, 23624 files=_files, 23625 auth_settings=_auth_settings, 23626 collection_formats=_collection_formats, 23627 _host=_host, 23628 _request_auth=_request_auth, 23629 ) 23630 23631 @validate_call 23632 def attach_tag_to_item( 23633 self, 23634 board_id_platform_tags: Annotated[ 23635 StrictStr, 23636 Field(description="Unique identifier (ID) of the board with the item that you want to add a tag to."), 23637 ], 23638 item_id: Annotated[ 23639 StrictStr, Field(description="Unique identifier (ID) of the item to which you want to add a tag.") 23640 ], 23641 tag_id: Annotated[ 23642 StrictStr, Field(description="Unique identifier (ID) of the tag you want to add to the item.") 23643 ], 23644 _request_timeout: Union[ 23645 None, 23646 Annotated[StrictFloat, Field(gt=0)], 23647 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23648 ] = None, 23649 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23650 _content_type: Optional[StrictStr] = None, 23651 _headers: Optional[Dict[StrictStr, Any]] = None, 23652 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23653 ) -> object: 23654 """Attach tag to item 23655 23656 Attach an existing tag to the specified item. Card and sticky note items can have up to 8 tags. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Update tag](https://developers.miro.com/reference/update-tag), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23657 23658 :param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to add a tag to. (required) 23659 :type board_id_platform_tags: str 23660 :param item_id: Unique identifier (ID) of the item to which you want to add a tag. (required) 23661 :type item_id: str 23662 :param tag_id: Unique identifier (ID) of the tag you want to add to the item. (required) 23663 :type tag_id: str 23664 :param _request_timeout: timeout setting for this request. If one 23665 number provided, it will be total request 23666 timeout. It can also be a pair (tuple) of 23667 (connection, read) timeouts. 23668 :type _request_timeout: int, tuple(int, int), optional 23669 :param _request_auth: set to override the auth_settings for an a single 23670 request; this effectively ignores the 23671 authentication in the spec for a single request. 23672 :type _request_auth: dict, optional 23673 :param _content_type: force content-type for the request. 23674 :type _content_type: str, Optional 23675 :param _headers: set to override the headers for a single 23676 request; this effectively ignores the headers 23677 in the spec for a single request. 23678 :type _headers: dict, optional 23679 :param _host_index: set to override the host_index for a single 23680 request; this effectively ignores the host_index 23681 in the spec for a single request. 23682 :type _host_index: int, optional 23683 :return: Returns the result object. 23684 """ # noqa: E501 23685 23686 _param = self._attach_tag_to_item_serialize( 23687 board_id_platform_tags=board_id_platform_tags, 23688 item_id=item_id, 23689 tag_id=tag_id, 23690 _request_auth=_request_auth, 23691 _content_type=_content_type, 23692 _headers=_headers, 23693 _host_index=_host_index, 23694 ) 23695 23696 _response_types_map: Dict[str, Optional[str]] = { 23697 "204": "object", 23698 "400": "GetTagsFromItem400Response", 23699 "404": "GetTagsFromItem400Response", 23700 "429": "GetTagsFromItem400Response", 23701 } 23702 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23703 response_data.read() 23704 return self.api_client.response_deserialize( 23705 response_data=response_data, 23706 response_types_map=_response_types_map, 23707 ).data 23708 23709 def _attach_tag_to_item_serialize( 23710 self, 23711 board_id_platform_tags, 23712 item_id, 23713 tag_id, 23714 _request_auth, 23715 _content_type, 23716 _headers, 23717 _host_index, 23718 ) -> RequestSerialized: 23719 23720 _host = None 23721 23722 _collection_formats: Dict[str, str] = {} 23723 23724 _path_params: Dict[str, str] = {} 23725 _query_params: List[Tuple[str, str]] = [] 23726 _header_params: Dict[str, Optional[str]] = _headers or {} 23727 _form_params: List[Tuple[str, str]] = [] 23728 _files: Dict[str, str] = {} 23729 _body_params: Optional[bytes] = None 23730 23731 # process the path parameters 23732 if board_id_platform_tags is not None: 23733 _path_params["board_id_PlatformTags"] = board_id_platform_tags 23734 if item_id is not None: 23735 _path_params["item_id"] = item_id 23736 # process the query parameters 23737 if tag_id is not None: 23738 23739 _query_params.append(("tag_id", tag_id)) 23740 23741 # process the header parameters 23742 # process the form parameters 23743 # process the body parameter 23744 23745 # set the HTTP header `Accept` 23746 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23747 23748 # authentication setting 23749 _auth_settings: List[str] = [] 23750 23751 return self.api_client.param_serialize( 23752 method="POST", 23753 resource_path="/v2/boards/{board_id_PlatformTags}/items/{item_id}", 23754 path_params=_path_params, 23755 query_params=_query_params, 23756 header_params=_header_params, 23757 body=_body_params, 23758 post_params=_form_params, 23759 files=_files, 23760 auth_settings=_auth_settings, 23761 collection_formats=_collection_formats, 23762 _host=_host, 23763 _request_auth=_request_auth, 23764 ) 23765 23766 @validate_call 23767 def create_tag( 23768 self, 23769 board_id: Annotated[ 23770 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the tag.") 23771 ], 23772 tag_create_request: TagCreateRequest, 23773 _request_timeout: Union[ 23774 None, 23775 Annotated[StrictFloat, Field(gt=0)], 23776 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23777 ] = None, 23778 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23779 _content_type: Optional[StrictStr] = None, 23780 _headers: Optional[Dict[StrictStr, Any]] = None, 23781 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23782 ) -> TagWithLinks: 23783 """Create tag 23784 23785 Creates a tag on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23786 23787 :param board_id: Unique identifier (ID) of the board where you want to create the tag. (required) 23788 :type board_id: str 23789 :param tag_create_request: (required) 23790 :type tag_create_request: TagCreateRequest 23791 :param _request_timeout: timeout setting for this request. If one 23792 number provided, it will be total request 23793 timeout. It can also be a pair (tuple) of 23794 (connection, read) timeouts. 23795 :type _request_timeout: int, tuple(int, int), optional 23796 :param _request_auth: set to override the auth_settings for an a single 23797 request; this effectively ignores the 23798 authentication in the spec for a single request. 23799 :type _request_auth: dict, optional 23800 :param _content_type: force content-type for the request. 23801 :type _content_type: str, Optional 23802 :param _headers: set to override the headers for a single 23803 request; this effectively ignores the headers 23804 in the spec for a single request. 23805 :type _headers: dict, optional 23806 :param _host_index: set to override the host_index for a single 23807 request; this effectively ignores the host_index 23808 in the spec for a single request. 23809 :type _host_index: int, optional 23810 :return: Returns the result object. 23811 """ # noqa: E501 23812 23813 _param = self._create_tag_serialize( 23814 board_id=board_id, 23815 tag_create_request=tag_create_request, 23816 _request_auth=_request_auth, 23817 _content_type=_content_type, 23818 _headers=_headers, 23819 _host_index=_host_index, 23820 ) 23821 23822 _response_types_map: Dict[str, Optional[str]] = { 23823 "201": "TagWithLinks", 23824 "400": "GetTagsFromItem400Response", 23825 "404": "GetTagsFromItem400Response", 23826 "429": "GetTagsFromItem400Response", 23827 } 23828 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23829 response_data.read() 23830 return self.api_client.response_deserialize( 23831 response_data=response_data, 23832 response_types_map=_response_types_map, 23833 ).data 23834 23835 def _create_tag_serialize( 23836 self, 23837 board_id, 23838 tag_create_request, 23839 _request_auth, 23840 _content_type, 23841 _headers, 23842 _host_index, 23843 ) -> RequestSerialized: 23844 23845 _host = None 23846 23847 _collection_formats: Dict[str, str] = {} 23848 23849 _path_params: Dict[str, str] = {} 23850 _query_params: List[Tuple[str, str]] = [] 23851 _header_params: Dict[str, Optional[str]] = _headers or {} 23852 _form_params: List[Tuple[str, str]] = [] 23853 _files: Dict[str, str] = {} 23854 _body_params: Optional[bytes] = None 23855 23856 # process the path parameters 23857 if board_id is not None: 23858 _path_params["board_id"] = board_id 23859 # process the query parameters 23860 # process the header parameters 23861 # process the form parameters 23862 # process the body parameter 23863 if tag_create_request is not None: 23864 _body_params = tag_create_request 23865 23866 # set the HTTP header `Accept` 23867 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23868 23869 # set the HTTP header `Content-Type` 23870 if _content_type: 23871 _header_params["Content-Type"] = _content_type 23872 else: 23873 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23874 if _default_content_type is not None: 23875 _header_params["Content-Type"] = _default_content_type 23876 23877 # authentication setting 23878 _auth_settings: List[str] = [] 23879 23880 return self.api_client.param_serialize( 23881 method="POST", 23882 resource_path="/v2/boards/{board_id}/tags", 23883 path_params=_path_params, 23884 query_params=_query_params, 23885 header_params=_header_params, 23886 body=_body_params, 23887 post_params=_form_params, 23888 files=_files, 23889 auth_settings=_auth_settings, 23890 collection_formats=_collection_formats, 23891 _host=_host, 23892 _request_auth=_request_auth, 23893 ) 23894 23895 @validate_call 23896 def delete_tag( 23897 self, 23898 board_id: Annotated[ 23899 StrictStr, Field(description="Unique identifier (ID) of the board where you want to delete a specific tag.") 23900 ], 23901 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to delete.")], 23902 _request_timeout: Union[ 23903 None, 23904 Annotated[StrictFloat, Field(gt=0)], 23905 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23906 ] = None, 23907 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23908 _content_type: Optional[StrictStr] = None, 23909 _headers: Optional[Dict[StrictStr, Any]] = None, 23910 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23911 ) -> object: 23912 """Delete tag 23913 23914 Deletes the specified tag from the board. The tag is also removed from all cards and sticky notes on the board. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Update tag](https://developers.miro.com/reference/update-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23915 23916 :param board_id: Unique identifier (ID) of the board where you want to delete a specific tag. (required) 23917 :type board_id: str 23918 :param tag_id: Unique identifier (ID) of the tag that you want to delete. (required) 23919 :type tag_id: str 23920 :param _request_timeout: timeout setting for this request. If one 23921 number provided, it will be total request 23922 timeout. It can also be a pair (tuple) of 23923 (connection, read) timeouts. 23924 :type _request_timeout: int, tuple(int, int), optional 23925 :param _request_auth: set to override the auth_settings for an a single 23926 request; this effectively ignores the 23927 authentication in the spec for a single request. 23928 :type _request_auth: dict, optional 23929 :param _content_type: force content-type for the request. 23930 :type _content_type: str, Optional 23931 :param _headers: set to override the headers for a single 23932 request; this effectively ignores the headers 23933 in the spec for a single request. 23934 :type _headers: dict, optional 23935 :param _host_index: set to override the host_index for a single 23936 request; this effectively ignores the host_index 23937 in the spec for a single request. 23938 :type _host_index: int, optional 23939 :return: Returns the result object. 23940 """ # noqa: E501 23941 23942 _param = self._delete_tag_serialize( 23943 board_id=board_id, 23944 tag_id=tag_id, 23945 _request_auth=_request_auth, 23946 _content_type=_content_type, 23947 _headers=_headers, 23948 _host_index=_host_index, 23949 ) 23950 23951 _response_types_map: Dict[str, Optional[str]] = { 23952 "204": "object", 23953 "400": "GetTagsFromItem400Response", 23954 "404": "GetTagsFromItem400Response", 23955 "429": "GetTagsFromItem400Response", 23956 } 23957 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23958 response_data.read() 23959 return self.api_client.response_deserialize( 23960 response_data=response_data, 23961 response_types_map=_response_types_map, 23962 ).data 23963 23964 def _delete_tag_serialize( 23965 self, 23966 board_id, 23967 tag_id, 23968 _request_auth, 23969 _content_type, 23970 _headers, 23971 _host_index, 23972 ) -> RequestSerialized: 23973 23974 _host = None 23975 23976 _collection_formats: Dict[str, str] = {} 23977 23978 _path_params: Dict[str, str] = {} 23979 _query_params: List[Tuple[str, str]] = [] 23980 _header_params: Dict[str, Optional[str]] = _headers or {} 23981 _form_params: List[Tuple[str, str]] = [] 23982 _files: Dict[str, str] = {} 23983 _body_params: Optional[bytes] = None 23984 23985 # process the path parameters 23986 if board_id is not None: 23987 _path_params["board_id"] = board_id 23988 if tag_id is not None: 23989 _path_params["tag_id"] = tag_id 23990 # process the query parameters 23991 # process the header parameters 23992 # process the form parameters 23993 # process the body parameter 23994 23995 # set the HTTP header `Accept` 23996 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23997 23998 # authentication setting 23999 _auth_settings: List[str] = [] 24000 24001 return self.api_client.param_serialize( 24002 method="DELETE", 24003 resource_path="/v2/boards/{board_id}/tags/{tag_id}", 24004 path_params=_path_params, 24005 query_params=_query_params, 24006 header_params=_header_params, 24007 body=_body_params, 24008 post_params=_form_params, 24009 files=_files, 24010 auth_settings=_auth_settings, 24011 collection_formats=_collection_formats, 24012 _host=_host, 24013 _request_auth=_request_auth, 24014 ) 24015 24016 @validate_call 24017 def get_items_by_tag( 24018 self, 24019 board_id_platform_tags: Annotated[ 24020 StrictStr, 24021 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 24022 ], 24023 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to retrieve.")], 24024 limit: Optional[Annotated[str, Field(strict=True)]] = None, 24025 offset: Optional[StrictStr] = None, 24026 _request_timeout: Union[ 24027 None, 24028 Annotated[StrictFloat, Field(gt=0)], 24029 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24030 ] = None, 24031 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24032 _content_type: Optional[StrictStr] = None, 24033 _headers: Optional[Dict[StrictStr, Any]] = None, 24034 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24035 ) -> ItemPagedResponse: 24036 """Get items by tag 24037 24038 Retrieves all the items that have the specified tag.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24039 24040 :param board_id_platform_tags: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) 24041 :type board_id_platform_tags: str 24042 :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) 24043 :type tag_id: str 24044 :param limit: 24045 :type limit: str 24046 :param offset: 24047 :type offset: str 24048 :param _request_timeout: timeout setting for this request. If one 24049 number provided, it will be total request 24050 timeout. It can also be a pair (tuple) of 24051 (connection, read) timeouts. 24052 :type _request_timeout: int, tuple(int, int), optional 24053 :param _request_auth: set to override the auth_settings for an a single 24054 request; this effectively ignores the 24055 authentication in the spec for a single request. 24056 :type _request_auth: dict, optional 24057 :param _content_type: force content-type for the request. 24058 :type _content_type: str, Optional 24059 :param _headers: set to override the headers for a single 24060 request; this effectively ignores the headers 24061 in the spec for a single request. 24062 :type _headers: dict, optional 24063 :param _host_index: set to override the host_index for a single 24064 request; this effectively ignores the host_index 24065 in the spec for a single request. 24066 :type _host_index: int, optional 24067 :return: Returns the result object. 24068 """ # noqa: E501 24069 24070 _param = self._get_items_by_tag_serialize( 24071 board_id_platform_tags=board_id_platform_tags, 24072 tag_id=tag_id, 24073 limit=limit, 24074 offset=offset, 24075 _request_auth=_request_auth, 24076 _content_type=_content_type, 24077 _headers=_headers, 24078 _host_index=_host_index, 24079 ) 24080 24081 _response_types_map: Dict[str, Optional[str]] = { 24082 "200": "ItemPagedResponse", 24083 "400": "GetTagsFromItem400Response", 24084 "404": "GetTagsFromItem400Response", 24085 "429": "GetTagsFromItem400Response", 24086 } 24087 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24088 response_data.read() 24089 return self.api_client.response_deserialize( 24090 response_data=response_data, 24091 response_types_map=_response_types_map, 24092 ).data 24093 24094 def _get_items_by_tag_serialize( 24095 self, 24096 board_id_platform_tags, 24097 tag_id, 24098 limit, 24099 offset, 24100 _request_auth, 24101 _content_type, 24102 _headers, 24103 _host_index, 24104 ) -> RequestSerialized: 24105 24106 _host = None 24107 24108 _collection_formats: Dict[str, str] = {} 24109 24110 _path_params: Dict[str, str] = {} 24111 _query_params: List[Tuple[str, str]] = [] 24112 _header_params: Dict[str, Optional[str]] = _headers or {} 24113 _form_params: List[Tuple[str, str]] = [] 24114 _files: Dict[str, str] = {} 24115 _body_params: Optional[bytes] = None 24116 24117 # process the path parameters 24118 if board_id_platform_tags is not None: 24119 _path_params["board_id_PlatformTags"] = board_id_platform_tags 24120 # process the query parameters 24121 if limit is not None: 24122 24123 _query_params.append(("limit", limit)) 24124 24125 if offset is not None: 24126 24127 _query_params.append(("offset", offset)) 24128 24129 if tag_id is not None: 24130 24131 _query_params.append(("tag_id", tag_id)) 24132 24133 # process the header parameters 24134 # process the form parameters 24135 # process the body parameter 24136 24137 # set the HTTP header `Accept` 24138 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24139 24140 # authentication setting 24141 _auth_settings: List[str] = [] 24142 24143 return self.api_client.param_serialize( 24144 method="GET", 24145 resource_path="/v2/boards/{board_id_PlatformTags}/items", 24146 path_params=_path_params, 24147 query_params=_query_params, 24148 header_params=_header_params, 24149 body=_body_params, 24150 post_params=_form_params, 24151 files=_files, 24152 auth_settings=_auth_settings, 24153 collection_formats=_collection_formats, 24154 _host=_host, 24155 _request_auth=_request_auth, 24156 ) 24157 24158 @validate_call 24159 def get_tag( 24160 self, 24161 board_id: Annotated[ 24162 StrictStr, 24163 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 24164 ], 24165 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to retrieve.")], 24166 _request_timeout: Union[ 24167 None, 24168 Annotated[StrictFloat, Field(gt=0)], 24169 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24170 ] = None, 24171 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24172 _content_type: Optional[StrictStr] = None, 24173 _headers: Optional[Dict[StrictStr, Any]] = None, 24174 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24175 ) -> TagWithLinks: 24176 """Get tag 24177 24178 Retrieves information for a specific tag.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24179 24180 :param board_id: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) 24181 :type board_id: str 24182 :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) 24183 :type tag_id: str 24184 :param _request_timeout: timeout setting for this request. If one 24185 number provided, it will be total request 24186 timeout. It can also be a pair (tuple) of 24187 (connection, read) timeouts. 24188 :type _request_timeout: int, tuple(int, int), optional 24189 :param _request_auth: set to override the auth_settings for an a single 24190 request; this effectively ignores the 24191 authentication in the spec for a single request. 24192 :type _request_auth: dict, optional 24193 :param _content_type: force content-type for the request. 24194 :type _content_type: str, Optional 24195 :param _headers: set to override the headers for a single 24196 request; this effectively ignores the headers 24197 in the spec for a single request. 24198 :type _headers: dict, optional 24199 :param _host_index: set to override the host_index for a single 24200 request; this effectively ignores the host_index 24201 in the spec for a single request. 24202 :type _host_index: int, optional 24203 :return: Returns the result object. 24204 """ # noqa: E501 24205 24206 _param = self._get_tag_serialize( 24207 board_id=board_id, 24208 tag_id=tag_id, 24209 _request_auth=_request_auth, 24210 _content_type=_content_type, 24211 _headers=_headers, 24212 _host_index=_host_index, 24213 ) 24214 24215 _response_types_map: Dict[str, Optional[str]] = { 24216 "200": "TagWithLinks", 24217 "400": "GetTagsFromItem400Response", 24218 "404": "GetTagsFromItem400Response", 24219 "429": "GetTagsFromItem400Response", 24220 } 24221 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24222 response_data.read() 24223 return self.api_client.response_deserialize( 24224 response_data=response_data, 24225 response_types_map=_response_types_map, 24226 ).data 24227 24228 def _get_tag_serialize( 24229 self, 24230 board_id, 24231 tag_id, 24232 _request_auth, 24233 _content_type, 24234 _headers, 24235 _host_index, 24236 ) -> RequestSerialized: 24237 24238 _host = None 24239 24240 _collection_formats: Dict[str, str] = {} 24241 24242 _path_params: Dict[str, str] = {} 24243 _query_params: List[Tuple[str, str]] = [] 24244 _header_params: Dict[str, Optional[str]] = _headers or {} 24245 _form_params: List[Tuple[str, str]] = [] 24246 _files: Dict[str, str] = {} 24247 _body_params: Optional[bytes] = None 24248 24249 # process the path parameters 24250 if board_id is not None: 24251 _path_params["board_id"] = board_id 24252 if tag_id is not None: 24253 _path_params["tag_id"] = tag_id 24254 # process the query parameters 24255 # process the header parameters 24256 # process the form parameters 24257 # process the body parameter 24258 24259 # set the HTTP header `Accept` 24260 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24261 24262 # authentication setting 24263 _auth_settings: List[str] = [] 24264 24265 return self.api_client.param_serialize( 24266 method="GET", 24267 resource_path="/v2/boards/{board_id}/tags/{tag_id}", 24268 path_params=_path_params, 24269 query_params=_query_params, 24270 header_params=_header_params, 24271 body=_body_params, 24272 post_params=_form_params, 24273 files=_files, 24274 auth_settings=_auth_settings, 24275 collection_formats=_collection_formats, 24276 _host=_host, 24277 _request_auth=_request_auth, 24278 ) 24279 24280 @validate_call 24281 def get_tags_from_board( 24282 self, 24283 board_id: Annotated[ 24284 StrictStr, Field(description="Unique identifier (ID) of the board whose tags you want to retrieve.") 24285 ], 24286 limit: Optional[Annotated[str, Field(strict=True)]] = None, 24287 offset: Optional[StrictStr] = None, 24288 _request_timeout: Union[ 24289 None, 24290 Annotated[StrictFloat, Field(gt=0)], 24291 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24292 ] = None, 24293 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24294 _content_type: Optional[StrictStr] = None, 24295 _headers: Optional[Dict[StrictStr, Any]] = None, 24296 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24297 ) -> TagsPagedResponse: 24298 """Get tags from board 24299 24300 Retrieves all the tags from the specified board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24301 24302 :param board_id: Unique identifier (ID) of the board whose tags you want to retrieve. (required) 24303 :type board_id: str 24304 :param limit: 24305 :type limit: str 24306 :param offset: 24307 :type offset: str 24308 :param _request_timeout: timeout setting for this request. If one 24309 number provided, it will be total request 24310 timeout. It can also be a pair (tuple) of 24311 (connection, read) timeouts. 24312 :type _request_timeout: int, tuple(int, int), optional 24313 :param _request_auth: set to override the auth_settings for an a single 24314 request; this effectively ignores the 24315 authentication in the spec for a single request. 24316 :type _request_auth: dict, optional 24317 :param _content_type: force content-type for the request. 24318 :type _content_type: str, Optional 24319 :param _headers: set to override the headers for a single 24320 request; this effectively ignores the headers 24321 in the spec for a single request. 24322 :type _headers: dict, optional 24323 :param _host_index: set to override the host_index for a single 24324 request; this effectively ignores the host_index 24325 in the spec for a single request. 24326 :type _host_index: int, optional 24327 :return: Returns the result object. 24328 """ # noqa: E501 24329 24330 _param = self._get_tags_from_board_serialize( 24331 board_id=board_id, 24332 limit=limit, 24333 offset=offset, 24334 _request_auth=_request_auth, 24335 _content_type=_content_type, 24336 _headers=_headers, 24337 _host_index=_host_index, 24338 ) 24339 24340 _response_types_map: Dict[str, Optional[str]] = { 24341 "200": "TagsPagedResponse", 24342 "400": "GetTagsFromItem400Response", 24343 "404": "GetTagsFromItem400Response", 24344 "429": "GetTagsFromItem400Response", 24345 } 24346 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24347 response_data.read() 24348 return self.api_client.response_deserialize( 24349 response_data=response_data, 24350 response_types_map=_response_types_map, 24351 ).data 24352 24353 def _get_tags_from_board_serialize( 24354 self, 24355 board_id, 24356 limit, 24357 offset, 24358 _request_auth, 24359 _content_type, 24360 _headers, 24361 _host_index, 24362 ) -> RequestSerialized: 24363 24364 _host = None 24365 24366 _collection_formats: Dict[str, str] = {} 24367 24368 _path_params: Dict[str, str] = {} 24369 _query_params: List[Tuple[str, str]] = [] 24370 _header_params: Dict[str, Optional[str]] = _headers or {} 24371 _form_params: List[Tuple[str, str]] = [] 24372 _files: Dict[str, str] = {} 24373 _body_params: Optional[bytes] = None 24374 24375 # process the path parameters 24376 if board_id is not None: 24377 _path_params["board_id"] = board_id 24378 # process the query parameters 24379 if limit is not None: 24380 24381 _query_params.append(("limit", limit)) 24382 24383 if offset is not None: 24384 24385 _query_params.append(("offset", offset)) 24386 24387 # process the header parameters 24388 # process the form parameters 24389 # process the body parameter 24390 24391 # set the HTTP header `Accept` 24392 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24393 24394 # authentication setting 24395 _auth_settings: List[str] = [] 24396 24397 return self.api_client.param_serialize( 24398 method="GET", 24399 resource_path="/v2/boards/{board_id}/tags", 24400 path_params=_path_params, 24401 query_params=_query_params, 24402 header_params=_header_params, 24403 body=_body_params, 24404 post_params=_form_params, 24405 files=_files, 24406 auth_settings=_auth_settings, 24407 collection_formats=_collection_formats, 24408 _host=_host, 24409 _request_auth=_request_auth, 24410 ) 24411 24412 @validate_call 24413 def get_tags_from_item( 24414 self, 24415 board_id: Annotated[ 24416 StrictStr, 24417 Field(description="Unique identifier (ID) of the board with the item whose tags you want to retrieve."), 24418 ], 24419 item_id: Annotated[ 24420 StrictStr, Field(description="Unique identifier (ID) of the item whose tags you want to retrieve.") 24421 ], 24422 _request_timeout: Union[ 24423 None, 24424 Annotated[StrictFloat, Field(gt=0)], 24425 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24426 ] = None, 24427 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24428 _content_type: Optional[StrictStr] = None, 24429 _headers: Optional[Dict[StrictStr, Any]] = None, 24430 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24431 ) -> GetTagsResponse: 24432 """Get tags from item 24433 24434 Retrieves all the tags from the specified item.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24435 24436 :param board_id: Unique identifier (ID) of the board with the item whose tags you want to retrieve. (required) 24437 :type board_id: str 24438 :param item_id: Unique identifier (ID) of the item whose tags you want to retrieve. (required) 24439 :type item_id: str 24440 :param _request_timeout: timeout setting for this request. If one 24441 number provided, it will be total request 24442 timeout. It can also be a pair (tuple) of 24443 (connection, read) timeouts. 24444 :type _request_timeout: int, tuple(int, int), optional 24445 :param _request_auth: set to override the auth_settings for an a single 24446 request; this effectively ignores the 24447 authentication in the spec for a single request. 24448 :type _request_auth: dict, optional 24449 :param _content_type: force content-type for the request. 24450 :type _content_type: str, Optional 24451 :param _headers: set to override the headers for a single 24452 request; this effectively ignores the headers 24453 in the spec for a single request. 24454 :type _headers: dict, optional 24455 :param _host_index: set to override the host_index for a single 24456 request; this effectively ignores the host_index 24457 in the spec for a single request. 24458 :type _host_index: int, optional 24459 :return: Returns the result object. 24460 """ # noqa: E501 24461 24462 _param = self._get_tags_from_item_serialize( 24463 board_id=board_id, 24464 item_id=item_id, 24465 _request_auth=_request_auth, 24466 _content_type=_content_type, 24467 _headers=_headers, 24468 _host_index=_host_index, 24469 ) 24470 24471 _response_types_map: Dict[str, Optional[str]] = { 24472 "200": "GetTagsResponse", 24473 "400": "GetTagsFromItem400Response", 24474 "404": "GetTagsFromItem400Response", 24475 "429": "GetTagsFromItem400Response", 24476 } 24477 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24478 response_data.read() 24479 return self.api_client.response_deserialize( 24480 response_data=response_data, 24481 response_types_map=_response_types_map, 24482 ).data 24483 24484 def _get_tags_from_item_serialize( 24485 self, 24486 board_id, 24487 item_id, 24488 _request_auth, 24489 _content_type, 24490 _headers, 24491 _host_index, 24492 ) -> RequestSerialized: 24493 24494 _host = None 24495 24496 _collection_formats: Dict[str, str] = {} 24497 24498 _path_params: Dict[str, str] = {} 24499 _query_params: List[Tuple[str, str]] = [] 24500 _header_params: Dict[str, Optional[str]] = _headers or {} 24501 _form_params: List[Tuple[str, str]] = [] 24502 _files: Dict[str, str] = {} 24503 _body_params: Optional[bytes] = None 24504 24505 # process the path parameters 24506 if board_id is not None: 24507 _path_params["board_id"] = board_id 24508 if item_id is not None: 24509 _path_params["item_id"] = item_id 24510 # process the query parameters 24511 # process the header parameters 24512 # process the form parameters 24513 # process the body parameter 24514 24515 # set the HTTP header `Accept` 24516 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24517 24518 # authentication setting 24519 _auth_settings: List[str] = [] 24520 24521 return self.api_client.param_serialize( 24522 method="GET", 24523 resource_path="/v2/boards/{board_id}/items/{item_id}/tags", 24524 path_params=_path_params, 24525 query_params=_query_params, 24526 header_params=_header_params, 24527 body=_body_params, 24528 post_params=_form_params, 24529 files=_files, 24530 auth_settings=_auth_settings, 24531 collection_formats=_collection_formats, 24532 _host=_host, 24533 _request_auth=_request_auth, 24534 ) 24535 24536 @validate_call 24537 def remove_tag_from_item( 24538 self, 24539 board_id_platform_tags: Annotated[ 24540 StrictStr, 24541 Field(description="Unique identifier (ID) of the board with the item that you want to remove a tag from."), 24542 ], 24543 item_id: Annotated[ 24544 StrictStr, Field(description="Unique identifier (ID) of the item that you want to remove the tag from.") 24545 ], 24546 tag_id: Annotated[ 24547 StrictStr, Field(description="Unique identifier (ID) of the tag that you want to remove from the item.") 24548 ], 24549 _request_timeout: Union[ 24550 None, 24551 Annotated[StrictFloat, Field(gt=0)], 24552 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24553 ] = None, 24554 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24555 _content_type: Optional[StrictStr] = None, 24556 _headers: Optional[Dict[StrictStr, Any]] = None, 24557 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24558 ) -> object: 24559 """Remove tag from item 24560 24561 Removes the specified tag from the specified item. The tag still exists on the board. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Update tag](https://developers.miro.com/reference/update-tag), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24562 24563 :param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to remove a tag from. (required) 24564 :type board_id_platform_tags: str 24565 :param item_id: Unique identifier (ID) of the item that you want to remove the tag from. (required) 24566 :type item_id: str 24567 :param tag_id: Unique identifier (ID) of the tag that you want to remove from the item. (required) 24568 :type tag_id: str 24569 :param _request_timeout: timeout setting for this request. If one 24570 number provided, it will be total request 24571 timeout. It can also be a pair (tuple) of 24572 (connection, read) timeouts. 24573 :type _request_timeout: int, tuple(int, int), optional 24574 :param _request_auth: set to override the auth_settings for an a single 24575 request; this effectively ignores the 24576 authentication in the spec for a single request. 24577 :type _request_auth: dict, optional 24578 :param _content_type: force content-type for the request. 24579 :type _content_type: str, Optional 24580 :param _headers: set to override the headers for a single 24581 request; this effectively ignores the headers 24582 in the spec for a single request. 24583 :type _headers: dict, optional 24584 :param _host_index: set to override the host_index for a single 24585 request; this effectively ignores the host_index 24586 in the spec for a single request. 24587 :type _host_index: int, optional 24588 :return: Returns the result object. 24589 """ # noqa: E501 24590 24591 _param = self._remove_tag_from_item_serialize( 24592 board_id_platform_tags=board_id_platform_tags, 24593 item_id=item_id, 24594 tag_id=tag_id, 24595 _request_auth=_request_auth, 24596 _content_type=_content_type, 24597 _headers=_headers, 24598 _host_index=_host_index, 24599 ) 24600 24601 _response_types_map: Dict[str, Optional[str]] = { 24602 "204": "object", 24603 "400": "GetTagsFromItem400Response", 24604 "404": "GetTagsFromItem400Response", 24605 "429": "GetTagsFromItem400Response", 24606 } 24607 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24608 response_data.read() 24609 return self.api_client.response_deserialize( 24610 response_data=response_data, 24611 response_types_map=_response_types_map, 24612 ).data 24613 24614 def _remove_tag_from_item_serialize( 24615 self, 24616 board_id_platform_tags, 24617 item_id, 24618 tag_id, 24619 _request_auth, 24620 _content_type, 24621 _headers, 24622 _host_index, 24623 ) -> RequestSerialized: 24624 24625 _host = None 24626 24627 _collection_formats: Dict[str, str] = {} 24628 24629 _path_params: Dict[str, str] = {} 24630 _query_params: List[Tuple[str, str]] = [] 24631 _header_params: Dict[str, Optional[str]] = _headers or {} 24632 _form_params: List[Tuple[str, str]] = [] 24633 _files: Dict[str, str] = {} 24634 _body_params: Optional[bytes] = None 24635 24636 # process the path parameters 24637 if board_id_platform_tags is not None: 24638 _path_params["board_id_PlatformTags"] = board_id_platform_tags 24639 if item_id is not None: 24640 _path_params["item_id"] = item_id 24641 # process the query parameters 24642 if tag_id is not None: 24643 24644 _query_params.append(("tag_id", tag_id)) 24645 24646 # process the header parameters 24647 # process the form parameters 24648 # process the body parameter 24649 24650 # set the HTTP header `Accept` 24651 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24652 24653 # authentication setting 24654 _auth_settings: List[str] = [] 24655 24656 return self.api_client.param_serialize( 24657 method="DELETE", 24658 resource_path="/v2/boards/{board_id_PlatformTags}/items/{item_id}", 24659 path_params=_path_params, 24660 query_params=_query_params, 24661 header_params=_header_params, 24662 body=_body_params, 24663 post_params=_form_params, 24664 files=_files, 24665 auth_settings=_auth_settings, 24666 collection_formats=_collection_formats, 24667 _host=_host, 24668 _request_auth=_request_auth, 24669 ) 24670 24671 @validate_call 24672 def update_tag( 24673 self, 24674 board_id: Annotated[ 24675 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update a specific tag.") 24676 ], 24677 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to update.")], 24678 tag_update_request: TagUpdateRequest, 24679 _request_timeout: Union[ 24680 None, 24681 Annotated[StrictFloat, Field(gt=0)], 24682 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24683 ] = None, 24684 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24685 _content_type: Optional[StrictStr] = None, 24686 _headers: Optional[Dict[StrictStr, Any]] = None, 24687 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24688 ) -> TagWithLinks: 24689 """Update tag 24690 24691 Updates a tag based on the data properties provided in the request body. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24692 24693 :param board_id: Unique identifier (ID) of the board where you want to update a specific tag. (required) 24694 :type board_id: str 24695 :param tag_id: Unique identifier (ID) of the tag that you want to update. (required) 24696 :type tag_id: str 24697 :param tag_update_request: (required) 24698 :type tag_update_request: TagUpdateRequest 24699 :param _request_timeout: timeout setting for this request. If one 24700 number provided, it will be total request 24701 timeout. It can also be a pair (tuple) of 24702 (connection, read) timeouts. 24703 :type _request_timeout: int, tuple(int, int), optional 24704 :param _request_auth: set to override the auth_settings for an a single 24705 request; this effectively ignores the 24706 authentication in the spec for a single request. 24707 :type _request_auth: dict, optional 24708 :param _content_type: force content-type for the request. 24709 :type _content_type: str, Optional 24710 :param _headers: set to override the headers for a single 24711 request; this effectively ignores the headers 24712 in the spec for a single request. 24713 :type _headers: dict, optional 24714 :param _host_index: set to override the host_index for a single 24715 request; this effectively ignores the host_index 24716 in the spec for a single request. 24717 :type _host_index: int, optional 24718 :return: Returns the result object. 24719 """ # noqa: E501 24720 24721 _param = self._update_tag_serialize( 24722 board_id=board_id, 24723 tag_id=tag_id, 24724 tag_update_request=tag_update_request, 24725 _request_auth=_request_auth, 24726 _content_type=_content_type, 24727 _headers=_headers, 24728 _host_index=_host_index, 24729 ) 24730 24731 _response_types_map: Dict[str, Optional[str]] = { 24732 "200": "TagWithLinks", 24733 "400": "GetTagsFromItem400Response", 24734 "404": "GetTagsFromItem400Response", 24735 "429": "GetTagsFromItem400Response", 24736 } 24737 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24738 response_data.read() 24739 return self.api_client.response_deserialize( 24740 response_data=response_data, 24741 response_types_map=_response_types_map, 24742 ).data 24743 24744 def _update_tag_serialize( 24745 self, 24746 board_id, 24747 tag_id, 24748 tag_update_request, 24749 _request_auth, 24750 _content_type, 24751 _headers, 24752 _host_index, 24753 ) -> RequestSerialized: 24754 24755 _host = None 24756 24757 _collection_formats: Dict[str, str] = {} 24758 24759 _path_params: Dict[str, str] = {} 24760 _query_params: List[Tuple[str, str]] = [] 24761 _header_params: Dict[str, Optional[str]] = _headers or {} 24762 _form_params: List[Tuple[str, str]] = [] 24763 _files: Dict[str, str] = {} 24764 _body_params: Optional[bytes] = None 24765 24766 # process the path parameters 24767 if board_id is not None: 24768 _path_params["board_id"] = board_id 24769 if tag_id is not None: 24770 _path_params["tag_id"] = tag_id 24771 # process the query parameters 24772 # process the header parameters 24773 # process the form parameters 24774 # process the body parameter 24775 if tag_update_request is not None: 24776 _body_params = tag_update_request 24777 24778 # set the HTTP header `Accept` 24779 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24780 24781 # set the HTTP header `Content-Type` 24782 if _content_type: 24783 _header_params["Content-Type"] = _content_type 24784 else: 24785 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 24786 if _default_content_type is not None: 24787 _header_params["Content-Type"] = _default_content_type 24788 24789 # authentication setting 24790 _auth_settings: List[str] = [] 24791 24792 return self.api_client.param_serialize( 24793 method="PATCH", 24794 resource_path="/v2/boards/{board_id}/tags/{tag_id}", 24795 path_params=_path_params, 24796 query_params=_query_params, 24797 header_params=_header_params, 24798 body=_body_params, 24799 post_params=_form_params, 24800 files=_files, 24801 auth_settings=_auth_settings, 24802 collection_formats=_collection_formats, 24803 _host=_host, 24804 _request_auth=_request_auth, 24805 ) 24806 24807 @validate_call 24808 def create_text_item( 24809 self, 24810 board_id: Annotated[ 24811 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 24812 ], 24813 text_create_request: TextCreateRequest, 24814 _request_timeout: Union[ 24815 None, 24816 Annotated[StrictFloat, Field(gt=0)], 24817 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24818 ] = None, 24819 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24820 _content_type: Optional[StrictStr] = None, 24821 _headers: Optional[Dict[StrictStr, Any]] = None, 24822 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24823 ) -> TextItem: 24824 """Create text item 24825 24826 Adds a text item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 24827 24828 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 24829 :type board_id: str 24830 :param text_create_request: (required) 24831 :type text_create_request: TextCreateRequest 24832 :param _request_timeout: timeout setting for this request. If one 24833 number provided, it will be total request 24834 timeout. It can also be a pair (tuple) of 24835 (connection, read) timeouts. 24836 :type _request_timeout: int, tuple(int, int), optional 24837 :param _request_auth: set to override the auth_settings for an a single 24838 request; this effectively ignores the 24839 authentication in the spec for a single request. 24840 :type _request_auth: dict, optional 24841 :param _content_type: force content-type for the request. 24842 :type _content_type: str, Optional 24843 :param _headers: set to override the headers for a single 24844 request; this effectively ignores the headers 24845 in the spec for a single request. 24846 :type _headers: dict, optional 24847 :param _host_index: set to override the host_index for a single 24848 request; this effectively ignores the host_index 24849 in the spec for a single request. 24850 :type _host_index: int, optional 24851 :return: Returns the result object. 24852 """ # noqa: E501 24853 24854 _param = self._create_text_item_serialize( 24855 board_id=board_id, 24856 text_create_request=text_create_request, 24857 _request_auth=_request_auth, 24858 _content_type=_content_type, 24859 _headers=_headers, 24860 _host_index=_host_index, 24861 ) 24862 24863 _response_types_map: Dict[str, Optional[str]] = { 24864 "201": "TextItem", 24865 "400": None, 24866 "404": None, 24867 "429": None, 24868 } 24869 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24870 response_data.read() 24871 return self.api_client.response_deserialize( 24872 response_data=response_data, 24873 response_types_map=_response_types_map, 24874 ).data 24875 24876 def _create_text_item_serialize( 24877 self, 24878 board_id, 24879 text_create_request, 24880 _request_auth, 24881 _content_type, 24882 _headers, 24883 _host_index, 24884 ) -> RequestSerialized: 24885 24886 _host = None 24887 24888 _collection_formats: Dict[str, str] = {} 24889 24890 _path_params: Dict[str, str] = {} 24891 _query_params: List[Tuple[str, str]] = [] 24892 _header_params: Dict[str, Optional[str]] = _headers or {} 24893 _form_params: List[Tuple[str, str]] = [] 24894 _files: Dict[str, str] = {} 24895 _body_params: Optional[bytes] = None 24896 24897 # process the path parameters 24898 if board_id is not None: 24899 _path_params["board_id"] = board_id 24900 # process the query parameters 24901 # process the header parameters 24902 # process the form parameters 24903 # process the body parameter 24904 if text_create_request is not None: 24905 _body_params = text_create_request 24906 24907 # set the HTTP header `Accept` 24908 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24909 24910 # set the HTTP header `Content-Type` 24911 if _content_type: 24912 _header_params["Content-Type"] = _content_type 24913 else: 24914 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 24915 if _default_content_type is not None: 24916 _header_params["Content-Type"] = _default_content_type 24917 24918 # authentication setting 24919 _auth_settings: List[str] = [] 24920 24921 return self.api_client.param_serialize( 24922 method="POST", 24923 resource_path="/v2/boards/{board_id}/texts", 24924 path_params=_path_params, 24925 query_params=_query_params, 24926 header_params=_header_params, 24927 body=_body_params, 24928 post_params=_form_params, 24929 files=_files, 24930 auth_settings=_auth_settings, 24931 collection_formats=_collection_formats, 24932 _host=_host, 24933 _request_auth=_request_auth, 24934 ) 24935 24936 @validate_call 24937 def delete_text_item( 24938 self, 24939 board_id: Annotated[ 24940 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 24941 ], 24942 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 24943 _request_timeout: Union[ 24944 None, 24945 Annotated[StrictFloat, Field(gt=0)], 24946 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24947 ] = None, 24948 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24949 _content_type: Optional[StrictStr] = None, 24950 _headers: Optional[Dict[StrictStr, Any]] = None, 24951 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24952 ) -> object: 24953 """Delete text item 24954 24955 Deletes a text item from the board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 24956 24957 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 24958 :type board_id: str 24959 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 24960 :type item_id: str 24961 :param _request_timeout: timeout setting for this request. If one 24962 number provided, it will be total request 24963 timeout. It can also be a pair (tuple) of 24964 (connection, read) timeouts. 24965 :type _request_timeout: int, tuple(int, int), optional 24966 :param _request_auth: set to override the auth_settings for an a single 24967 request; this effectively ignores the 24968 authentication in the spec for a single request. 24969 :type _request_auth: dict, optional 24970 :param _content_type: force content-type for the request. 24971 :type _content_type: str, Optional 24972 :param _headers: set to override the headers for a single 24973 request; this effectively ignores the headers 24974 in the spec for a single request. 24975 :type _headers: dict, optional 24976 :param _host_index: set to override the host_index for a single 24977 request; this effectively ignores the host_index 24978 in the spec for a single request. 24979 :type _host_index: int, optional 24980 :return: Returns the result object. 24981 """ # noqa: E501 24982 24983 _param = self._delete_text_item_serialize( 24984 board_id=board_id, 24985 item_id=item_id, 24986 _request_auth=_request_auth, 24987 _content_type=_content_type, 24988 _headers=_headers, 24989 _host_index=_host_index, 24990 ) 24991 24992 _response_types_map: Dict[str, Optional[str]] = { 24993 "204": "object", 24994 "400": None, 24995 "404": None, 24996 "429": None, 24997 } 24998 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24999 response_data.read() 25000 return self.api_client.response_deserialize( 25001 response_data=response_data, 25002 response_types_map=_response_types_map, 25003 ).data 25004 25005 def _delete_text_item_serialize( 25006 self, 25007 board_id, 25008 item_id, 25009 _request_auth, 25010 _content_type, 25011 _headers, 25012 _host_index, 25013 ) -> RequestSerialized: 25014 25015 _host = None 25016 25017 _collection_formats: Dict[str, str] = {} 25018 25019 _path_params: Dict[str, str] = {} 25020 _query_params: List[Tuple[str, str]] = [] 25021 _header_params: Dict[str, Optional[str]] = _headers or {} 25022 _form_params: List[Tuple[str, str]] = [] 25023 _files: Dict[str, str] = {} 25024 _body_params: Optional[bytes] = None 25025 25026 # process the path parameters 25027 if board_id is not None: 25028 _path_params["board_id"] = board_id 25029 if item_id is not None: 25030 _path_params["item_id"] = item_id 25031 # process the query parameters 25032 # process the header parameters 25033 # process the form parameters 25034 # process the body parameter 25035 25036 # set the HTTP header `Accept` 25037 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25038 25039 # authentication setting 25040 _auth_settings: List[str] = [] 25041 25042 return self.api_client.param_serialize( 25043 method="DELETE", 25044 resource_path="/v2/boards/{board_id}/texts/{item_id}", 25045 path_params=_path_params, 25046 query_params=_query_params, 25047 header_params=_header_params, 25048 body=_body_params, 25049 post_params=_form_params, 25050 files=_files, 25051 auth_settings=_auth_settings, 25052 collection_formats=_collection_formats, 25053 _host=_host, 25054 _request_auth=_request_auth, 25055 ) 25056 25057 @validate_call 25058 def get_text_item( 25059 self, 25060 board_id: Annotated[ 25061 StrictStr, 25062 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 25063 ], 25064 item_id: Annotated[ 25065 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 25066 ], 25067 _request_timeout: Union[ 25068 None, 25069 Annotated[StrictFloat, Field(gt=0)], 25070 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25071 ] = None, 25072 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25073 _content_type: Optional[StrictStr] = None, 25074 _headers: Optional[Dict[StrictStr, Any]] = None, 25075 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25076 ) -> TextItem: 25077 """Get text item 25078 25079 Retrieves information for a specific text item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 25080 25081 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 25082 :type board_id: str 25083 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 25084 :type item_id: str 25085 :param _request_timeout: timeout setting for this request. If one 25086 number provided, it will be total request 25087 timeout. It can also be a pair (tuple) of 25088 (connection, read) timeouts. 25089 :type _request_timeout: int, tuple(int, int), optional 25090 :param _request_auth: set to override the auth_settings for an a single 25091 request; this effectively ignores the 25092 authentication in the spec for a single request. 25093 :type _request_auth: dict, optional 25094 :param _content_type: force content-type for the request. 25095 :type _content_type: str, Optional 25096 :param _headers: set to override the headers for a single 25097 request; this effectively ignores the headers 25098 in the spec for a single request. 25099 :type _headers: dict, optional 25100 :param _host_index: set to override the host_index for a single 25101 request; this effectively ignores the host_index 25102 in the spec for a single request. 25103 :type _host_index: int, optional 25104 :return: Returns the result object. 25105 """ # noqa: E501 25106 25107 _param = self._get_text_item_serialize( 25108 board_id=board_id, 25109 item_id=item_id, 25110 _request_auth=_request_auth, 25111 _content_type=_content_type, 25112 _headers=_headers, 25113 _host_index=_host_index, 25114 ) 25115 25116 _response_types_map: Dict[str, Optional[str]] = { 25117 "200": "TextItem", 25118 "400": None, 25119 "404": None, 25120 "429": None, 25121 } 25122 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25123 response_data.read() 25124 return self.api_client.response_deserialize( 25125 response_data=response_data, 25126 response_types_map=_response_types_map, 25127 ).data 25128 25129 def _get_text_item_serialize( 25130 self, 25131 board_id, 25132 item_id, 25133 _request_auth, 25134 _content_type, 25135 _headers, 25136 _host_index, 25137 ) -> RequestSerialized: 25138 25139 _host = None 25140 25141 _collection_formats: Dict[str, str] = {} 25142 25143 _path_params: Dict[str, str] = {} 25144 _query_params: List[Tuple[str, str]] = [] 25145 _header_params: Dict[str, Optional[str]] = _headers or {} 25146 _form_params: List[Tuple[str, str]] = [] 25147 _files: Dict[str, str] = {} 25148 _body_params: Optional[bytes] = None 25149 25150 # process the path parameters 25151 if board_id is not None: 25152 _path_params["board_id"] = board_id 25153 if item_id is not None: 25154 _path_params["item_id"] = item_id 25155 # process the query parameters 25156 # process the header parameters 25157 # process the form parameters 25158 # process the body parameter 25159 25160 # set the HTTP header `Accept` 25161 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25162 25163 # authentication setting 25164 _auth_settings: List[str] = [] 25165 25166 return self.api_client.param_serialize( 25167 method="GET", 25168 resource_path="/v2/boards/{board_id}/texts/{item_id}", 25169 path_params=_path_params, 25170 query_params=_query_params, 25171 header_params=_header_params, 25172 body=_body_params, 25173 post_params=_form_params, 25174 files=_files, 25175 auth_settings=_auth_settings, 25176 collection_formats=_collection_formats, 25177 _host=_host, 25178 _request_auth=_request_auth, 25179 ) 25180 25181 @validate_call 25182 def update_text_item( 25183 self, 25184 board_id: Annotated[ 25185 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 25186 ], 25187 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 25188 text_update_request: TextUpdateRequest, 25189 _request_timeout: Union[ 25190 None, 25191 Annotated[StrictFloat, Field(gt=0)], 25192 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25193 ] = None, 25194 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25195 _content_type: Optional[StrictStr] = None, 25196 _headers: Optional[Dict[StrictStr, Any]] = None, 25197 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25198 ) -> TextItem: 25199 """Update text item 25200 25201 Updates a text item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 25202 25203 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 25204 :type board_id: str 25205 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 25206 :type item_id: str 25207 :param text_update_request: (required) 25208 :type text_update_request: TextUpdateRequest 25209 :param _request_timeout: timeout setting for this request. If one 25210 number provided, it will be total request 25211 timeout. It can also be a pair (tuple) of 25212 (connection, read) timeouts. 25213 :type _request_timeout: int, tuple(int, int), optional 25214 :param _request_auth: set to override the auth_settings for an a single 25215 request; this effectively ignores the 25216 authentication in the spec for a single request. 25217 :type _request_auth: dict, optional 25218 :param _content_type: force content-type for the request. 25219 :type _content_type: str, Optional 25220 :param _headers: set to override the headers for a single 25221 request; this effectively ignores the headers 25222 in the spec for a single request. 25223 :type _headers: dict, optional 25224 :param _host_index: set to override the host_index for a single 25225 request; this effectively ignores the host_index 25226 in the spec for a single request. 25227 :type _host_index: int, optional 25228 :return: Returns the result object. 25229 """ # noqa: E501 25230 25231 _param = self._update_text_item_serialize( 25232 board_id=board_id, 25233 item_id=item_id, 25234 text_update_request=text_update_request, 25235 _request_auth=_request_auth, 25236 _content_type=_content_type, 25237 _headers=_headers, 25238 _host_index=_host_index, 25239 ) 25240 25241 _response_types_map: Dict[str, Optional[str]] = { 25242 "200": "TextItem", 25243 "400": None, 25244 "404": None, 25245 "409": None, 25246 "429": None, 25247 } 25248 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25249 response_data.read() 25250 return self.api_client.response_deserialize( 25251 response_data=response_data, 25252 response_types_map=_response_types_map, 25253 ).data 25254 25255 def _update_text_item_serialize( 25256 self, 25257 board_id, 25258 item_id, 25259 text_update_request, 25260 _request_auth, 25261 _content_type, 25262 _headers, 25263 _host_index, 25264 ) -> RequestSerialized: 25265 25266 _host = None 25267 25268 _collection_formats: Dict[str, str] = {} 25269 25270 _path_params: Dict[str, str] = {} 25271 _query_params: List[Tuple[str, str]] = [] 25272 _header_params: Dict[str, Optional[str]] = _headers or {} 25273 _form_params: List[Tuple[str, str]] = [] 25274 _files: Dict[str, str] = {} 25275 _body_params: Optional[bytes] = None 25276 25277 # process the path parameters 25278 if board_id is not None: 25279 _path_params["board_id"] = board_id 25280 if item_id is not None: 25281 _path_params["item_id"] = item_id 25282 # process the query parameters 25283 # process the header parameters 25284 # process the form parameters 25285 # process the body parameter 25286 if text_update_request is not None: 25287 _body_params = text_update_request 25288 25289 # set the HTTP header `Accept` 25290 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25291 25292 # set the HTTP header `Content-Type` 25293 if _content_type: 25294 _header_params["Content-Type"] = _content_type 25295 else: 25296 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 25297 if _default_content_type is not None: 25298 _header_params["Content-Type"] = _default_content_type 25299 25300 # authentication setting 25301 _auth_settings: List[str] = [] 25302 25303 return self.api_client.param_serialize( 25304 method="PATCH", 25305 resource_path="/v2/boards/{board_id}/texts/{item_id}", 25306 path_params=_path_params, 25307 query_params=_query_params, 25308 header_params=_header_params, 25309 body=_body_params, 25310 post_params=_form_params, 25311 files=_files, 25312 auth_settings=_auth_settings, 25313 collection_formats=_collection_formats, 25314 _host=_host, 25315 _request_auth=_request_auth, 25316 ) 25317 25318 @validate_call 25319 def revoke_token( 25320 self, 25321 access_token: Annotated[StrictStr, Field(description="Access token that you want to revoke")], 25322 _request_timeout: Union[ 25323 None, 25324 Annotated[StrictFloat, Field(gt=0)], 25325 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25326 ] = None, 25327 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25328 _content_type: Optional[StrictStr] = None, 25329 _headers: Optional[Dict[StrictStr, Any]] = None, 25330 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25331 ) -> None: 25332 """(Deprecated) Revoke token (v1) 25333 25334 <p><b>Please use the new revoke endpoint <code>/v2/oauth/revoke</code>. This endpoint is considered vulnerable and deprecated due to access token passed publicly in the URL.</b></p> Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user. 25335 25336 :param access_token: Access token that you want to revoke (required) 25337 :type access_token: str 25338 :param _request_timeout: timeout setting for this request. If one 25339 number provided, it will be total request 25340 timeout. It can also be a pair (tuple) of 25341 (connection, read) timeouts. 25342 :type _request_timeout: int, tuple(int, int), optional 25343 :param _request_auth: set to override the auth_settings for an a single 25344 request; this effectively ignores the 25345 authentication in the spec for a single request. 25346 :type _request_auth: dict, optional 25347 :param _content_type: force content-type for the request. 25348 :type _content_type: str, Optional 25349 :param _headers: set to override the headers for a single 25350 request; this effectively ignores the headers 25351 in the spec for a single request. 25352 :type _headers: dict, optional 25353 :param _host_index: set to override the host_index for a single 25354 request; this effectively ignores the host_index 25355 in the spec for a single request. 25356 :type _host_index: int, optional 25357 :return: Returns the result object. 25358 """ # noqa: E501 25359 warnings.warn("POST /v1/oauth/revoke is deprecated.", DeprecationWarning) 25360 25361 _param = self._revoke_token_serialize( 25362 access_token=access_token, 25363 _request_auth=_request_auth, 25364 _content_type=_content_type, 25365 _headers=_headers, 25366 _host_index=_host_index, 25367 ) 25368 25369 _response_types_map: Dict[str, Optional[str]] = { 25370 "204": None, 25371 "400": None, 25372 } 25373 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25374 response_data.read() 25375 return self.api_client.response_deserialize( 25376 response_data=response_data, 25377 response_types_map=_response_types_map, 25378 ).data 25379 25380 def _revoke_token_serialize( 25381 self, 25382 access_token, 25383 _request_auth, 25384 _content_type, 25385 _headers, 25386 _host_index, 25387 ) -> RequestSerialized: 25388 25389 _host = None 25390 25391 _collection_formats: Dict[str, str] = {} 25392 25393 _path_params: Dict[str, str] = {} 25394 _query_params: List[Tuple[str, str]] = [] 25395 _header_params: Dict[str, Optional[str]] = _headers or {} 25396 _form_params: List[Tuple[str, str]] = [] 25397 _files: Dict[str, str] = {} 25398 _body_params: Optional[bytes] = None 25399 25400 # process the path parameters 25401 # process the query parameters 25402 if access_token is not None: 25403 25404 _query_params.append(("access_token", access_token)) 25405 25406 # process the header parameters 25407 # process the form parameters 25408 # process the body parameter 25409 25410 # authentication setting 25411 _auth_settings: List[str] = [] 25412 25413 return self.api_client.param_serialize( 25414 method="POST", 25415 resource_path="/v1/oauth/revoke", 25416 path_params=_path_params, 25417 query_params=_query_params, 25418 header_params=_header_params, 25419 body=_body_params, 25420 post_params=_form_params, 25421 files=_files, 25422 auth_settings=_auth_settings, 25423 collection_formats=_collection_formats, 25424 _host=_host, 25425 _request_auth=_request_auth, 25426 ) 25427 25428 @validate_call 25429 def token_info( 25430 self, 25431 _request_timeout: Union[ 25432 None, 25433 Annotated[StrictFloat, Field(gt=0)], 25434 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25435 ] = None, 25436 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25437 _content_type: Optional[StrictStr] = None, 25438 _headers: Optional[Dict[StrictStr, Any]] = None, 25439 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25440 ) -> TokenInformation: 25441 """Get access token information 25442 25443 Get information about an access token, such as the token type, scopes, team, user, token creation date and time, and the user who created the token. 25444 25445 :param _request_timeout: timeout setting for this request. If one 25446 number provided, it will be total request 25447 timeout. It can also be a pair (tuple) of 25448 (connection, read) timeouts. 25449 :type _request_timeout: int, tuple(int, int), optional 25450 :param _request_auth: set to override the auth_settings for an a single 25451 request; this effectively ignores the 25452 authentication in the spec for a single request. 25453 :type _request_auth: dict, optional 25454 :param _content_type: force content-type for the request. 25455 :type _content_type: str, Optional 25456 :param _headers: set to override the headers for a single 25457 request; this effectively ignores the headers 25458 in the spec for a single request. 25459 :type _headers: dict, optional 25460 :param _host_index: set to override the host_index for a single 25461 request; this effectively ignores the host_index 25462 in the spec for a single request. 25463 :type _host_index: int, optional 25464 :return: Returns the result object. 25465 """ # noqa: E501 25466 25467 _param = self._token_info_serialize( 25468 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 25469 ) 25470 25471 _response_types_map: Dict[str, Optional[str]] = { 25472 "200": "TokenInformation", 25473 "400": None, 25474 } 25475 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25476 response_data.read() 25477 return self.api_client.response_deserialize( 25478 response_data=response_data, 25479 response_types_map=_response_types_map, 25480 ).data 25481 25482 def _token_info_serialize( 25483 self, 25484 _request_auth, 25485 _content_type, 25486 _headers, 25487 _host_index, 25488 ) -> RequestSerialized: 25489 25490 _host = None 25491 25492 _collection_formats: Dict[str, str] = {} 25493 25494 _path_params: Dict[str, str] = {} 25495 _query_params: List[Tuple[str, str]] = [] 25496 _header_params: Dict[str, Optional[str]] = _headers or {} 25497 _form_params: List[Tuple[str, str]] = [] 25498 _files: Dict[str, str] = {} 25499 _body_params: Optional[bytes] = None 25500 25501 # process the path parameters 25502 # process the query parameters 25503 # process the header parameters 25504 # process the form parameters 25505 # process the body parameter 25506 25507 # set the HTTP header `Accept` 25508 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25509 25510 # authentication setting 25511 _auth_settings: List[str] = [] 25512 25513 return self.api_client.param_serialize( 25514 method="GET", 25515 resource_path="/v1/oauth-token", 25516 path_params=_path_params, 25517 query_params=_query_params, 25518 header_params=_header_params, 25519 body=_body_params, 25520 post_params=_form_params, 25521 files=_files, 25522 auth_settings=_auth_settings, 25523 collection_formats=_collection_formats, 25524 _host=_host, 25525 _request_auth=_request_auth, 25526 )
235class MiroApiEndpoints: 236 """NOTE: This class is auto generated by OpenAPI Generator 237 Ref: https://openapi-generator.tech 238 239 Do not edit the class manually. 240 """ 241 242 def __init__(self, api_client=None) -> None: 243 if api_client is None: 244 api_client = ApiClient.get_default() 245 self.api_client = api_client 246 247 @validate_call 248 def get_metrics( 249 self, 250 app_id: Annotated[StrictStr, Field(description="ID of the app to get metrics for.")], 251 start_date: Annotated[ 252 date, Field(description="Start date of the period in UTC format. For example, 2024-12-31.") 253 ], 254 end_date: Annotated[date, Field(description="End date of the period in UTC format. For example, 2024-12-31.")], 255 period: Annotated[Optional[StrictStr], Field(description="Group data by this time period.")] = None, 256 _request_timeout: Union[ 257 None, 258 Annotated[StrictFloat, Field(gt=0)], 259 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 260 ] = None, 261 _request_auth: Optional[Dict[StrictStr, Any]] = None, 262 _content_type: Optional[StrictStr] = None, 263 _headers: Optional[Dict[StrictStr, Any]] = None, 264 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 265 ) -> List[GetMetrics200ResponseInner]: 266 """Get app metrics 267 268 Returns a list of usage metrics for a specific app for a given time range, grouped by requested time period. This endpoint requires an app management API token. It can be generated in the <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">Your Apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 269 270 :param app_id: ID of the app to get metrics for. (required) 271 :type app_id: str 272 :param start_date: Start date of the period in UTC format. For example, 2024-12-31. (required) 273 :type start_date: date 274 :param end_date: End date of the period in UTC format. For example, 2024-12-31. (required) 275 :type end_date: date 276 :param period: Group data by this time period. 277 :type period: str 278 :param _request_timeout: timeout setting for this request. If one 279 number provided, it will be total request 280 timeout. It can also be a pair (tuple) of 281 (connection, read) timeouts. 282 :type _request_timeout: int, tuple(int, int), optional 283 :param _request_auth: set to override the auth_settings for an a single 284 request; this effectively ignores the 285 authentication in the spec for a single request. 286 :type _request_auth: dict, optional 287 :param _content_type: force content-type for the request. 288 :type _content_type: str, Optional 289 :param _headers: set to override the headers for a single 290 request; this effectively ignores the headers 291 in the spec for a single request. 292 :type _headers: dict, optional 293 :param _host_index: set to override the host_index for a single 294 request; this effectively ignores the host_index 295 in the spec for a single request. 296 :type _host_index: int, optional 297 :return: Returns the result object. 298 """ # noqa: E501 299 300 _param = self._get_metrics_serialize( 301 app_id=app_id, 302 start_date=start_date, 303 end_date=end_date, 304 period=period, 305 _request_auth=_request_auth, 306 _content_type=_content_type, 307 _headers=_headers, 308 _host_index=_host_index, 309 ) 310 311 _response_types_map: Dict[str, Optional[str]] = { 312 "200": "List[GetMetrics200ResponseInner]", 313 "404": "GetMetrics404Response", 314 } 315 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 316 response_data.read() 317 return self.api_client.response_deserialize( 318 response_data=response_data, 319 response_types_map=_response_types_map, 320 ).data 321 322 def _get_metrics_serialize( 323 self, 324 app_id, 325 start_date, 326 end_date, 327 period, 328 _request_auth, 329 _content_type, 330 _headers, 331 _host_index, 332 ) -> RequestSerialized: 333 334 _host = None 335 336 _collection_formats: Dict[str, str] = {} 337 338 _path_params: Dict[str, str] = {} 339 _query_params: List[Tuple[str, str]] = [] 340 _header_params: Dict[str, Optional[str]] = _headers or {} 341 _form_params: List[Tuple[str, str]] = [] 342 _files: Dict[str, str] = {} 343 _body_params: Optional[bytes] = None 344 345 # process the path parameters 346 if app_id is not None: 347 _path_params["app_id"] = app_id 348 # process the query parameters 349 if start_date is not None: 350 if isinstance(start_date, date): 351 _query_params.append(("startDate", start_date.strftime(self.api_client.configuration.date_format))) 352 else: 353 _query_params.append(("startDate", start_date)) 354 355 if end_date is not None: 356 if isinstance(end_date, date): 357 _query_params.append(("endDate", end_date.strftime(self.api_client.configuration.date_format))) 358 else: 359 _query_params.append(("endDate", end_date)) 360 361 if period is not None: 362 363 _query_params.append(("period", period)) 364 365 # process the header parameters 366 # process the form parameters 367 # process the body parameter 368 369 # set the HTTP header `Accept` 370 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 371 372 # authentication setting 373 _auth_settings: List[str] = [] 374 375 return self.api_client.param_serialize( 376 method="GET", 377 resource_path="/v2-experimental/apps/{app_id}/metrics", 378 path_params=_path_params, 379 query_params=_query_params, 380 header_params=_header_params, 381 body=_body_params, 382 post_params=_form_params, 383 files=_files, 384 auth_settings=_auth_settings, 385 collection_formats=_collection_formats, 386 _host=_host, 387 _request_auth=_request_auth, 388 ) 389 390 @validate_call 391 def get_metrics_total( 392 self, 393 app_id: Annotated[StrictStr, Field(description="ID of the app to get total metrics for.")], 394 _request_timeout: Union[ 395 None, 396 Annotated[StrictFloat, Field(gt=0)], 397 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 398 ] = None, 399 _request_auth: Optional[Dict[StrictStr, Any]] = None, 400 _content_type: Optional[StrictStr] = None, 401 _headers: Optional[Dict[StrictStr, Any]] = None, 402 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 403 ) -> GetMetricsTotal200Response: 404 """Get total app metrics 405 406 Returns total usage metrics for a specific app since the app was created. This endpoint requires an app management API token. It can be generated in <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">your apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 407 408 :param app_id: ID of the app to get total metrics for. (required) 409 :type app_id: str 410 :param _request_timeout: timeout setting for this request. If one 411 number provided, it will be total request 412 timeout. It can also be a pair (tuple) of 413 (connection, read) timeouts. 414 :type _request_timeout: int, tuple(int, int), optional 415 :param _request_auth: set to override the auth_settings for an a single 416 request; this effectively ignores the 417 authentication in the spec for a single request. 418 :type _request_auth: dict, optional 419 :param _content_type: force content-type for the request. 420 :type _content_type: str, Optional 421 :param _headers: set to override the headers for a single 422 request; this effectively ignores the headers 423 in the spec for a single request. 424 :type _headers: dict, optional 425 :param _host_index: set to override the host_index for a single 426 request; this effectively ignores the host_index 427 in the spec for a single request. 428 :type _host_index: int, optional 429 :return: Returns the result object. 430 """ # noqa: E501 431 432 _param = self._get_metrics_total_serialize( 433 app_id=app_id, 434 _request_auth=_request_auth, 435 _content_type=_content_type, 436 _headers=_headers, 437 _host_index=_host_index, 438 ) 439 440 _response_types_map: Dict[str, Optional[str]] = { 441 "200": "GetMetricsTotal200Response", 442 "404": "GetMetricsTotal404Response", 443 } 444 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 445 response_data.read() 446 return self.api_client.response_deserialize( 447 response_data=response_data, 448 response_types_map=_response_types_map, 449 ).data 450 451 def _get_metrics_total_serialize( 452 self, 453 app_id, 454 _request_auth, 455 _content_type, 456 _headers, 457 _host_index, 458 ) -> RequestSerialized: 459 460 _host = None 461 462 _collection_formats: Dict[str, str] = {} 463 464 _path_params: Dict[str, str] = {} 465 _query_params: List[Tuple[str, str]] = [] 466 _header_params: Dict[str, Optional[str]] = _headers or {} 467 _form_params: List[Tuple[str, str]] = [] 468 _files: Dict[str, str] = {} 469 _body_params: Optional[bytes] = None 470 471 # process the path parameters 472 if app_id is not None: 473 _path_params["app_id"] = app_id 474 # process the query parameters 475 # process the header parameters 476 # process the form parameters 477 # process the body parameter 478 479 # set the HTTP header `Accept` 480 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 481 482 # authentication setting 483 _auth_settings: List[str] = [] 484 485 return self.api_client.param_serialize( 486 method="GET", 487 resource_path="/v2-experimental/apps/{app_id}/metrics-total", 488 path_params=_path_params, 489 query_params=_query_params, 490 header_params=_header_params, 491 body=_body_params, 492 post_params=_form_params, 493 files=_files, 494 auth_settings=_auth_settings, 495 collection_formats=_collection_formats, 496 _host=_host, 497 _request_auth=_request_auth, 498 ) 499 500 @validate_call 501 def enterprise_get_audit_logs( 502 self, 503 created_after: Annotated[ 504 StrictStr, 505 Field( 506 description='Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-03-30T17:26:50.000Z` as the value for the `createdAfter` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC))." ' 507 ), 508 ], 509 created_before: Annotated[ 510 StrictStr, 511 Field( 512 description="Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-04-30T17:26:50.000Z` as the value for the `createdBefore` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 513 ), 514 ], 515 cursor: Annotated[ 516 Optional[StrictStr], 517 Field( 518 description="A cursor-paginated method returns a portion of the total set of results based on the `limit` specified and a `cursor` that points to the next portion of the results. To retrieve the next set of results of the collection, set the `cursor` parameter in your next request to the appropriate cursor value returned in the response." 519 ), 520 ] = None, 521 limit: Annotated[ 522 Optional[StrictInt], 523 Field( 524 description="Maximum number of results returned based on the `limit` specified in the request. For example, if there are `30` results, the request has no `cursor` value, and the `limit` is set to `20`,the `size` of the results will be `20`. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the `cursor` parameter value that you obtained from the response.<br>Default: `100` " 525 ), 526 ] = None, 527 sorting: Annotated[ 528 Optional[StrictStr], 529 Field( 530 description="Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log `createdAt` parameter).<br>Default: `ASC` " 531 ), 532 ] = None, 533 _request_timeout: Union[ 534 None, 535 Annotated[StrictFloat, Field(gt=0)], 536 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 537 ] = None, 538 _request_auth: Optional[Dict[StrictStr, Any]] = None, 539 _content_type: Optional[StrictStr] = None, 540 _headers: Optional[Dict[StrictStr, Any]] = None, 541 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 542 ) -> AuditPage: 543 """Get audit logs 544 545 Retrieves a page of audit events from the last 90 days. If you want to retrieve data that is older than 90 days, you can use the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/360017571434-Audit-logs#h_01J7EY4E0F67EFTRQ7BT688HW0\">CSV export feature</a>.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>auditlogs:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> 546 547 :param created_after: Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-03-30T17:26:50.000Z` as the value for the `createdAfter` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).\" (required) 548 :type created_after: str 549 :param created_before: Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-04-30T17:26:50.000Z` as the value for the `createdBefore` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 550 :type created_before: str 551 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the `limit` specified and a `cursor` that points to the next portion of the results. To retrieve the next set of results of the collection, set the `cursor` parameter in your next request to the appropriate cursor value returned in the response. 552 :type cursor: str 553 :param limit: Maximum number of results returned based on the `limit` specified in the request. For example, if there are `30` results, the request has no `cursor` value, and the `limit` is set to `20`,the `size` of the results will be `20`. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the `cursor` parameter value that you obtained from the response.<br>Default: `100` 554 :type limit: int 555 :param sorting: Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log `createdAt` parameter).<br>Default: `ASC` 556 :type sorting: str 557 :param _request_timeout: timeout setting for this request. If one 558 number provided, it will be total request 559 timeout. It can also be a pair (tuple) of 560 (connection, read) timeouts. 561 :type _request_timeout: int, tuple(int, int), optional 562 :param _request_auth: set to override the auth_settings for an a single 563 request; this effectively ignores the 564 authentication in the spec for a single request. 565 :type _request_auth: dict, optional 566 :param _content_type: force content-type for the request. 567 :type _content_type: str, Optional 568 :param _headers: set to override the headers for a single 569 request; this effectively ignores the headers 570 in the spec for a single request. 571 :type _headers: dict, optional 572 :param _host_index: set to override the host_index for a single 573 request; this effectively ignores the host_index 574 in the spec for a single request. 575 :type _host_index: int, optional 576 :return: Returns the result object. 577 """ # noqa: E501 578 579 _param = self._enterprise_get_audit_logs_serialize( 580 created_after=created_after, 581 created_before=created_before, 582 cursor=cursor, 583 limit=limit, 584 sorting=sorting, 585 _request_auth=_request_auth, 586 _content_type=_content_type, 587 _headers=_headers, 588 _host_index=_host_index, 589 ) 590 591 _response_types_map: Dict[str, Optional[str]] = { 592 "200": "AuditPage", 593 "400": None, 594 "401": None, 595 "403": None, 596 "404": None, 597 "409": None, 598 "429": None, 599 } 600 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 601 response_data.read() 602 return self.api_client.response_deserialize( 603 response_data=response_data, 604 response_types_map=_response_types_map, 605 ).data 606 607 def _enterprise_get_audit_logs_serialize( 608 self, 609 created_after, 610 created_before, 611 cursor, 612 limit, 613 sorting, 614 _request_auth, 615 _content_type, 616 _headers, 617 _host_index, 618 ) -> RequestSerialized: 619 620 _host = None 621 622 _collection_formats: Dict[str, str] = {} 623 624 _path_params: Dict[str, str] = {} 625 _query_params: List[Tuple[str, str]] = [] 626 _header_params: Dict[str, Optional[str]] = _headers or {} 627 _form_params: List[Tuple[str, str]] = [] 628 _files: Dict[str, str] = {} 629 _body_params: Optional[bytes] = None 630 631 # process the path parameters 632 # process the query parameters 633 if created_after is not None: 634 635 _query_params.append(("createdAfter", created_after)) 636 637 if created_before is not None: 638 639 _query_params.append(("createdBefore", created_before)) 640 641 if cursor is not None: 642 643 _query_params.append(("cursor", cursor)) 644 645 if limit is not None: 646 647 _query_params.append(("limit", limit)) 648 649 if sorting is not None: 650 651 _query_params.append(("sorting", sorting)) 652 653 # process the header parameters 654 # process the form parameters 655 # process the body parameter 656 657 # set the HTTP header `Accept` 658 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 659 660 # authentication setting 661 _auth_settings: List[str] = [] 662 663 return self.api_client.param_serialize( 664 method="GET", 665 resource_path="/v2/audit/logs", 666 path_params=_path_params, 667 query_params=_query_params, 668 header_params=_header_params, 669 body=_body_params, 670 post_params=_form_params, 671 files=_files, 672 auth_settings=_auth_settings, 673 collection_formats=_collection_formats, 674 _host=_host, 675 _request_auth=_request_auth, 676 ) 677 678 @validate_call 679 def enterprise_board_content_item_logs_fetch( 680 self, 681 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 682 var_from: Annotated[ 683 datetime, 684 Field( 685 description="Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 686 ), 687 ], 688 to: Annotated[ 689 datetime, 690 Field( 691 description="Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 692 ), 693 ], 694 board_ids: Annotated[ 695 Optional[Annotated[List[StrictStr], Field(max_length=15)]], 696 Field(description="List of board IDs for which you want to retrieve the content logs."), 697 ] = None, 698 emails: Annotated[ 699 Optional[Annotated[List[StrictStr], Field(max_length=15)]], 700 Field( 701 description="Filter content logs based on the list of emails of users who created, modified, or deleted the board item." 702 ), 703 ] = None, 704 cursor: Annotated[ 705 Optional[StrictStr], 706 Field( 707 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 708 ), 709 ] = None, 710 limit: Annotated[ 711 Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], 712 Field( 713 description="The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 714 ), 715 ] = None, 716 sorting: Annotated[ 717 Optional[StrictStr], 718 Field( 719 description="Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify `asc`. To sort by a descending modified date, specify `desc`. " 720 ), 721 ] = None, 722 _request_timeout: Union[ 723 None, 724 Annotated[StrictFloat, Field(gt=0)], 725 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 726 ] = None, 727 _request_auth: Optional[Dict[StrictStr, Any]] = None, 728 _content_type: Optional[StrictStr] = None, 729 _headers: Optional[Dict[StrictStr, Any]] = None, 730 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 731 ) -> GetBoardItemContentLogsResponse: 732 """Retrieve content change logs of board items 733 734 Retrieves content changes for board items within your organization. Content changes are actions that users can perform on board items, such as updating a sticky note's text. You can retrieve results for a specific time period. You can also filter results based on the board IDs and the emails of users who created, modified, or deleted a board item. Additionally, results can be paginated for easier viewing and processing. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>contentlogs:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin.</p> 735 736 :param org_id: Unique identifier of the organization. (required) 737 :type org_id: str 738 :param var_from: Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 739 :type var_from: datetime 740 :param to: Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 741 :type to: datetime 742 :param board_ids: List of board IDs for which you want to retrieve the content logs. 743 :type board_ids: List[str] 744 :param emails: Filter content logs based on the list of emails of users who created, modified, or deleted the board item. 745 :type emails: List[str] 746 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 747 :type cursor: str 748 :param limit: The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value. 749 :type limit: int 750 :param sorting: Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify `asc`. To sort by a descending modified date, specify `desc`. 751 :type sorting: str 752 :param _request_timeout: timeout setting for this request. If one 753 number provided, it will be total request 754 timeout. It can also be a pair (tuple) of 755 (connection, read) timeouts. 756 :type _request_timeout: int, tuple(int, int), optional 757 :param _request_auth: set to override the auth_settings for an a single 758 request; this effectively ignores the 759 authentication in the spec for a single request. 760 :type _request_auth: dict, optional 761 :param _content_type: force content-type for the request. 762 :type _content_type: str, Optional 763 :param _headers: set to override the headers for a single 764 request; this effectively ignores the headers 765 in the spec for a single request. 766 :type _headers: dict, optional 767 :param _host_index: set to override the host_index for a single 768 request; this effectively ignores the host_index 769 in the spec for a single request. 770 :type _host_index: int, optional 771 :return: Returns the result object. 772 """ # noqa: E501 773 774 _param = self._enterprise_board_content_item_logs_fetch_serialize( 775 org_id=org_id, 776 var_from=var_from, 777 to=to, 778 board_ids=board_ids, 779 emails=emails, 780 cursor=cursor, 781 limit=limit, 782 sorting=sorting, 783 _request_auth=_request_auth, 784 _content_type=_content_type, 785 _headers=_headers, 786 _host_index=_host_index, 787 ) 788 789 _response_types_map: Dict[str, Optional[str]] = { 790 "200": "GetBoardItemContentLogsResponse", 791 "400": None, 792 "401": None, 793 "403": None, 794 "404": None, 795 "429": None, 796 } 797 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 798 response_data.read() 799 return self.api_client.response_deserialize( 800 response_data=response_data, 801 response_types_map=_response_types_map, 802 ).data 803 804 def _enterprise_board_content_item_logs_fetch_serialize( 805 self, 806 org_id, 807 var_from, 808 to, 809 board_ids, 810 emails, 811 cursor, 812 limit, 813 sorting, 814 _request_auth, 815 _content_type, 816 _headers, 817 _host_index, 818 ) -> RequestSerialized: 819 820 _host = None 821 822 _collection_formats: Dict[str, str] = { 823 "board_ids": "multi", 824 "emails": "multi", 825 } 826 827 _path_params: Dict[str, str] = {} 828 _query_params: List[Tuple[str, str]] = [] 829 _header_params: Dict[str, Optional[str]] = _headers or {} 830 _form_params: List[Tuple[str, str]] = [] 831 _files: Dict[str, str] = {} 832 _body_params: Optional[bytes] = None 833 834 # process the path parameters 835 if org_id is not None: 836 _path_params["org_id"] = org_id 837 # process the query parameters 838 if board_ids is not None: 839 840 _query_params.append(("board_ids", board_ids)) 841 842 if emails is not None: 843 844 _query_params.append(("emails", emails)) 845 846 if var_from is not None: 847 if isinstance(var_from, datetime): 848 _query_params.append(("from", var_from.strftime(self.api_client.configuration.datetime_format))) 849 else: 850 _query_params.append(("from", var_from)) 851 852 if to is not None: 853 if isinstance(to, datetime): 854 _query_params.append(("to", to.strftime(self.api_client.configuration.datetime_format))) 855 else: 856 _query_params.append(("to", to)) 857 858 if cursor is not None: 859 860 _query_params.append(("cursor", cursor)) 861 862 if limit is not None: 863 864 _query_params.append(("limit", limit)) 865 866 if sorting is not None: 867 868 _query_params.append(("sorting", sorting)) 869 870 # process the header parameters 871 # process the form parameters 872 # process the body parameter 873 874 # set the HTTP header `Accept` 875 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 876 877 # authentication setting 878 _auth_settings: List[str] = [] 879 880 return self.api_client.param_serialize( 881 method="GET", 882 resource_path="/v2/orgs/{org_id}/content-logs/items", 883 path_params=_path_params, 884 query_params=_query_params, 885 header_params=_header_params, 886 body=_body_params, 887 post_params=_form_params, 888 files=_files, 889 auth_settings=_auth_settings, 890 collection_formats=_collection_formats, 891 _host=_host, 892 _request_auth=_request_auth, 893 ) 894 895 @validate_call 896 def enterprise_board_export_job_results( 897 self, 898 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 899 job_id: Annotated[StrictStr, Field(description="Unique identifier of the job.")], 900 _request_timeout: Union[ 901 None, 902 Annotated[StrictFloat, Field(gt=0)], 903 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 904 ] = None, 905 _request_auth: Optional[Dict[StrictStr, Any]] = None, 906 _content_type: Optional[StrictStr] = None, 907 _headers: Optional[Dict[StrictStr, Any]] = None, 908 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 909 ) -> BoardExportResult: 910 """Get results for board export job 911 912 Retrieves the result of the board export job. The response provides more information about the board export job, such as the S3 link to the files created.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 913 914 :param org_id: Unique identifier of the organization. (required) 915 :type org_id: str 916 :param job_id: Unique identifier of the job. (required) 917 :type job_id: str 918 :param _request_timeout: timeout setting for this request. If one 919 number provided, it will be total request 920 timeout. It can also be a pair (tuple) of 921 (connection, read) timeouts. 922 :type _request_timeout: int, tuple(int, int), optional 923 :param _request_auth: set to override the auth_settings for an a single 924 request; this effectively ignores the 925 authentication in the spec for a single request. 926 :type _request_auth: dict, optional 927 :param _content_type: force content-type for the request. 928 :type _content_type: str, Optional 929 :param _headers: set to override the headers for a single 930 request; this effectively ignores the headers 931 in the spec for a single request. 932 :type _headers: dict, optional 933 :param _host_index: set to override the host_index for a single 934 request; this effectively ignores the host_index 935 in the spec for a single request. 936 :type _host_index: int, optional 937 :return: Returns the result object. 938 """ # noqa: E501 939 940 _param = self._enterprise_board_export_job_results_serialize( 941 org_id=org_id, 942 job_id=job_id, 943 _request_auth=_request_auth, 944 _content_type=_content_type, 945 _headers=_headers, 946 _host_index=_host_index, 947 ) 948 949 _response_types_map: Dict[str, Optional[str]] = { 950 "200": "BoardExportResult", 951 "400": None, 952 "401": None, 953 "403": None, 954 "404": None, 955 "429": None, 956 } 957 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 958 response_data.read() 959 return self.api_client.response_deserialize( 960 response_data=response_data, 961 response_types_map=_response_types_map, 962 ).data 963 964 def _enterprise_board_export_job_results_serialize( 965 self, 966 org_id, 967 job_id, 968 _request_auth, 969 _content_type, 970 _headers, 971 _host_index, 972 ) -> RequestSerialized: 973 974 _host = None 975 976 _collection_formats: Dict[str, str] = {} 977 978 _path_params: Dict[str, str] = {} 979 _query_params: List[Tuple[str, str]] = [] 980 _header_params: Dict[str, Optional[str]] = _headers or {} 981 _form_params: List[Tuple[str, str]] = [] 982 _files: Dict[str, str] = {} 983 _body_params: Optional[bytes] = None 984 985 # process the path parameters 986 if org_id is not None: 987 _path_params["org_id"] = org_id 988 if job_id is not None: 989 _path_params["job_id"] = job_id 990 # process the query parameters 991 # process the header parameters 992 # process the form parameters 993 # process the body parameter 994 995 # set the HTTP header `Accept` 996 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 997 998 # authentication setting 999 _auth_settings: List[str] = [] 1000 1001 return self.api_client.param_serialize( 1002 method="GET", 1003 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/results", 1004 path_params=_path_params, 1005 query_params=_query_params, 1006 header_params=_header_params, 1007 body=_body_params, 1008 post_params=_form_params, 1009 files=_files, 1010 auth_settings=_auth_settings, 1011 collection_formats=_collection_formats, 1012 _host=_host, 1013 _request_auth=_request_auth, 1014 ) 1015 1016 @validate_call 1017 def enterprise_board_export_job_status( 1018 self, 1019 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1020 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1021 _request_timeout: Union[ 1022 None, 1023 Annotated[StrictFloat, Field(gt=0)], 1024 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1025 ] = None, 1026 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1027 _content_type: Optional[StrictStr] = None, 1028 _headers: Optional[Dict[StrictStr, Any]] = None, 1029 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1030 ) -> BoardExportJobStatus: 1031 """Get board export job status 1032 1033 Retrieves the status of the board export job.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1034 1035 :param org_id: Unique identifier of the organization. (required) 1036 :type org_id: str 1037 :param job_id: Unique identifier of the board export job. (required) 1038 :type job_id: str 1039 :param _request_timeout: timeout setting for this request. If one 1040 number provided, it will be total request 1041 timeout. It can also be a pair (tuple) of 1042 (connection, read) timeouts. 1043 :type _request_timeout: int, tuple(int, int), optional 1044 :param _request_auth: set to override the auth_settings for an a single 1045 request; this effectively ignores the 1046 authentication in the spec for a single request. 1047 :type _request_auth: dict, optional 1048 :param _content_type: force content-type for the request. 1049 :type _content_type: str, Optional 1050 :param _headers: set to override the headers for a single 1051 request; this effectively ignores the headers 1052 in the spec for a single request. 1053 :type _headers: dict, optional 1054 :param _host_index: set to override the host_index for a single 1055 request; this effectively ignores the host_index 1056 in the spec for a single request. 1057 :type _host_index: int, optional 1058 :return: Returns the result object. 1059 """ # noqa: E501 1060 1061 _param = self._enterprise_board_export_job_status_serialize( 1062 org_id=org_id, 1063 job_id=job_id, 1064 _request_auth=_request_auth, 1065 _content_type=_content_type, 1066 _headers=_headers, 1067 _host_index=_host_index, 1068 ) 1069 1070 _response_types_map: Dict[str, Optional[str]] = { 1071 "200": "BoardExportJobStatus", 1072 "400": None, 1073 "401": None, 1074 "403": None, 1075 "404": None, 1076 "429": None, 1077 } 1078 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1079 response_data.read() 1080 return self.api_client.response_deserialize( 1081 response_data=response_data, 1082 response_types_map=_response_types_map, 1083 ).data 1084 1085 def _enterprise_board_export_job_status_serialize( 1086 self, 1087 org_id, 1088 job_id, 1089 _request_auth, 1090 _content_type, 1091 _headers, 1092 _host_index, 1093 ) -> RequestSerialized: 1094 1095 _host = None 1096 1097 _collection_formats: Dict[str, str] = {} 1098 1099 _path_params: Dict[str, str] = {} 1100 _query_params: List[Tuple[str, str]] = [] 1101 _header_params: Dict[str, Optional[str]] = _headers or {} 1102 _form_params: List[Tuple[str, str]] = [] 1103 _files: Dict[str, str] = {} 1104 _body_params: Optional[bytes] = None 1105 1106 # process the path parameters 1107 if org_id is not None: 1108 _path_params["org_id"] = org_id 1109 if job_id is not None: 1110 _path_params["job_id"] = job_id 1111 # process the query parameters 1112 # process the header parameters 1113 # process the form parameters 1114 # process the body parameter 1115 1116 # set the HTTP header `Accept` 1117 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1118 1119 # authentication setting 1120 _auth_settings: List[str] = [] 1121 1122 return self.api_client.param_serialize( 1123 method="GET", 1124 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}", 1125 path_params=_path_params, 1126 query_params=_query_params, 1127 header_params=_header_params, 1128 body=_body_params, 1129 post_params=_form_params, 1130 files=_files, 1131 auth_settings=_auth_settings, 1132 collection_formats=_collection_formats, 1133 _host=_host, 1134 _request_auth=_request_auth, 1135 ) 1136 1137 @validate_call 1138 def enterprise_board_export_job_tasks( 1139 self, 1140 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1141 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1142 status: Annotated[ 1143 Optional[List[StrictStr]], 1144 Field( 1145 description="Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR." 1146 ), 1147 ] = None, 1148 cursor: Annotated[ 1149 Optional[StrictStr], 1150 Field( 1151 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 1152 ), 1153 ] = None, 1154 limit: Annotated[ 1155 Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], 1156 Field( 1157 description="The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 1158 ), 1159 ] = None, 1160 _request_timeout: Union[ 1161 None, 1162 Annotated[StrictFloat, Field(gt=0)], 1163 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1164 ] = None, 1165 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1166 _content_type: Optional[StrictStr] = None, 1167 _headers: Optional[Dict[StrictStr, Any]] = None, 1168 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1169 ) -> BoardExportJobTasksList: 1170 """Get board export job tasks list 1171 1172 Retrieves the list of tasks for the board export job.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1173 1174 :param org_id: Unique identifier of the organization. (required) 1175 :type org_id: str 1176 :param job_id: Unique identifier of the board export job. (required) 1177 :type job_id: str 1178 :param status: Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR. 1179 :type status: List[str] 1180 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 1181 :type cursor: str 1182 :param limit: The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. 1183 :type limit: int 1184 :param _request_timeout: timeout setting for this request. If one 1185 number provided, it will be total request 1186 timeout. It can also be a pair (tuple) of 1187 (connection, read) timeouts. 1188 :type _request_timeout: int, tuple(int, int), optional 1189 :param _request_auth: set to override the auth_settings for an a single 1190 request; this effectively ignores the 1191 authentication in the spec for a single request. 1192 :type _request_auth: dict, optional 1193 :param _content_type: force content-type for the request. 1194 :type _content_type: str, Optional 1195 :param _headers: set to override the headers for a single 1196 request; this effectively ignores the headers 1197 in the spec for a single request. 1198 :type _headers: dict, optional 1199 :param _host_index: set to override the host_index for a single 1200 request; this effectively ignores the host_index 1201 in the spec for a single request. 1202 :type _host_index: int, optional 1203 :return: Returns the result object. 1204 """ # noqa: E501 1205 1206 _param = self._enterprise_board_export_job_tasks_serialize( 1207 org_id=org_id, 1208 job_id=job_id, 1209 status=status, 1210 cursor=cursor, 1211 limit=limit, 1212 _request_auth=_request_auth, 1213 _content_type=_content_type, 1214 _headers=_headers, 1215 _host_index=_host_index, 1216 ) 1217 1218 _response_types_map: Dict[str, Optional[str]] = { 1219 "200": "BoardExportJobTasksList", 1220 "400": None, 1221 "401": None, 1222 "403": None, 1223 "404": None, 1224 "429": None, 1225 } 1226 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1227 response_data.read() 1228 return self.api_client.response_deserialize( 1229 response_data=response_data, 1230 response_types_map=_response_types_map, 1231 ).data 1232 1233 def _enterprise_board_export_job_tasks_serialize( 1234 self, 1235 org_id, 1236 job_id, 1237 status, 1238 cursor, 1239 limit, 1240 _request_auth, 1241 _content_type, 1242 _headers, 1243 _host_index, 1244 ) -> RequestSerialized: 1245 1246 _host = None 1247 1248 _collection_formats: Dict[str, str] = { 1249 "status": "multi", 1250 } 1251 1252 _path_params: Dict[str, str] = {} 1253 _query_params: List[Tuple[str, str]] = [] 1254 _header_params: Dict[str, Optional[str]] = _headers or {} 1255 _form_params: List[Tuple[str, str]] = [] 1256 _files: Dict[str, str] = {} 1257 _body_params: Optional[bytes] = None 1258 1259 # process the path parameters 1260 if org_id is not None: 1261 _path_params["org_id"] = org_id 1262 if job_id is not None: 1263 _path_params["job_id"] = job_id 1264 # process the query parameters 1265 if status is not None: 1266 1267 _query_params.append(("status", status)) 1268 1269 if cursor is not None: 1270 1271 _query_params.append(("cursor", cursor)) 1272 1273 if limit is not None: 1274 1275 _query_params.append(("limit", limit)) 1276 1277 # process the header parameters 1278 # process the form parameters 1279 # process the body parameter 1280 1281 # set the HTTP header `Accept` 1282 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1283 1284 # authentication setting 1285 _auth_settings: List[str] = [] 1286 1287 return self.api_client.param_serialize( 1288 method="GET", 1289 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/tasks", 1290 path_params=_path_params, 1291 query_params=_query_params, 1292 header_params=_header_params, 1293 body=_body_params, 1294 post_params=_form_params, 1295 files=_files, 1296 auth_settings=_auth_settings, 1297 collection_formats=_collection_formats, 1298 _host=_host, 1299 _request_auth=_request_auth, 1300 ) 1301 1302 @validate_call 1303 def enterprise_board_export_jobs( 1304 self, 1305 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1306 status: Annotated[ 1307 Optional[List[StrictStr]], 1308 Field( 1309 description="Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED." 1310 ), 1311 ] = None, 1312 creator_id: Annotated[ 1313 Optional[List[StrictInt]], Field(description="Unique identifier of the board export job creator.") 1314 ] = None, 1315 cursor: Annotated[ 1316 Optional[StrictStr], 1317 Field( 1318 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 1319 ), 1320 ] = None, 1321 limit: Annotated[ 1322 Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], 1323 Field( 1324 description="The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 1325 ), 1326 ] = None, 1327 _request_timeout: Union[ 1328 None, 1329 Annotated[StrictFloat, Field(gt=0)], 1330 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1331 ] = None, 1332 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1333 _content_type: Optional[StrictStr] = None, 1334 _headers: Optional[Dict[StrictStr, Any]] = None, 1335 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1336 ) -> BoardExportJobsList: 1337 """Get board export jobs list 1338 1339 Retrieves the list of board export jobs based on the filters provided in the request.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1340 1341 :param org_id: Unique identifier of the organization. (required) 1342 :type org_id: str 1343 :param status: Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED. 1344 :type status: List[str] 1345 :param creator_id: Unique identifier of the board export job creator. 1346 :type creator_id: List[int] 1347 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 1348 :type cursor: str 1349 :param limit: The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. 1350 :type limit: int 1351 :param _request_timeout: timeout setting for this request. If one 1352 number provided, it will be total request 1353 timeout. It can also be a pair (tuple) of 1354 (connection, read) timeouts. 1355 :type _request_timeout: int, tuple(int, int), optional 1356 :param _request_auth: set to override the auth_settings for an a single 1357 request; this effectively ignores the 1358 authentication in the spec for a single request. 1359 :type _request_auth: dict, optional 1360 :param _content_type: force content-type for the request. 1361 :type _content_type: str, Optional 1362 :param _headers: set to override the headers for a single 1363 request; this effectively ignores the headers 1364 in the spec for a single request. 1365 :type _headers: dict, optional 1366 :param _host_index: set to override the host_index for a single 1367 request; this effectively ignores the host_index 1368 in the spec for a single request. 1369 :type _host_index: int, optional 1370 :return: Returns the result object. 1371 """ # noqa: E501 1372 1373 _param = self._enterprise_board_export_jobs_serialize( 1374 org_id=org_id, 1375 status=status, 1376 creator_id=creator_id, 1377 cursor=cursor, 1378 limit=limit, 1379 _request_auth=_request_auth, 1380 _content_type=_content_type, 1381 _headers=_headers, 1382 _host_index=_host_index, 1383 ) 1384 1385 _response_types_map: Dict[str, Optional[str]] = { 1386 "200": "BoardExportJobsList", 1387 "400": None, 1388 "401": None, 1389 "403": None, 1390 "404": None, 1391 "429": None, 1392 } 1393 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1394 response_data.read() 1395 return self.api_client.response_deserialize( 1396 response_data=response_data, 1397 response_types_map=_response_types_map, 1398 ).data 1399 1400 def _enterprise_board_export_jobs_serialize( 1401 self, 1402 org_id, 1403 status, 1404 creator_id, 1405 cursor, 1406 limit, 1407 _request_auth, 1408 _content_type, 1409 _headers, 1410 _host_index, 1411 ) -> RequestSerialized: 1412 1413 _host = None 1414 1415 _collection_formats: Dict[str, str] = { 1416 "status": "multi", 1417 "creatorId": "multi", 1418 } 1419 1420 _path_params: Dict[str, str] = {} 1421 _query_params: List[Tuple[str, str]] = [] 1422 _header_params: Dict[str, Optional[str]] = _headers or {} 1423 _form_params: List[Tuple[str, str]] = [] 1424 _files: Dict[str, str] = {} 1425 _body_params: Optional[bytes] = None 1426 1427 # process the path parameters 1428 if org_id is not None: 1429 _path_params["org_id"] = org_id 1430 # process the query parameters 1431 if status is not None: 1432 1433 _query_params.append(("status", status)) 1434 1435 if creator_id is not None: 1436 1437 _query_params.append(("creatorId", creator_id)) 1438 1439 if cursor is not None: 1440 1441 _query_params.append(("cursor", cursor)) 1442 1443 if limit is not None: 1444 1445 _query_params.append(("limit", limit)) 1446 1447 # process the header parameters 1448 # process the form parameters 1449 # process the body parameter 1450 1451 # set the HTTP header `Accept` 1452 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1453 1454 # authentication setting 1455 _auth_settings: List[str] = [] 1456 1457 return self.api_client.param_serialize( 1458 method="GET", 1459 resource_path="/v2/orgs/{org_id}/boards/export/jobs", 1460 path_params=_path_params, 1461 query_params=_query_params, 1462 header_params=_header_params, 1463 body=_body_params, 1464 post_params=_form_params, 1465 files=_files, 1466 auth_settings=_auth_settings, 1467 collection_formats=_collection_formats, 1468 _host=_host, 1469 _request_auth=_request_auth, 1470 ) 1471 1472 @validate_call 1473 def enterprise_create_board_export( 1474 self, 1475 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1476 request_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1477 create_board_export_request: CreateBoardExportRequest, 1478 _request_timeout: Union[ 1479 None, 1480 Annotated[StrictFloat, Field(gt=0)], 1481 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1482 ] = None, 1483 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1484 _content_type: Optional[StrictStr] = None, 1485 _headers: Optional[Dict[StrictStr, Any]] = None, 1486 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1487 ) -> BoardExportJobId: 1488 """Create board export job 1489 1490 Creates an export job for one or more boards.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1491 1492 :param org_id: Unique identifier of the organization. (required) 1493 :type org_id: str 1494 :param request_id: Unique identifier of the board export job. (required) 1495 :type request_id: str 1496 :param create_board_export_request: (required) 1497 :type create_board_export_request: CreateBoardExportRequest 1498 :param _request_timeout: timeout setting for this request. If one 1499 number provided, it will be total request 1500 timeout. It can also be a pair (tuple) of 1501 (connection, read) timeouts. 1502 :type _request_timeout: int, tuple(int, int), optional 1503 :param _request_auth: set to override the auth_settings for an a single 1504 request; this effectively ignores the 1505 authentication in the spec for a single request. 1506 :type _request_auth: dict, optional 1507 :param _content_type: force content-type for the request. 1508 :type _content_type: str, Optional 1509 :param _headers: set to override the headers for a single 1510 request; this effectively ignores the headers 1511 in the spec for a single request. 1512 :type _headers: dict, optional 1513 :param _host_index: set to override the host_index for a single 1514 request; this effectively ignores the host_index 1515 in the spec for a single request. 1516 :type _host_index: int, optional 1517 :return: Returns the result object. 1518 """ # noqa: E501 1519 1520 _param = self._enterprise_create_board_export_serialize( 1521 org_id=org_id, 1522 request_id=request_id, 1523 create_board_export_request=create_board_export_request, 1524 _request_auth=_request_auth, 1525 _content_type=_content_type, 1526 _headers=_headers, 1527 _host_index=_host_index, 1528 ) 1529 1530 _response_types_map: Dict[str, Optional[str]] = { 1531 "200": "BoardExportJobId", 1532 "400": None, 1533 "401": None, 1534 "403": None, 1535 "404": None, 1536 "425": None, 1537 "429": None, 1538 } 1539 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1540 response_data.read() 1541 return self.api_client.response_deserialize( 1542 response_data=response_data, 1543 response_types_map=_response_types_map, 1544 ).data 1545 1546 def _enterprise_create_board_export_serialize( 1547 self, 1548 org_id, 1549 request_id, 1550 create_board_export_request, 1551 _request_auth, 1552 _content_type, 1553 _headers, 1554 _host_index, 1555 ) -> RequestSerialized: 1556 1557 _host = None 1558 1559 _collection_formats: Dict[str, str] = {} 1560 1561 _path_params: Dict[str, str] = {} 1562 _query_params: List[Tuple[str, str]] = [] 1563 _header_params: Dict[str, Optional[str]] = _headers or {} 1564 _form_params: List[Tuple[str, str]] = [] 1565 _files: Dict[str, str] = {} 1566 _body_params: Optional[bytes] = None 1567 1568 # process the path parameters 1569 if org_id is not None: 1570 _path_params["org_id"] = org_id 1571 # process the query parameters 1572 if request_id is not None: 1573 1574 _query_params.append(("request_id", request_id)) 1575 1576 # process the header parameters 1577 # process the form parameters 1578 # process the body parameter 1579 if create_board_export_request is not None: 1580 _body_params = create_board_export_request 1581 1582 # set the HTTP header `Accept` 1583 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1584 1585 # set the HTTP header `Content-Type` 1586 if _content_type: 1587 _header_params["Content-Type"] = _content_type 1588 else: 1589 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 1590 if _default_content_type is not None: 1591 _header_params["Content-Type"] = _default_content_type 1592 1593 # authentication setting 1594 _auth_settings: List[str] = [] 1595 1596 return self.api_client.param_serialize( 1597 method="POST", 1598 resource_path="/v2/orgs/{org_id}/boards/export/jobs", 1599 path_params=_path_params, 1600 query_params=_query_params, 1601 header_params=_header_params, 1602 body=_body_params, 1603 post_params=_form_params, 1604 files=_files, 1605 auth_settings=_auth_settings, 1606 collection_formats=_collection_formats, 1607 _host=_host, 1608 _request_auth=_request_auth, 1609 ) 1610 1611 @validate_call 1612 def enterprise_create_board_export_task_export_link( 1613 self, 1614 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1615 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1616 task_id: Annotated[StrictStr, Field(description="Unique identifier of the board export task.")], 1617 _request_timeout: Union[ 1618 None, 1619 Annotated[StrictFloat, Field(gt=0)], 1620 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1621 ] = None, 1622 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1623 _content_type: Optional[StrictStr] = None, 1624 _headers: Optional[Dict[StrictStr, Any]] = None, 1625 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1626 ) -> BoardExportTaskExportLink: 1627 """Create task export link 1628 1629 Creates a link to download the results of a board export task.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1630 1631 :param org_id: Unique identifier of the organization. (required) 1632 :type org_id: str 1633 :param job_id: Unique identifier of the board export job. (required) 1634 :type job_id: str 1635 :param task_id: Unique identifier of the board export task. (required) 1636 :type task_id: str 1637 :param _request_timeout: timeout setting for this request. If one 1638 number provided, it will be total request 1639 timeout. It can also be a pair (tuple) of 1640 (connection, read) timeouts. 1641 :type _request_timeout: int, tuple(int, int), optional 1642 :param _request_auth: set to override the auth_settings for an a single 1643 request; this effectively ignores the 1644 authentication in the spec for a single request. 1645 :type _request_auth: dict, optional 1646 :param _content_type: force content-type for the request. 1647 :type _content_type: str, Optional 1648 :param _headers: set to override the headers for a single 1649 request; this effectively ignores the headers 1650 in the spec for a single request. 1651 :type _headers: dict, optional 1652 :param _host_index: set to override the host_index for a single 1653 request; this effectively ignores the host_index 1654 in the spec for a single request. 1655 :type _host_index: int, optional 1656 :return: Returns the result object. 1657 """ # noqa: E501 1658 1659 _param = self._enterprise_create_board_export_task_export_link_serialize( 1660 org_id=org_id, 1661 job_id=job_id, 1662 task_id=task_id, 1663 _request_auth=_request_auth, 1664 _content_type=_content_type, 1665 _headers=_headers, 1666 _host_index=_host_index, 1667 ) 1668 1669 _response_types_map: Dict[str, Optional[str]] = { 1670 "200": "BoardExportTaskExportLink", 1671 "400": None, 1672 "401": None, 1673 "403": None, 1674 "404": None, 1675 "425": None, 1676 "429": None, 1677 } 1678 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1679 response_data.read() 1680 return self.api_client.response_deserialize( 1681 response_data=response_data, 1682 response_types_map=_response_types_map, 1683 ).data 1684 1685 def _enterprise_create_board_export_task_export_link_serialize( 1686 self, 1687 org_id, 1688 job_id, 1689 task_id, 1690 _request_auth, 1691 _content_type, 1692 _headers, 1693 _host_index, 1694 ) -> RequestSerialized: 1695 1696 _host = None 1697 1698 _collection_formats: Dict[str, str] = {} 1699 1700 _path_params: Dict[str, str] = {} 1701 _query_params: List[Tuple[str, str]] = [] 1702 _header_params: Dict[str, Optional[str]] = _headers or {} 1703 _form_params: List[Tuple[str, str]] = [] 1704 _files: Dict[str, str] = {} 1705 _body_params: Optional[bytes] = None 1706 1707 # process the path parameters 1708 if org_id is not None: 1709 _path_params["org_id"] = org_id 1710 if job_id is not None: 1711 _path_params["job_id"] = job_id 1712 if task_id is not None: 1713 _path_params["task_id"] = task_id 1714 # process the query parameters 1715 # process the header parameters 1716 # process the form parameters 1717 # process the body parameter 1718 1719 # set the HTTP header `Accept` 1720 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1721 1722 # authentication setting 1723 _auth_settings: List[str] = [] 1724 1725 return self.api_client.param_serialize( 1726 method="POST", 1727 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/tasks/{task_id}/export-link", 1728 path_params=_path_params, 1729 query_params=_query_params, 1730 header_params=_header_params, 1731 body=_body_params, 1732 post_params=_form_params, 1733 files=_files, 1734 auth_settings=_auth_settings, 1735 collection_formats=_collection_formats, 1736 _host=_host, 1737 _request_auth=_request_auth, 1738 ) 1739 1740 @validate_call 1741 def enterprise_update_board_export_job( 1742 self, 1743 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1744 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1745 enterprise_update_board_export_job_request: Optional[EnterpriseUpdateBoardExportJobRequest] = None, 1746 _request_timeout: Union[ 1747 None, 1748 Annotated[StrictFloat, Field(gt=0)], 1749 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1750 ] = None, 1751 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1752 _content_type: Optional[StrictStr] = None, 1753 _headers: Optional[Dict[StrictStr, Any]] = None, 1754 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1755 ) -> EnterpriseUpdateBoardExportJob200Response: 1756 """Update board export job status 1757 1758 Updates the status of the board export job.<br/>Currently, only the cancellation of an ongoing export job is supported.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1759 1760 :param org_id: Unique identifier of the organization. (required) 1761 :type org_id: str 1762 :param job_id: Unique identifier of the board export job. (required) 1763 :type job_id: str 1764 :param enterprise_update_board_export_job_request: 1765 :type enterprise_update_board_export_job_request: EnterpriseUpdateBoardExportJobRequest 1766 :param _request_timeout: timeout setting for this request. If one 1767 number provided, it will be total request 1768 timeout. It can also be a pair (tuple) of 1769 (connection, read) timeouts. 1770 :type _request_timeout: int, tuple(int, int), optional 1771 :param _request_auth: set to override the auth_settings for an a single 1772 request; this effectively ignores the 1773 authentication in the spec for a single request. 1774 :type _request_auth: dict, optional 1775 :param _content_type: force content-type for the request. 1776 :type _content_type: str, Optional 1777 :param _headers: set to override the headers for a single 1778 request; this effectively ignores the headers 1779 in the spec for a single request. 1780 :type _headers: dict, optional 1781 :param _host_index: set to override the host_index for a single 1782 request; this effectively ignores the host_index 1783 in the spec for a single request. 1784 :type _host_index: int, optional 1785 :return: Returns the result object. 1786 """ # noqa: E501 1787 1788 _param = self._enterprise_update_board_export_job_serialize( 1789 org_id=org_id, 1790 job_id=job_id, 1791 enterprise_update_board_export_job_request=enterprise_update_board_export_job_request, 1792 _request_auth=_request_auth, 1793 _content_type=_content_type, 1794 _headers=_headers, 1795 _host_index=_host_index, 1796 ) 1797 1798 _response_types_map: Dict[str, Optional[str]] = { 1799 "200": "EnterpriseUpdateBoardExportJob200Response", 1800 "400": None, 1801 "401": None, 1802 "403": None, 1803 "404": None, 1804 "429": None, 1805 } 1806 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1807 response_data.read() 1808 return self.api_client.response_deserialize( 1809 response_data=response_data, 1810 response_types_map=_response_types_map, 1811 ).data 1812 1813 def _enterprise_update_board_export_job_serialize( 1814 self, 1815 org_id, 1816 job_id, 1817 enterprise_update_board_export_job_request, 1818 _request_auth, 1819 _content_type, 1820 _headers, 1821 _host_index, 1822 ) -> RequestSerialized: 1823 1824 _host = None 1825 1826 _collection_formats: Dict[str, str] = {} 1827 1828 _path_params: Dict[str, str] = {} 1829 _query_params: List[Tuple[str, str]] = [] 1830 _header_params: Dict[str, Optional[str]] = _headers or {} 1831 _form_params: List[Tuple[str, str]] = [] 1832 _files: Dict[str, str] = {} 1833 _body_params: Optional[bytes] = None 1834 1835 # process the path parameters 1836 if org_id is not None: 1837 _path_params["org_id"] = org_id 1838 if job_id is not None: 1839 _path_params["job_id"] = job_id 1840 # process the query parameters 1841 # process the header parameters 1842 # process the form parameters 1843 # process the body parameter 1844 if enterprise_update_board_export_job_request is not None: 1845 _body_params = enterprise_update_board_export_job_request 1846 1847 # set the HTTP header `Accept` 1848 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1849 1850 # set the HTTP header `Content-Type` 1851 if _content_type: 1852 _header_params["Content-Type"] = _content_type 1853 else: 1854 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 1855 if _default_content_type is not None: 1856 _header_params["Content-Type"] = _default_content_type 1857 1858 # authentication setting 1859 _auth_settings: List[str] = [] 1860 1861 return self.api_client.param_serialize( 1862 method="PUT", 1863 resource_path="/v2/orgs/{org_id}/boards/export/jobs/{job_id}/status", 1864 path_params=_path_params, 1865 query_params=_query_params, 1866 header_params=_header_params, 1867 body=_body_params, 1868 post_params=_form_params, 1869 files=_files, 1870 auth_settings=_auth_settings, 1871 collection_formats=_collection_formats, 1872 _host=_host, 1873 _request_auth=_request_auth, 1874 ) 1875 1876 @validate_call 1877 def enterprise_dataclassification_board_get( 1878 self, 1879 org_id: Annotated[StrictStr, Field(description="id of the organization")], 1880 team_id: Annotated[StrictStr, Field(description="id of the team")], 1881 board_id: Annotated[StrictStr, Field(description="Unique identifier of the board that you want to retrieve.")], 1882 _request_timeout: Union[ 1883 None, 1884 Annotated[StrictFloat, Field(gt=0)], 1885 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1886 ] = None, 1887 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1888 _content_type: Optional[StrictStr] = None, 1889 _headers: Optional[Dict[StrictStr, Any]] = None, 1890 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1891 ) -> BoardDataClassificationLabel: 1892 """Get board classification 1893 1894 Retrieves board classification for a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1895 1896 :param org_id: id of the organization (required) 1897 :type org_id: str 1898 :param team_id: id of the team (required) 1899 :type team_id: str 1900 :param board_id: Unique identifier of the board that you want to retrieve. (required) 1901 :type board_id: str 1902 :param _request_timeout: timeout setting for this request. If one 1903 number provided, it will be total request 1904 timeout. It can also be a pair (tuple) of 1905 (connection, read) timeouts. 1906 :type _request_timeout: int, tuple(int, int), optional 1907 :param _request_auth: set to override the auth_settings for an a single 1908 request; this effectively ignores the 1909 authentication in the spec for a single request. 1910 :type _request_auth: dict, optional 1911 :param _content_type: force content-type for the request. 1912 :type _content_type: str, Optional 1913 :param _headers: set to override the headers for a single 1914 request; this effectively ignores the headers 1915 in the spec for a single request. 1916 :type _headers: dict, optional 1917 :param _host_index: set to override the host_index for a single 1918 request; this effectively ignores the host_index 1919 in the spec for a single request. 1920 :type _host_index: int, optional 1921 :return: Returns the result object. 1922 """ # noqa: E501 1923 1924 _param = self._enterprise_dataclassification_board_get_serialize( 1925 org_id=org_id, 1926 team_id=team_id, 1927 board_id=board_id, 1928 _request_auth=_request_auth, 1929 _content_type=_content_type, 1930 _headers=_headers, 1931 _host_index=_host_index, 1932 ) 1933 1934 _response_types_map: Dict[str, Optional[str]] = { 1935 "200": "BoardDataClassificationLabel", 1936 "400": None, 1937 "401": None, 1938 "403": None, 1939 "404": None, 1940 "429": None, 1941 } 1942 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1943 response_data.read() 1944 return self.api_client.response_deserialize( 1945 response_data=response_data, 1946 response_types_map=_response_types_map, 1947 ).data 1948 1949 def _enterprise_dataclassification_board_get_serialize( 1950 self, 1951 org_id, 1952 team_id, 1953 board_id, 1954 _request_auth, 1955 _content_type, 1956 _headers, 1957 _host_index, 1958 ) -> RequestSerialized: 1959 1960 _host = None 1961 1962 _collection_formats: Dict[str, str] = {} 1963 1964 _path_params: Dict[str, str] = {} 1965 _query_params: List[Tuple[str, str]] = [] 1966 _header_params: Dict[str, Optional[str]] = _headers or {} 1967 _form_params: List[Tuple[str, str]] = [] 1968 _files: Dict[str, str] = {} 1969 _body_params: Optional[bytes] = None 1970 1971 # process the path parameters 1972 if org_id is not None: 1973 _path_params["org_id"] = org_id 1974 if team_id is not None: 1975 _path_params["team_id"] = team_id 1976 if board_id is not None: 1977 _path_params["board_id"] = board_id 1978 # process the query parameters 1979 # process the header parameters 1980 # process the form parameters 1981 # process the body parameter 1982 1983 # set the HTTP header `Accept` 1984 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 1985 1986 # authentication setting 1987 _auth_settings: List[str] = [] 1988 1989 return self.api_client.param_serialize( 1990 method="GET", 1991 resource_path="/v2/orgs/{org_id}/teams/{team_id}/boards/{board_id}/data-classification", 1992 path_params=_path_params, 1993 query_params=_query_params, 1994 header_params=_header_params, 1995 body=_body_params, 1996 post_params=_form_params, 1997 files=_files, 1998 auth_settings=_auth_settings, 1999 collection_formats=_collection_formats, 2000 _host=_host, 2001 _request_auth=_request_auth, 2002 ) 2003 2004 @validate_call 2005 def enterprise_dataclassification_board_set( 2006 self, 2007 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2008 team_id: Annotated[StrictStr, Field(description="id of the team")], 2009 board_id: Annotated[StrictStr, Field(description="Unique identifier of the board that you want to update.")], 2010 data_classification_label_id: DataClassificationLabelId, 2011 _request_timeout: Union[ 2012 None, 2013 Annotated[StrictFloat, Field(gt=0)], 2014 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2015 ] = None, 2016 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2017 _content_type: Optional[StrictStr] = None, 2018 _headers: Optional[Dict[StrictStr, Any]] = None, 2019 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2020 ) -> BoardDataClassificationLabel: 2021 """Update board classification 2022 2023 Updates board classification for an existing board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2024 2025 :param org_id: id of the organization (required) 2026 :type org_id: str 2027 :param team_id: id of the team (required) 2028 :type team_id: str 2029 :param board_id: Unique identifier of the board that you want to update. (required) 2030 :type board_id: str 2031 :param data_classification_label_id: (required) 2032 :type data_classification_label_id: DataClassificationLabelId 2033 :param _request_timeout: timeout setting for this request. If one 2034 number provided, it will be total request 2035 timeout. It can also be a pair (tuple) of 2036 (connection, read) timeouts. 2037 :type _request_timeout: int, tuple(int, int), optional 2038 :param _request_auth: set to override the auth_settings for an a single 2039 request; this effectively ignores the 2040 authentication in the spec for a single request. 2041 :type _request_auth: dict, optional 2042 :param _content_type: force content-type for the request. 2043 :type _content_type: str, Optional 2044 :param _headers: set to override the headers for a single 2045 request; this effectively ignores the headers 2046 in the spec for a single request. 2047 :type _headers: dict, optional 2048 :param _host_index: set to override the host_index for a single 2049 request; this effectively ignores the host_index 2050 in the spec for a single request. 2051 :type _host_index: int, optional 2052 :return: Returns the result object. 2053 """ # noqa: E501 2054 2055 _param = self._enterprise_dataclassification_board_set_serialize( 2056 org_id=org_id, 2057 team_id=team_id, 2058 board_id=board_id, 2059 data_classification_label_id=data_classification_label_id, 2060 _request_auth=_request_auth, 2061 _content_type=_content_type, 2062 _headers=_headers, 2063 _host_index=_host_index, 2064 ) 2065 2066 _response_types_map: Dict[str, Optional[str]] = { 2067 "200": "BoardDataClassificationLabel", 2068 "400": None, 2069 "401": None, 2070 "403": None, 2071 "404": None, 2072 "429": None, 2073 } 2074 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2075 response_data.read() 2076 return self.api_client.response_deserialize( 2077 response_data=response_data, 2078 response_types_map=_response_types_map, 2079 ).data 2080 2081 def _enterprise_dataclassification_board_set_serialize( 2082 self, 2083 org_id, 2084 team_id, 2085 board_id, 2086 data_classification_label_id, 2087 _request_auth, 2088 _content_type, 2089 _headers, 2090 _host_index, 2091 ) -> RequestSerialized: 2092 2093 _host = None 2094 2095 _collection_formats: Dict[str, str] = {} 2096 2097 _path_params: Dict[str, str] = {} 2098 _query_params: List[Tuple[str, str]] = [] 2099 _header_params: Dict[str, Optional[str]] = _headers or {} 2100 _form_params: List[Tuple[str, str]] = [] 2101 _files: Dict[str, str] = {} 2102 _body_params: Optional[bytes] = None 2103 2104 # process the path parameters 2105 if org_id is not None: 2106 _path_params["org_id"] = org_id 2107 if team_id is not None: 2108 _path_params["team_id"] = team_id 2109 if board_id is not None: 2110 _path_params["board_id"] = board_id 2111 # process the query parameters 2112 # process the header parameters 2113 # process the form parameters 2114 # process the body parameter 2115 if data_classification_label_id is not None: 2116 _body_params = data_classification_label_id 2117 2118 # set the HTTP header `Accept` 2119 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2120 2121 # set the HTTP header `Content-Type` 2122 if _content_type: 2123 _header_params["Content-Type"] = _content_type 2124 else: 2125 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2126 if _default_content_type is not None: 2127 _header_params["Content-Type"] = _default_content_type 2128 2129 # authentication setting 2130 _auth_settings: List[str] = [] 2131 2132 return self.api_client.param_serialize( 2133 method="POST", 2134 resource_path="/v2/orgs/{org_id}/teams/{team_id}/boards/{board_id}/data-classification", 2135 path_params=_path_params, 2136 query_params=_query_params, 2137 header_params=_header_params, 2138 body=_body_params, 2139 post_params=_form_params, 2140 files=_files, 2141 auth_settings=_auth_settings, 2142 collection_formats=_collection_formats, 2143 _host=_host, 2144 _request_auth=_request_auth, 2145 ) 2146 2147 @validate_call 2148 def enterprise_dataclassification_organization_settings_get( 2149 self, 2150 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2151 _request_timeout: Union[ 2152 None, 2153 Annotated[StrictFloat, Field(gt=0)], 2154 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2155 ] = None, 2156 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2157 _content_type: Optional[StrictStr] = None, 2158 _headers: Optional[Dict[StrictStr, Any]] = None, 2159 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2160 ) -> DataClassificationOrganizationSettings: 2161 """Get organization settings 2162 2163 Retrieves board classification settings for an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2164 2165 :param org_id: id of the organization (required) 2166 :type org_id: str 2167 :param _request_timeout: timeout setting for this request. If one 2168 number provided, it will be total request 2169 timeout. It can also be a pair (tuple) of 2170 (connection, read) timeouts. 2171 :type _request_timeout: int, tuple(int, int), optional 2172 :param _request_auth: set to override the auth_settings for an a single 2173 request; this effectively ignores the 2174 authentication in the spec for a single request. 2175 :type _request_auth: dict, optional 2176 :param _content_type: force content-type for the request. 2177 :type _content_type: str, Optional 2178 :param _headers: set to override the headers for a single 2179 request; this effectively ignores the headers 2180 in the spec for a single request. 2181 :type _headers: dict, optional 2182 :param _host_index: set to override the host_index for a single 2183 request; this effectively ignores the host_index 2184 in the spec for a single request. 2185 :type _host_index: int, optional 2186 :return: Returns the result object. 2187 """ # noqa: E501 2188 2189 _param = self._enterprise_dataclassification_organization_settings_get_serialize( 2190 org_id=org_id, 2191 _request_auth=_request_auth, 2192 _content_type=_content_type, 2193 _headers=_headers, 2194 _host_index=_host_index, 2195 ) 2196 2197 _response_types_map: Dict[str, Optional[str]] = { 2198 "200": "DataClassificationOrganizationSettings", 2199 "400": None, 2200 "401": None, 2201 "403": None, 2202 "404": None, 2203 "429": None, 2204 } 2205 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2206 response_data.read() 2207 return self.api_client.response_deserialize( 2208 response_data=response_data, 2209 response_types_map=_response_types_map, 2210 ).data 2211 2212 def _enterprise_dataclassification_organization_settings_get_serialize( 2213 self, 2214 org_id, 2215 _request_auth, 2216 _content_type, 2217 _headers, 2218 _host_index, 2219 ) -> RequestSerialized: 2220 2221 _host = None 2222 2223 _collection_formats: Dict[str, str] = {} 2224 2225 _path_params: Dict[str, str] = {} 2226 _query_params: List[Tuple[str, str]] = [] 2227 _header_params: Dict[str, Optional[str]] = _headers or {} 2228 _form_params: List[Tuple[str, str]] = [] 2229 _files: Dict[str, str] = {} 2230 _body_params: Optional[bytes] = None 2231 2232 # process the path parameters 2233 if org_id is not None: 2234 _path_params["org_id"] = org_id 2235 # process the query parameters 2236 # process the header parameters 2237 # process the form parameters 2238 # process the body parameter 2239 2240 # set the HTTP header `Accept` 2241 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2242 2243 # authentication setting 2244 _auth_settings: List[str] = [] 2245 2246 return self.api_client.param_serialize( 2247 method="GET", 2248 resource_path="/v2/orgs/{org_id}/data-classification-settings", 2249 path_params=_path_params, 2250 query_params=_query_params, 2251 header_params=_header_params, 2252 body=_body_params, 2253 post_params=_form_params, 2254 files=_files, 2255 auth_settings=_auth_settings, 2256 collection_formats=_collection_formats, 2257 _host=_host, 2258 _request_auth=_request_auth, 2259 ) 2260 2261 @validate_call 2262 def enterprise_dataclassification_team_boards_bulk( 2263 self, 2264 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2265 team_id: Annotated[StrictStr, Field(description="id of the team")], 2266 update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest, 2267 _request_timeout: Union[ 2268 None, 2269 Annotated[StrictFloat, Field(gt=0)], 2270 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2271 ] = None, 2272 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2273 _content_type: Optional[StrictStr] = None, 2274 _headers: Optional[Dict[StrictStr, Any]] = None, 2275 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2276 ) -> UpdateBoardsDataClassificationLabel: 2277 """Bulk update boards classification 2278 2279 Updates board classification for not-classified only or all boards in an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2280 2281 :param org_id: id of the organization (required) 2282 :type org_id: str 2283 :param team_id: id of the team (required) 2284 :type team_id: str 2285 :param update_boards_data_classification_label_request: (required) 2286 :type update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest 2287 :param _request_timeout: timeout setting for this request. If one 2288 number provided, it will be total request 2289 timeout. It can also be a pair (tuple) of 2290 (connection, read) timeouts. 2291 :type _request_timeout: int, tuple(int, int), optional 2292 :param _request_auth: set to override the auth_settings for an a single 2293 request; this effectively ignores the 2294 authentication in the spec for a single request. 2295 :type _request_auth: dict, optional 2296 :param _content_type: force content-type for the request. 2297 :type _content_type: str, Optional 2298 :param _headers: set to override the headers for a single 2299 request; this effectively ignores the headers 2300 in the spec for a single request. 2301 :type _headers: dict, optional 2302 :param _host_index: set to override the host_index for a single 2303 request; this effectively ignores the host_index 2304 in the spec for a single request. 2305 :type _host_index: int, optional 2306 :return: Returns the result object. 2307 """ # noqa: E501 2308 2309 _param = self._enterprise_dataclassification_team_boards_bulk_serialize( 2310 org_id=org_id, 2311 team_id=team_id, 2312 update_boards_data_classification_label_request=update_boards_data_classification_label_request, 2313 _request_auth=_request_auth, 2314 _content_type=_content_type, 2315 _headers=_headers, 2316 _host_index=_host_index, 2317 ) 2318 2319 _response_types_map: Dict[str, Optional[str]] = { 2320 "200": "UpdateBoardsDataClassificationLabel", 2321 "400": None, 2322 "401": None, 2323 "403": None, 2324 "404": None, 2325 "429": None, 2326 } 2327 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2328 response_data.read() 2329 return self.api_client.response_deserialize( 2330 response_data=response_data, 2331 response_types_map=_response_types_map, 2332 ).data 2333 2334 def _enterprise_dataclassification_team_boards_bulk_serialize( 2335 self, 2336 org_id, 2337 team_id, 2338 update_boards_data_classification_label_request, 2339 _request_auth, 2340 _content_type, 2341 _headers, 2342 _host_index, 2343 ) -> RequestSerialized: 2344 2345 _host = None 2346 2347 _collection_formats: Dict[str, str] = {} 2348 2349 _path_params: Dict[str, str] = {} 2350 _query_params: List[Tuple[str, str]] = [] 2351 _header_params: Dict[str, Optional[str]] = _headers or {} 2352 _form_params: List[Tuple[str, str]] = [] 2353 _files: Dict[str, str] = {} 2354 _body_params: Optional[bytes] = None 2355 2356 # process the path parameters 2357 if org_id is not None: 2358 _path_params["org_id"] = org_id 2359 if team_id is not None: 2360 _path_params["team_id"] = team_id 2361 # process the query parameters 2362 # process the header parameters 2363 # process the form parameters 2364 # process the body parameter 2365 if update_boards_data_classification_label_request is not None: 2366 _body_params = update_boards_data_classification_label_request 2367 2368 # set the HTTP header `Accept` 2369 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2370 2371 # set the HTTP header `Content-Type` 2372 if _content_type: 2373 _header_params["Content-Type"] = _content_type 2374 else: 2375 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2376 if _default_content_type is not None: 2377 _header_params["Content-Type"] = _default_content_type 2378 2379 # authentication setting 2380 _auth_settings: List[str] = [] 2381 2382 return self.api_client.param_serialize( 2383 method="PATCH", 2384 resource_path="/v2/orgs/{org_id}/teams/{team_id}/data-classification", 2385 path_params=_path_params, 2386 query_params=_query_params, 2387 header_params=_header_params, 2388 body=_body_params, 2389 post_params=_form_params, 2390 files=_files, 2391 auth_settings=_auth_settings, 2392 collection_formats=_collection_formats, 2393 _host=_host, 2394 _request_auth=_request_auth, 2395 ) 2396 2397 @validate_call 2398 def enterprise_dataclassification_team_settings_get( 2399 self, 2400 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2401 team_id: Annotated[StrictStr, Field(description="id of the team")], 2402 _request_timeout: Union[ 2403 None, 2404 Annotated[StrictFloat, Field(gt=0)], 2405 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2406 ] = None, 2407 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2408 _content_type: Optional[StrictStr] = None, 2409 _headers: Optional[Dict[StrictStr, Any]] = None, 2410 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2411 ) -> DataClassificationTeamSettings: 2412 """Get team settings 2413 2414 Retrieves board classification settings for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2415 2416 :param org_id: id of the organization (required) 2417 :type org_id: str 2418 :param team_id: id of the team (required) 2419 :type team_id: str 2420 :param _request_timeout: timeout setting for this request. If one 2421 number provided, it will be total request 2422 timeout. It can also be a pair (tuple) of 2423 (connection, read) timeouts. 2424 :type _request_timeout: int, tuple(int, int), optional 2425 :param _request_auth: set to override the auth_settings for an a single 2426 request; this effectively ignores the 2427 authentication in the spec for a single request. 2428 :type _request_auth: dict, optional 2429 :param _content_type: force content-type for the request. 2430 :type _content_type: str, Optional 2431 :param _headers: set to override the headers for a single 2432 request; this effectively ignores the headers 2433 in the spec for a single request. 2434 :type _headers: dict, optional 2435 :param _host_index: set to override the host_index for a single 2436 request; this effectively ignores the host_index 2437 in the spec for a single request. 2438 :type _host_index: int, optional 2439 :return: Returns the result object. 2440 """ # noqa: E501 2441 2442 _param = self._enterprise_dataclassification_team_settings_get_serialize( 2443 org_id=org_id, 2444 team_id=team_id, 2445 _request_auth=_request_auth, 2446 _content_type=_content_type, 2447 _headers=_headers, 2448 _host_index=_host_index, 2449 ) 2450 2451 _response_types_map: Dict[str, Optional[str]] = { 2452 "200": "DataClassificationTeamSettings", 2453 "400": None, 2454 "401": None, 2455 "403": None, 2456 "404": None, 2457 "429": None, 2458 } 2459 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2460 response_data.read() 2461 return self.api_client.response_deserialize( 2462 response_data=response_data, 2463 response_types_map=_response_types_map, 2464 ).data 2465 2466 def _enterprise_dataclassification_team_settings_get_serialize( 2467 self, 2468 org_id, 2469 team_id, 2470 _request_auth, 2471 _content_type, 2472 _headers, 2473 _host_index, 2474 ) -> RequestSerialized: 2475 2476 _host = None 2477 2478 _collection_formats: Dict[str, str] = {} 2479 2480 _path_params: Dict[str, str] = {} 2481 _query_params: List[Tuple[str, str]] = [] 2482 _header_params: Dict[str, Optional[str]] = _headers or {} 2483 _form_params: List[Tuple[str, str]] = [] 2484 _files: Dict[str, str] = {} 2485 _body_params: Optional[bytes] = None 2486 2487 # process the path parameters 2488 if org_id is not None: 2489 _path_params["org_id"] = org_id 2490 if team_id is not None: 2491 _path_params["team_id"] = team_id 2492 # process the query parameters 2493 # process the header parameters 2494 # process the form parameters 2495 # process the body parameter 2496 2497 # set the HTTP header `Accept` 2498 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2499 2500 # authentication setting 2501 _auth_settings: List[str] = [] 2502 2503 return self.api_client.param_serialize( 2504 method="GET", 2505 resource_path="/v2/orgs/{org_id}/teams/{team_id}/data-classification-settings", 2506 path_params=_path_params, 2507 query_params=_query_params, 2508 header_params=_header_params, 2509 body=_body_params, 2510 post_params=_form_params, 2511 files=_files, 2512 auth_settings=_auth_settings, 2513 collection_formats=_collection_formats, 2514 _host=_host, 2515 _request_auth=_request_auth, 2516 ) 2517 2518 @validate_call 2519 def enterprise_dataclassification_team_settings_set( 2520 self, 2521 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2522 team_id: Annotated[StrictStr, Field(description="id of the team")], 2523 update_team_settings_request: UpdateTeamSettingsRequest, 2524 _request_timeout: Union[ 2525 None, 2526 Annotated[StrictFloat, Field(gt=0)], 2527 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2528 ] = None, 2529 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2530 _content_type: Optional[StrictStr] = None, 2531 _headers: Optional[Dict[StrictStr, Any]] = None, 2532 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2533 ) -> DataClassificationTeamSettings: 2534 """Update team settings 2535 2536 Updates board classification settings for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2537 2538 :param org_id: id of the organization (required) 2539 :type org_id: str 2540 :param team_id: id of the team (required) 2541 :type team_id: str 2542 :param update_team_settings_request: (required) 2543 :type update_team_settings_request: UpdateTeamSettingsRequest 2544 :param _request_timeout: timeout setting for this request. If one 2545 number provided, it will be total request 2546 timeout. It can also be a pair (tuple) of 2547 (connection, read) timeouts. 2548 :type _request_timeout: int, tuple(int, int), optional 2549 :param _request_auth: set to override the auth_settings for an a single 2550 request; this effectively ignores the 2551 authentication in the spec for a single request. 2552 :type _request_auth: dict, optional 2553 :param _content_type: force content-type for the request. 2554 :type _content_type: str, Optional 2555 :param _headers: set to override the headers for a single 2556 request; this effectively ignores the headers 2557 in the spec for a single request. 2558 :type _headers: dict, optional 2559 :param _host_index: set to override the host_index for a single 2560 request; this effectively ignores the host_index 2561 in the spec for a single request. 2562 :type _host_index: int, optional 2563 :return: Returns the result object. 2564 """ # noqa: E501 2565 2566 _param = self._enterprise_dataclassification_team_settings_set_serialize( 2567 org_id=org_id, 2568 team_id=team_id, 2569 update_team_settings_request=update_team_settings_request, 2570 _request_auth=_request_auth, 2571 _content_type=_content_type, 2572 _headers=_headers, 2573 _host_index=_host_index, 2574 ) 2575 2576 _response_types_map: Dict[str, Optional[str]] = { 2577 "200": "DataClassificationTeamSettings", 2578 "400": None, 2579 "401": None, 2580 "403": None, 2581 "404": None, 2582 "429": None, 2583 } 2584 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2585 response_data.read() 2586 return self.api_client.response_deserialize( 2587 response_data=response_data, 2588 response_types_map=_response_types_map, 2589 ).data 2590 2591 def _enterprise_dataclassification_team_settings_set_serialize( 2592 self, 2593 org_id, 2594 team_id, 2595 update_team_settings_request, 2596 _request_auth, 2597 _content_type, 2598 _headers, 2599 _host_index, 2600 ) -> RequestSerialized: 2601 2602 _host = None 2603 2604 _collection_formats: Dict[str, str] = {} 2605 2606 _path_params: Dict[str, str] = {} 2607 _query_params: List[Tuple[str, str]] = [] 2608 _header_params: Dict[str, Optional[str]] = _headers or {} 2609 _form_params: List[Tuple[str, str]] = [] 2610 _files: Dict[str, str] = {} 2611 _body_params: Optional[bytes] = None 2612 2613 # process the path parameters 2614 if org_id is not None: 2615 _path_params["org_id"] = org_id 2616 if team_id is not None: 2617 _path_params["team_id"] = team_id 2618 # process the query parameters 2619 # process the header parameters 2620 # process the form parameters 2621 # process the body parameter 2622 if update_team_settings_request is not None: 2623 _body_params = update_team_settings_request 2624 2625 # set the HTTP header `Accept` 2626 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2627 2628 # set the HTTP header `Content-Type` 2629 if _content_type: 2630 _header_params["Content-Type"] = _content_type 2631 else: 2632 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2633 if _default_content_type is not None: 2634 _header_params["Content-Type"] = _default_content_type 2635 2636 # authentication setting 2637 _auth_settings: List[str] = [] 2638 2639 return self.api_client.param_serialize( 2640 method="PATCH", 2641 resource_path="/v2/orgs/{org_id}/teams/{team_id}/data-classification-settings", 2642 path_params=_path_params, 2643 query_params=_query_params, 2644 header_params=_header_params, 2645 body=_body_params, 2646 post_params=_form_params, 2647 files=_files, 2648 auth_settings=_auth_settings, 2649 collection_formats=_collection_formats, 2650 _host=_host, 2651 _request_auth=_request_auth, 2652 ) 2653 2654 @validate_call 2655 def create_items( 2656 self, 2657 board_id: Annotated[ 2658 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 2659 ], 2660 item_create: Annotated[List[ItemCreate], Field(min_length=1, max_length=20)], 2661 _request_timeout: Union[ 2662 None, 2663 Annotated[StrictFloat, Field(gt=0)], 2664 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2665 ] = None, 2666 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2667 _content_type: Optional[StrictStr] = None, 2668 _headers: Optional[Dict[StrictStr, Any]] = None, 2669 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2670 ) -> Items: 2671 """Create items in bulk 2672 2673 Adds different types of items to a board. You can add up to 20 items of the same or different type per create call. For example, you can create 3 shape items, 4 card items, and 5 sticky notes in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. <br/><br>To try out this API in our documentation:<br/><br>1. In the **BODY PARAMS** section, scroll down until you see **ADD OBJECT** (Figure 1).<br><br><img alt=“add src=\"https://files.readme.io/570dac1-small-add_object.png\"><br>Figure 1. Add object user interface in readme<br><br>2. Click **ADD OBJECT**, and then select or enter the appropriate values for parameters of the item that you want to add.<br><br>3. Repeat steps 1 and 2 for each item that you want to add.<br> <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item. For example, if you want to create one sticky note, one card, and one shape item in one call, the rate limiting applicable will be 300 credits. This is because create item calls take Level 2 rate limiting of 100 credits each, 100 for sticky note, 100 for card, and 100 for shape item. 2674 2675 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 2676 :type board_id: str 2677 :param item_create: (required) 2678 :type item_create: List[ItemCreate] 2679 :param _request_timeout: timeout setting for this request. If one 2680 number provided, it will be total request 2681 timeout. It can also be a pair (tuple) of 2682 (connection, read) timeouts. 2683 :type _request_timeout: int, tuple(int, int), optional 2684 :param _request_auth: set to override the auth_settings for an a single 2685 request; this effectively ignores the 2686 authentication in the spec for a single request. 2687 :type _request_auth: dict, optional 2688 :param _content_type: force content-type for the request. 2689 :type _content_type: str, Optional 2690 :param _headers: set to override the headers for a single 2691 request; this effectively ignores the headers 2692 in the spec for a single request. 2693 :type _headers: dict, optional 2694 :param _host_index: set to override the host_index for a single 2695 request; this effectively ignores the host_index 2696 in the spec for a single request. 2697 :type _host_index: int, optional 2698 :return: Returns the result object. 2699 """ # noqa: E501 2700 2701 _param = self._create_items_serialize( 2702 board_id=board_id, 2703 item_create=item_create, 2704 _request_auth=_request_auth, 2705 _content_type=_content_type, 2706 _headers=_headers, 2707 _host_index=_host_index, 2708 ) 2709 2710 _response_types_map: Dict[str, Optional[str]] = { 2711 "201": "Items", 2712 "400": "BulkOperationError", 2713 "429": "Error", 2714 } 2715 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2716 response_data.read() 2717 return self.api_client.response_deserialize( 2718 response_data=response_data, 2719 response_types_map=_response_types_map, 2720 ).data 2721 2722 def _create_items_serialize( 2723 self, 2724 board_id, 2725 item_create, 2726 _request_auth, 2727 _content_type, 2728 _headers, 2729 _host_index, 2730 ) -> RequestSerialized: 2731 2732 _host = None 2733 2734 _collection_formats: Dict[str, str] = { 2735 "ItemCreate": "", 2736 } 2737 2738 _path_params: Dict[str, str] = {} 2739 _query_params: List[Tuple[str, str]] = [] 2740 _header_params: Dict[str, Optional[str]] = _headers or {} 2741 _form_params: List[Tuple[str, str]] = [] 2742 _files: Dict[str, str] = {} 2743 _body_params: Optional[bytes] = None 2744 2745 # process the path parameters 2746 if board_id is not None: 2747 _path_params["board_id"] = board_id 2748 # process the query parameters 2749 # process the header parameters 2750 # process the form parameters 2751 # process the body parameter 2752 if item_create is not None: 2753 _body_params = item_create 2754 2755 # set the HTTP header `Accept` 2756 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2757 2758 # set the HTTP header `Content-Type` 2759 if _content_type: 2760 _header_params["Content-Type"] = _content_type 2761 else: 2762 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 2763 if _default_content_type is not None: 2764 _header_params["Content-Type"] = _default_content_type 2765 2766 # authentication setting 2767 _auth_settings: List[str] = [] 2768 2769 return self.api_client.param_serialize( 2770 method="POST", 2771 resource_path="/v2/boards/{board_id}/items/bulk", 2772 path_params=_path_params, 2773 query_params=_query_params, 2774 header_params=_header_params, 2775 body=_body_params, 2776 post_params=_form_params, 2777 files=_files, 2778 auth_settings=_auth_settings, 2779 collection_formats=_collection_formats, 2780 _host=_host, 2781 _request_auth=_request_auth, 2782 ) 2783 2784 @validate_call 2785 def create_items_in_bulk_using_file_from_device( 2786 self, 2787 board_id: Annotated[ 2788 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 2789 ], 2790 data: Annotated[ 2791 Union[StrictBytes, StrictStr], 2792 Field( 2793 description="JSON file containing bulk data, where each object represents an item to be created. For details, see [JSON file example](https://developers.miro.com/reference/json-data-example)." 2794 ), 2795 ], 2796 resources: Annotated[ 2797 List[Union[StrictBytes, StrictStr]], 2798 Field(description="Array of items to create (PDFs, images, etc.). Maximum of 20 items."), 2799 ], 2800 _request_timeout: Union[ 2801 None, 2802 Annotated[StrictFloat, Field(gt=0)], 2803 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2804 ] = None, 2805 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2806 _content_type: Optional[StrictStr] = None, 2807 _headers: Optional[Dict[StrictStr, Any]] = None, 2808 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2809 ) -> Items: 2810 """Create items in bulk using file from device 2811 2812 Adds different types of items to a board using files from a device. You can add up to 20 items of the same or different type per create call. For example, you can create 5 document items and 5 images in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. To try out this API in our documentation: 1. In the **BODY PARAMS** section, select **ADD FILE**, and then upload a local file. Repeat for each item that you want to add. 2. Upload a JSON file that contains the bulk data for the items you want to create. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item<br/> 2813 2814 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 2815 :type board_id: str 2816 :param data: JSON file containing bulk data, where each object represents an item to be created. For details, see [JSON file example](https://developers.miro.com/reference/json-data-example). (required) 2817 :type data: bytearray 2818 :param resources: Array of items to create (PDFs, images, etc.). Maximum of 20 items. (required) 2819 :type resources: List[bytearray] 2820 :param _request_timeout: timeout setting for this request. If one 2821 number provided, it will be total request 2822 timeout. It can also be a pair (tuple) of 2823 (connection, read) timeouts. 2824 :type _request_timeout: int, tuple(int, int), optional 2825 :param _request_auth: set to override the auth_settings for an a single 2826 request; this effectively ignores the 2827 authentication in the spec for a single request. 2828 :type _request_auth: dict, optional 2829 :param _content_type: force content-type for the request. 2830 :type _content_type: str, Optional 2831 :param _headers: set to override the headers for a single 2832 request; this effectively ignores the headers 2833 in the spec for a single request. 2834 :type _headers: dict, optional 2835 :param _host_index: set to override the host_index for a single 2836 request; this effectively ignores the host_index 2837 in the spec for a single request. 2838 :type _host_index: int, optional 2839 :return: Returns the result object. 2840 """ # noqa: E501 2841 2842 _param = self._create_items_in_bulk_using_file_from_device_serialize( 2843 board_id=board_id, 2844 data=data, 2845 resources=resources, 2846 _request_auth=_request_auth, 2847 _content_type=_content_type, 2848 _headers=_headers, 2849 _host_index=_host_index, 2850 ) 2851 2852 _response_types_map: Dict[str, Optional[str]] = { 2853 "201": "Items", 2854 } 2855 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2856 response_data.read() 2857 return self.api_client.response_deserialize( 2858 response_data=response_data, 2859 response_types_map=_response_types_map, 2860 ).data 2861 2862 def _create_items_in_bulk_using_file_from_device_serialize( 2863 self, 2864 board_id, 2865 data, 2866 resources, 2867 _request_auth, 2868 _content_type, 2869 _headers, 2870 _host_index, 2871 ) -> RequestSerialized: 2872 2873 _host = None 2874 2875 _collection_formats: Dict[str, str] = { 2876 "resources": "csv", 2877 } 2878 2879 _path_params: Dict[str, str] = {} 2880 _query_params: List[Tuple[str, str]] = [] 2881 _header_params: Dict[str, Optional[str]] = _headers or {} 2882 _form_params: List[Tuple[str, str]] = [] 2883 _files: Dict[str, str] = {} 2884 _body_params: Optional[bytes] = None 2885 2886 # process the path parameters 2887 if board_id is not None: 2888 _path_params["board_id"] = board_id 2889 # process the query parameters 2890 # process the header parameters 2891 # process the form parameters 2892 if data is not None: 2893 _files["data"] = data 2894 if resources is not None: 2895 _files["resources"] = resources 2896 # process the body parameter 2897 2898 # set the HTTP header `Accept` 2899 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 2900 2901 # set the HTTP header `Content-Type` 2902 if _content_type: 2903 _header_params["Content-Type"] = _content_type 2904 else: 2905 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 2906 if _default_content_type is not None: 2907 _header_params["Content-Type"] = _default_content_type 2908 2909 # authentication setting 2910 _auth_settings: List[str] = [] 2911 2912 return self.api_client.param_serialize( 2913 method="POST", 2914 resource_path="/v2/boards/{board_id_Platformcreateitemsinbulkusingfilefromdevice}/items/bulk", 2915 path_params=_path_params, 2916 query_params=_query_params, 2917 header_params=_header_params, 2918 body=_body_params, 2919 post_params=_form_params, 2920 files=_files, 2921 auth_settings=_auth_settings, 2922 collection_formats=_collection_formats, 2923 _host=_host, 2924 _request_auth=_request_auth, 2925 ) 2926 2927 @validate_call 2928 def get_resource_type( 2929 self, 2930 resource: StrictStr, 2931 _request_timeout: Union[ 2932 None, 2933 Annotated[StrictFloat, Field(gt=0)], 2934 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2935 ] = None, 2936 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2937 _content_type: Optional[StrictStr] = None, 2938 _headers: Optional[Dict[StrictStr, Any]] = None, 2939 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2940 ) -> ResourceType: 2941 """Get resource type 2942 2943 Retrieve metadata for the available resource types (User and Group) that are supported. 2944 2945 :param resource: (required) 2946 :type resource: str 2947 :param _request_timeout: timeout setting for this request. If one 2948 number provided, it will be total request 2949 timeout. It can also be a pair (tuple) of 2950 (connection, read) timeouts. 2951 :type _request_timeout: int, tuple(int, int), optional 2952 :param _request_auth: set to override the auth_settings for an a single 2953 request; this effectively ignores the 2954 authentication in the spec for a single request. 2955 :type _request_auth: dict, optional 2956 :param _content_type: force content-type for the request. 2957 :type _content_type: str, Optional 2958 :param _headers: set to override the headers for a single 2959 request; this effectively ignores the headers 2960 in the spec for a single request. 2961 :type _headers: dict, optional 2962 :param _host_index: set to override the host_index for a single 2963 request; this effectively ignores the host_index 2964 in the spec for a single request. 2965 :type _host_index: int, optional 2966 :return: Returns the result object. 2967 """ # noqa: E501 2968 2969 _param = self._get_resource_type_serialize( 2970 resource=resource, 2971 _request_auth=_request_auth, 2972 _content_type=_content_type, 2973 _headers=_headers, 2974 _host_index=_host_index, 2975 ) 2976 2977 _response_types_map: Dict[str, Optional[str]] = { 2978 "200": "ResourceType", 2979 "400": None, 2980 "401": None, 2981 "403": None, 2982 "404": None, 2983 "500": None, 2984 } 2985 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2986 response_data.read() 2987 return self.api_client.response_deserialize( 2988 response_data=response_data, 2989 response_types_map=_response_types_map, 2990 ).data 2991 2992 def _get_resource_type_serialize( 2993 self, 2994 resource, 2995 _request_auth, 2996 _content_type, 2997 _headers, 2998 _host_index, 2999 ) -> RequestSerialized: 3000 3001 _host = None 3002 3003 _collection_formats: Dict[str, str] = {} 3004 3005 _path_params: Dict[str, str] = {} 3006 _query_params: List[Tuple[str, str]] = [] 3007 _header_params: Dict[str, Optional[str]] = _headers or {} 3008 _form_params: List[Tuple[str, str]] = [] 3009 _files: Dict[str, str] = {} 3010 _body_params: Optional[bytes] = None 3011 3012 # process the path parameters 3013 if resource is not None: 3014 _path_params["resource"] = resource 3015 # process the query parameters 3016 # process the header parameters 3017 # process the form parameters 3018 # process the body parameter 3019 3020 # set the HTTP header `Accept` 3021 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3022 3023 # authentication setting 3024 _auth_settings: List[str] = [] 3025 3026 return self.api_client.param_serialize( 3027 method="GET", 3028 resource_path="/ResourceTypes/{resource}", 3029 path_params=_path_params, 3030 query_params=_query_params, 3031 header_params=_header_params, 3032 body=_body_params, 3033 post_params=_form_params, 3034 files=_files, 3035 auth_settings=_auth_settings, 3036 collection_formats=_collection_formats, 3037 _host=_host, 3038 _request_auth=_request_auth, 3039 ) 3040 3041 @validate_call 3042 def get_schema( 3043 self, 3044 uri: Annotated[StrictStr, Field(description="Schema URI of a particular resource type.")], 3045 _request_timeout: Union[ 3046 None, 3047 Annotated[StrictFloat, Field(gt=0)], 3048 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3049 ] = None, 3050 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3051 _content_type: Optional[StrictStr] = None, 3052 _headers: Optional[Dict[StrictStr, Any]] = None, 3053 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3054 ) -> SchemaResource: 3055 """Get schema 3056 3057 Retrieve information about how users, groups, and enterprise-user attributes URIs that are formatted. 3058 3059 :param uri: Schema URI of a particular resource type. (required) 3060 :type uri: str 3061 :param _request_timeout: timeout setting for this request. If one 3062 number provided, it will be total request 3063 timeout. It can also be a pair (tuple) of 3064 (connection, read) timeouts. 3065 :type _request_timeout: int, tuple(int, int), optional 3066 :param _request_auth: set to override the auth_settings for an a single 3067 request; this effectively ignores the 3068 authentication in the spec for a single request. 3069 :type _request_auth: dict, optional 3070 :param _content_type: force content-type for the request. 3071 :type _content_type: str, Optional 3072 :param _headers: set to override the headers for a single 3073 request; this effectively ignores the headers 3074 in the spec for a single request. 3075 :type _headers: dict, optional 3076 :param _host_index: set to override the host_index for a single 3077 request; this effectively ignores the host_index 3078 in the spec for a single request. 3079 :type _host_index: int, optional 3080 :return: Returns the result object. 3081 """ # noqa: E501 3082 3083 _param = self._get_schema_serialize( 3084 uri=uri, 3085 _request_auth=_request_auth, 3086 _content_type=_content_type, 3087 _headers=_headers, 3088 _host_index=_host_index, 3089 ) 3090 3091 _response_types_map: Dict[str, Optional[str]] = { 3092 "200": "SchemaResource", 3093 "400": None, 3094 "401": None, 3095 "403": None, 3096 "404": None, 3097 "500": None, 3098 } 3099 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3100 response_data.read() 3101 return self.api_client.response_deserialize( 3102 response_data=response_data, 3103 response_types_map=_response_types_map, 3104 ).data 3105 3106 def _get_schema_serialize( 3107 self, 3108 uri, 3109 _request_auth, 3110 _content_type, 3111 _headers, 3112 _host_index, 3113 ) -> RequestSerialized: 3114 3115 _host = None 3116 3117 _collection_formats: Dict[str, str] = {} 3118 3119 _path_params: Dict[str, str] = {} 3120 _query_params: List[Tuple[str, str]] = [] 3121 _header_params: Dict[str, Optional[str]] = _headers or {} 3122 _form_params: List[Tuple[str, str]] = [] 3123 _files: Dict[str, str] = {} 3124 _body_params: Optional[bytes] = None 3125 3126 # process the path parameters 3127 if uri is not None: 3128 _path_params["uri"] = uri 3129 # process the query parameters 3130 # process the header parameters 3131 # process the form parameters 3132 # process the body parameter 3133 3134 # set the HTTP header `Accept` 3135 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3136 3137 # authentication setting 3138 _auth_settings: List[str] = [] 3139 3140 return self.api_client.param_serialize( 3141 method="GET", 3142 resource_path="/Schemas/{uri}", 3143 path_params=_path_params, 3144 query_params=_query_params, 3145 header_params=_header_params, 3146 body=_body_params, 3147 post_params=_form_params, 3148 files=_files, 3149 auth_settings=_auth_settings, 3150 collection_formats=_collection_formats, 3151 _host=_host, 3152 _request_auth=_request_auth, 3153 ) 3154 3155 @validate_call 3156 def list_resource_types( 3157 self, 3158 _request_timeout: Union[ 3159 None, 3160 Annotated[StrictFloat, Field(gt=0)], 3161 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3162 ] = None, 3163 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3164 _content_type: Optional[StrictStr] = None, 3165 _headers: Optional[Dict[StrictStr, Any]] = None, 3166 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3167 ) -> ResourceTypeListResponse: 3168 """List resource types 3169 3170 Retrieve information about which SCIM resources are supported. <br><br> Currently, Miro supports Users and Groups as Resource Types. 3171 3172 :param _request_timeout: timeout setting for this request. If one 3173 number provided, it will be total request 3174 timeout. It can also be a pair (tuple) of 3175 (connection, read) timeouts. 3176 :type _request_timeout: int, tuple(int, int), optional 3177 :param _request_auth: set to override the auth_settings for an a single 3178 request; this effectively ignores the 3179 authentication in the spec for a single request. 3180 :type _request_auth: dict, optional 3181 :param _content_type: force content-type for the request. 3182 :type _content_type: str, Optional 3183 :param _headers: set to override the headers for a single 3184 request; this effectively ignores the headers 3185 in the spec for a single request. 3186 :type _headers: dict, optional 3187 :param _host_index: set to override the host_index for a single 3188 request; this effectively ignores the host_index 3189 in the spec for a single request. 3190 :type _host_index: int, optional 3191 :return: Returns the result object. 3192 """ # noqa: E501 3193 3194 _param = self._list_resource_types_serialize( 3195 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3196 ) 3197 3198 _response_types_map: Dict[str, Optional[str]] = { 3199 "200": "ResourceTypeListResponse", 3200 "400": None, 3201 "401": None, 3202 "403": None, 3203 "404": None, 3204 "500": None, 3205 } 3206 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3207 response_data.read() 3208 return self.api_client.response_deserialize( 3209 response_data=response_data, 3210 response_types_map=_response_types_map, 3211 ).data 3212 3213 def _list_resource_types_serialize( 3214 self, 3215 _request_auth, 3216 _content_type, 3217 _headers, 3218 _host_index, 3219 ) -> RequestSerialized: 3220 3221 _host = None 3222 3223 _collection_formats: Dict[str, str] = {} 3224 3225 _path_params: Dict[str, str] = {} 3226 _query_params: List[Tuple[str, str]] = [] 3227 _header_params: Dict[str, Optional[str]] = _headers or {} 3228 _form_params: List[Tuple[str, str]] = [] 3229 _files: Dict[str, str] = {} 3230 _body_params: Optional[bytes] = None 3231 3232 # process the path parameters 3233 # process the query parameters 3234 # process the header parameters 3235 # process the form parameters 3236 # process the body parameter 3237 3238 # set the HTTP header `Accept` 3239 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3240 3241 # authentication setting 3242 _auth_settings: List[str] = [] 3243 3244 return self.api_client.param_serialize( 3245 method="GET", 3246 resource_path="/ResourceTypes", 3247 path_params=_path_params, 3248 query_params=_query_params, 3249 header_params=_header_params, 3250 body=_body_params, 3251 post_params=_form_params, 3252 files=_files, 3253 auth_settings=_auth_settings, 3254 collection_formats=_collection_formats, 3255 _host=_host, 3256 _request_auth=_request_auth, 3257 ) 3258 3259 @validate_call 3260 def list_schemas( 3261 self, 3262 _request_timeout: Union[ 3263 None, 3264 Annotated[StrictFloat, Field(gt=0)], 3265 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3266 ] = None, 3267 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3268 _content_type: Optional[StrictStr] = None, 3269 _headers: Optional[Dict[StrictStr, Any]] = None, 3270 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3271 ) -> SchemaListResponse: 3272 """List schemas 3273 3274 Retrieve metadata about Users, Groups, and extension attributes that are currently supported. 3275 3276 :param _request_timeout: timeout setting for this request. If one 3277 number provided, it will be total request 3278 timeout. It can also be a pair (tuple) of 3279 (connection, read) timeouts. 3280 :type _request_timeout: int, tuple(int, int), optional 3281 :param _request_auth: set to override the auth_settings for an a single 3282 request; this effectively ignores the 3283 authentication in the spec for a single request. 3284 :type _request_auth: dict, optional 3285 :param _content_type: force content-type for the request. 3286 :type _content_type: str, Optional 3287 :param _headers: set to override the headers for a single 3288 request; this effectively ignores the headers 3289 in the spec for a single request. 3290 :type _headers: dict, optional 3291 :param _host_index: set to override the host_index for a single 3292 request; this effectively ignores the host_index 3293 in the spec for a single request. 3294 :type _host_index: int, optional 3295 :return: Returns the result object. 3296 """ # noqa: E501 3297 3298 _param = self._list_schemas_serialize( 3299 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3300 ) 3301 3302 _response_types_map: Dict[str, Optional[str]] = { 3303 "200": "SchemaListResponse", 3304 "400": None, 3305 "401": None, 3306 "403": None, 3307 "404": None, 3308 "500": None, 3309 } 3310 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3311 response_data.read() 3312 return self.api_client.response_deserialize( 3313 response_data=response_data, 3314 response_types_map=_response_types_map, 3315 ).data 3316 3317 def _list_schemas_serialize( 3318 self, 3319 _request_auth, 3320 _content_type, 3321 _headers, 3322 _host_index, 3323 ) -> RequestSerialized: 3324 3325 _host = None 3326 3327 _collection_formats: Dict[str, str] = {} 3328 3329 _path_params: Dict[str, str] = {} 3330 _query_params: List[Tuple[str, str]] = [] 3331 _header_params: Dict[str, Optional[str]] = _headers or {} 3332 _form_params: List[Tuple[str, str]] = [] 3333 _files: Dict[str, str] = {} 3334 _body_params: Optional[bytes] = None 3335 3336 # process the path parameters 3337 # process the query parameters 3338 # process the header parameters 3339 # process the form parameters 3340 # process the body parameter 3341 3342 # set the HTTP header `Accept` 3343 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3344 3345 # authentication setting 3346 _auth_settings: List[str] = [] 3347 3348 return self.api_client.param_serialize( 3349 method="GET", 3350 resource_path="/Schemas", 3351 path_params=_path_params, 3352 query_params=_query_params, 3353 header_params=_header_params, 3354 body=_body_params, 3355 post_params=_form_params, 3356 files=_files, 3357 auth_settings=_auth_settings, 3358 collection_formats=_collection_formats, 3359 _host=_host, 3360 _request_auth=_request_auth, 3361 ) 3362 3363 @validate_call 3364 def list_service_provider_configs( 3365 self, 3366 _request_timeout: Union[ 3367 None, 3368 Annotated[StrictFloat, Field(gt=0)], 3369 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3370 ] = None, 3371 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3372 _content_type: Optional[StrictStr] = None, 3373 _headers: Optional[Dict[StrictStr, Any]] = None, 3374 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3375 ) -> ServiceProviderConfigResponse: 3376 """Get Service Provider Config 3377 3378 Retrieve supported operations and SCIM API basic configuration. 3379 3380 :param _request_timeout: timeout setting for this request. If one 3381 number provided, it will be total request 3382 timeout. It can also be a pair (tuple) of 3383 (connection, read) timeouts. 3384 :type _request_timeout: int, tuple(int, int), optional 3385 :param _request_auth: set to override the auth_settings for an a single 3386 request; this effectively ignores the 3387 authentication in the spec for a single request. 3388 :type _request_auth: dict, optional 3389 :param _content_type: force content-type for the request. 3390 :type _content_type: str, Optional 3391 :param _headers: set to override the headers for a single 3392 request; this effectively ignores the headers 3393 in the spec for a single request. 3394 :type _headers: dict, optional 3395 :param _host_index: set to override the host_index for a single 3396 request; this effectively ignores the host_index 3397 in the spec for a single request. 3398 :type _host_index: int, optional 3399 :return: Returns the result object. 3400 """ # noqa: E501 3401 3402 _param = self._list_service_provider_configs_serialize( 3403 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3404 ) 3405 3406 _response_types_map: Dict[str, Optional[str]] = { 3407 "200": "ServiceProviderConfigResponse", 3408 "400": None, 3409 "401": None, 3410 "403": None, 3411 "404": None, 3412 "500": None, 3413 } 3414 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3415 response_data.read() 3416 return self.api_client.response_deserialize( 3417 response_data=response_data, 3418 response_types_map=_response_types_map, 3419 ).data 3420 3421 def _list_service_provider_configs_serialize( 3422 self, 3423 _request_auth, 3424 _content_type, 3425 _headers, 3426 _host_index, 3427 ) -> RequestSerialized: 3428 3429 _host = None 3430 3431 _collection_formats: Dict[str, str] = {} 3432 3433 _path_params: Dict[str, str] = {} 3434 _query_params: List[Tuple[str, str]] = [] 3435 _header_params: Dict[str, Optional[str]] = _headers or {} 3436 _form_params: List[Tuple[str, str]] = [] 3437 _files: Dict[str, str] = {} 3438 _body_params: Optional[bytes] = None 3439 3440 # process the path parameters 3441 # process the query parameters 3442 # process the header parameters 3443 # process the form parameters 3444 # process the body parameter 3445 3446 # set the HTTP header `Accept` 3447 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 3448 3449 # authentication setting 3450 _auth_settings: List[str] = [] 3451 3452 return self.api_client.param_serialize( 3453 method="GET", 3454 resource_path="/ServiceProviderConfig", 3455 path_params=_path_params, 3456 query_params=_query_params, 3457 header_params=_header_params, 3458 body=_body_params, 3459 post_params=_form_params, 3460 files=_files, 3461 auth_settings=_auth_settings, 3462 collection_formats=_collection_formats, 3463 _host=_host, 3464 _request_auth=_request_auth, 3465 ) 3466 3467 @validate_call 3468 def create_shape_item_flowchart( 3469 self, 3470 board_id: Annotated[ 3471 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 3472 ], 3473 shape_create_request: ShapeCreateRequest, 3474 _request_timeout: Union[ 3475 None, 3476 Annotated[StrictFloat, Field(gt=0)], 3477 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3478 ] = None, 3479 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3480 _content_type: Optional[StrictStr] = None, 3481 _headers: Optional[Dict[StrictStr, Any]] = None, 3482 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3483 ) -> ShapeItem: 3484 """Create shape item 3485 3486 Adds a flowchart shape item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 3487 3488 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 3489 :type board_id: str 3490 :param shape_create_request: (required) 3491 :type shape_create_request: ShapeCreateRequest 3492 :param _request_timeout: timeout setting for this request. If one 3493 number provided, it will be total request 3494 timeout. It can also be a pair (tuple) of 3495 (connection, read) timeouts. 3496 :type _request_timeout: int, tuple(int, int), optional 3497 :param _request_auth: set to override the auth_settings for an a single 3498 request; this effectively ignores the 3499 authentication in the spec for a single request. 3500 :type _request_auth: dict, optional 3501 :param _content_type: force content-type for the request. 3502 :type _content_type: str, Optional 3503 :param _headers: set to override the headers for a single 3504 request; this effectively ignores the headers 3505 in the spec for a single request. 3506 :type _headers: dict, optional 3507 :param _host_index: set to override the host_index for a single 3508 request; this effectively ignores the host_index 3509 in the spec for a single request. 3510 :type _host_index: int, optional 3511 :return: Returns the result object. 3512 """ # noqa: E501 3513 3514 _param = self._create_shape_item_flowchart_serialize( 3515 board_id=board_id, 3516 shape_create_request=shape_create_request, 3517 _request_auth=_request_auth, 3518 _content_type=_content_type, 3519 _headers=_headers, 3520 _host_index=_host_index, 3521 ) 3522 3523 _response_types_map: Dict[str, Optional[str]] = { 3524 "201": "ShapeItem", 3525 "400": "CreateFrameItem400Response", 3526 "404": "CreateFrameItem400Response", 3527 "429": "CreateFrameItem400Response", 3528 } 3529 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3530 response_data.read() 3531 return self.api_client.response_deserialize( 3532 response_data=response_data, 3533 response_types_map=_response_types_map, 3534 ).data 3535 3536 def _create_shape_item_flowchart_serialize( 3537 self, 3538 board_id, 3539 shape_create_request, 3540 _request_auth, 3541 _content_type, 3542 _headers, 3543 _host_index, 3544 ) -> RequestSerialized: 3545 3546 _host = None 3547 3548 _collection_formats: Dict[str, str] = {} 3549 3550 _path_params: Dict[str, str] = {} 3551 _query_params: List[Tuple[str, str]] = [] 3552 _header_params: Dict[str, Optional[str]] = _headers or {} 3553 _form_params: List[Tuple[str, str]] = [] 3554 _files: Dict[str, str] = {} 3555 _body_params: Optional[bytes] = None 3556 3557 # process the path parameters 3558 if board_id is not None: 3559 _path_params["board_id"] = board_id 3560 # process the query parameters 3561 # process the header parameters 3562 # process the form parameters 3563 # process the body parameter 3564 if shape_create_request is not None: 3565 _body_params = shape_create_request 3566 3567 # set the HTTP header `Accept` 3568 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3569 3570 # set the HTTP header `Content-Type` 3571 if _content_type: 3572 _header_params["Content-Type"] = _content_type 3573 else: 3574 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 3575 if _default_content_type is not None: 3576 _header_params["Content-Type"] = _default_content_type 3577 3578 # authentication setting 3579 _auth_settings: List[str] = [] 3580 3581 return self.api_client.param_serialize( 3582 method="POST", 3583 resource_path="/v2-experimental/boards/{board_id}/shapes", 3584 path_params=_path_params, 3585 query_params=_query_params, 3586 header_params=_header_params, 3587 body=_body_params, 3588 post_params=_form_params, 3589 files=_files, 3590 auth_settings=_auth_settings, 3591 collection_formats=_collection_formats, 3592 _host=_host, 3593 _request_auth=_request_auth, 3594 ) 3595 3596 @validate_call 3597 def delete_shape_item_flowchart( 3598 self, 3599 board_id: Annotated[ 3600 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 3601 ], 3602 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 3603 _request_timeout: Union[ 3604 None, 3605 Annotated[StrictFloat, Field(gt=0)], 3606 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3607 ] = None, 3608 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3609 _content_type: Optional[StrictStr] = None, 3610 _headers: Optional[Dict[StrictStr, Any]] = None, 3611 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3612 ) -> object: 3613 """Delete shape item 3614 3615 Deletes a flowchart shape item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 3616 3617 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 3618 :type board_id: str 3619 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 3620 :type item_id: str 3621 :param _request_timeout: timeout setting for this request. If one 3622 number provided, it will be total request 3623 timeout. It can also be a pair (tuple) of 3624 (connection, read) timeouts. 3625 :type _request_timeout: int, tuple(int, int), optional 3626 :param _request_auth: set to override the auth_settings for an a single 3627 request; this effectively ignores the 3628 authentication in the spec for a single request. 3629 :type _request_auth: dict, optional 3630 :param _content_type: force content-type for the request. 3631 :type _content_type: str, Optional 3632 :param _headers: set to override the headers for a single 3633 request; this effectively ignores the headers 3634 in the spec for a single request. 3635 :type _headers: dict, optional 3636 :param _host_index: set to override the host_index for a single 3637 request; this effectively ignores the host_index 3638 in the spec for a single request. 3639 :type _host_index: int, optional 3640 :return: Returns the result object. 3641 """ # noqa: E501 3642 3643 _param = self._delete_shape_item_flowchart_serialize( 3644 board_id=board_id, 3645 item_id=item_id, 3646 _request_auth=_request_auth, 3647 _content_type=_content_type, 3648 _headers=_headers, 3649 _host_index=_host_index, 3650 ) 3651 3652 _response_types_map: Dict[str, Optional[str]] = { 3653 "204": "object", 3654 "400": "CreateFrameItem400Response", 3655 "404": "CreateFrameItem400Response", 3656 "429": "CreateFrameItem400Response", 3657 } 3658 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3659 response_data.read() 3660 return self.api_client.response_deserialize( 3661 response_data=response_data, 3662 response_types_map=_response_types_map, 3663 ).data 3664 3665 def _delete_shape_item_flowchart_serialize( 3666 self, 3667 board_id, 3668 item_id, 3669 _request_auth, 3670 _content_type, 3671 _headers, 3672 _host_index, 3673 ) -> RequestSerialized: 3674 3675 _host = None 3676 3677 _collection_formats: Dict[str, str] = {} 3678 3679 _path_params: Dict[str, str] = {} 3680 _query_params: List[Tuple[str, str]] = [] 3681 _header_params: Dict[str, Optional[str]] = _headers or {} 3682 _form_params: List[Tuple[str, str]] = [] 3683 _files: Dict[str, str] = {} 3684 _body_params: Optional[bytes] = None 3685 3686 # process the path parameters 3687 if board_id is not None: 3688 _path_params["board_id"] = board_id 3689 if item_id is not None: 3690 _path_params["item_id"] = item_id 3691 # process the query parameters 3692 # process the header parameters 3693 # process the form parameters 3694 # process the body parameter 3695 3696 # set the HTTP header `Accept` 3697 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3698 3699 # authentication setting 3700 _auth_settings: List[str] = [] 3701 3702 return self.api_client.param_serialize( 3703 method="DELETE", 3704 resource_path="/v2-experimental/boards/{board_id}/shapes/{item_id}", 3705 path_params=_path_params, 3706 query_params=_query_params, 3707 header_params=_header_params, 3708 body=_body_params, 3709 post_params=_form_params, 3710 files=_files, 3711 auth_settings=_auth_settings, 3712 collection_formats=_collection_formats, 3713 _host=_host, 3714 _request_auth=_request_auth, 3715 ) 3716 3717 @validate_call 3718 def get_items_experimental( 3719 self, 3720 board_id: Annotated[ 3721 StrictStr, 3722 Field( 3723 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 3724 ), 3725 ], 3726 limit: Optional[Annotated[str, Field(strict=True)]] = None, 3727 type: Optional[StrictStr] = None, 3728 cursor: Optional[StrictStr] = None, 3729 _request_timeout: Union[ 3730 None, 3731 Annotated[StrictFloat, Field(gt=0)], 3732 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3733 ] = None, 3734 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3735 _content_type: Optional[StrictStr] = None, 3736 _headers: Optional[Dict[StrictStr, Any]] = None, 3737 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3738 ) -> GenericItemCursorPaged: 3739 """Get items on board 3740 3741 Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 3742 3743 :param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) 3744 :type board_id: str 3745 :param limit: 3746 :type limit: str 3747 :param type: 3748 :type type: str 3749 :param cursor: 3750 :type cursor: str 3751 :param _request_timeout: timeout setting for this request. If one 3752 number provided, it will be total request 3753 timeout. It can also be a pair (tuple) of 3754 (connection, read) timeouts. 3755 :type _request_timeout: int, tuple(int, int), optional 3756 :param _request_auth: set to override the auth_settings for an a single 3757 request; this effectively ignores the 3758 authentication in the spec for a single request. 3759 :type _request_auth: dict, optional 3760 :param _content_type: force content-type for the request. 3761 :type _content_type: str, Optional 3762 :param _headers: set to override the headers for a single 3763 request; this effectively ignores the headers 3764 in the spec for a single request. 3765 :type _headers: dict, optional 3766 :param _host_index: set to override the host_index for a single 3767 request; this effectively ignores the host_index 3768 in the spec for a single request. 3769 :type _host_index: int, optional 3770 :return: Returns the result object. 3771 """ # noqa: E501 3772 3773 _param = self._get_items_experimental_serialize( 3774 board_id=board_id, 3775 limit=limit, 3776 type=type, 3777 cursor=cursor, 3778 _request_auth=_request_auth, 3779 _content_type=_content_type, 3780 _headers=_headers, 3781 _host_index=_host_index, 3782 ) 3783 3784 _response_types_map: Dict[str, Optional[str]] = { 3785 "200": "GenericItemCursorPaged", 3786 "400": "CreateFrameItem400Response", 3787 "404": "CreateFrameItem400Response", 3788 "429": "CreateFrameItem400Response", 3789 } 3790 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3791 response_data.read() 3792 return self.api_client.response_deserialize( 3793 response_data=response_data, 3794 response_types_map=_response_types_map, 3795 ).data 3796 3797 def _get_items_experimental_serialize( 3798 self, 3799 board_id, 3800 limit, 3801 type, 3802 cursor, 3803 _request_auth, 3804 _content_type, 3805 _headers, 3806 _host_index, 3807 ) -> RequestSerialized: 3808 3809 _host = None 3810 3811 _collection_formats: Dict[str, str] = {} 3812 3813 _path_params: Dict[str, str] = {} 3814 _query_params: List[Tuple[str, str]] = [] 3815 _header_params: Dict[str, Optional[str]] = _headers or {} 3816 _form_params: List[Tuple[str, str]] = [] 3817 _files: Dict[str, str] = {} 3818 _body_params: Optional[bytes] = None 3819 3820 # process the path parameters 3821 if board_id is not None: 3822 _path_params["board_id"] = board_id 3823 # process the query parameters 3824 if limit is not None: 3825 3826 _query_params.append(("limit", limit)) 3827 3828 if type is not None: 3829 3830 _query_params.append(("type", type)) 3831 3832 if cursor is not None: 3833 3834 _query_params.append(("cursor", cursor)) 3835 3836 # process the header parameters 3837 # process the form parameters 3838 # process the body parameter 3839 3840 # set the HTTP header `Accept` 3841 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3842 3843 # authentication setting 3844 _auth_settings: List[str] = [] 3845 3846 return self.api_client.param_serialize( 3847 method="GET", 3848 resource_path="/v2-experimental/boards/{board_id}/items", 3849 path_params=_path_params, 3850 query_params=_query_params, 3851 header_params=_header_params, 3852 body=_body_params, 3853 post_params=_form_params, 3854 files=_files, 3855 auth_settings=_auth_settings, 3856 collection_formats=_collection_formats, 3857 _host=_host, 3858 _request_auth=_request_auth, 3859 ) 3860 3861 @validate_call 3862 def get_shape_item_flowchart( 3863 self, 3864 board_id: Annotated[ 3865 StrictStr, 3866 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 3867 ], 3868 item_id: Annotated[ 3869 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 3870 ], 3871 _request_timeout: Union[ 3872 None, 3873 Annotated[StrictFloat, Field(gt=0)], 3874 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3875 ] = None, 3876 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3877 _content_type: Optional[StrictStr] = None, 3878 _headers: Optional[Dict[StrictStr, Any]] = None, 3879 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3880 ) -> ShapeItem: 3881 """Get shape item 3882 3883 Retrieves information for a specific shape item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 3884 3885 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 3886 :type board_id: str 3887 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 3888 :type item_id: str 3889 :param _request_timeout: timeout setting for this request. If one 3890 number provided, it will be total request 3891 timeout. It can also be a pair (tuple) of 3892 (connection, read) timeouts. 3893 :type _request_timeout: int, tuple(int, int), optional 3894 :param _request_auth: set to override the auth_settings for an a single 3895 request; this effectively ignores the 3896 authentication in the spec for a single request. 3897 :type _request_auth: dict, optional 3898 :param _content_type: force content-type for the request. 3899 :type _content_type: str, Optional 3900 :param _headers: set to override the headers for a single 3901 request; this effectively ignores the headers 3902 in the spec for a single request. 3903 :type _headers: dict, optional 3904 :param _host_index: set to override the host_index for a single 3905 request; this effectively ignores the host_index 3906 in the spec for a single request. 3907 :type _host_index: int, optional 3908 :return: Returns the result object. 3909 """ # noqa: E501 3910 3911 _param = self._get_shape_item_flowchart_serialize( 3912 board_id=board_id, 3913 item_id=item_id, 3914 _request_auth=_request_auth, 3915 _content_type=_content_type, 3916 _headers=_headers, 3917 _host_index=_host_index, 3918 ) 3919 3920 _response_types_map: Dict[str, Optional[str]] = { 3921 "200": "ShapeItem", 3922 "400": "CreateFrameItem400Response", 3923 "404": "CreateFrameItem400Response", 3924 "429": "CreateFrameItem400Response", 3925 } 3926 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3927 response_data.read() 3928 return self.api_client.response_deserialize( 3929 response_data=response_data, 3930 response_types_map=_response_types_map, 3931 ).data 3932 3933 def _get_shape_item_flowchart_serialize( 3934 self, 3935 board_id, 3936 item_id, 3937 _request_auth, 3938 _content_type, 3939 _headers, 3940 _host_index, 3941 ) -> RequestSerialized: 3942 3943 _host = None 3944 3945 _collection_formats: Dict[str, str] = {} 3946 3947 _path_params: Dict[str, str] = {} 3948 _query_params: List[Tuple[str, str]] = [] 3949 _header_params: Dict[str, Optional[str]] = _headers or {} 3950 _form_params: List[Tuple[str, str]] = [] 3951 _files: Dict[str, str] = {} 3952 _body_params: Optional[bytes] = None 3953 3954 # process the path parameters 3955 if board_id is not None: 3956 _path_params["board_id"] = board_id 3957 if item_id is not None: 3958 _path_params["item_id"] = item_id 3959 # process the query parameters 3960 # process the header parameters 3961 # process the form parameters 3962 # process the body parameter 3963 3964 # set the HTTP header `Accept` 3965 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 3966 3967 # authentication setting 3968 _auth_settings: List[str] = [] 3969 3970 return self.api_client.param_serialize( 3971 method="GET", 3972 resource_path="/v2-experimental/boards/{board_id}/shapes/{item_id}", 3973 path_params=_path_params, 3974 query_params=_query_params, 3975 header_params=_header_params, 3976 body=_body_params, 3977 post_params=_form_params, 3978 files=_files, 3979 auth_settings=_auth_settings, 3980 collection_formats=_collection_formats, 3981 _host=_host, 3982 _request_auth=_request_auth, 3983 ) 3984 3985 @validate_call 3986 def get_specific_item_experimental( 3987 self, 3988 board_id: Annotated[ 3989 StrictStr, 3990 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 3991 ], 3992 item_id: Annotated[ 3993 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 3994 ], 3995 _request_timeout: Union[ 3996 None, 3997 Annotated[StrictFloat, Field(gt=0)], 3998 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3999 ] = None, 4000 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4001 _content_type: Optional[StrictStr] = None, 4002 _headers: Optional[Dict[StrictStr, Any]] = None, 4003 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4004 ) -> GenericItem: 4005 """Get specific item on board 4006 4007 Retrieves information for a specific item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 4008 4009 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 4010 :type board_id: str 4011 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 4012 :type item_id: str 4013 :param _request_timeout: timeout setting for this request. If one 4014 number provided, it will be total request 4015 timeout. It can also be a pair (tuple) of 4016 (connection, read) timeouts. 4017 :type _request_timeout: int, tuple(int, int), optional 4018 :param _request_auth: set to override the auth_settings for an a single 4019 request; this effectively ignores the 4020 authentication in the spec for a single request. 4021 :type _request_auth: dict, optional 4022 :param _content_type: force content-type for the request. 4023 :type _content_type: str, Optional 4024 :param _headers: set to override the headers for a single 4025 request; this effectively ignores the headers 4026 in the spec for a single request. 4027 :type _headers: dict, optional 4028 :param _host_index: set to override the host_index for a single 4029 request; this effectively ignores the host_index 4030 in the spec for a single request. 4031 :type _host_index: int, optional 4032 :return: Returns the result object. 4033 """ # noqa: E501 4034 4035 _param = self._get_specific_item_experimental_serialize( 4036 board_id=board_id, 4037 item_id=item_id, 4038 _request_auth=_request_auth, 4039 _content_type=_content_type, 4040 _headers=_headers, 4041 _host_index=_host_index, 4042 ) 4043 4044 _response_types_map: Dict[str, Optional[str]] = { 4045 "200": "GenericItem", 4046 "400": "CreateFrameItem400Response", 4047 "404": "CreateFrameItem400Response", 4048 "429": "CreateFrameItem400Response", 4049 } 4050 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4051 response_data.read() 4052 return self.api_client.response_deserialize( 4053 response_data=response_data, 4054 response_types_map=_response_types_map, 4055 ).data 4056 4057 def _get_specific_item_experimental_serialize( 4058 self, 4059 board_id, 4060 item_id, 4061 _request_auth, 4062 _content_type, 4063 _headers, 4064 _host_index, 4065 ) -> RequestSerialized: 4066 4067 _host = None 4068 4069 _collection_formats: Dict[str, str] = {} 4070 4071 _path_params: Dict[str, str] = {} 4072 _query_params: List[Tuple[str, str]] = [] 4073 _header_params: Dict[str, Optional[str]] = _headers or {} 4074 _form_params: List[Tuple[str, str]] = [] 4075 _files: Dict[str, str] = {} 4076 _body_params: Optional[bytes] = None 4077 4078 # process the path parameters 4079 if board_id is not None: 4080 _path_params["board_id"] = board_id 4081 if item_id is not None: 4082 _path_params["item_id"] = item_id 4083 # process the query parameters 4084 # process the header parameters 4085 # process the form parameters 4086 # process the body parameter 4087 4088 # set the HTTP header `Accept` 4089 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4090 4091 # authentication setting 4092 _auth_settings: List[str] = [] 4093 4094 return self.api_client.param_serialize( 4095 method="GET", 4096 resource_path="/v2-experimental/boards/{board_id}/items/{item_id}", 4097 path_params=_path_params, 4098 query_params=_query_params, 4099 header_params=_header_params, 4100 body=_body_params, 4101 post_params=_form_params, 4102 files=_files, 4103 auth_settings=_auth_settings, 4104 collection_formats=_collection_formats, 4105 _host=_host, 4106 _request_auth=_request_auth, 4107 ) 4108 4109 @validate_call 4110 def update_shape_item_flowchart( 4111 self, 4112 board_id: Annotated[ 4113 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 4114 ], 4115 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 4116 shape_update_request: ShapeUpdateRequest, 4117 _request_timeout: Union[ 4118 None, 4119 Annotated[StrictFloat, Field(gt=0)], 4120 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4121 ] = None, 4122 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4123 _content_type: Optional[StrictStr] = None, 4124 _headers: Optional[Dict[StrictStr, Any]] = None, 4125 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4126 ) -> ShapeItem: 4127 """Update shape item 4128 4129 Updates a flowchart shape item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 4130 4131 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 4132 :type board_id: str 4133 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 4134 :type item_id: str 4135 :param shape_update_request: (required) 4136 :type shape_update_request: ShapeUpdateRequest 4137 :param _request_timeout: timeout setting for this request. If one 4138 number provided, it will be total request 4139 timeout. It can also be a pair (tuple) of 4140 (connection, read) timeouts. 4141 :type _request_timeout: int, tuple(int, int), optional 4142 :param _request_auth: set to override the auth_settings for an a single 4143 request; this effectively ignores the 4144 authentication in the spec for a single request. 4145 :type _request_auth: dict, optional 4146 :param _content_type: force content-type for the request. 4147 :type _content_type: str, Optional 4148 :param _headers: set to override the headers for a single 4149 request; this effectively ignores the headers 4150 in the spec for a single request. 4151 :type _headers: dict, optional 4152 :param _host_index: set to override the host_index for a single 4153 request; this effectively ignores the host_index 4154 in the spec for a single request. 4155 :type _host_index: int, optional 4156 :return: Returns the result object. 4157 """ # noqa: E501 4158 4159 _param = self._update_shape_item_flowchart_serialize( 4160 board_id=board_id, 4161 item_id=item_id, 4162 shape_update_request=shape_update_request, 4163 _request_auth=_request_auth, 4164 _content_type=_content_type, 4165 _headers=_headers, 4166 _host_index=_host_index, 4167 ) 4168 4169 _response_types_map: Dict[str, Optional[str]] = { 4170 "200": "ShapeItem", 4171 "400": "CreateFrameItem400Response", 4172 "404": "CreateFrameItem400Response", 4173 "429": "CreateFrameItem400Response", 4174 } 4175 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4176 response_data.read() 4177 return self.api_client.response_deserialize( 4178 response_data=response_data, 4179 response_types_map=_response_types_map, 4180 ).data 4181 4182 def _update_shape_item_flowchart_serialize( 4183 self, 4184 board_id, 4185 item_id, 4186 shape_update_request, 4187 _request_auth, 4188 _content_type, 4189 _headers, 4190 _host_index, 4191 ) -> RequestSerialized: 4192 4193 _host = None 4194 4195 _collection_formats: Dict[str, str] = {} 4196 4197 _path_params: Dict[str, str] = {} 4198 _query_params: List[Tuple[str, str]] = [] 4199 _header_params: Dict[str, Optional[str]] = _headers or {} 4200 _form_params: List[Tuple[str, str]] = [] 4201 _files: Dict[str, str] = {} 4202 _body_params: Optional[bytes] = None 4203 4204 # process the path parameters 4205 if board_id is not None: 4206 _path_params["board_id"] = board_id 4207 if item_id is not None: 4208 _path_params["item_id"] = item_id 4209 # process the query parameters 4210 # process the header parameters 4211 # process the form parameters 4212 # process the body parameter 4213 if shape_update_request is not None: 4214 _body_params = shape_update_request 4215 4216 # set the HTTP header `Accept` 4217 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4218 4219 # set the HTTP header `Content-Type` 4220 if _content_type: 4221 _header_params["Content-Type"] = _content_type 4222 else: 4223 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 4224 if _default_content_type is not None: 4225 _header_params["Content-Type"] = _default_content_type 4226 4227 # authentication setting 4228 _auth_settings: List[str] = [] 4229 4230 return self.api_client.param_serialize( 4231 method="PATCH", 4232 resource_path="/v2-experimental/boards/{board_id}/shapes/{item_id}", 4233 path_params=_path_params, 4234 query_params=_query_params, 4235 header_params=_header_params, 4236 body=_body_params, 4237 post_params=_form_params, 4238 files=_files, 4239 auth_settings=_auth_settings, 4240 collection_formats=_collection_formats, 4241 _host=_host, 4242 _request_auth=_request_auth, 4243 ) 4244 4245 @validate_call 4246 def get_group( 4247 self, 4248 id: Annotated[StrictStr, Field(description="A server-assigned, unique identifier for this Group (team).")], 4249 attributes: Annotated[ 4250 Optional[StrictStr], 4251 Field( 4252 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to retrieve attributes within complex attributes. For example: members.display" 4253 ), 4254 ] = None, 4255 _request_timeout: Union[ 4256 None, 4257 Annotated[StrictFloat, Field(gt=0)], 4258 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4259 ] = None, 4260 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4261 _content_type: Optional[StrictStr] = None, 4262 _headers: Optional[Dict[StrictStr, Any]] = None, 4263 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4264 ) -> GroupResource: 4265 """Get group 4266 4267 Retrieves a single Group resource.<br><b> Note</b>: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched. 4268 4269 :param id: A server-assigned, unique identifier for this Group (team). (required) 4270 :type id: str 4271 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to retrieve attributes within complex attributes. For example: members.display 4272 :type attributes: str 4273 :param _request_timeout: timeout setting for this request. If one 4274 number provided, it will be total request 4275 timeout. It can also be a pair (tuple) of 4276 (connection, read) timeouts. 4277 :type _request_timeout: int, tuple(int, int), optional 4278 :param _request_auth: set to override the auth_settings for an a single 4279 request; this effectively ignores the 4280 authentication in the spec for a single request. 4281 :type _request_auth: dict, optional 4282 :param _content_type: force content-type for the request. 4283 :type _content_type: str, Optional 4284 :param _headers: set to override the headers for a single 4285 request; this effectively ignores the headers 4286 in the spec for a single request. 4287 :type _headers: dict, optional 4288 :param _host_index: set to override the host_index for a single 4289 request; this effectively ignores the host_index 4290 in the spec for a single request. 4291 :type _host_index: int, optional 4292 :return: Returns the result object. 4293 """ # noqa: E501 4294 4295 _param = self._get_group_serialize( 4296 id=id, 4297 attributes=attributes, 4298 _request_auth=_request_auth, 4299 _content_type=_content_type, 4300 _headers=_headers, 4301 _host_index=_host_index, 4302 ) 4303 4304 _response_types_map: Dict[str, Optional[str]] = { 4305 "200": "GroupResource", 4306 "400": None, 4307 "401": None, 4308 "403": None, 4309 "404": None, 4310 "409": None, 4311 "413": None, 4312 "429": None, 4313 "500": None, 4314 } 4315 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4316 response_data.read() 4317 return self.api_client.response_deserialize( 4318 response_data=response_data, 4319 response_types_map=_response_types_map, 4320 ).data 4321 4322 def _get_group_serialize( 4323 self, 4324 id, 4325 attributes, 4326 _request_auth, 4327 _content_type, 4328 _headers, 4329 _host_index, 4330 ) -> RequestSerialized: 4331 4332 _host = None 4333 4334 _collection_formats: Dict[str, str] = {} 4335 4336 _path_params: Dict[str, str] = {} 4337 _query_params: List[Tuple[str, str]] = [] 4338 _header_params: Dict[str, Optional[str]] = _headers or {} 4339 _form_params: List[Tuple[str, str]] = [] 4340 _files: Dict[str, str] = {} 4341 _body_params: Optional[bytes] = None 4342 4343 # process the path parameters 4344 if id is not None: 4345 _path_params["id"] = id 4346 # process the query parameters 4347 if attributes is not None: 4348 4349 _query_params.append(("attributes", attributes)) 4350 4351 # process the header parameters 4352 # process the form parameters 4353 # process the body parameter 4354 4355 # set the HTTP header `Accept` 4356 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 4357 4358 # authentication setting 4359 _auth_settings: List[str] = [] 4360 4361 return self.api_client.param_serialize( 4362 method="GET", 4363 resource_path="/Groups/{id}", 4364 path_params=_path_params, 4365 query_params=_query_params, 4366 header_params=_header_params, 4367 body=_body_params, 4368 post_params=_form_params, 4369 files=_files, 4370 auth_settings=_auth_settings, 4371 collection_formats=_collection_formats, 4372 _host=_host, 4373 _request_auth=_request_auth, 4374 ) 4375 4376 @validate_call 4377 def list_groups( 4378 self, 4379 attributes: Annotated[ 4380 Optional[StrictStr], 4381 Field( 4382 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to fetch attributes within complex attributes, for Example: members.display." 4383 ), 4384 ] = None, 4385 filter: Annotated[ 4386 Optional[StrictStr], 4387 Field( 4388 description='You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical "and"<br> or = Logical "or"<br> not = "Not" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br>For Example: displayName eq "Product Team" will fetch information related to team matching the display name "Product Team". <br>Note</b>: Filtering on complex attributes is not supported' 4389 ), 4390 ] = None, 4391 start_index: Annotated[ 4392 Optional[StrictInt], 4393 Field( 4394 description="Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1" 4395 ), 4396 ] = None, 4397 count: Annotated[ 4398 Optional[StrictInt], 4399 Field( 4400 description="Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12" 4401 ), 4402 ] = None, 4403 sort_by: Annotated[ 4404 Optional[StrictStr], 4405 Field( 4406 description="Specifies the attribute whose value will be used to order the response. Example sortBy=displayName" 4407 ), 4408 ] = None, 4409 sort_order: Annotated[ 4410 Optional[StrictStr], 4411 Field( 4412 description="Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending" 4413 ), 4414 ] = None, 4415 _request_timeout: Union[ 4416 None, 4417 Annotated[StrictFloat, Field(gt=0)], 4418 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4419 ] = None, 4420 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4421 _content_type: Optional[StrictStr] = None, 4422 _headers: Optional[Dict[StrictStr, Any]] = None, 4423 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4424 ) -> GroupListResponse: 4425 """List groups 4426 4427 Retrieves the list of groups (teams) in the organization.<br><br> Note: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched. 4428 4429 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to fetch attributes within complex attributes, for Example: members.display. 4430 :type attributes: str 4431 :param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical \"and\"<br> or = Logical \"or\"<br> not = \"Not\" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br>For Example: displayName eq \"Product Team\" will fetch information related to team matching the display name \"Product Team\". <br>Note</b>: Filtering on complex attributes is not supported 4432 :type filter: str 4433 :param start_index: Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1 4434 :type start_index: int 4435 :param count: Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12 4436 :type count: int 4437 :param sort_by: Specifies the attribute whose value will be used to order the response. Example sortBy=displayName 4438 :type sort_by: str 4439 :param sort_order: Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending 4440 :type sort_order: str 4441 :param _request_timeout: timeout setting for this request. If one 4442 number provided, it will be total request 4443 timeout. It can also be a pair (tuple) of 4444 (connection, read) timeouts. 4445 :type _request_timeout: int, tuple(int, int), optional 4446 :param _request_auth: set to override the auth_settings for an a single 4447 request; this effectively ignores the 4448 authentication in the spec for a single request. 4449 :type _request_auth: dict, optional 4450 :param _content_type: force content-type for the request. 4451 :type _content_type: str, Optional 4452 :param _headers: set to override the headers for a single 4453 request; this effectively ignores the headers 4454 in the spec for a single request. 4455 :type _headers: dict, optional 4456 :param _host_index: set to override the host_index for a single 4457 request; this effectively ignores the host_index 4458 in the spec for a single request. 4459 :type _host_index: int, optional 4460 :return: Returns the result object. 4461 """ # noqa: E501 4462 4463 _param = self._list_groups_serialize( 4464 attributes=attributes, 4465 filter=filter, 4466 start_index=start_index, 4467 count=count, 4468 sort_by=sort_by, 4469 sort_order=sort_order, 4470 _request_auth=_request_auth, 4471 _content_type=_content_type, 4472 _headers=_headers, 4473 _host_index=_host_index, 4474 ) 4475 4476 _response_types_map: Dict[str, Optional[str]] = { 4477 "200": "GroupListResponse", 4478 "400": None, 4479 "401": None, 4480 "403": None, 4481 "404": None, 4482 "429": None, 4483 "500": None, 4484 } 4485 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4486 response_data.read() 4487 return self.api_client.response_deserialize( 4488 response_data=response_data, 4489 response_types_map=_response_types_map, 4490 ).data 4491 4492 def _list_groups_serialize( 4493 self, 4494 attributes, 4495 filter, 4496 start_index, 4497 count, 4498 sort_by, 4499 sort_order, 4500 _request_auth, 4501 _content_type, 4502 _headers, 4503 _host_index, 4504 ) -> RequestSerialized: 4505 4506 _host = None 4507 4508 _collection_formats: Dict[str, str] = {} 4509 4510 _path_params: Dict[str, str] = {} 4511 _query_params: List[Tuple[str, str]] = [] 4512 _header_params: Dict[str, Optional[str]] = _headers or {} 4513 _form_params: List[Tuple[str, str]] = [] 4514 _files: Dict[str, str] = {} 4515 _body_params: Optional[bytes] = None 4516 4517 # process the path parameters 4518 # process the query parameters 4519 if attributes is not None: 4520 4521 _query_params.append(("attributes", attributes)) 4522 4523 if filter is not None: 4524 4525 _query_params.append(("filter", filter)) 4526 4527 if start_index is not None: 4528 4529 _query_params.append(("startIndex", start_index)) 4530 4531 if count is not None: 4532 4533 _query_params.append(("count", count)) 4534 4535 if sort_by is not None: 4536 4537 _query_params.append(("sortBy", sort_by)) 4538 4539 if sort_order is not None: 4540 4541 _query_params.append(("sortOrder", sort_order)) 4542 4543 # process the header parameters 4544 # process the form parameters 4545 # process the body parameter 4546 4547 # set the HTTP header `Accept` 4548 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 4549 4550 # authentication setting 4551 _auth_settings: List[str] = [] 4552 4553 return self.api_client.param_serialize( 4554 method="GET", 4555 resource_path="/Groups", 4556 path_params=_path_params, 4557 query_params=_query_params, 4558 header_params=_header_params, 4559 body=_body_params, 4560 post_params=_form_params, 4561 files=_files, 4562 auth_settings=_auth_settings, 4563 collection_formats=_collection_formats, 4564 _host=_host, 4565 _request_auth=_request_auth, 4566 ) 4567 4568 @validate_call 4569 def patch_group( 4570 self, 4571 id: Annotated[ 4572 StrictStr, Field(description="Group (Team) ID. A server-assigned, unique identifier for this Group (team).") 4573 ], 4574 patch_group_resource: Annotated[ 4575 PatchGroupResource, 4576 Field( 4577 description="Payload to add, replace, remove members in the specified group (team). <br><br> The body of a PATCH request must contain the attribute `Operations` and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one `op` member. " 4578 ), 4579 ], 4580 attributes: Annotated[ 4581 Optional[StrictStr], 4582 Field( 4583 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> It is also possible to fetch attributes within complex attributes, for Example: members.display" 4584 ), 4585 ] = None, 4586 _request_timeout: Union[ 4587 None, 4588 Annotated[StrictFloat, Field(gt=0)], 4589 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4590 ] = None, 4591 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4592 _content_type: Optional[StrictStr] = None, 4593 _headers: Optional[Dict[StrictStr, Any]] = None, 4594 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4595 ) -> GroupResource: 4596 """Patch group 4597 4598 Updates an existing group resource, i.e. a team, overwriting values for specified attributes. Patch operation for group can be used to add, remove, or replace team members and to update the display name of the group (team). <br><br> To add a user to the group (team), use add operation. <br> To remove a user from a group (team), use remove operation. <br> To update a user resource, use the replace operation. <br> The last team admin cannot be removed from the team. <br><br> Note: Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided. <br><br> Team members removal specifics: <br> For remove or replace operations, the team member is removed from the team and from all team boards. The ownership of boards that belong to the removed team member is transferred to the oldest team member who currently has an admin role. After you remove a team member, adding the team member again to the team does not automatically restore their previous ownership of the boards. If the user is not registered fully in Miro and is not assigned to any other team, the user is also removed from the organization. <br><br> Add team members specifics: <br> All added team members are reactivated or recreated if they were deactivated or deleted earlier. <br><br> External users specifics: <br> When adding existing users with the role ORGANIZATION_EXTERNAL_USER or ORGANIZATION_TEAM_GUEST_USER to a team, we set FULL license and ORGANIZATION_INTERNAL_USER roles. 4599 4600 :param id: Group (Team) ID. A server-assigned, unique identifier for this Group (team). (required) 4601 :type id: str 4602 :param patch_group_resource: Payload to add, replace, remove members in the specified group (team). <br><br> The body of a PATCH request must contain the attribute `Operations` and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one `op` member. (required) 4603 :type patch_group_resource: PatchGroupResource 4604 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> It is also possible to fetch attributes within complex attributes, for Example: members.display 4605 :type attributes: str 4606 :param _request_timeout: timeout setting for this request. If one 4607 number provided, it will be total request 4608 timeout. It can also be a pair (tuple) of 4609 (connection, read) timeouts. 4610 :type _request_timeout: int, tuple(int, int), optional 4611 :param _request_auth: set to override the auth_settings for an a single 4612 request; this effectively ignores the 4613 authentication in the spec for a single request. 4614 :type _request_auth: dict, optional 4615 :param _content_type: force content-type for the request. 4616 :type _content_type: str, Optional 4617 :param _headers: set to override the headers for a single 4618 request; this effectively ignores the headers 4619 in the spec for a single request. 4620 :type _headers: dict, optional 4621 :param _host_index: set to override the host_index for a single 4622 request; this effectively ignores the host_index 4623 in the spec for a single request. 4624 :type _host_index: int, optional 4625 :return: Returns the result object. 4626 """ # noqa: E501 4627 4628 _param = self._patch_group_serialize( 4629 id=id, 4630 patch_group_resource=patch_group_resource, 4631 attributes=attributes, 4632 _request_auth=_request_auth, 4633 _content_type=_content_type, 4634 _headers=_headers, 4635 _host_index=_host_index, 4636 ) 4637 4638 _response_types_map: Dict[str, Optional[str]] = { 4639 "200": "GroupResource", 4640 "400": None, 4641 "401": None, 4642 "403": None, 4643 "404": None, 4644 "409": None, 4645 "413": None, 4646 "429": None, 4647 "500": None, 4648 } 4649 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4650 response_data.read() 4651 return self.api_client.response_deserialize( 4652 response_data=response_data, 4653 response_types_map=_response_types_map, 4654 ).data 4655 4656 def _patch_group_serialize( 4657 self, 4658 id, 4659 patch_group_resource, 4660 attributes, 4661 _request_auth, 4662 _content_type, 4663 _headers, 4664 _host_index, 4665 ) -> RequestSerialized: 4666 4667 _host = None 4668 4669 _collection_formats: Dict[str, str] = {} 4670 4671 _path_params: Dict[str, str] = {} 4672 _query_params: List[Tuple[str, str]] = [] 4673 _header_params: Dict[str, Optional[str]] = _headers or {} 4674 _form_params: List[Tuple[str, str]] = [] 4675 _files: Dict[str, str] = {} 4676 _body_params: Optional[bytes] = None 4677 4678 # process the path parameters 4679 if id is not None: 4680 _path_params["id"] = id 4681 # process the query parameters 4682 if attributes is not None: 4683 4684 _query_params.append(("attributes", attributes)) 4685 4686 # process the header parameters 4687 # process the form parameters 4688 # process the body parameter 4689 if patch_group_resource is not None: 4690 _body_params = patch_group_resource 4691 4692 # set the HTTP header `Accept` 4693 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 4694 4695 # set the HTTP header `Content-Type` 4696 if _content_type: 4697 _header_params["Content-Type"] = _content_type 4698 else: 4699 _default_content_type = self.api_client.select_header_content_type( 4700 ["application/scim+json", "application/json"] 4701 ) 4702 if _default_content_type is not None: 4703 _header_params["Content-Type"] = _default_content_type 4704 4705 # authentication setting 4706 _auth_settings: List[str] = [] 4707 4708 return self.api_client.param_serialize( 4709 method="PATCH", 4710 resource_path="/Groups/{id}", 4711 path_params=_path_params, 4712 query_params=_query_params, 4713 header_params=_header_params, 4714 body=_body_params, 4715 post_params=_form_params, 4716 files=_files, 4717 auth_settings=_auth_settings, 4718 collection_formats=_collection_formats, 4719 _host=_host, 4720 _request_auth=_request_auth, 4721 ) 4722 4723 @validate_call 4724 def create_case( 4725 self, 4726 org_id: Annotated[ 4727 str, Field(strict=True, description="The ID of the organization in which you want to create a new case.") 4728 ], 4729 case_request: CaseRequest, 4730 _request_timeout: Union[ 4731 None, 4732 Annotated[StrictFloat, Field(gt=0)], 4733 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4734 ] = None, 4735 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4736 _content_type: Optional[StrictStr] = None, 4737 _headers: Optional[Dict[StrictStr, Any]] = None, 4738 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4739 ) -> CaseResponse: 4740 """Create case 4741 4742 Creating a case for legal hold is the first critical step in the eDiscovery process when litigation or an investigation is anticipated. One of the purposes of creating a case is that it acts as a container that allows admins to group multiple legal holds under one case. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120022370962-Create-a-case\" target=_blank>Help Center page on creating a case</a>. <br><br>This API creates a new case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 4743 4744 :param org_id: The ID of the organization in which you want to create a new case. (required) 4745 :type org_id: str 4746 :param case_request: (required) 4747 :type case_request: CaseRequest 4748 :param _request_timeout: timeout setting for this request. If one 4749 number provided, it will be total request 4750 timeout. It can also be a pair (tuple) of 4751 (connection, read) timeouts. 4752 :type _request_timeout: int, tuple(int, int), optional 4753 :param _request_auth: set to override the auth_settings for an a single 4754 request; this effectively ignores the 4755 authentication in the spec for a single request. 4756 :type _request_auth: dict, optional 4757 :param _content_type: force content-type for the request. 4758 :type _content_type: str, Optional 4759 :param _headers: set to override the headers for a single 4760 request; this effectively ignores the headers 4761 in the spec for a single request. 4762 :type _headers: dict, optional 4763 :param _host_index: set to override the host_index for a single 4764 request; this effectively ignores the host_index 4765 in the spec for a single request. 4766 :type _host_index: int, optional 4767 :return: Returns the result object. 4768 """ # noqa: E501 4769 4770 _param = self._create_case_serialize( 4771 org_id=org_id, 4772 case_request=case_request, 4773 _request_auth=_request_auth, 4774 _content_type=_content_type, 4775 _headers=_headers, 4776 _host_index=_host_index, 4777 ) 4778 4779 _response_types_map: Dict[str, Optional[str]] = { 4780 "200": "CaseResponse", 4781 "400": None, 4782 "401": None, 4783 "403": None, 4784 "404": None, 4785 "429": None, 4786 } 4787 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4788 response_data.read() 4789 return self.api_client.response_deserialize( 4790 response_data=response_data, 4791 response_types_map=_response_types_map, 4792 ).data 4793 4794 def _create_case_serialize( 4795 self, 4796 org_id, 4797 case_request, 4798 _request_auth, 4799 _content_type, 4800 _headers, 4801 _host_index, 4802 ) -> RequestSerialized: 4803 4804 _host = None 4805 4806 _collection_formats: Dict[str, str] = {} 4807 4808 _path_params: Dict[str, str] = {} 4809 _query_params: List[Tuple[str, str]] = [] 4810 _header_params: Dict[str, Optional[str]] = _headers or {} 4811 _form_params: List[Tuple[str, str]] = [] 4812 _files: Dict[str, str] = {} 4813 _body_params: Optional[bytes] = None 4814 4815 # process the path parameters 4816 if org_id is not None: 4817 _path_params["org_id"] = org_id 4818 # process the query parameters 4819 # process the header parameters 4820 # process the form parameters 4821 # process the body parameter 4822 if case_request is not None: 4823 _body_params = case_request 4824 4825 # set the HTTP header `Accept` 4826 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4827 4828 # set the HTTP header `Content-Type` 4829 if _content_type: 4830 _header_params["Content-Type"] = _content_type 4831 else: 4832 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 4833 if _default_content_type is not None: 4834 _header_params["Content-Type"] = _default_content_type 4835 4836 # authentication setting 4837 _auth_settings: List[str] = [] 4838 4839 return self.api_client.param_serialize( 4840 method="POST", 4841 resource_path="/v2/orgs/{org_id}/cases", 4842 path_params=_path_params, 4843 query_params=_query_params, 4844 header_params=_header_params, 4845 body=_body_params, 4846 post_params=_form_params, 4847 files=_files, 4848 auth_settings=_auth_settings, 4849 collection_formats=_collection_formats, 4850 _host=_host, 4851 _request_auth=_request_auth, 4852 ) 4853 4854 @validate_call 4855 def create_legal_hold( 4856 self, 4857 org_id: Annotated[ 4858 str, 4859 Field(strict=True, description="The ID of the organization in which you want to create a new legal hold."), 4860 ], 4861 case_id: Annotated[ 4862 str, Field(strict=True, description="The ID of the case in which you want to create a new legal hold.") 4863 ], 4864 legal_hold_request: LegalHoldRequest, 4865 _request_timeout: Union[ 4866 None, 4867 Annotated[StrictFloat, Field(gt=0)], 4868 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4869 ] = None, 4870 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4871 _content_type: Optional[StrictStr] = None, 4872 _headers: Optional[Dict[StrictStr, Any]] = None, 4873 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4874 ) -> LegalHoldResponse: 4875 """Create legal hold 4876 4877 After creating a case it is possible to add one or multiple legal holds to the case. Creating a legal hold involves identifying the relevant users associated with a case and applying the hold to prevent permanent deletion of content that those users own, co-own, create, edit or access. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120471564946-Add-a-legal-hold-to-a-case\" target=_blank>Help Center page on adding a legal hold to a case</a>. <br><br>This API creates a new legal hold in a case for an organization. Newly created legal holds could take up to 24 hours to be processed.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 4878 4879 :param org_id: The ID of the organization in which you want to create a new legal hold. (required) 4880 :type org_id: str 4881 :param case_id: The ID of the case in which you want to create a new legal hold. (required) 4882 :type case_id: str 4883 :param legal_hold_request: (required) 4884 :type legal_hold_request: LegalHoldRequest 4885 :param _request_timeout: timeout setting for this request. If one 4886 number provided, it will be total request 4887 timeout. It can also be a pair (tuple) of 4888 (connection, read) timeouts. 4889 :type _request_timeout: int, tuple(int, int), optional 4890 :param _request_auth: set to override the auth_settings for an a single 4891 request; this effectively ignores the 4892 authentication in the spec for a single request. 4893 :type _request_auth: dict, optional 4894 :param _content_type: force content-type for the request. 4895 :type _content_type: str, Optional 4896 :param _headers: set to override the headers for a single 4897 request; this effectively ignores the headers 4898 in the spec for a single request. 4899 :type _headers: dict, optional 4900 :param _host_index: set to override the host_index for a single 4901 request; this effectively ignores the host_index 4902 in the spec for a single request. 4903 :type _host_index: int, optional 4904 :return: Returns the result object. 4905 """ # noqa: E501 4906 4907 _param = self._create_legal_hold_serialize( 4908 org_id=org_id, 4909 case_id=case_id, 4910 legal_hold_request=legal_hold_request, 4911 _request_auth=_request_auth, 4912 _content_type=_content_type, 4913 _headers=_headers, 4914 _host_index=_host_index, 4915 ) 4916 4917 _response_types_map: Dict[str, Optional[str]] = { 4918 "200": "LegalHoldResponse", 4919 "400": None, 4920 "401": None, 4921 "403": None, 4922 "404": None, 4923 "429": None, 4924 } 4925 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4926 response_data.read() 4927 return self.api_client.response_deserialize( 4928 response_data=response_data, 4929 response_types_map=_response_types_map, 4930 ).data 4931 4932 def _create_legal_hold_serialize( 4933 self, 4934 org_id, 4935 case_id, 4936 legal_hold_request, 4937 _request_auth, 4938 _content_type, 4939 _headers, 4940 _host_index, 4941 ) -> RequestSerialized: 4942 4943 _host = None 4944 4945 _collection_formats: Dict[str, str] = {} 4946 4947 _path_params: Dict[str, str] = {} 4948 _query_params: List[Tuple[str, str]] = [] 4949 _header_params: Dict[str, Optional[str]] = _headers or {} 4950 _form_params: List[Tuple[str, str]] = [] 4951 _files: Dict[str, str] = {} 4952 _body_params: Optional[bytes] = None 4953 4954 # process the path parameters 4955 if org_id is not None: 4956 _path_params["org_id"] = org_id 4957 if case_id is not None: 4958 _path_params["case_id"] = case_id 4959 # process the query parameters 4960 # process the header parameters 4961 # process the form parameters 4962 # process the body parameter 4963 if legal_hold_request is not None: 4964 _body_params = legal_hold_request 4965 4966 # set the HTTP header `Accept` 4967 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 4968 4969 # set the HTTP header `Content-Type` 4970 if _content_type: 4971 _header_params["Content-Type"] = _content_type 4972 else: 4973 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 4974 if _default_content_type is not None: 4975 _header_params["Content-Type"] = _default_content_type 4976 4977 # authentication setting 4978 _auth_settings: List[str] = [] 4979 4980 return self.api_client.param_serialize( 4981 method="POST", 4982 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds", 4983 path_params=_path_params, 4984 query_params=_query_params, 4985 header_params=_header_params, 4986 body=_body_params, 4987 post_params=_form_params, 4988 files=_files, 4989 auth_settings=_auth_settings, 4990 collection_formats=_collection_formats, 4991 _host=_host, 4992 _request_auth=_request_auth, 4993 ) 4994 4995 @validate_call 4996 def delete_case( 4997 self, 4998 org_id: Annotated[ 4999 str, Field(strict=True, description="The ID of the organization in which you want to close a case.") 5000 ], 5001 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to close.")], 5002 _request_timeout: Union[ 5003 None, 5004 Annotated[StrictFloat, Field(gt=0)], 5005 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5006 ] = None, 5007 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5008 _content_type: Optional[StrictStr] = None, 5009 _headers: Optional[Dict[StrictStr, Any]] = None, 5010 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5011 ) -> None: 5012 """Close case 5013 5014 Closing a case is the final stage in the eDiscovery process, marking the conclusion of a legal matter or investigation. You must ensure that all associated legal holds within the case are closed before closing the case. Closing a case will permanently delete it. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22138936297746-Close-a-case\" target=_blank>Help Center page on closing a case</a>. <br><br>This API closes a case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5015 5016 :param org_id: The ID of the organization in which you want to close a case. (required) 5017 :type org_id: str 5018 :param case_id: The ID of the case you want to close. (required) 5019 :type case_id: str 5020 :param _request_timeout: timeout setting for this request. If one 5021 number provided, it will be total request 5022 timeout. It can also be a pair (tuple) of 5023 (connection, read) timeouts. 5024 :type _request_timeout: int, tuple(int, int), optional 5025 :param _request_auth: set to override the auth_settings for an a single 5026 request; this effectively ignores the 5027 authentication in the spec for a single request. 5028 :type _request_auth: dict, optional 5029 :param _content_type: force content-type for the request. 5030 :type _content_type: str, Optional 5031 :param _headers: set to override the headers for a single 5032 request; this effectively ignores the headers 5033 in the spec for a single request. 5034 :type _headers: dict, optional 5035 :param _host_index: set to override the host_index for a single 5036 request; this effectively ignores the host_index 5037 in the spec for a single request. 5038 :type _host_index: int, optional 5039 :return: Returns the result object. 5040 """ # noqa: E501 5041 5042 _param = self._delete_case_serialize( 5043 org_id=org_id, 5044 case_id=case_id, 5045 _request_auth=_request_auth, 5046 _content_type=_content_type, 5047 _headers=_headers, 5048 _host_index=_host_index, 5049 ) 5050 5051 _response_types_map: Dict[str, Optional[str]] = { 5052 "204": None, 5053 "400": None, 5054 "401": None, 5055 "403": None, 5056 "404": None, 5057 "429": None, 5058 } 5059 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5060 response_data.read() 5061 return self.api_client.response_deserialize( 5062 response_data=response_data, 5063 response_types_map=_response_types_map, 5064 ).data 5065 5066 def _delete_case_serialize( 5067 self, 5068 org_id, 5069 case_id, 5070 _request_auth, 5071 _content_type, 5072 _headers, 5073 _host_index, 5074 ) -> RequestSerialized: 5075 5076 _host = None 5077 5078 _collection_formats: Dict[str, str] = {} 5079 5080 _path_params: Dict[str, str] = {} 5081 _query_params: List[Tuple[str, str]] = [] 5082 _header_params: Dict[str, Optional[str]] = _headers or {} 5083 _form_params: List[Tuple[str, str]] = [] 5084 _files: Dict[str, str] = {} 5085 _body_params: Optional[bytes] = None 5086 5087 # process the path parameters 5088 if org_id is not None: 5089 _path_params["org_id"] = org_id 5090 if case_id is not None: 5091 _path_params["case_id"] = case_id 5092 # process the query parameters 5093 # process the header parameters 5094 # process the form parameters 5095 # process the body parameter 5096 5097 # authentication setting 5098 _auth_settings: List[str] = [] 5099 5100 return self.api_client.param_serialize( 5101 method="DELETE", 5102 resource_path="/v2/orgs/{org_id}/cases/{case_id}", 5103 path_params=_path_params, 5104 query_params=_query_params, 5105 header_params=_header_params, 5106 body=_body_params, 5107 post_params=_form_params, 5108 files=_files, 5109 auth_settings=_auth_settings, 5110 collection_formats=_collection_formats, 5111 _host=_host, 5112 _request_auth=_request_auth, 5113 ) 5114 5115 @validate_call 5116 def delete_legal_hold( 5117 self, 5118 org_id: Annotated[ 5119 str, Field(strict=True, description="The ID of the organization in which you want to close a legal hold.") 5120 ], 5121 case_id: Annotated[ 5122 str, Field(strict=True, description="The ID of the case in which you want to close a legal hold.") 5123 ], 5124 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to close.")], 5125 _request_timeout: Union[ 5126 None, 5127 Annotated[StrictFloat, Field(gt=0)], 5128 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5129 ] = None, 5130 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5131 _content_type: Optional[StrictStr] = None, 5132 _headers: Optional[Dict[StrictStr, Any]] = None, 5133 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5134 ) -> None: 5135 """Close legal hold 5136 5137 Closing a legal hold is one of the final steps in the eDiscovery process once the litigation or investigation has concluded. This process involves releasing the Miro boards and custodians that were under legal hold, allowing the preserved boards to return to normal operations. Closing a legal hold will permanently delete it. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/21922521629330-Close-a-legal-hold\" target=_blank>Help Center page on closing a legal hold</a>. <br><br>This API closes a legal hold in a case for an organization. Once a legal hold is closed, it can take up to 24 hours to release the content items from the legal hold. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5138 5139 :param org_id: The ID of the organization in which you want to close a legal hold. (required) 5140 :type org_id: str 5141 :param case_id: The ID of the case in which you want to close a legal hold. (required) 5142 :type case_id: str 5143 :param legal_hold_id: The ID of the legal hold you want to close. (required) 5144 :type legal_hold_id: str 5145 :param _request_timeout: timeout setting for this request. If one 5146 number provided, it will be total request 5147 timeout. It can also be a pair (tuple) of 5148 (connection, read) timeouts. 5149 :type _request_timeout: int, tuple(int, int), optional 5150 :param _request_auth: set to override the auth_settings for an a single 5151 request; this effectively ignores the 5152 authentication in the spec for a single request. 5153 :type _request_auth: dict, optional 5154 :param _content_type: force content-type for the request. 5155 :type _content_type: str, Optional 5156 :param _headers: set to override the headers for a single 5157 request; this effectively ignores the headers 5158 in the spec for a single request. 5159 :type _headers: dict, optional 5160 :param _host_index: set to override the host_index for a single 5161 request; this effectively ignores the host_index 5162 in the spec for a single request. 5163 :type _host_index: int, optional 5164 :return: Returns the result object. 5165 """ # noqa: E501 5166 5167 _param = self._delete_legal_hold_serialize( 5168 org_id=org_id, 5169 case_id=case_id, 5170 legal_hold_id=legal_hold_id, 5171 _request_auth=_request_auth, 5172 _content_type=_content_type, 5173 _headers=_headers, 5174 _host_index=_host_index, 5175 ) 5176 5177 _response_types_map: Dict[str, Optional[str]] = { 5178 "204": None, 5179 "400": None, 5180 "401": None, 5181 "403": None, 5182 "404": None, 5183 "429": None, 5184 } 5185 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5186 response_data.read() 5187 return self.api_client.response_deserialize( 5188 response_data=response_data, 5189 response_types_map=_response_types_map, 5190 ).data 5191 5192 def _delete_legal_hold_serialize( 5193 self, 5194 org_id, 5195 case_id, 5196 legal_hold_id, 5197 _request_auth, 5198 _content_type, 5199 _headers, 5200 _host_index, 5201 ) -> RequestSerialized: 5202 5203 _host = None 5204 5205 _collection_formats: Dict[str, str] = {} 5206 5207 _path_params: Dict[str, str] = {} 5208 _query_params: List[Tuple[str, str]] = [] 5209 _header_params: Dict[str, Optional[str]] = _headers or {} 5210 _form_params: List[Tuple[str, str]] = [] 5211 _files: Dict[str, str] = {} 5212 _body_params: Optional[bytes] = None 5213 5214 # process the path parameters 5215 if org_id is not None: 5216 _path_params["org_id"] = org_id 5217 if case_id is not None: 5218 _path_params["case_id"] = case_id 5219 if legal_hold_id is not None: 5220 _path_params["legal_hold_id"] = legal_hold_id 5221 # process the query parameters 5222 # process the header parameters 5223 # process the form parameters 5224 # process the body parameter 5225 5226 # authentication setting 5227 _auth_settings: List[str] = [] 5228 5229 return self.api_client.param_serialize( 5230 method="DELETE", 5231 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}", 5232 path_params=_path_params, 5233 query_params=_query_params, 5234 header_params=_header_params, 5235 body=_body_params, 5236 post_params=_form_params, 5237 files=_files, 5238 auth_settings=_auth_settings, 5239 collection_formats=_collection_formats, 5240 _host=_host, 5241 _request_auth=_request_auth, 5242 ) 5243 5244 @validate_call 5245 def edit_case( 5246 self, 5247 org_id: Annotated[ 5248 str, 5249 Field( 5250 strict=True, description="The ID of the organization for which you want to edit the case information." 5251 ), 5252 ], 5253 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to edit.")], 5254 case_request: CaseRequest, 5255 _request_timeout: Union[ 5256 None, 5257 Annotated[StrictFloat, Field(gt=0)], 5258 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5259 ] = None, 5260 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5261 _content_type: Optional[StrictStr] = None, 5262 _headers: Optional[Dict[StrictStr, Any]] = None, 5263 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5264 ) -> CaseResponse: 5265 """Edit case 5266 5267 Editing a case allows eDiscovery Admins to keep case details accurate and aligned with the evolving scope of a legal matter. As investigations progress, it may be necessary to update the case name or description to reflect changes in focus, terminology, or internal documentation standards. Since a case serves as the central container for one or more legal holds, keeping its information up to date helps ensure clarity, consistency, and easier navigation for all stakeholders involved in the legal process.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5268 5269 :param org_id: The ID of the organization for which you want to edit the case information. (required) 5270 :type org_id: str 5271 :param case_id: The ID of the case you want to edit. (required) 5272 :type case_id: str 5273 :param case_request: (required) 5274 :type case_request: CaseRequest 5275 :param _request_timeout: timeout setting for this request. If one 5276 number provided, it will be total request 5277 timeout. It can also be a pair (tuple) of 5278 (connection, read) timeouts. 5279 :type _request_timeout: int, tuple(int, int), optional 5280 :param _request_auth: set to override the auth_settings for an a single 5281 request; this effectively ignores the 5282 authentication in the spec for a single request. 5283 :type _request_auth: dict, optional 5284 :param _content_type: force content-type for the request. 5285 :type _content_type: str, Optional 5286 :param _headers: set to override the headers for a single 5287 request; this effectively ignores the headers 5288 in the spec for a single request. 5289 :type _headers: dict, optional 5290 :param _host_index: set to override the host_index for a single 5291 request; this effectively ignores the host_index 5292 in the spec for a single request. 5293 :type _host_index: int, optional 5294 :return: Returns the result object. 5295 """ # noqa: E501 5296 5297 _param = self._edit_case_serialize( 5298 org_id=org_id, 5299 case_id=case_id, 5300 case_request=case_request, 5301 _request_auth=_request_auth, 5302 _content_type=_content_type, 5303 _headers=_headers, 5304 _host_index=_host_index, 5305 ) 5306 5307 _response_types_map: Dict[str, Optional[str]] = { 5308 "200": "CaseResponse", 5309 "400": None, 5310 "401": None, 5311 "403": None, 5312 "404": None, 5313 "429": None, 5314 } 5315 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5316 response_data.read() 5317 return self.api_client.response_deserialize( 5318 response_data=response_data, 5319 response_types_map=_response_types_map, 5320 ).data 5321 5322 def _edit_case_serialize( 5323 self, 5324 org_id, 5325 case_id, 5326 case_request, 5327 _request_auth, 5328 _content_type, 5329 _headers, 5330 _host_index, 5331 ) -> RequestSerialized: 5332 5333 _host = None 5334 5335 _collection_formats: Dict[str, str] = {} 5336 5337 _path_params: Dict[str, str] = {} 5338 _query_params: List[Tuple[str, str]] = [] 5339 _header_params: Dict[str, Optional[str]] = _headers or {} 5340 _form_params: List[Tuple[str, str]] = [] 5341 _files: Dict[str, str] = {} 5342 _body_params: Optional[bytes] = None 5343 5344 # process the path parameters 5345 if org_id is not None: 5346 _path_params["org_id"] = org_id 5347 if case_id is not None: 5348 _path_params["case_id"] = case_id 5349 # process the query parameters 5350 # process the header parameters 5351 # process the form parameters 5352 # process the body parameter 5353 if case_request is not None: 5354 _body_params = case_request 5355 5356 # set the HTTP header `Accept` 5357 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5358 5359 # set the HTTP header `Content-Type` 5360 if _content_type: 5361 _header_params["Content-Type"] = _content_type 5362 else: 5363 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 5364 if _default_content_type is not None: 5365 _header_params["Content-Type"] = _default_content_type 5366 5367 # authentication setting 5368 _auth_settings: List[str] = [] 5369 5370 return self.api_client.param_serialize( 5371 method="PUT", 5372 resource_path="/v2/orgs/{org_id}/cases/{case_id}", 5373 path_params=_path_params, 5374 query_params=_query_params, 5375 header_params=_header_params, 5376 body=_body_params, 5377 post_params=_form_params, 5378 files=_files, 5379 auth_settings=_auth_settings, 5380 collection_formats=_collection_formats, 5381 _host=_host, 5382 _request_auth=_request_auth, 5383 ) 5384 5385 @validate_call 5386 def edit_legal_hold( 5387 self, 5388 org_id: Annotated[ 5389 str, 5390 Field( 5391 strict=True, 5392 description="The ID of the organization for which you want to edit the legal hold information.", 5393 ), 5394 ], 5395 case_id: Annotated[ 5396 str, 5397 Field(strict=True, description="The ID of the case for which you want to edit the legal hold information."), 5398 ], 5399 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to edit.")], 5400 legal_hold_request: LegalHoldRequest, 5401 _request_timeout: Union[ 5402 None, 5403 Annotated[StrictFloat, Field(gt=0)], 5404 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5405 ] = None, 5406 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5407 _content_type: Optional[StrictStr] = None, 5408 _headers: Optional[Dict[StrictStr, Any]] = None, 5409 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5410 ) -> LegalHoldResponse: 5411 """Edit legal hold 5412 5413 Editing a legal hold allows eDiscovery Admins to adjust and refine ongoing legal preservation efforts as case requirements evolve. Whether new custodians are identified, additional Miro boards become relevant, or existing boards or users are no longer in scope, editing a legal hold ensures that the correct data remains preserved and defensible throughout the legal process. Admins can update the legal hold’s name or description and add or remove users and boards as needed. This flexibility supports dynamic legal workflows and ensures that preservation stays precise, up to date, and aligned with the scope of the legal matter—maintaining compliance while avoiding unnecessary data retention.<br/><br/>When a legal hold is edited, boards newly added to the hold will begin having their versions preserved from that point forward, boards or users removed from the hold will stop being preserved, and their versions will no longer be preserved as part of that legal hold, boards that remain under hold will continue to have all versions preserved, including any deletions that occur after the hold was applied. This approach ensures organizations can respond to legal demands with accuracy and accountability as a case evolves.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5414 5415 :param org_id: The ID of the organization for which you want to edit the legal hold information. (required) 5416 :type org_id: str 5417 :param case_id: The ID of the case for which you want to edit the legal hold information. (required) 5418 :type case_id: str 5419 :param legal_hold_id: The ID of the legal hold you want to edit. (required) 5420 :type legal_hold_id: str 5421 :param legal_hold_request: (required) 5422 :type legal_hold_request: LegalHoldRequest 5423 :param _request_timeout: timeout setting for this request. If one 5424 number provided, it will be total request 5425 timeout. It can also be a pair (tuple) of 5426 (connection, read) timeouts. 5427 :type _request_timeout: int, tuple(int, int), optional 5428 :param _request_auth: set to override the auth_settings for an a single 5429 request; this effectively ignores the 5430 authentication in the spec for a single request. 5431 :type _request_auth: dict, optional 5432 :param _content_type: force content-type for the request. 5433 :type _content_type: str, Optional 5434 :param _headers: set to override the headers for a single 5435 request; this effectively ignores the headers 5436 in the spec for a single request. 5437 :type _headers: dict, optional 5438 :param _host_index: set to override the host_index for a single 5439 request; this effectively ignores the host_index 5440 in the spec for a single request. 5441 :type _host_index: int, optional 5442 :return: Returns the result object. 5443 """ # noqa: E501 5444 5445 _param = self._edit_legal_hold_serialize( 5446 org_id=org_id, 5447 case_id=case_id, 5448 legal_hold_id=legal_hold_id, 5449 legal_hold_request=legal_hold_request, 5450 _request_auth=_request_auth, 5451 _content_type=_content_type, 5452 _headers=_headers, 5453 _host_index=_host_index, 5454 ) 5455 5456 _response_types_map: Dict[str, Optional[str]] = { 5457 "200": "LegalHoldResponse", 5458 "400": None, 5459 "401": None, 5460 "403": None, 5461 "404": None, 5462 "429": None, 5463 } 5464 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5465 response_data.read() 5466 return self.api_client.response_deserialize( 5467 response_data=response_data, 5468 response_types_map=_response_types_map, 5469 ).data 5470 5471 def _edit_legal_hold_serialize( 5472 self, 5473 org_id, 5474 case_id, 5475 legal_hold_id, 5476 legal_hold_request, 5477 _request_auth, 5478 _content_type, 5479 _headers, 5480 _host_index, 5481 ) -> RequestSerialized: 5482 5483 _host = None 5484 5485 _collection_formats: Dict[str, str] = {} 5486 5487 _path_params: Dict[str, str] = {} 5488 _query_params: List[Tuple[str, str]] = [] 5489 _header_params: Dict[str, Optional[str]] = _headers or {} 5490 _form_params: List[Tuple[str, str]] = [] 5491 _files: Dict[str, str] = {} 5492 _body_params: Optional[bytes] = None 5493 5494 # process the path parameters 5495 if org_id is not None: 5496 _path_params["org_id"] = org_id 5497 if case_id is not None: 5498 _path_params["case_id"] = case_id 5499 if legal_hold_id is not None: 5500 _path_params["legal_hold_id"] = legal_hold_id 5501 # process the query parameters 5502 # process the header parameters 5503 # process the form parameters 5504 # process the body parameter 5505 if legal_hold_request is not None: 5506 _body_params = legal_hold_request 5507 5508 # set the HTTP header `Accept` 5509 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5510 5511 # set the HTTP header `Content-Type` 5512 if _content_type: 5513 _header_params["Content-Type"] = _content_type 5514 else: 5515 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 5516 if _default_content_type is not None: 5517 _header_params["Content-Type"] = _default_content_type 5518 5519 # authentication setting 5520 _auth_settings: List[str] = [] 5521 5522 return self.api_client.param_serialize( 5523 method="PUT", 5524 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}", 5525 path_params=_path_params, 5526 query_params=_query_params, 5527 header_params=_header_params, 5528 body=_body_params, 5529 post_params=_form_params, 5530 files=_files, 5531 auth_settings=_auth_settings, 5532 collection_formats=_collection_formats, 5533 _host=_host, 5534 _request_auth=_request_auth, 5535 ) 5536 5537 @validate_call 5538 def get_all_cases( 5539 self, 5540 org_id: Annotated[ 5541 str, 5542 Field( 5543 strict=True, description="The ID of the organization for which you want to retrieve the list of cases." 5544 ), 5545 ], 5546 limit: Annotated[ 5547 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 5548 Field(description="The maximum number of items in the result list."), 5549 ] = None, 5550 cursor: Annotated[ 5551 Optional[StrictStr], 5552 Field( 5553 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 5554 ), 5555 ] = None, 5556 _request_timeout: Union[ 5557 None, 5558 Annotated[StrictFloat, Field(gt=0)], 5559 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5560 ] = None, 5561 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5562 _content_type: Optional[StrictStr] = None, 5563 _headers: Optional[Dict[StrictStr, Any]] = None, 5564 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5565 ) -> PaginatedCaseResponse: 5566 """Get all cases 5567 5568 Retrieves the list of eDiscovery cases in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5569 5570 :param org_id: The ID of the organization for which you want to retrieve the list of cases. (required) 5571 :type org_id: str 5572 :param limit: The maximum number of items in the result list. 5573 :type limit: int 5574 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 5575 :type cursor: str 5576 :param _request_timeout: timeout setting for this request. If one 5577 number provided, it will be total request 5578 timeout. It can also be a pair (tuple) of 5579 (connection, read) timeouts. 5580 :type _request_timeout: int, tuple(int, int), optional 5581 :param _request_auth: set to override the auth_settings for an a single 5582 request; this effectively ignores the 5583 authentication in the spec for a single request. 5584 :type _request_auth: dict, optional 5585 :param _content_type: force content-type for the request. 5586 :type _content_type: str, Optional 5587 :param _headers: set to override the headers for a single 5588 request; this effectively ignores the headers 5589 in the spec for a single request. 5590 :type _headers: dict, optional 5591 :param _host_index: set to override the host_index for a single 5592 request; this effectively ignores the host_index 5593 in the spec for a single request. 5594 :type _host_index: int, optional 5595 :return: Returns the result object. 5596 """ # noqa: E501 5597 5598 _param = self._get_all_cases_serialize( 5599 org_id=org_id, 5600 limit=limit, 5601 cursor=cursor, 5602 _request_auth=_request_auth, 5603 _content_type=_content_type, 5604 _headers=_headers, 5605 _host_index=_host_index, 5606 ) 5607 5608 _response_types_map: Dict[str, Optional[str]] = { 5609 "200": "PaginatedCaseResponse", 5610 "400": None, 5611 "401": None, 5612 "403": None, 5613 "404": None, 5614 "429": None, 5615 } 5616 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5617 response_data.read() 5618 return self.api_client.response_deserialize( 5619 response_data=response_data, 5620 response_types_map=_response_types_map, 5621 ).data 5622 5623 def _get_all_cases_serialize( 5624 self, 5625 org_id, 5626 limit, 5627 cursor, 5628 _request_auth, 5629 _content_type, 5630 _headers, 5631 _host_index, 5632 ) -> RequestSerialized: 5633 5634 _host = None 5635 5636 _collection_formats: Dict[str, str] = {} 5637 5638 _path_params: Dict[str, str] = {} 5639 _query_params: List[Tuple[str, str]] = [] 5640 _header_params: Dict[str, Optional[str]] = _headers or {} 5641 _form_params: List[Tuple[str, str]] = [] 5642 _files: Dict[str, str] = {} 5643 _body_params: Optional[bytes] = None 5644 5645 # process the path parameters 5646 if org_id is not None: 5647 _path_params["org_id"] = org_id 5648 # process the query parameters 5649 if limit is not None: 5650 5651 _query_params.append(("limit", limit)) 5652 5653 if cursor is not None: 5654 5655 _query_params.append(("cursor", cursor)) 5656 5657 # process the header parameters 5658 # process the form parameters 5659 # process the body parameter 5660 5661 # set the HTTP header `Accept` 5662 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5663 5664 # authentication setting 5665 _auth_settings: List[str] = [] 5666 5667 return self.api_client.param_serialize( 5668 method="GET", 5669 resource_path="/v2/orgs/{org_id}/cases", 5670 path_params=_path_params, 5671 query_params=_query_params, 5672 header_params=_header_params, 5673 body=_body_params, 5674 post_params=_form_params, 5675 files=_files, 5676 auth_settings=_auth_settings, 5677 collection_formats=_collection_formats, 5678 _host=_host, 5679 _request_auth=_request_auth, 5680 ) 5681 5682 @validate_call 5683 def get_all_legal_holds( 5684 self, 5685 org_id: Annotated[ 5686 str, 5687 Field( 5688 strict=True, 5689 description="The ID of the organization for which you want to retrieve the list of legal holds within a case.", 5690 ), 5691 ], 5692 case_id: Annotated[ 5693 str, 5694 Field( 5695 strict=True, description="The ID of the case for which you want to retrieve the list of legal holds." 5696 ), 5697 ], 5698 limit: Annotated[ 5699 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 5700 Field(description="The maximum number of items in the result list."), 5701 ] = None, 5702 cursor: Annotated[ 5703 Optional[StrictStr], 5704 Field( 5705 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 5706 ), 5707 ] = None, 5708 _request_timeout: Union[ 5709 None, 5710 Annotated[StrictFloat, Field(gt=0)], 5711 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5712 ] = None, 5713 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5714 _content_type: Optional[StrictStr] = None, 5715 _headers: Optional[Dict[StrictStr, Any]] = None, 5716 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5717 ) -> PaginatedLegalHoldResponse: 5718 """Get all legal holds within a case 5719 5720 Retrieves the list of all legal holds within a case for an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5721 5722 :param org_id: The ID of the organization for which you want to retrieve the list of legal holds within a case. (required) 5723 :type org_id: str 5724 :param case_id: The ID of the case for which you want to retrieve the list of legal holds. (required) 5725 :type case_id: str 5726 :param limit: The maximum number of items in the result list. 5727 :type limit: int 5728 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 5729 :type cursor: str 5730 :param _request_timeout: timeout setting for this request. If one 5731 number provided, it will be total request 5732 timeout. It can also be a pair (tuple) of 5733 (connection, read) timeouts. 5734 :type _request_timeout: int, tuple(int, int), optional 5735 :param _request_auth: set to override the auth_settings for an a single 5736 request; this effectively ignores the 5737 authentication in the spec for a single request. 5738 :type _request_auth: dict, optional 5739 :param _content_type: force content-type for the request. 5740 :type _content_type: str, Optional 5741 :param _headers: set to override the headers for a single 5742 request; this effectively ignores the headers 5743 in the spec for a single request. 5744 :type _headers: dict, optional 5745 :param _host_index: set to override the host_index for a single 5746 request; this effectively ignores the host_index 5747 in the spec for a single request. 5748 :type _host_index: int, optional 5749 :return: Returns the result object. 5750 """ # noqa: E501 5751 5752 _param = self._get_all_legal_holds_serialize( 5753 org_id=org_id, 5754 case_id=case_id, 5755 limit=limit, 5756 cursor=cursor, 5757 _request_auth=_request_auth, 5758 _content_type=_content_type, 5759 _headers=_headers, 5760 _host_index=_host_index, 5761 ) 5762 5763 _response_types_map: Dict[str, Optional[str]] = { 5764 "200": "PaginatedLegalHoldResponse", 5765 "400": None, 5766 "401": None, 5767 "403": None, 5768 "404": None, 5769 "429": None, 5770 } 5771 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5772 response_data.read() 5773 return self.api_client.response_deserialize( 5774 response_data=response_data, 5775 response_types_map=_response_types_map, 5776 ).data 5777 5778 def _get_all_legal_holds_serialize( 5779 self, 5780 org_id, 5781 case_id, 5782 limit, 5783 cursor, 5784 _request_auth, 5785 _content_type, 5786 _headers, 5787 _host_index, 5788 ) -> RequestSerialized: 5789 5790 _host = None 5791 5792 _collection_formats: Dict[str, str] = {} 5793 5794 _path_params: Dict[str, str] = {} 5795 _query_params: List[Tuple[str, str]] = [] 5796 _header_params: Dict[str, Optional[str]] = _headers or {} 5797 _form_params: List[Tuple[str, str]] = [] 5798 _files: Dict[str, str] = {} 5799 _body_params: Optional[bytes] = None 5800 5801 # process the path parameters 5802 if org_id is not None: 5803 _path_params["org_id"] = org_id 5804 if case_id is not None: 5805 _path_params["case_id"] = case_id 5806 # process the query parameters 5807 if limit is not None: 5808 5809 _query_params.append(("limit", limit)) 5810 5811 if cursor is not None: 5812 5813 _query_params.append(("cursor", cursor)) 5814 5815 # process the header parameters 5816 # process the form parameters 5817 # process the body parameter 5818 5819 # set the HTTP header `Accept` 5820 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5821 5822 # authentication setting 5823 _auth_settings: List[str] = [] 5824 5825 return self.api_client.param_serialize( 5826 method="GET", 5827 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds", 5828 path_params=_path_params, 5829 query_params=_query_params, 5830 header_params=_header_params, 5831 body=_body_params, 5832 post_params=_form_params, 5833 files=_files, 5834 auth_settings=_auth_settings, 5835 collection_formats=_collection_formats, 5836 _host=_host, 5837 _request_auth=_request_auth, 5838 ) 5839 5840 @validate_call 5841 def get_case( 5842 self, 5843 org_id: Annotated[ 5844 str, 5845 Field( 5846 strict=True, 5847 description="The ID of the organization for which you want to retrieve the case information.", 5848 ), 5849 ], 5850 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to retrieve.")], 5851 _request_timeout: Union[ 5852 None, 5853 Annotated[StrictFloat, Field(gt=0)], 5854 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5855 ] = None, 5856 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5857 _content_type: Optional[StrictStr] = None, 5858 _headers: Optional[Dict[StrictStr, Any]] = None, 5859 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5860 ) -> CaseResponse: 5861 """Get case 5862 5863 Retrieves information about a case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5864 5865 :param org_id: The ID of the organization for which you want to retrieve the case information. (required) 5866 :type org_id: str 5867 :param case_id: The ID of the case you want to retrieve. (required) 5868 :type case_id: str 5869 :param _request_timeout: timeout setting for this request. If one 5870 number provided, it will be total request 5871 timeout. It can also be a pair (tuple) of 5872 (connection, read) timeouts. 5873 :type _request_timeout: int, tuple(int, int), optional 5874 :param _request_auth: set to override the auth_settings for an a single 5875 request; this effectively ignores the 5876 authentication in the spec for a single request. 5877 :type _request_auth: dict, optional 5878 :param _content_type: force content-type for the request. 5879 :type _content_type: str, Optional 5880 :param _headers: set to override the headers for a single 5881 request; this effectively ignores the headers 5882 in the spec for a single request. 5883 :type _headers: dict, optional 5884 :param _host_index: set to override the host_index for a single 5885 request; this effectively ignores the host_index 5886 in the spec for a single request. 5887 :type _host_index: int, optional 5888 :return: Returns the result object. 5889 """ # noqa: E501 5890 5891 _param = self._get_case_serialize( 5892 org_id=org_id, 5893 case_id=case_id, 5894 _request_auth=_request_auth, 5895 _content_type=_content_type, 5896 _headers=_headers, 5897 _host_index=_host_index, 5898 ) 5899 5900 _response_types_map: Dict[str, Optional[str]] = { 5901 "200": "CaseResponse", 5902 "400": None, 5903 "401": None, 5904 "403": None, 5905 "404": None, 5906 "429": None, 5907 } 5908 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5909 response_data.read() 5910 return self.api_client.response_deserialize( 5911 response_data=response_data, 5912 response_types_map=_response_types_map, 5913 ).data 5914 5915 def _get_case_serialize( 5916 self, 5917 org_id, 5918 case_id, 5919 _request_auth, 5920 _content_type, 5921 _headers, 5922 _host_index, 5923 ) -> RequestSerialized: 5924 5925 _host = None 5926 5927 _collection_formats: Dict[str, str] = {} 5928 5929 _path_params: Dict[str, str] = {} 5930 _query_params: List[Tuple[str, str]] = [] 5931 _header_params: Dict[str, Optional[str]] = _headers or {} 5932 _form_params: List[Tuple[str, str]] = [] 5933 _files: Dict[str, str] = {} 5934 _body_params: Optional[bytes] = None 5935 5936 # process the path parameters 5937 if org_id is not None: 5938 _path_params["org_id"] = org_id 5939 if case_id is not None: 5940 _path_params["case_id"] = case_id 5941 # process the query parameters 5942 # process the header parameters 5943 # process the form parameters 5944 # process the body parameter 5945 5946 # set the HTTP header `Accept` 5947 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 5948 5949 # authentication setting 5950 _auth_settings: List[str] = [] 5951 5952 return self.api_client.param_serialize( 5953 method="GET", 5954 resource_path="/v2/orgs/{org_id}/cases/{case_id}", 5955 path_params=_path_params, 5956 query_params=_query_params, 5957 header_params=_header_params, 5958 body=_body_params, 5959 post_params=_form_params, 5960 files=_files, 5961 auth_settings=_auth_settings, 5962 collection_formats=_collection_formats, 5963 _host=_host, 5964 _request_auth=_request_auth, 5965 ) 5966 5967 @validate_call 5968 def get_legal_hold( 5969 self, 5970 org_id: Annotated[ 5971 str, 5972 Field( 5973 strict=True, 5974 description="The ID of the organization for which you want to retrieve the legal hold information.", 5975 ), 5976 ], 5977 case_id: Annotated[ 5978 str, 5979 Field( 5980 strict=True, description="The ID of the case for which you want to retrieve the legal hold information." 5981 ), 5982 ], 5983 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to retrieve.")], 5984 _request_timeout: Union[ 5985 None, 5986 Annotated[StrictFloat, Field(gt=0)], 5987 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5988 ] = None, 5989 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5990 _content_type: Optional[StrictStr] = None, 5991 _headers: Optional[Dict[StrictStr, Any]] = None, 5992 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5993 ) -> LegalHoldResponse: 5994 """Get legal hold information 5995 5996 Retrieves information about a legal hold within a case for an organization. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5997 5998 :param org_id: The ID of the organization for which you want to retrieve the legal hold information. (required) 5999 :type org_id: str 6000 :param case_id: The ID of the case for which you want to retrieve the legal hold information. (required) 6001 :type case_id: str 6002 :param legal_hold_id: The ID of the legal hold you want to retrieve. (required) 6003 :type legal_hold_id: str 6004 :param _request_timeout: timeout setting for this request. If one 6005 number provided, it will be total request 6006 timeout. It can also be a pair (tuple) of 6007 (connection, read) timeouts. 6008 :type _request_timeout: int, tuple(int, int), optional 6009 :param _request_auth: set to override the auth_settings for an a single 6010 request; this effectively ignores the 6011 authentication in the spec for a single request. 6012 :type _request_auth: dict, optional 6013 :param _content_type: force content-type for the request. 6014 :type _content_type: str, Optional 6015 :param _headers: set to override the headers for a single 6016 request; this effectively ignores the headers 6017 in the spec for a single request. 6018 :type _headers: dict, optional 6019 :param _host_index: set to override the host_index for a single 6020 request; this effectively ignores the host_index 6021 in the spec for a single request. 6022 :type _host_index: int, optional 6023 :return: Returns the result object. 6024 """ # noqa: E501 6025 6026 _param = self._get_legal_hold_serialize( 6027 org_id=org_id, 6028 case_id=case_id, 6029 legal_hold_id=legal_hold_id, 6030 _request_auth=_request_auth, 6031 _content_type=_content_type, 6032 _headers=_headers, 6033 _host_index=_host_index, 6034 ) 6035 6036 _response_types_map: Dict[str, Optional[str]] = { 6037 "200": "LegalHoldResponse", 6038 "400": None, 6039 "401": None, 6040 "403": None, 6041 "404": None, 6042 "429": None, 6043 } 6044 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6045 response_data.read() 6046 return self.api_client.response_deserialize( 6047 response_data=response_data, 6048 response_types_map=_response_types_map, 6049 ).data 6050 6051 def _get_legal_hold_serialize( 6052 self, 6053 org_id, 6054 case_id, 6055 legal_hold_id, 6056 _request_auth, 6057 _content_type, 6058 _headers, 6059 _host_index, 6060 ) -> RequestSerialized: 6061 6062 _host = None 6063 6064 _collection_formats: Dict[str, str] = {} 6065 6066 _path_params: Dict[str, str] = {} 6067 _query_params: List[Tuple[str, str]] = [] 6068 _header_params: Dict[str, Optional[str]] = _headers or {} 6069 _form_params: List[Tuple[str, str]] = [] 6070 _files: Dict[str, str] = {} 6071 _body_params: Optional[bytes] = None 6072 6073 # process the path parameters 6074 if org_id is not None: 6075 _path_params["org_id"] = org_id 6076 if case_id is not None: 6077 _path_params["case_id"] = case_id 6078 if legal_hold_id is not None: 6079 _path_params["legal_hold_id"] = legal_hold_id 6080 # process the query parameters 6081 # process the header parameters 6082 # process the form parameters 6083 # process the body parameter 6084 6085 # set the HTTP header `Accept` 6086 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6087 6088 # authentication setting 6089 _auth_settings: List[str] = [] 6090 6091 return self.api_client.param_serialize( 6092 method="GET", 6093 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}", 6094 path_params=_path_params, 6095 query_params=_query_params, 6096 header_params=_header_params, 6097 body=_body_params, 6098 post_params=_form_params, 6099 files=_files, 6100 auth_settings=_auth_settings, 6101 collection_formats=_collection_formats, 6102 _host=_host, 6103 _request_auth=_request_auth, 6104 ) 6105 6106 @validate_call 6107 def get_legal_hold_content_items( 6108 self, 6109 org_id: Annotated[ 6110 str, 6111 Field( 6112 strict=True, 6113 description="The ID of the organization for which you want to retrieve the list of content items under hold.", 6114 ), 6115 ], 6116 case_id: Annotated[ 6117 str, 6118 Field( 6119 strict=True, 6120 description="The ID of the case for which you want to retrieve the list of content items under hold.", 6121 ), 6122 ], 6123 legal_hold_id: Annotated[ 6124 str, 6125 Field( 6126 strict=True, 6127 description="The ID of the legal hold for which you want to retrieve the list of content items under hold.", 6128 ), 6129 ], 6130 limit: Annotated[ 6131 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 6132 Field(description="The maximum number of items in the result list."), 6133 ] = None, 6134 cursor: Annotated[ 6135 Optional[StrictStr], 6136 Field( 6137 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 6138 ), 6139 ] = None, 6140 _request_timeout: Union[ 6141 None, 6142 Annotated[StrictFloat, Field(gt=0)], 6143 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6144 ] = None, 6145 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6146 _content_type: Optional[StrictStr] = None, 6147 _headers: Optional[Dict[StrictStr, Any]] = None, 6148 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6149 ) -> PaginatedLegalHoldContentItemsResponse: 6150 """Get content items under legal hold 6151 6152 Once a legal hold is in place you can review or explore the preserved Miro boards to ensure that all relevant data is intact and ready for legal proceedings or investigations. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120628583570-Review-boards-under-legal-hold\" target=_blank>Help Center page on reviewing boards under legal hold</a>. <br><br>This API lists all content items under a specific legal hold in a case for an organization. Please verify that the legal hold is in 'ACTIVE' state to guarantee that the legal hold has finished processing the full list of content items under hold. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 6153 6154 :param org_id: The ID of the organization for which you want to retrieve the list of content items under hold. (required) 6155 :type org_id: str 6156 :param case_id: The ID of the case for which you want to retrieve the list of content items under hold. (required) 6157 :type case_id: str 6158 :param legal_hold_id: The ID of the legal hold for which you want to retrieve the list of content items under hold. (required) 6159 :type legal_hold_id: str 6160 :param limit: The maximum number of items in the result list. 6161 :type limit: int 6162 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 6163 :type cursor: str 6164 :param _request_timeout: timeout setting for this request. If one 6165 number provided, it will be total request 6166 timeout. It can also be a pair (tuple) of 6167 (connection, read) timeouts. 6168 :type _request_timeout: int, tuple(int, int), optional 6169 :param _request_auth: set to override the auth_settings for an a single 6170 request; this effectively ignores the 6171 authentication in the spec for a single request. 6172 :type _request_auth: dict, optional 6173 :param _content_type: force content-type for the request. 6174 :type _content_type: str, Optional 6175 :param _headers: set to override the headers for a single 6176 request; this effectively ignores the headers 6177 in the spec for a single request. 6178 :type _headers: dict, optional 6179 :param _host_index: set to override the host_index for a single 6180 request; this effectively ignores the host_index 6181 in the spec for a single request. 6182 :type _host_index: int, optional 6183 :return: Returns the result object. 6184 """ # noqa: E501 6185 6186 _param = self._get_legal_hold_content_items_serialize( 6187 org_id=org_id, 6188 case_id=case_id, 6189 legal_hold_id=legal_hold_id, 6190 limit=limit, 6191 cursor=cursor, 6192 _request_auth=_request_auth, 6193 _content_type=_content_type, 6194 _headers=_headers, 6195 _host_index=_host_index, 6196 ) 6197 6198 _response_types_map: Dict[str, Optional[str]] = { 6199 "200": "PaginatedLegalHoldContentItemsResponse", 6200 "400": None, 6201 "401": None, 6202 "403": None, 6203 "404": None, 6204 "429": None, 6205 } 6206 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6207 response_data.read() 6208 return self.api_client.response_deserialize( 6209 response_data=response_data, 6210 response_types_map=_response_types_map, 6211 ).data 6212 6213 def _get_legal_hold_content_items_serialize( 6214 self, 6215 org_id, 6216 case_id, 6217 legal_hold_id, 6218 limit, 6219 cursor, 6220 _request_auth, 6221 _content_type, 6222 _headers, 6223 _host_index, 6224 ) -> RequestSerialized: 6225 6226 _host = None 6227 6228 _collection_formats: Dict[str, str] = {} 6229 6230 _path_params: Dict[str, str] = {} 6231 _query_params: List[Tuple[str, str]] = [] 6232 _header_params: Dict[str, Optional[str]] = _headers or {} 6233 _form_params: List[Tuple[str, str]] = [] 6234 _files: Dict[str, str] = {} 6235 _body_params: Optional[bytes] = None 6236 6237 # process the path parameters 6238 if org_id is not None: 6239 _path_params["org_id"] = org_id 6240 if case_id is not None: 6241 _path_params["case_id"] = case_id 6242 if legal_hold_id is not None: 6243 _path_params["legal_hold_id"] = legal_hold_id 6244 # process the query parameters 6245 if limit is not None: 6246 6247 _query_params.append(("limit", limit)) 6248 6249 if cursor is not None: 6250 6251 _query_params.append(("cursor", cursor)) 6252 6253 # process the header parameters 6254 # process the form parameters 6255 # process the body parameter 6256 6257 # set the HTTP header `Accept` 6258 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6259 6260 # authentication setting 6261 _auth_settings: List[str] = [] 6262 6263 return self.api_client.param_serialize( 6264 method="GET", 6265 resource_path="/v2/orgs/{org_id}/cases/{case_id}/legal-holds/{legal_hold_id}/content-items", 6266 path_params=_path_params, 6267 query_params=_query_params, 6268 header_params=_header_params, 6269 body=_body_params, 6270 post_params=_form_params, 6271 files=_files, 6272 auth_settings=_auth_settings, 6273 collection_formats=_collection_formats, 6274 _host=_host, 6275 _request_auth=_request_auth, 6276 ) 6277 6278 @validate_call 6279 def get_legal_hold_export_jobs( 6280 self, 6281 org_id: Annotated[ 6282 str, 6283 Field( 6284 strict=True, 6285 description="The ID of the organization for which you want to retrieve the list of export jobs within a case.", 6286 ), 6287 ], 6288 case_id: Annotated[ 6289 str, 6290 Field( 6291 strict=True, description="The ID of the case for which you want to retrieve the list of export jobs." 6292 ), 6293 ], 6294 limit: Annotated[ 6295 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 6296 Field(description="The maximum number of items in the result list."), 6297 ] = None, 6298 cursor: Annotated[ 6299 Optional[StrictStr], 6300 Field( 6301 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 6302 ), 6303 ] = None, 6304 _request_timeout: Union[ 6305 None, 6306 Annotated[StrictFloat, Field(gt=0)], 6307 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6308 ] = None, 6309 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6310 _content_type: Optional[StrictStr] = None, 6311 _headers: Optional[Dict[StrictStr, Any]] = None, 6312 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6313 ) -> PaginatedCaseExportJobsResponse: 6314 """Get board export jobs of a case 6315 6316 Retrieves board export jobs for a case.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 6317 6318 :param org_id: The ID of the organization for which you want to retrieve the list of export jobs within a case. (required) 6319 :type org_id: str 6320 :param case_id: The ID of the case for which you want to retrieve the list of export jobs. (required) 6321 :type case_id: str 6322 :param limit: The maximum number of items in the result list. 6323 :type limit: int 6324 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 6325 :type cursor: str 6326 :param _request_timeout: timeout setting for this request. If one 6327 number provided, it will be total request 6328 timeout. It can also be a pair (tuple) of 6329 (connection, read) timeouts. 6330 :type _request_timeout: int, tuple(int, int), optional 6331 :param _request_auth: set to override the auth_settings for an a single 6332 request; this effectively ignores the 6333 authentication in the spec for a single request. 6334 :type _request_auth: dict, optional 6335 :param _content_type: force content-type for the request. 6336 :type _content_type: str, Optional 6337 :param _headers: set to override the headers for a single 6338 request; this effectively ignores the headers 6339 in the spec for a single request. 6340 :type _headers: dict, optional 6341 :param _host_index: set to override the host_index for a single 6342 request; this effectively ignores the host_index 6343 in the spec for a single request. 6344 :type _host_index: int, optional 6345 :return: Returns the result object. 6346 """ # noqa: E501 6347 6348 _param = self._get_legal_hold_export_jobs_serialize( 6349 org_id=org_id, 6350 case_id=case_id, 6351 limit=limit, 6352 cursor=cursor, 6353 _request_auth=_request_auth, 6354 _content_type=_content_type, 6355 _headers=_headers, 6356 _host_index=_host_index, 6357 ) 6358 6359 _response_types_map: Dict[str, Optional[str]] = { 6360 "200": "PaginatedCaseExportJobsResponse", 6361 "400": None, 6362 "401": None, 6363 "403": None, 6364 "404": None, 6365 "429": None, 6366 } 6367 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6368 response_data.read() 6369 return self.api_client.response_deserialize( 6370 response_data=response_data, 6371 response_types_map=_response_types_map, 6372 ).data 6373 6374 def _get_legal_hold_export_jobs_serialize( 6375 self, 6376 org_id, 6377 case_id, 6378 limit, 6379 cursor, 6380 _request_auth, 6381 _content_type, 6382 _headers, 6383 _host_index, 6384 ) -> RequestSerialized: 6385 6386 _host = None 6387 6388 _collection_formats: Dict[str, str] = {} 6389 6390 _path_params: Dict[str, str] = {} 6391 _query_params: List[Tuple[str, str]] = [] 6392 _header_params: Dict[str, Optional[str]] = _headers or {} 6393 _form_params: List[Tuple[str, str]] = [] 6394 _files: Dict[str, str] = {} 6395 _body_params: Optional[bytes] = None 6396 6397 # process the path parameters 6398 if org_id is not None: 6399 _path_params["org_id"] = org_id 6400 if case_id is not None: 6401 _path_params["case_id"] = case_id 6402 # process the query parameters 6403 if limit is not None: 6404 6405 _query_params.append(("limit", limit)) 6406 6407 if cursor is not None: 6408 6409 _query_params.append(("cursor", cursor)) 6410 6411 # process the header parameters 6412 # process the form parameters 6413 # process the body parameter 6414 6415 # set the HTTP header `Accept` 6416 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6417 6418 # authentication setting 6419 _auth_settings: List[str] = [] 6420 6421 return self.api_client.param_serialize( 6422 method="GET", 6423 resource_path="/v2/orgs/{org_id}/cases/{case_id}/export-jobs", 6424 path_params=_path_params, 6425 query_params=_query_params, 6426 header_params=_header_params, 6427 body=_body_params, 6428 post_params=_form_params, 6429 files=_files, 6430 auth_settings=_auth_settings, 6431 collection_formats=_collection_formats, 6432 _host=_host, 6433 _request_auth=_request_auth, 6434 ) 6435 6436 @validate_call 6437 def create_mindmap_nodes_experimental( 6438 self, 6439 board_id: Annotated[ 6440 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 6441 ], 6442 mindmap_create_request: MindmapCreateRequest, 6443 _request_timeout: Union[ 6444 None, 6445 Annotated[StrictFloat, Field(gt=0)], 6446 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6447 ] = None, 6448 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6449 _content_type: Optional[StrictStr] = None, 6450 _headers: Optional[Dict[StrictStr, Any]] = None, 6451 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6452 ) -> MindmapItem: 6453 """Create mind map node 6454 6455 Adds a mind map node to a board. A root node is the starting point of a mind map. A node that is created under a root node is a child node. For information on mind maps, use cases, mind map structure, and more, see the <a href=\"https://developers.miro.com/docs/mind-maps\" target=_blank>Mind Map Overview</a> page. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/><br/> <b>Known limitations on node placement: </b> Currently, the create API supports explicit positions for nodes. This means that users can only place nodes based on the x, y coordinates provided in the position parameters. If the position is not provided in the request, nodes default to coordinates x=0, y=0, effectively placing them at the center of the board. <br /><br /><b>Upcoming changes:</b> We understand the importance of flexibility in node placement. We are actively working on implementing changes to support positioning nodes relative to their parent node as well. This enhancement offers a more dynamic and intuitive mind mapping experience. <br /><br />Additionally, we are actively working on providing the update API, further enhancing the functionality of mind map APIs. 6456 6457 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 6458 :type board_id: str 6459 :param mindmap_create_request: (required) 6460 :type mindmap_create_request: MindmapCreateRequest 6461 :param _request_timeout: timeout setting for this request. If one 6462 number provided, it will be total request 6463 timeout. It can also be a pair (tuple) of 6464 (connection, read) timeouts. 6465 :type _request_timeout: int, tuple(int, int), optional 6466 :param _request_auth: set to override the auth_settings for an a single 6467 request; this effectively ignores the 6468 authentication in the spec for a single request. 6469 :type _request_auth: dict, optional 6470 :param _content_type: force content-type for the request. 6471 :type _content_type: str, Optional 6472 :param _headers: set to override the headers for a single 6473 request; this effectively ignores the headers 6474 in the spec for a single request. 6475 :type _headers: dict, optional 6476 :param _host_index: set to override the host_index for a single 6477 request; this effectively ignores the host_index 6478 in the spec for a single request. 6479 :type _host_index: int, optional 6480 :return: Returns the result object. 6481 """ # noqa: E501 6482 6483 _param = self._create_mindmap_nodes_experimental_serialize( 6484 board_id=board_id, 6485 mindmap_create_request=mindmap_create_request, 6486 _request_auth=_request_auth, 6487 _content_type=_content_type, 6488 _headers=_headers, 6489 _host_index=_host_index, 6490 ) 6491 6492 _response_types_map: Dict[str, Optional[str]] = { 6493 "201": "MindmapItem", 6494 "400": "CreateFrameItem400Response", 6495 "404": "CreateFrameItem400Response", 6496 "429": "CreateFrameItem400Response", 6497 } 6498 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6499 response_data.read() 6500 return self.api_client.response_deserialize( 6501 response_data=response_data, 6502 response_types_map=_response_types_map, 6503 ).data 6504 6505 def _create_mindmap_nodes_experimental_serialize( 6506 self, 6507 board_id, 6508 mindmap_create_request, 6509 _request_auth, 6510 _content_type, 6511 _headers, 6512 _host_index, 6513 ) -> RequestSerialized: 6514 6515 _host = None 6516 6517 _collection_formats: Dict[str, str] = {} 6518 6519 _path_params: Dict[str, str] = {} 6520 _query_params: List[Tuple[str, str]] = [] 6521 _header_params: Dict[str, Optional[str]] = _headers or {} 6522 _form_params: List[Tuple[str, str]] = [] 6523 _files: Dict[str, str] = {} 6524 _body_params: Optional[bytes] = None 6525 6526 # process the path parameters 6527 if board_id is not None: 6528 _path_params["board_id"] = board_id 6529 # process the query parameters 6530 # process the header parameters 6531 # process the form parameters 6532 # process the body parameter 6533 if mindmap_create_request is not None: 6534 _body_params = mindmap_create_request 6535 6536 # set the HTTP header `Accept` 6537 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6538 6539 # set the HTTP header `Content-Type` 6540 if _content_type: 6541 _header_params["Content-Type"] = _content_type 6542 else: 6543 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 6544 if _default_content_type is not None: 6545 _header_params["Content-Type"] = _default_content_type 6546 6547 # authentication setting 6548 _auth_settings: List[str] = [] 6549 6550 return self.api_client.param_serialize( 6551 method="POST", 6552 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes", 6553 path_params=_path_params, 6554 query_params=_query_params, 6555 header_params=_header_params, 6556 body=_body_params, 6557 post_params=_form_params, 6558 files=_files, 6559 auth_settings=_auth_settings, 6560 collection_formats=_collection_formats, 6561 _host=_host, 6562 _request_auth=_request_auth, 6563 ) 6564 6565 @validate_call 6566 def delete_mindmap_node_experimental( 6567 self, 6568 board_id: Annotated[ 6569 StrictStr, 6570 Field(description="Unique identifier (ID) of the board from which you want to delete the mind map node."), 6571 ], 6572 item_id: Annotated[ 6573 StrictStr, Field(description="Unique identifier (ID) of the mind map node that you want to delete.") 6574 ], 6575 _request_timeout: Union[ 6576 None, 6577 Annotated[StrictFloat, Field(gt=0)], 6578 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6579 ] = None, 6580 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6581 _content_type: Optional[StrictStr] = None, 6582 _headers: Optional[Dict[StrictStr, Any]] = None, 6583 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6584 ) -> object: 6585 """Delete mind map node 6586 6587 Deletes a mind map node item and its child nodes from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 6588 6589 :param board_id: Unique identifier (ID) of the board from which you want to delete the mind map node. (required) 6590 :type board_id: str 6591 :param item_id: Unique identifier (ID) of the mind map node that you want to delete. (required) 6592 :type item_id: str 6593 :param _request_timeout: timeout setting for this request. If one 6594 number provided, it will be total request 6595 timeout. It can also be a pair (tuple) of 6596 (connection, read) timeouts. 6597 :type _request_timeout: int, tuple(int, int), optional 6598 :param _request_auth: set to override the auth_settings for an a single 6599 request; this effectively ignores the 6600 authentication in the spec for a single request. 6601 :type _request_auth: dict, optional 6602 :param _content_type: force content-type for the request. 6603 :type _content_type: str, Optional 6604 :param _headers: set to override the headers for a single 6605 request; this effectively ignores the headers 6606 in the spec for a single request. 6607 :type _headers: dict, optional 6608 :param _host_index: set to override the host_index for a single 6609 request; this effectively ignores the host_index 6610 in the spec for a single request. 6611 :type _host_index: int, optional 6612 :return: Returns the result object. 6613 """ # noqa: E501 6614 6615 _param = self._delete_mindmap_node_experimental_serialize( 6616 board_id=board_id, 6617 item_id=item_id, 6618 _request_auth=_request_auth, 6619 _content_type=_content_type, 6620 _headers=_headers, 6621 _host_index=_host_index, 6622 ) 6623 6624 _response_types_map: Dict[str, Optional[str]] = { 6625 "204": "object", 6626 "400": "CreateFrameItem400Response", 6627 "404": "CreateFrameItem400Response", 6628 "429": "CreateFrameItem400Response", 6629 } 6630 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6631 response_data.read() 6632 return self.api_client.response_deserialize( 6633 response_data=response_data, 6634 response_types_map=_response_types_map, 6635 ).data 6636 6637 def _delete_mindmap_node_experimental_serialize( 6638 self, 6639 board_id, 6640 item_id, 6641 _request_auth, 6642 _content_type, 6643 _headers, 6644 _host_index, 6645 ) -> RequestSerialized: 6646 6647 _host = None 6648 6649 _collection_formats: Dict[str, str] = {} 6650 6651 _path_params: Dict[str, str] = {} 6652 _query_params: List[Tuple[str, str]] = [] 6653 _header_params: Dict[str, Optional[str]] = _headers or {} 6654 _form_params: List[Tuple[str, str]] = [] 6655 _files: Dict[str, str] = {} 6656 _body_params: Optional[bytes] = None 6657 6658 # process the path parameters 6659 if board_id is not None: 6660 _path_params["board_id"] = board_id 6661 if item_id is not None: 6662 _path_params["item_id"] = item_id 6663 # process the query parameters 6664 # process the header parameters 6665 # process the form parameters 6666 # process the body parameter 6667 6668 # set the HTTP header `Accept` 6669 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6670 6671 # authentication setting 6672 _auth_settings: List[str] = [] 6673 6674 return self.api_client.param_serialize( 6675 method="DELETE", 6676 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes/{item_id}", 6677 path_params=_path_params, 6678 query_params=_query_params, 6679 header_params=_header_params, 6680 body=_body_params, 6681 post_params=_form_params, 6682 files=_files, 6683 auth_settings=_auth_settings, 6684 collection_formats=_collection_formats, 6685 _host=_host, 6686 _request_auth=_request_auth, 6687 ) 6688 6689 @validate_call 6690 def get_mindmap_node_experimental( 6691 self, 6692 board_id: Annotated[ 6693 StrictStr, 6694 Field(description="Unique identifier (ID) of the board from which you want to retrieve a mind map node."), 6695 ], 6696 item_id: Annotated[ 6697 StrictStr, Field(description="Unique identifier (ID) of the mind map node that you want to retrieve.") 6698 ], 6699 _request_timeout: Union[ 6700 None, 6701 Annotated[StrictFloat, Field(gt=0)], 6702 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6703 ] = None, 6704 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6705 _content_type: Optional[StrictStr] = None, 6706 _headers: Optional[Dict[StrictStr, Any]] = None, 6707 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6708 ) -> MindmapItem: 6709 """Get specific mind map node 6710 6711 Retrieves information for a specific mind map node on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 6712 6713 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a mind map node. (required) 6714 :type board_id: str 6715 :param item_id: Unique identifier (ID) of the mind map node that you want to retrieve. (required) 6716 :type item_id: str 6717 :param _request_timeout: timeout setting for this request. If one 6718 number provided, it will be total request 6719 timeout. It can also be a pair (tuple) of 6720 (connection, read) timeouts. 6721 :type _request_timeout: int, tuple(int, int), optional 6722 :param _request_auth: set to override the auth_settings for an a single 6723 request; this effectively ignores the 6724 authentication in the spec for a single request. 6725 :type _request_auth: dict, optional 6726 :param _content_type: force content-type for the request. 6727 :type _content_type: str, Optional 6728 :param _headers: set to override the headers for a single 6729 request; this effectively ignores the headers 6730 in the spec for a single request. 6731 :type _headers: dict, optional 6732 :param _host_index: set to override the host_index for a single 6733 request; this effectively ignores the host_index 6734 in the spec for a single request. 6735 :type _host_index: int, optional 6736 :return: Returns the result object. 6737 """ # noqa: E501 6738 6739 _param = self._get_mindmap_node_experimental_serialize( 6740 board_id=board_id, 6741 item_id=item_id, 6742 _request_auth=_request_auth, 6743 _content_type=_content_type, 6744 _headers=_headers, 6745 _host_index=_host_index, 6746 ) 6747 6748 _response_types_map: Dict[str, Optional[str]] = { 6749 "200": "MindmapItem", 6750 } 6751 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6752 response_data.read() 6753 return self.api_client.response_deserialize( 6754 response_data=response_data, 6755 response_types_map=_response_types_map, 6756 ).data 6757 6758 def _get_mindmap_node_experimental_serialize( 6759 self, 6760 board_id, 6761 item_id, 6762 _request_auth, 6763 _content_type, 6764 _headers, 6765 _host_index, 6766 ) -> RequestSerialized: 6767 6768 _host = None 6769 6770 _collection_formats: Dict[str, str] = {} 6771 6772 _path_params: Dict[str, str] = {} 6773 _query_params: List[Tuple[str, str]] = [] 6774 _header_params: Dict[str, Optional[str]] = _headers or {} 6775 _form_params: List[Tuple[str, str]] = [] 6776 _files: Dict[str, str] = {} 6777 _body_params: Optional[bytes] = None 6778 6779 # process the path parameters 6780 if board_id is not None: 6781 _path_params["board_id"] = board_id 6782 if item_id is not None: 6783 _path_params["item_id"] = item_id 6784 # process the query parameters 6785 # process the header parameters 6786 # process the form parameters 6787 # process the body parameter 6788 6789 # set the HTTP header `Accept` 6790 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6791 6792 # authentication setting 6793 _auth_settings: List[str] = [] 6794 6795 return self.api_client.param_serialize( 6796 method="GET", 6797 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes/{item_id}", 6798 path_params=_path_params, 6799 query_params=_query_params, 6800 header_params=_header_params, 6801 body=_body_params, 6802 post_params=_form_params, 6803 files=_files, 6804 auth_settings=_auth_settings, 6805 collection_formats=_collection_formats, 6806 _host=_host, 6807 _request_auth=_request_auth, 6808 ) 6809 6810 @validate_call 6811 def get_mindmap_nodes_experimental( 6812 self, 6813 board_id: Annotated[ 6814 StrictStr, 6815 Field(description="Unique identifier (ID) of the board from which you want to retrieve mind map nodes."), 6816 ], 6817 limit: Annotated[Optional[StrictStr], Field(description="Maximum number of results returned")] = None, 6818 cursor: Annotated[ 6819 Optional[StrictStr], Field(description="Points to the next portion of the results set") 6820 ] = None, 6821 _request_timeout: Union[ 6822 None, 6823 Annotated[StrictFloat, Field(gt=0)], 6824 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6825 ] = None, 6826 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6827 _content_type: Optional[StrictStr] = None, 6828 _headers: Optional[Dict[StrictStr, Any]] = None, 6829 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6830 ) -> MindmapCursorPaged: 6831 """Get mind map nodes 6832 6833 Retrieves a list of mind map nodes for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 6834 6835 :param board_id: Unique identifier (ID) of the board from which you want to retrieve mind map nodes. (required) 6836 :type board_id: str 6837 :param limit: Maximum number of results returned 6838 :type limit: str 6839 :param cursor: Points to the next portion of the results set 6840 :type cursor: str 6841 :param _request_timeout: timeout setting for this request. If one 6842 number provided, it will be total request 6843 timeout. It can also be a pair (tuple) of 6844 (connection, read) timeouts. 6845 :type _request_timeout: int, tuple(int, int), optional 6846 :param _request_auth: set to override the auth_settings for an a single 6847 request; this effectively ignores the 6848 authentication in the spec for a single request. 6849 :type _request_auth: dict, optional 6850 :param _content_type: force content-type for the request. 6851 :type _content_type: str, Optional 6852 :param _headers: set to override the headers for a single 6853 request; this effectively ignores the headers 6854 in the spec for a single request. 6855 :type _headers: dict, optional 6856 :param _host_index: set to override the host_index for a single 6857 request; this effectively ignores the host_index 6858 in the spec for a single request. 6859 :type _host_index: int, optional 6860 :return: Returns the result object. 6861 """ # noqa: E501 6862 6863 _param = self._get_mindmap_nodes_experimental_serialize( 6864 board_id=board_id, 6865 limit=limit, 6866 cursor=cursor, 6867 _request_auth=_request_auth, 6868 _content_type=_content_type, 6869 _headers=_headers, 6870 _host_index=_host_index, 6871 ) 6872 6873 _response_types_map: Dict[str, Optional[str]] = { 6874 "200": "MindmapCursorPaged", 6875 } 6876 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6877 response_data.read() 6878 return self.api_client.response_deserialize( 6879 response_data=response_data, 6880 response_types_map=_response_types_map, 6881 ).data 6882 6883 def _get_mindmap_nodes_experimental_serialize( 6884 self, 6885 board_id, 6886 limit, 6887 cursor, 6888 _request_auth, 6889 _content_type, 6890 _headers, 6891 _host_index, 6892 ) -> RequestSerialized: 6893 6894 _host = None 6895 6896 _collection_formats: Dict[str, str] = {} 6897 6898 _path_params: Dict[str, str] = {} 6899 _query_params: List[Tuple[str, str]] = [] 6900 _header_params: Dict[str, Optional[str]] = _headers or {} 6901 _form_params: List[Tuple[str, str]] = [] 6902 _files: Dict[str, str] = {} 6903 _body_params: Optional[bytes] = None 6904 6905 # process the path parameters 6906 if board_id is not None: 6907 _path_params["board_id"] = board_id 6908 # process the query parameters 6909 if limit is not None: 6910 6911 _query_params.append(("limit", limit)) 6912 6913 if cursor is not None: 6914 6915 _query_params.append(("cursor", cursor)) 6916 6917 # process the header parameters 6918 # process the form parameters 6919 # process the body parameter 6920 6921 # set the HTTP header `Accept` 6922 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 6923 6924 # authentication setting 6925 _auth_settings: List[str] = [] 6926 6927 return self.api_client.param_serialize( 6928 method="GET", 6929 resource_path="/v2-experimental/boards/{board_id}/mindmap_nodes", 6930 path_params=_path_params, 6931 query_params=_query_params, 6932 header_params=_header_params, 6933 body=_body_params, 6934 post_params=_form_params, 6935 files=_files, 6936 auth_settings=_auth_settings, 6937 collection_formats=_collection_formats, 6938 _host=_host, 6939 _request_auth=_request_auth, 6940 ) 6941 6942 @validate_call 6943 def revoke_token_v2( 6944 self, 6945 revoke_token_request: RevokeTokenRequest, 6946 _request_timeout: Union[ 6947 None, 6948 Annotated[StrictFloat, Field(gt=0)], 6949 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6950 ] = None, 6951 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6952 _content_type: Optional[StrictStr] = None, 6953 _headers: Optional[Dict[StrictStr, Any]] = None, 6954 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6955 ) -> None: 6956 """Revoke token (v2) 6957 6958 Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user. 6959 6960 :param revoke_token_request: (required) 6961 :type revoke_token_request: RevokeTokenRequest 6962 :param _request_timeout: timeout setting for this request. If one 6963 number provided, it will be total request 6964 timeout. It can also be a pair (tuple) of 6965 (connection, read) timeouts. 6966 :type _request_timeout: int, tuple(int, int), optional 6967 :param _request_auth: set to override the auth_settings for an a single 6968 request; this effectively ignores the 6969 authentication in the spec for a single request. 6970 :type _request_auth: dict, optional 6971 :param _content_type: force content-type for the request. 6972 :type _content_type: str, Optional 6973 :param _headers: set to override the headers for a single 6974 request; this effectively ignores the headers 6975 in the spec for a single request. 6976 :type _headers: dict, optional 6977 :param _host_index: set to override the host_index for a single 6978 request; this effectively ignores the host_index 6979 in the spec for a single request. 6980 :type _host_index: int, optional 6981 :return: Returns the result object. 6982 """ # noqa: E501 6983 6984 _param = self._revoke_token_v2_serialize( 6985 revoke_token_request=revoke_token_request, 6986 _request_auth=_request_auth, 6987 _content_type=_content_type, 6988 _headers=_headers, 6989 _host_index=_host_index, 6990 ) 6991 6992 _response_types_map: Dict[str, Optional[str]] = { 6993 "204": None, 6994 "404": "ErrorResponse", 6995 } 6996 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6997 response_data.read() 6998 return self.api_client.response_deserialize( 6999 response_data=response_data, 7000 response_types_map=_response_types_map, 7001 ).data 7002 7003 def _revoke_token_v2_serialize( 7004 self, 7005 revoke_token_request, 7006 _request_auth, 7007 _content_type, 7008 _headers, 7009 _host_index, 7010 ) -> RequestSerialized: 7011 7012 _host = None 7013 7014 _collection_formats: Dict[str, str] = {} 7015 7016 _path_params: Dict[str, str] = {} 7017 _query_params: List[Tuple[str, str]] = [] 7018 _header_params: Dict[str, Optional[str]] = _headers or {} 7019 _form_params: List[Tuple[str, str]] = [] 7020 _files: Dict[str, str] = {} 7021 _body_params: Optional[bytes] = None 7022 7023 # process the path parameters 7024 # process the query parameters 7025 # process the header parameters 7026 # process the form parameters 7027 # process the body parameter 7028 if revoke_token_request is not None: 7029 _body_params = revoke_token_request 7030 7031 # set the HTTP header `Accept` 7032 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7033 7034 # set the HTTP header `Content-Type` 7035 if _content_type: 7036 _header_params["Content-Type"] = _content_type 7037 else: 7038 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 7039 if _default_content_type is not None: 7040 _header_params["Content-Type"] = _default_content_type 7041 7042 # authentication setting 7043 _auth_settings: List[str] = [] 7044 7045 return self.api_client.param_serialize( 7046 method="POST", 7047 resource_path="/v2/oauth/revoke", 7048 path_params=_path_params, 7049 query_params=_query_params, 7050 header_params=_header_params, 7051 body=_body_params, 7052 post_params=_form_params, 7053 files=_files, 7054 auth_settings=_auth_settings, 7055 collection_formats=_collection_formats, 7056 _host=_host, 7057 _request_auth=_request_auth, 7058 ) 7059 7060 @validate_call 7061 def enterprise_get_organization_member( 7062 self, 7063 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7064 member_id: Annotated[StrictStr, Field(description="id of the organization member")], 7065 _request_timeout: Union[ 7066 None, 7067 Annotated[StrictFloat, Field(gt=0)], 7068 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7069 ] = None, 7070 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7071 _content_type: Optional[StrictStr] = None, 7072 _headers: Optional[Dict[StrictStr, Any]] = None, 7073 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7074 ) -> OrganizationMember: 7075 """Get organization member 7076 7077 Retrieves organization member information for an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7078 7079 :param org_id: id of the organization (required) 7080 :type org_id: str 7081 :param member_id: id of the organization member (required) 7082 :type member_id: str 7083 :param _request_timeout: timeout setting for this request. If one 7084 number provided, it will be total request 7085 timeout. It can also be a pair (tuple) of 7086 (connection, read) timeouts. 7087 :type _request_timeout: int, tuple(int, int), optional 7088 :param _request_auth: set to override the auth_settings for an a single 7089 request; this effectively ignores the 7090 authentication in the spec for a single request. 7091 :type _request_auth: dict, optional 7092 :param _content_type: force content-type for the request. 7093 :type _content_type: str, Optional 7094 :param _headers: set to override the headers for a single 7095 request; this effectively ignores the headers 7096 in the spec for a single request. 7097 :type _headers: dict, optional 7098 :param _host_index: set to override the host_index for a single 7099 request; this effectively ignores the host_index 7100 in the spec for a single request. 7101 :type _host_index: int, optional 7102 :return: Returns the result object. 7103 """ # noqa: E501 7104 7105 _param = self._enterprise_get_organization_member_serialize( 7106 org_id=org_id, 7107 member_id=member_id, 7108 _request_auth=_request_auth, 7109 _content_type=_content_type, 7110 _headers=_headers, 7111 _host_index=_host_index, 7112 ) 7113 7114 _response_types_map: Dict[str, Optional[str]] = { 7115 "200": "OrganizationMember", 7116 "400": None, 7117 "401": None, 7118 "403": None, 7119 "404": None, 7120 "409": None, 7121 "429": None, 7122 } 7123 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7124 response_data.read() 7125 return self.api_client.response_deserialize( 7126 response_data=response_data, 7127 response_types_map=_response_types_map, 7128 ).data 7129 7130 def _enterprise_get_organization_member_serialize( 7131 self, 7132 org_id, 7133 member_id, 7134 _request_auth, 7135 _content_type, 7136 _headers, 7137 _host_index, 7138 ) -> RequestSerialized: 7139 7140 _host = None 7141 7142 _collection_formats: Dict[str, str] = {} 7143 7144 _path_params: Dict[str, str] = {} 7145 _query_params: List[Tuple[str, str]] = [] 7146 _header_params: Dict[str, Optional[str]] = _headers or {} 7147 _form_params: List[Tuple[str, str]] = [] 7148 _files: Dict[str, str] = {} 7149 _body_params: Optional[bytes] = None 7150 7151 # process the path parameters 7152 if org_id is not None: 7153 _path_params["org_id"] = org_id 7154 if member_id is not None: 7155 _path_params["member_id"] = member_id 7156 # process the query parameters 7157 # process the header parameters 7158 # process the form parameters 7159 # process the body parameter 7160 7161 # set the HTTP header `Accept` 7162 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7163 7164 # authentication setting 7165 _auth_settings: List[str] = [] 7166 7167 return self.api_client.param_serialize( 7168 method="GET", 7169 resource_path="/v2/orgs/{org_id}/members/{member_id}", 7170 path_params=_path_params, 7171 query_params=_query_params, 7172 header_params=_header_params, 7173 body=_body_params, 7174 post_params=_form_params, 7175 files=_files, 7176 auth_settings=_auth_settings, 7177 collection_formats=_collection_formats, 7178 _host=_host, 7179 _request_auth=_request_auth, 7180 ) 7181 7182 @validate_call 7183 def enterprise_get_organization_members( 7184 self, 7185 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7186 emails: Optional[StrictStr] = None, 7187 role: Optional[StrictStr] = None, 7188 license: Optional[StrictStr] = None, 7189 active: Optional[StrictBool] = None, 7190 cursor: Optional[StrictStr] = None, 7191 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 7192 _request_timeout: Union[ 7193 None, 7194 Annotated[StrictFloat, Field(gt=0)], 7195 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7196 ] = None, 7197 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7198 _content_type: Optional[StrictStr] = None, 7199 _headers: Optional[Dict[StrictStr, Any]] = None, 7200 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7201 ) -> EnterpriseGetOrganizationMembers200Response: 7202 """Get organization members 7203 7204 Retrieves organization members based on the organization ID and the cursor, or based on the user emails provided in the request.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7205 7206 :param org_id: id of the organization (required) 7207 :type org_id: str 7208 :param emails: 7209 :type emails: str 7210 :param role: 7211 :type role: str 7212 :param license: 7213 :type license: str 7214 :param active: 7215 :type active: bool 7216 :param cursor: 7217 :type cursor: str 7218 :param limit: 7219 :type limit: int 7220 :param _request_timeout: timeout setting for this request. If one 7221 number provided, it will be total request 7222 timeout. It can also be a pair (tuple) of 7223 (connection, read) timeouts. 7224 :type _request_timeout: int, tuple(int, int), optional 7225 :param _request_auth: set to override the auth_settings for an a single 7226 request; this effectively ignores the 7227 authentication in the spec for a single request. 7228 :type _request_auth: dict, optional 7229 :param _content_type: force content-type for the request. 7230 :type _content_type: str, Optional 7231 :param _headers: set to override the headers for a single 7232 request; this effectively ignores the headers 7233 in the spec for a single request. 7234 :type _headers: dict, optional 7235 :param _host_index: set to override the host_index for a single 7236 request; this effectively ignores the host_index 7237 in the spec for a single request. 7238 :type _host_index: int, optional 7239 :return: Returns the result object. 7240 """ # noqa: E501 7241 7242 _param = self._enterprise_get_organization_members_serialize( 7243 org_id=org_id, 7244 emails=emails, 7245 role=role, 7246 license=license, 7247 active=active, 7248 cursor=cursor, 7249 limit=limit, 7250 _request_auth=_request_auth, 7251 _content_type=_content_type, 7252 _headers=_headers, 7253 _host_index=_host_index, 7254 ) 7255 7256 _response_types_map: Dict[str, Optional[str]] = { 7257 "200": "EnterpriseGetOrganizationMembers200Response", 7258 "400": None, 7259 "401": None, 7260 "403": None, 7261 "404": None, 7262 "409": None, 7263 "429": None, 7264 } 7265 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7266 response_data.read() 7267 return self.api_client.response_deserialize( 7268 response_data=response_data, 7269 response_types_map=_response_types_map, 7270 ).data 7271 7272 def _enterprise_get_organization_members_serialize( 7273 self, 7274 org_id, 7275 emails, 7276 role, 7277 license, 7278 active, 7279 cursor, 7280 limit, 7281 _request_auth, 7282 _content_type, 7283 _headers, 7284 _host_index, 7285 ) -> RequestSerialized: 7286 7287 _host = None 7288 7289 _collection_formats: Dict[str, str] = {} 7290 7291 _path_params: Dict[str, str] = {} 7292 _query_params: List[Tuple[str, str]] = [] 7293 _header_params: Dict[str, Optional[str]] = _headers or {} 7294 _form_params: List[Tuple[str, str]] = [] 7295 _files: Dict[str, str] = {} 7296 _body_params: Optional[bytes] = None 7297 7298 # process the path parameters 7299 if org_id is not None: 7300 _path_params["org_id"] = org_id 7301 # process the query parameters 7302 if emails is not None: 7303 7304 _query_params.append(("emails", emails)) 7305 7306 if role is not None: 7307 7308 _query_params.append(("role", role)) 7309 7310 if license is not None: 7311 7312 _query_params.append(("license", license)) 7313 7314 if active is not None: 7315 7316 _query_params.append(("active", active)) 7317 7318 if cursor is not None: 7319 7320 _query_params.append(("cursor", cursor)) 7321 7322 if limit is not None: 7323 7324 _query_params.append(("limit", limit)) 7325 7326 # process the header parameters 7327 # process the form parameters 7328 # process the body parameter 7329 7330 # set the HTTP header `Accept` 7331 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7332 7333 # authentication setting 7334 _auth_settings: List[str] = [] 7335 7336 return self.api_client.param_serialize( 7337 method="GET", 7338 resource_path="/v2/orgs/{org_id}/members", 7339 path_params=_path_params, 7340 query_params=_query_params, 7341 header_params=_header_params, 7342 body=_body_params, 7343 post_params=_form_params, 7344 files=_files, 7345 auth_settings=_auth_settings, 7346 collection_formats=_collection_formats, 7347 _host=_host, 7348 _request_auth=_request_auth, 7349 ) 7350 7351 @validate_call 7352 def enterprise_get_organization( 7353 self, 7354 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7355 _request_timeout: Union[ 7356 None, 7357 Annotated[StrictFloat, Field(gt=0)], 7358 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7359 ] = None, 7360 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7361 _content_type: Optional[StrictStr] = None, 7362 _headers: Optional[Dict[StrictStr, Any]] = None, 7363 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7364 ) -> Organization: 7365 """Get organization info 7366 7367 Retrieves organization information.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7368 7369 :param org_id: id of the organization (required) 7370 :type org_id: str 7371 :param _request_timeout: timeout setting for this request. If one 7372 number provided, it will be total request 7373 timeout. It can also be a pair (tuple) of 7374 (connection, read) timeouts. 7375 :type _request_timeout: int, tuple(int, int), optional 7376 :param _request_auth: set to override the auth_settings for an a single 7377 request; this effectively ignores the 7378 authentication in the spec for a single request. 7379 :type _request_auth: dict, optional 7380 :param _content_type: force content-type for the request. 7381 :type _content_type: str, Optional 7382 :param _headers: set to override the headers for a single 7383 request; this effectively ignores the headers 7384 in the spec for a single request. 7385 :type _headers: dict, optional 7386 :param _host_index: set to override the host_index for a single 7387 request; this effectively ignores the host_index 7388 in the spec for a single request. 7389 :type _host_index: int, optional 7390 :return: Returns the result object. 7391 """ # noqa: E501 7392 7393 _param = self._enterprise_get_organization_serialize( 7394 org_id=org_id, 7395 _request_auth=_request_auth, 7396 _content_type=_content_type, 7397 _headers=_headers, 7398 _host_index=_host_index, 7399 ) 7400 7401 _response_types_map: Dict[str, Optional[str]] = { 7402 "200": "Organization", 7403 "400": None, 7404 "401": None, 7405 "403": None, 7406 "404": None, 7407 "409": None, 7408 "429": None, 7409 } 7410 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7411 response_data.read() 7412 return self.api_client.response_deserialize( 7413 response_data=response_data, 7414 response_types_map=_response_types_map, 7415 ).data 7416 7417 def _enterprise_get_organization_serialize( 7418 self, 7419 org_id, 7420 _request_auth, 7421 _content_type, 7422 _headers, 7423 _host_index, 7424 ) -> RequestSerialized: 7425 7426 _host = None 7427 7428 _collection_formats: Dict[str, str] = {} 7429 7430 _path_params: Dict[str, str] = {} 7431 _query_params: List[Tuple[str, str]] = [] 7432 _header_params: Dict[str, Optional[str]] = _headers or {} 7433 _form_params: List[Tuple[str, str]] = [] 7434 _files: Dict[str, str] = {} 7435 _body_params: Optional[bytes] = None 7436 7437 # process the path parameters 7438 if org_id is not None: 7439 _path_params["org_id"] = org_id 7440 # process the query parameters 7441 # process the header parameters 7442 # process the form parameters 7443 # process the body parameter 7444 7445 # set the HTTP header `Accept` 7446 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7447 7448 # authentication setting 7449 _auth_settings: List[str] = [] 7450 7451 return self.api_client.param_serialize( 7452 method="GET", 7453 resource_path="/v2/orgs/{org_id}", 7454 path_params=_path_params, 7455 query_params=_query_params, 7456 header_params=_header_params, 7457 body=_body_params, 7458 post_params=_form_params, 7459 files=_files, 7460 auth_settings=_auth_settings, 7461 collection_formats=_collection_formats, 7462 _host=_host, 7463 _request_auth=_request_auth, 7464 ) 7465 7466 @validate_call 7467 def enterprise_add_project_member( 7468 self, 7469 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7470 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7471 project_id: Annotated[StrictStr, Field(description="The ID of the project to which you want to add a user.")], 7472 add_project_member_request: AddProjectMemberRequest, 7473 _request_timeout: Union[ 7474 None, 7475 Annotated[StrictFloat, Field(gt=0)], 7476 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7477 ] = None, 7478 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7479 _content_type: Optional[StrictStr] = None, 7480 _headers: Optional[Dict[StrictStr, Any]] = None, 7481 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7482 ) -> ProjectMember: 7483 """Add member in a project 7484 7485 Add a Miro user to a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7486 7487 :param org_id: The ID of the organization to which the project belongs. (required) 7488 :type org_id: str 7489 :param team_id: The ID of the team to which the project belongs. (required) 7490 :type team_id: str 7491 :param project_id: The ID of the project to which you want to add a user. (required) 7492 :type project_id: str 7493 :param add_project_member_request: (required) 7494 :type add_project_member_request: AddProjectMemberRequest 7495 :param _request_timeout: timeout setting for this request. If one 7496 number provided, it will be total request 7497 timeout. It can also be a pair (tuple) of 7498 (connection, read) timeouts. 7499 :type _request_timeout: int, tuple(int, int), optional 7500 :param _request_auth: set to override the auth_settings for an a single 7501 request; this effectively ignores the 7502 authentication in the spec for a single request. 7503 :type _request_auth: dict, optional 7504 :param _content_type: force content-type for the request. 7505 :type _content_type: str, Optional 7506 :param _headers: set to override the headers for a single 7507 request; this effectively ignores the headers 7508 in the spec for a single request. 7509 :type _headers: dict, optional 7510 :param _host_index: set to override the host_index for a single 7511 request; this effectively ignores the host_index 7512 in the spec for a single request. 7513 :type _host_index: int, optional 7514 :return: Returns the result object. 7515 """ # noqa: E501 7516 7517 _param = self._enterprise_add_project_member_serialize( 7518 org_id=org_id, 7519 team_id=team_id, 7520 project_id=project_id, 7521 add_project_member_request=add_project_member_request, 7522 _request_auth=_request_auth, 7523 _content_type=_content_type, 7524 _headers=_headers, 7525 _host_index=_host_index, 7526 ) 7527 7528 _response_types_map: Dict[str, Optional[str]] = { 7529 "201": "ProjectMember", 7530 "400": "Error400", 7531 "401": "Error401", 7532 "403": "Error403", 7533 "404": "Error404", 7534 "409": "Error409", 7535 "429": "Error429", 7536 } 7537 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7538 response_data.read() 7539 return self.api_client.response_deserialize( 7540 response_data=response_data, 7541 response_types_map=_response_types_map, 7542 ).data 7543 7544 def _enterprise_add_project_member_serialize( 7545 self, 7546 org_id, 7547 team_id, 7548 project_id, 7549 add_project_member_request, 7550 _request_auth, 7551 _content_type, 7552 _headers, 7553 _host_index, 7554 ) -> RequestSerialized: 7555 7556 _host = None 7557 7558 _collection_formats: Dict[str, str] = {} 7559 7560 _path_params: Dict[str, str] = {} 7561 _query_params: List[Tuple[str, str]] = [] 7562 _header_params: Dict[str, Optional[str]] = _headers or {} 7563 _form_params: List[Tuple[str, str]] = [] 7564 _files: Dict[str, str] = {} 7565 _body_params: Optional[bytes] = None 7566 7567 # process the path parameters 7568 if org_id is not None: 7569 _path_params["org_id"] = org_id 7570 if team_id is not None: 7571 _path_params["team_id"] = team_id 7572 if project_id is not None: 7573 _path_params["project_id"] = project_id 7574 # process the query parameters 7575 # process the header parameters 7576 # process the form parameters 7577 # process the body parameter 7578 if add_project_member_request is not None: 7579 _body_params = add_project_member_request 7580 7581 # set the HTTP header `Accept` 7582 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7583 7584 # set the HTTP header `Content-Type` 7585 if _content_type: 7586 _header_params["Content-Type"] = _content_type 7587 else: 7588 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 7589 if _default_content_type is not None: 7590 _header_params["Content-Type"] = _default_content_type 7591 7592 # authentication setting 7593 _auth_settings: List[str] = [] 7594 7595 return self.api_client.param_serialize( 7596 method="POST", 7597 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members", 7598 path_params=_path_params, 7599 query_params=_query_params, 7600 header_params=_header_params, 7601 body=_body_params, 7602 post_params=_form_params, 7603 files=_files, 7604 auth_settings=_auth_settings, 7605 collection_formats=_collection_formats, 7606 _host=_host, 7607 _request_auth=_request_auth, 7608 ) 7609 7610 @validate_call 7611 def enterprise_delete_project_member( 7612 self, 7613 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7614 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7615 project_id: Annotated[ 7616 StrictStr, Field(description="The ID of the project from which you want to remove a member.") 7617 ], 7618 member_id: Annotated[ 7619 StrictStr, Field(description="The ID of the member that you want to remove from a project.") 7620 ], 7621 _request_timeout: Union[ 7622 None, 7623 Annotated[StrictFloat, Field(gt=0)], 7624 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7625 ] = None, 7626 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7627 _content_type: Optional[StrictStr] = None, 7628 _headers: Optional[Dict[StrictStr, Any]] = None, 7629 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7630 ) -> None: 7631 """Remove project member 7632 7633 Remove a member from a project. The user remains in the team even after the member is removed from a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7634 7635 :param org_id: The ID of the organization to which the project belongs. (required) 7636 :type org_id: str 7637 :param team_id: The ID of the team to which the project belongs. (required) 7638 :type team_id: str 7639 :param project_id: The ID of the project from which you want to remove a member. (required) 7640 :type project_id: str 7641 :param member_id: The ID of the member that you want to remove from a project. (required) 7642 :type member_id: str 7643 :param _request_timeout: timeout setting for this request. If one 7644 number provided, it will be total request 7645 timeout. It can also be a pair (tuple) of 7646 (connection, read) timeouts. 7647 :type _request_timeout: int, tuple(int, int), optional 7648 :param _request_auth: set to override the auth_settings for an a single 7649 request; this effectively ignores the 7650 authentication in the spec for a single request. 7651 :type _request_auth: dict, optional 7652 :param _content_type: force content-type for the request. 7653 :type _content_type: str, Optional 7654 :param _headers: set to override the headers for a single 7655 request; this effectively ignores the headers 7656 in the spec for a single request. 7657 :type _headers: dict, optional 7658 :param _host_index: set to override the host_index for a single 7659 request; this effectively ignores the host_index 7660 in the spec for a single request. 7661 :type _host_index: int, optional 7662 :return: Returns the result object. 7663 """ # noqa: E501 7664 7665 _param = self._enterprise_delete_project_member_serialize( 7666 org_id=org_id, 7667 team_id=team_id, 7668 project_id=project_id, 7669 member_id=member_id, 7670 _request_auth=_request_auth, 7671 _content_type=_content_type, 7672 _headers=_headers, 7673 _host_index=_host_index, 7674 ) 7675 7676 _response_types_map: Dict[str, Optional[str]] = { 7677 "204": None, 7678 "400": "Error400", 7679 "401": "Error401", 7680 "403": "Error403", 7681 "404": "Error404", 7682 "409": "Error409", 7683 "429": "Error429", 7684 } 7685 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7686 response_data.read() 7687 return self.api_client.response_deserialize( 7688 response_data=response_data, 7689 response_types_map=_response_types_map, 7690 ).data 7691 7692 def _enterprise_delete_project_member_serialize( 7693 self, 7694 org_id, 7695 team_id, 7696 project_id, 7697 member_id, 7698 _request_auth, 7699 _content_type, 7700 _headers, 7701 _host_index, 7702 ) -> RequestSerialized: 7703 7704 _host = None 7705 7706 _collection_formats: Dict[str, str] = {} 7707 7708 _path_params: Dict[str, str] = {} 7709 _query_params: List[Tuple[str, str]] = [] 7710 _header_params: Dict[str, Optional[str]] = _headers or {} 7711 _form_params: List[Tuple[str, str]] = [] 7712 _files: Dict[str, str] = {} 7713 _body_params: Optional[bytes] = None 7714 7715 # process the path parameters 7716 if org_id is not None: 7717 _path_params["org_id"] = org_id 7718 if team_id is not None: 7719 _path_params["team_id"] = team_id 7720 if project_id is not None: 7721 _path_params["project_id"] = project_id 7722 if member_id is not None: 7723 _path_params["member_id"] = member_id 7724 # process the query parameters 7725 # process the header parameters 7726 # process the form parameters 7727 # process the body parameter 7728 7729 # set the HTTP header `Accept` 7730 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7731 7732 # authentication setting 7733 _auth_settings: List[str] = [] 7734 7735 return self.api_client.param_serialize( 7736 method="DELETE", 7737 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members/{member_id}", 7738 path_params=_path_params, 7739 query_params=_query_params, 7740 header_params=_header_params, 7741 body=_body_params, 7742 post_params=_form_params, 7743 files=_files, 7744 auth_settings=_auth_settings, 7745 collection_formats=_collection_formats, 7746 _host=_host, 7747 _request_auth=_request_auth, 7748 ) 7749 7750 @validate_call 7751 def enterprise_get_project_member( 7752 self, 7753 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7754 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7755 project_id: Annotated[ 7756 StrictStr, 7757 Field(description="The ID of the project from which you want to retrieve specific member information."), 7758 ], 7759 member_id: Annotated[ 7760 StrictStr, Field(description="The ID of the member for which you want to retrieve information.") 7761 ], 7762 _request_timeout: Union[ 7763 None, 7764 Annotated[StrictFloat, Field(gt=0)], 7765 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7766 ] = None, 7767 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7768 _content_type: Optional[StrictStr] = None, 7769 _headers: Optional[Dict[StrictStr, Any]] = None, 7770 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7771 ) -> ProjectMember: 7772 """Get project member 7773 7774 Retrieves information for a specific project member.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7775 7776 :param org_id: The ID of the organization to which the project belongs. (required) 7777 :type org_id: str 7778 :param team_id: The ID of the team to which the project belongs. (required) 7779 :type team_id: str 7780 :param project_id: The ID of the project from which you want to retrieve specific member information. (required) 7781 :type project_id: str 7782 :param member_id: The ID of the member for which you want to retrieve information. (required) 7783 :type member_id: str 7784 :param _request_timeout: timeout setting for this request. If one 7785 number provided, it will be total request 7786 timeout. It can also be a pair (tuple) of 7787 (connection, read) timeouts. 7788 :type _request_timeout: int, tuple(int, int), optional 7789 :param _request_auth: set to override the auth_settings for an a single 7790 request; this effectively ignores the 7791 authentication in the spec for a single request. 7792 :type _request_auth: dict, optional 7793 :param _content_type: force content-type for the request. 7794 :type _content_type: str, Optional 7795 :param _headers: set to override the headers for a single 7796 request; this effectively ignores the headers 7797 in the spec for a single request. 7798 :type _headers: dict, optional 7799 :param _host_index: set to override the host_index for a single 7800 request; this effectively ignores the host_index 7801 in the spec for a single request. 7802 :type _host_index: int, optional 7803 :return: Returns the result object. 7804 """ # noqa: E501 7805 7806 _param = self._enterprise_get_project_member_serialize( 7807 org_id=org_id, 7808 team_id=team_id, 7809 project_id=project_id, 7810 member_id=member_id, 7811 _request_auth=_request_auth, 7812 _content_type=_content_type, 7813 _headers=_headers, 7814 _host_index=_host_index, 7815 ) 7816 7817 _response_types_map: Dict[str, Optional[str]] = { 7818 "200": "ProjectMember", 7819 "400": "Error400", 7820 "401": "Error401", 7821 "403": "Error403", 7822 "404": "Error404", 7823 "409": "Error409", 7824 "429": "Error429", 7825 } 7826 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7827 response_data.read() 7828 return self.api_client.response_deserialize( 7829 response_data=response_data, 7830 response_types_map=_response_types_map, 7831 ).data 7832 7833 def _enterprise_get_project_member_serialize( 7834 self, 7835 org_id, 7836 team_id, 7837 project_id, 7838 member_id, 7839 _request_auth, 7840 _content_type, 7841 _headers, 7842 _host_index, 7843 ) -> RequestSerialized: 7844 7845 _host = None 7846 7847 _collection_formats: Dict[str, str] = {} 7848 7849 _path_params: Dict[str, str] = {} 7850 _query_params: List[Tuple[str, str]] = [] 7851 _header_params: Dict[str, Optional[str]] = _headers or {} 7852 _form_params: List[Tuple[str, str]] = [] 7853 _files: Dict[str, str] = {} 7854 _body_params: Optional[bytes] = None 7855 7856 # process the path parameters 7857 if org_id is not None: 7858 _path_params["org_id"] = org_id 7859 if team_id is not None: 7860 _path_params["team_id"] = team_id 7861 if project_id is not None: 7862 _path_params["project_id"] = project_id 7863 if member_id is not None: 7864 _path_params["member_id"] = member_id 7865 # process the query parameters 7866 # process the header parameters 7867 # process the form parameters 7868 # process the body parameter 7869 7870 # set the HTTP header `Accept` 7871 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 7872 7873 # authentication setting 7874 _auth_settings: List[str] = [] 7875 7876 return self.api_client.param_serialize( 7877 method="GET", 7878 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members/{member_id}", 7879 path_params=_path_params, 7880 query_params=_query_params, 7881 header_params=_header_params, 7882 body=_body_params, 7883 post_params=_form_params, 7884 files=_files, 7885 auth_settings=_auth_settings, 7886 collection_formats=_collection_formats, 7887 _host=_host, 7888 _request_auth=_request_auth, 7889 ) 7890 7891 @validate_call 7892 def enterprise_get_project_members( 7893 self, 7894 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7895 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7896 project_id: Annotated[ 7897 StrictStr, Field(description="The ID of the project for which you want to retrieve the list of members.") 7898 ], 7899 limit: Annotated[ 7900 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 7901 Field( 7902 description="The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value." 7903 ), 7904 ] = None, 7905 cursor: Annotated[ 7906 Optional[StrictStr], 7907 Field( 7908 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 7909 ), 7910 ] = None, 7911 _request_timeout: Union[ 7912 None, 7913 Annotated[StrictFloat, Field(gt=0)], 7914 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7915 ] = None, 7916 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7917 _content_type: Optional[StrictStr] = None, 7918 _headers: Optional[Dict[StrictStr, Any]] = None, 7919 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7920 ) -> ProjectMemberPage: 7921 """List of project members 7922 7923 Retrieves the list of members for a specific project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7924 7925 :param org_id: The ID of the organization to which the project belongs. (required) 7926 :type org_id: str 7927 :param team_id: The ID of the team to which the project belongs. (required) 7928 :type team_id: str 7929 :param project_id: The ID of the project for which you want to retrieve the list of members. (required) 7930 :type project_id: str 7931 :param limit: The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value. 7932 :type limit: int 7933 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 7934 :type cursor: str 7935 :param _request_timeout: timeout setting for this request. If one 7936 number provided, it will be total request 7937 timeout. It can also be a pair (tuple) of 7938 (connection, read) timeouts. 7939 :type _request_timeout: int, tuple(int, int), optional 7940 :param _request_auth: set to override the auth_settings for an a single 7941 request; this effectively ignores the 7942 authentication in the spec for a single request. 7943 :type _request_auth: dict, optional 7944 :param _content_type: force content-type for the request. 7945 :type _content_type: str, Optional 7946 :param _headers: set to override the headers for a single 7947 request; this effectively ignores the headers 7948 in the spec for a single request. 7949 :type _headers: dict, optional 7950 :param _host_index: set to override the host_index for a single 7951 request; this effectively ignores the host_index 7952 in the spec for a single request. 7953 :type _host_index: int, optional 7954 :return: Returns the result object. 7955 """ # noqa: E501 7956 7957 _param = self._enterprise_get_project_members_serialize( 7958 org_id=org_id, 7959 team_id=team_id, 7960 project_id=project_id, 7961 limit=limit, 7962 cursor=cursor, 7963 _request_auth=_request_auth, 7964 _content_type=_content_type, 7965 _headers=_headers, 7966 _host_index=_host_index, 7967 ) 7968 7969 _response_types_map: Dict[str, Optional[str]] = { 7970 "200": "ProjectMemberPage", 7971 "400": "Error400", 7972 "401": "Error401", 7973 "403": "Error403", 7974 "404": "Error404", 7975 "409": "Error409", 7976 "429": "Error429", 7977 } 7978 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7979 response_data.read() 7980 return self.api_client.response_deserialize( 7981 response_data=response_data, 7982 response_types_map=_response_types_map, 7983 ).data 7984 7985 def _enterprise_get_project_members_serialize( 7986 self, 7987 org_id, 7988 team_id, 7989 project_id, 7990 limit, 7991 cursor, 7992 _request_auth, 7993 _content_type, 7994 _headers, 7995 _host_index, 7996 ) -> RequestSerialized: 7997 7998 _host = None 7999 8000 _collection_formats: Dict[str, str] = {} 8001 8002 _path_params: Dict[str, str] = {} 8003 _query_params: List[Tuple[str, str]] = [] 8004 _header_params: Dict[str, Optional[str]] = _headers or {} 8005 _form_params: List[Tuple[str, str]] = [] 8006 _files: Dict[str, str] = {} 8007 _body_params: Optional[bytes] = None 8008 8009 # process the path parameters 8010 if org_id is not None: 8011 _path_params["org_id"] = org_id 8012 if team_id is not None: 8013 _path_params["team_id"] = team_id 8014 if project_id is not None: 8015 _path_params["project_id"] = project_id 8016 # process the query parameters 8017 if limit is not None: 8018 8019 _query_params.append(("limit", limit)) 8020 8021 if cursor is not None: 8022 8023 _query_params.append(("cursor", cursor)) 8024 8025 # process the header parameters 8026 # process the form parameters 8027 # process the body parameter 8028 8029 # set the HTTP header `Accept` 8030 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8031 8032 # authentication setting 8033 _auth_settings: List[str] = [] 8034 8035 return self.api_client.param_serialize( 8036 method="GET", 8037 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members", 8038 path_params=_path_params, 8039 query_params=_query_params, 8040 header_params=_header_params, 8041 body=_body_params, 8042 post_params=_form_params, 8043 files=_files, 8044 auth_settings=_auth_settings, 8045 collection_formats=_collection_formats, 8046 _host=_host, 8047 _request_auth=_request_auth, 8048 ) 8049 8050 @validate_call 8051 def enterprise_update_project_member( 8052 self, 8053 org_id: Annotated[ 8054 StrictStr, Field(description="The ID of the organization to which the project member belongs.") 8055 ], 8056 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project member belongs.")], 8057 project_id: Annotated[StrictStr, Field(description="The ID of a Project.")], 8058 member_id: Annotated[StrictStr, Field(description="The ID of the member whose details you want to update.")], 8059 update_project_member_request: UpdateProjectMemberRequest, 8060 _request_timeout: Union[ 8061 None, 8062 Annotated[StrictFloat, Field(gt=0)], 8063 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8064 ] = None, 8065 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8066 _content_type: Optional[StrictStr] = None, 8067 _headers: Optional[Dict[StrictStr, Any]] = None, 8068 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8069 ) -> ProjectMember: 8070 """Update project member 8071 8072 Updates details of a project member, such as the member's role.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8073 8074 :param org_id: The ID of the organization to which the project member belongs. (required) 8075 :type org_id: str 8076 :param team_id: The ID of the team to which the project member belongs. (required) 8077 :type team_id: str 8078 :param project_id: The ID of a Project. (required) 8079 :type project_id: str 8080 :param member_id: The ID of the member whose details you want to update. (required) 8081 :type member_id: str 8082 :param update_project_member_request: (required) 8083 :type update_project_member_request: UpdateProjectMemberRequest 8084 :param _request_timeout: timeout setting for this request. If one 8085 number provided, it will be total request 8086 timeout. It can also be a pair (tuple) of 8087 (connection, read) timeouts. 8088 :type _request_timeout: int, tuple(int, int), optional 8089 :param _request_auth: set to override the auth_settings for an a single 8090 request; this effectively ignores the 8091 authentication in the spec for a single request. 8092 :type _request_auth: dict, optional 8093 :param _content_type: force content-type for the request. 8094 :type _content_type: str, Optional 8095 :param _headers: set to override the headers for a single 8096 request; this effectively ignores the headers 8097 in the spec for a single request. 8098 :type _headers: dict, optional 8099 :param _host_index: set to override the host_index for a single 8100 request; this effectively ignores the host_index 8101 in the spec for a single request. 8102 :type _host_index: int, optional 8103 :return: Returns the result object. 8104 """ # noqa: E501 8105 8106 _param = self._enterprise_update_project_member_serialize( 8107 org_id=org_id, 8108 team_id=team_id, 8109 project_id=project_id, 8110 member_id=member_id, 8111 update_project_member_request=update_project_member_request, 8112 _request_auth=_request_auth, 8113 _content_type=_content_type, 8114 _headers=_headers, 8115 _host_index=_host_index, 8116 ) 8117 8118 _response_types_map: Dict[str, Optional[str]] = { 8119 "200": "ProjectMember", 8120 "400": "Error400", 8121 "401": "Error401", 8122 "403": "Error403", 8123 "404": "Error404", 8124 "409": "Error409", 8125 "429": "Error429", 8126 } 8127 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8128 response_data.read() 8129 return self.api_client.response_deserialize( 8130 response_data=response_data, 8131 response_types_map=_response_types_map, 8132 ).data 8133 8134 def _enterprise_update_project_member_serialize( 8135 self, 8136 org_id, 8137 team_id, 8138 project_id, 8139 member_id, 8140 update_project_member_request, 8141 _request_auth, 8142 _content_type, 8143 _headers, 8144 _host_index, 8145 ) -> RequestSerialized: 8146 8147 _host = None 8148 8149 _collection_formats: Dict[str, str] = {} 8150 8151 _path_params: Dict[str, str] = {} 8152 _query_params: List[Tuple[str, str]] = [] 8153 _header_params: Dict[str, Optional[str]] = _headers or {} 8154 _form_params: List[Tuple[str, str]] = [] 8155 _files: Dict[str, str] = {} 8156 _body_params: Optional[bytes] = None 8157 8158 # process the path parameters 8159 if org_id is not None: 8160 _path_params["org_id"] = org_id 8161 if team_id is not None: 8162 _path_params["team_id"] = team_id 8163 if project_id is not None: 8164 _path_params["project_id"] = project_id 8165 if member_id is not None: 8166 _path_params["member_id"] = member_id 8167 # process the query parameters 8168 # process the header parameters 8169 # process the form parameters 8170 # process the body parameter 8171 if update_project_member_request is not None: 8172 _body_params = update_project_member_request 8173 8174 # set the HTTP header `Accept` 8175 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8176 8177 # set the HTTP header `Content-Type` 8178 if _content_type: 8179 _header_params["Content-Type"] = _content_type 8180 else: 8181 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 8182 if _default_content_type is not None: 8183 _header_params["Content-Type"] = _default_content_type 8184 8185 # authentication setting 8186 _auth_settings: List[str] = [] 8187 8188 return self.api_client.param_serialize( 8189 method="PATCH", 8190 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/members/{member_id}", 8191 path_params=_path_params, 8192 query_params=_query_params, 8193 header_params=_header_params, 8194 body=_body_params, 8195 post_params=_form_params, 8196 files=_files, 8197 auth_settings=_auth_settings, 8198 collection_formats=_collection_formats, 8199 _host=_host, 8200 _request_auth=_request_auth, 8201 ) 8202 8203 @validate_call 8204 def enterprise_get_project_settings( 8205 self, 8206 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 8207 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 8208 project_id: Annotated[ 8209 StrictStr, Field(description="The ID of the project for which you want to retrieve the project settings.") 8210 ], 8211 _request_timeout: Union[ 8212 None, 8213 Annotated[StrictFloat, Field(gt=0)], 8214 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8215 ] = None, 8216 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8217 _content_type: Optional[StrictStr] = None, 8218 _headers: Optional[Dict[StrictStr, Any]] = None, 8219 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8220 ) -> ProjectSettings: 8221 """Get project settings 8222 8223 Retrieves the project settings.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8224 8225 :param org_id: The ID of the organization to which the project belongs. (required) 8226 :type org_id: str 8227 :param team_id: The ID of the team to which the project belongs. (required) 8228 :type team_id: str 8229 :param project_id: The ID of the project for which you want to retrieve the project settings. (required) 8230 :type project_id: str 8231 :param _request_timeout: timeout setting for this request. If one 8232 number provided, it will be total request 8233 timeout. It can also be a pair (tuple) of 8234 (connection, read) timeouts. 8235 :type _request_timeout: int, tuple(int, int), optional 8236 :param _request_auth: set to override the auth_settings for an a single 8237 request; this effectively ignores the 8238 authentication in the spec for a single request. 8239 :type _request_auth: dict, optional 8240 :param _content_type: force content-type for the request. 8241 :type _content_type: str, Optional 8242 :param _headers: set to override the headers for a single 8243 request; this effectively ignores the headers 8244 in the spec for a single request. 8245 :type _headers: dict, optional 8246 :param _host_index: set to override the host_index for a single 8247 request; this effectively ignores the host_index 8248 in the spec for a single request. 8249 :type _host_index: int, optional 8250 :return: Returns the result object. 8251 """ # noqa: E501 8252 8253 _param = self._enterprise_get_project_settings_serialize( 8254 org_id=org_id, 8255 team_id=team_id, 8256 project_id=project_id, 8257 _request_auth=_request_auth, 8258 _content_type=_content_type, 8259 _headers=_headers, 8260 _host_index=_host_index, 8261 ) 8262 8263 _response_types_map: Dict[str, Optional[str]] = { 8264 "200": "ProjectSettings", 8265 "400": "Error400", 8266 "401": "Error401", 8267 "403": "Error403", 8268 "404": "Error404", 8269 "429": "Error429", 8270 } 8271 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8272 response_data.read() 8273 return self.api_client.response_deserialize( 8274 response_data=response_data, 8275 response_types_map=_response_types_map, 8276 ).data 8277 8278 def _enterprise_get_project_settings_serialize( 8279 self, 8280 org_id, 8281 team_id, 8282 project_id, 8283 _request_auth, 8284 _content_type, 8285 _headers, 8286 _host_index, 8287 ) -> RequestSerialized: 8288 8289 _host = None 8290 8291 _collection_formats: Dict[str, str] = {} 8292 8293 _path_params: Dict[str, str] = {} 8294 _query_params: List[Tuple[str, str]] = [] 8295 _header_params: Dict[str, Optional[str]] = _headers or {} 8296 _form_params: List[Tuple[str, str]] = [] 8297 _files: Dict[str, str] = {} 8298 _body_params: Optional[bytes] = None 8299 8300 # process the path parameters 8301 if org_id is not None: 8302 _path_params["org_id"] = org_id 8303 if team_id is not None: 8304 _path_params["team_id"] = team_id 8305 if project_id is not None: 8306 _path_params["project_id"] = project_id 8307 # process the query parameters 8308 # process the header parameters 8309 # process the form parameters 8310 # process the body parameter 8311 8312 # set the HTTP header `Accept` 8313 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8314 8315 # authentication setting 8316 _auth_settings: List[str] = [] 8317 8318 return self.api_client.param_serialize( 8319 method="GET", 8320 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/settings", 8321 path_params=_path_params, 8322 query_params=_query_params, 8323 header_params=_header_params, 8324 body=_body_params, 8325 post_params=_form_params, 8326 files=_files, 8327 auth_settings=_auth_settings, 8328 collection_formats=_collection_formats, 8329 _host=_host, 8330 _request_auth=_request_auth, 8331 ) 8332 8333 @validate_call 8334 def enterprise_update_project_settings( 8335 self, 8336 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 8337 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 8338 project_id: Annotated[StrictStr, Field(description="The ID of the project whose settings you want to update.")], 8339 update_project_settings_request: UpdateProjectSettingsRequest, 8340 _request_timeout: Union[ 8341 None, 8342 Annotated[StrictFloat, Field(gt=0)], 8343 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8344 ] = None, 8345 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8346 _content_type: Optional[StrictStr] = None, 8347 _headers: Optional[Dict[StrictStr, Any]] = None, 8348 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8349 ) -> ProjectSettings: 8350 """Update project settings 8351 8352 Updates the settings of a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8353 8354 :param org_id: The ID of the organization to which the project belongs. (required) 8355 :type org_id: str 8356 :param team_id: The ID of the team to which the project belongs. (required) 8357 :type team_id: str 8358 :param project_id: The ID of the project whose settings you want to update. (required) 8359 :type project_id: str 8360 :param update_project_settings_request: (required) 8361 :type update_project_settings_request: UpdateProjectSettingsRequest 8362 :param _request_timeout: timeout setting for this request. If one 8363 number provided, it will be total request 8364 timeout. It can also be a pair (tuple) of 8365 (connection, read) timeouts. 8366 :type _request_timeout: int, tuple(int, int), optional 8367 :param _request_auth: set to override the auth_settings for an a single 8368 request; this effectively ignores the 8369 authentication in the spec for a single request. 8370 :type _request_auth: dict, optional 8371 :param _content_type: force content-type for the request. 8372 :type _content_type: str, Optional 8373 :param _headers: set to override the headers for a single 8374 request; this effectively ignores the headers 8375 in the spec for a single request. 8376 :type _headers: dict, optional 8377 :param _host_index: set to override the host_index for a single 8378 request; this effectively ignores the host_index 8379 in the spec for a single request. 8380 :type _host_index: int, optional 8381 :return: Returns the result object. 8382 """ # noqa: E501 8383 8384 _param = self._enterprise_update_project_settings_serialize( 8385 org_id=org_id, 8386 team_id=team_id, 8387 project_id=project_id, 8388 update_project_settings_request=update_project_settings_request, 8389 _request_auth=_request_auth, 8390 _content_type=_content_type, 8391 _headers=_headers, 8392 _host_index=_host_index, 8393 ) 8394 8395 _response_types_map: Dict[str, Optional[str]] = { 8396 "200": "ProjectSettings", 8397 "400": "Error400", 8398 "401": "Error401", 8399 "403": "Error403", 8400 "404": "Error404", 8401 "409": "Error409", 8402 "429": "Error429", 8403 } 8404 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8405 response_data.read() 8406 return self.api_client.response_deserialize( 8407 response_data=response_data, 8408 response_types_map=_response_types_map, 8409 ).data 8410 8411 def _enterprise_update_project_settings_serialize( 8412 self, 8413 org_id, 8414 team_id, 8415 project_id, 8416 update_project_settings_request, 8417 _request_auth, 8418 _content_type, 8419 _headers, 8420 _host_index, 8421 ) -> RequestSerialized: 8422 8423 _host = None 8424 8425 _collection_formats: Dict[str, str] = {} 8426 8427 _path_params: Dict[str, str] = {} 8428 _query_params: List[Tuple[str, str]] = [] 8429 _header_params: Dict[str, Optional[str]] = _headers or {} 8430 _form_params: List[Tuple[str, str]] = [] 8431 _files: Dict[str, str] = {} 8432 _body_params: Optional[bytes] = None 8433 8434 # process the path parameters 8435 if org_id is not None: 8436 _path_params["org_id"] = org_id 8437 if team_id is not None: 8438 _path_params["team_id"] = team_id 8439 if project_id is not None: 8440 _path_params["project_id"] = project_id 8441 # process the query parameters 8442 # process the header parameters 8443 # process the form parameters 8444 # process the body parameter 8445 if update_project_settings_request is not None: 8446 _body_params = update_project_settings_request 8447 8448 # set the HTTP header `Accept` 8449 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8450 8451 # set the HTTP header `Content-Type` 8452 if _content_type: 8453 _header_params["Content-Type"] = _content_type 8454 else: 8455 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 8456 if _default_content_type is not None: 8457 _header_params["Content-Type"] = _default_content_type 8458 8459 # authentication setting 8460 _auth_settings: List[str] = [] 8461 8462 return self.api_client.param_serialize( 8463 method="PATCH", 8464 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}/settings", 8465 path_params=_path_params, 8466 query_params=_query_params, 8467 header_params=_header_params, 8468 body=_body_params, 8469 post_params=_form_params, 8470 files=_files, 8471 auth_settings=_auth_settings, 8472 collection_formats=_collection_formats, 8473 _host=_host, 8474 _request_auth=_request_auth, 8475 ) 8476 8477 @validate_call 8478 def enterprise_create_project( 8479 self, 8480 org_id: Annotated[ 8481 StrictStr, Field(description="The ID of the organization within which you you want to create a project.") 8482 ], 8483 team_id: Annotated[ 8484 StrictStr, Field(description="The ID of the team within which you you want to create a project.") 8485 ], 8486 create_project_request: CreateProjectRequest, 8487 _request_timeout: Union[ 8488 None, 8489 Annotated[StrictFloat, Field(gt=0)], 8490 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8491 ] = None, 8492 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8493 _content_type: Optional[StrictStr] = None, 8494 _headers: Optional[Dict[StrictStr, Any]] = None, 8495 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8496 ) -> Project: 8497 """Create project 8498 8499 Projects are essentially folders of boards with the option to manage user access for a smaller group of people within a team. Projects are here to help you organize your boards and make them easier to find and share. In other words, a project is a group of boards that you can share with your teammates all at once. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/360018262033-Projects\" target=_blank>Help Center page on Projects</a>. <br><br>This API creates a new project in an existing team of an organization.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8500 8501 :param org_id: The ID of the organization within which you you want to create a project. (required) 8502 :type org_id: str 8503 :param team_id: The ID of the team within which you you want to create a project. (required) 8504 :type team_id: str 8505 :param create_project_request: (required) 8506 :type create_project_request: CreateProjectRequest 8507 :param _request_timeout: timeout setting for this request. If one 8508 number provided, it will be total request 8509 timeout. It can also be a pair (tuple) of 8510 (connection, read) timeouts. 8511 :type _request_timeout: int, tuple(int, int), optional 8512 :param _request_auth: set to override the auth_settings for an a single 8513 request; this effectively ignores the 8514 authentication in the spec for a single request. 8515 :type _request_auth: dict, optional 8516 :param _content_type: force content-type for the request. 8517 :type _content_type: str, Optional 8518 :param _headers: set to override the headers for a single 8519 request; this effectively ignores the headers 8520 in the spec for a single request. 8521 :type _headers: dict, optional 8522 :param _host_index: set to override the host_index for a single 8523 request; this effectively ignores the host_index 8524 in the spec for a single request. 8525 :type _host_index: int, optional 8526 :return: Returns the result object. 8527 """ # noqa: E501 8528 8529 _param = self._enterprise_create_project_serialize( 8530 org_id=org_id, 8531 team_id=team_id, 8532 create_project_request=create_project_request, 8533 _request_auth=_request_auth, 8534 _content_type=_content_type, 8535 _headers=_headers, 8536 _host_index=_host_index, 8537 ) 8538 8539 _response_types_map: Dict[str, Optional[str]] = { 8540 "201": "Project", 8541 "400": "Error400", 8542 "401": "Error401", 8543 "403": "Error403", 8544 "404": "Error404", 8545 "409": "Error409", 8546 "429": "Error429", 8547 } 8548 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8549 response_data.read() 8550 return self.api_client.response_deserialize( 8551 response_data=response_data, 8552 response_types_map=_response_types_map, 8553 ).data 8554 8555 def _enterprise_create_project_serialize( 8556 self, 8557 org_id, 8558 team_id, 8559 create_project_request, 8560 _request_auth, 8561 _content_type, 8562 _headers, 8563 _host_index, 8564 ) -> RequestSerialized: 8565 8566 _host = None 8567 8568 _collection_formats: Dict[str, str] = {} 8569 8570 _path_params: Dict[str, str] = {} 8571 _query_params: List[Tuple[str, str]] = [] 8572 _header_params: Dict[str, Optional[str]] = _headers or {} 8573 _form_params: List[Tuple[str, str]] = [] 8574 _files: Dict[str, str] = {} 8575 _body_params: Optional[bytes] = None 8576 8577 # process the path parameters 8578 if org_id is not None: 8579 _path_params["org_id"] = org_id 8580 if team_id is not None: 8581 _path_params["team_id"] = team_id 8582 # process the query parameters 8583 # process the header parameters 8584 # process the form parameters 8585 # process the body parameter 8586 if create_project_request is not None: 8587 _body_params = create_project_request 8588 8589 # set the HTTP header `Accept` 8590 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8591 8592 # set the HTTP header `Content-Type` 8593 if _content_type: 8594 _header_params["Content-Type"] = _content_type 8595 else: 8596 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 8597 if _default_content_type is not None: 8598 _header_params["Content-Type"] = _default_content_type 8599 8600 # authentication setting 8601 _auth_settings: List[str] = [] 8602 8603 return self.api_client.param_serialize( 8604 method="POST", 8605 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects", 8606 path_params=_path_params, 8607 query_params=_query_params, 8608 header_params=_header_params, 8609 body=_body_params, 8610 post_params=_form_params, 8611 files=_files, 8612 auth_settings=_auth_settings, 8613 collection_formats=_collection_formats, 8614 _host=_host, 8615 _request_auth=_request_auth, 8616 ) 8617 8618 @validate_call 8619 def enterprise_delete_project( 8620 self, 8621 org_id: Annotated[ 8622 StrictStr, Field(description="The ID of the organization from which you want to delete a project.") 8623 ], 8624 team_id: Annotated[StrictStr, Field(description="The ID of the team from which you want to delete a project.")], 8625 project_id: Annotated[StrictStr, Field(description="The ID of the project that you want to delete.")], 8626 _request_timeout: Union[ 8627 None, 8628 Annotated[StrictFloat, Field(gt=0)], 8629 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8630 ] = None, 8631 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8632 _content_type: Optional[StrictStr] = None, 8633 _headers: Optional[Dict[StrictStr, Any]] = None, 8634 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8635 ) -> None: 8636 """Delete project 8637 8638 Deletes a project. After a project is deleted, all boards and users that belong to the project remain in the team.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8639 8640 :param org_id: The ID of the organization from which you want to delete a project. (required) 8641 :type org_id: str 8642 :param team_id: The ID of the team from which you want to delete a project. (required) 8643 :type team_id: str 8644 :param project_id: The ID of the project that you want to delete. (required) 8645 :type project_id: str 8646 :param _request_timeout: timeout setting for this request. If one 8647 number provided, it will be total request 8648 timeout. It can also be a pair (tuple) of 8649 (connection, read) timeouts. 8650 :type _request_timeout: int, tuple(int, int), optional 8651 :param _request_auth: set to override the auth_settings for an a single 8652 request; this effectively ignores the 8653 authentication in the spec for a single request. 8654 :type _request_auth: dict, optional 8655 :param _content_type: force content-type for the request. 8656 :type _content_type: str, Optional 8657 :param _headers: set to override the headers for a single 8658 request; this effectively ignores the headers 8659 in the spec for a single request. 8660 :type _headers: dict, optional 8661 :param _host_index: set to override the host_index for a single 8662 request; this effectively ignores the host_index 8663 in the spec for a single request. 8664 :type _host_index: int, optional 8665 :return: Returns the result object. 8666 """ # noqa: E501 8667 8668 _param = self._enterprise_delete_project_serialize( 8669 org_id=org_id, 8670 team_id=team_id, 8671 project_id=project_id, 8672 _request_auth=_request_auth, 8673 _content_type=_content_type, 8674 _headers=_headers, 8675 _host_index=_host_index, 8676 ) 8677 8678 _response_types_map: Dict[str, Optional[str]] = { 8679 "204": None, 8680 "400": "Error400", 8681 "401": "Error401", 8682 "403": "Error403", 8683 "404": "Error404", 8684 "409": "Error409", 8685 "429": "Error429", 8686 } 8687 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8688 response_data.read() 8689 return self.api_client.response_deserialize( 8690 response_data=response_data, 8691 response_types_map=_response_types_map, 8692 ).data 8693 8694 def _enterprise_delete_project_serialize( 8695 self, 8696 org_id, 8697 team_id, 8698 project_id, 8699 _request_auth, 8700 _content_type, 8701 _headers, 8702 _host_index, 8703 ) -> RequestSerialized: 8704 8705 _host = None 8706 8707 _collection_formats: Dict[str, str] = {} 8708 8709 _path_params: Dict[str, str] = {} 8710 _query_params: List[Tuple[str, str]] = [] 8711 _header_params: Dict[str, Optional[str]] = _headers or {} 8712 _form_params: List[Tuple[str, str]] = [] 8713 _files: Dict[str, str] = {} 8714 _body_params: Optional[bytes] = None 8715 8716 # process the path parameters 8717 if org_id is not None: 8718 _path_params["org_id"] = org_id 8719 if team_id is not None: 8720 _path_params["team_id"] = team_id 8721 if project_id is not None: 8722 _path_params["project_id"] = project_id 8723 # process the query parameters 8724 # process the header parameters 8725 # process the form parameters 8726 # process the body parameter 8727 8728 # set the HTTP header `Accept` 8729 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8730 8731 # authentication setting 8732 _auth_settings: List[str] = [] 8733 8734 return self.api_client.param_serialize( 8735 method="DELETE", 8736 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}", 8737 path_params=_path_params, 8738 query_params=_query_params, 8739 header_params=_header_params, 8740 body=_body_params, 8741 post_params=_form_params, 8742 files=_files, 8743 auth_settings=_auth_settings, 8744 collection_formats=_collection_formats, 8745 _host=_host, 8746 _request_auth=_request_auth, 8747 ) 8748 8749 @validate_call 8750 def enterprise_get_project( 8751 self, 8752 org_id: Annotated[ 8753 StrictStr, 8754 Field(description="The ID of the organization from which you want to retrieve the project information."), 8755 ], 8756 team_id: Annotated[ 8757 StrictStr, Field(description="The ID of the team from which you want to retrieve the project information.") 8758 ], 8759 project_id: Annotated[ 8760 StrictStr, Field(description="The ID of the project for which you want to retrieve the information.") 8761 ], 8762 _request_timeout: Union[ 8763 None, 8764 Annotated[StrictFloat, Field(gt=0)], 8765 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8766 ] = None, 8767 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8768 _content_type: Optional[StrictStr] = None, 8769 _headers: Optional[Dict[StrictStr, Any]] = None, 8770 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8771 ) -> Project: 8772 """Get project 8773 8774 Retrieves project information, such as a name for an existing project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8775 8776 :param org_id: The ID of the organization from which you want to retrieve the project information. (required) 8777 :type org_id: str 8778 :param team_id: The ID of the team from which you want to retrieve the project information. (required) 8779 :type team_id: str 8780 :param project_id: The ID of the project for which you want to retrieve the information. (required) 8781 :type project_id: str 8782 :param _request_timeout: timeout setting for this request. If one 8783 number provided, it will be total request 8784 timeout. It can also be a pair (tuple) of 8785 (connection, read) timeouts. 8786 :type _request_timeout: int, tuple(int, int), optional 8787 :param _request_auth: set to override the auth_settings for an a single 8788 request; this effectively ignores the 8789 authentication in the spec for a single request. 8790 :type _request_auth: dict, optional 8791 :param _content_type: force content-type for the request. 8792 :type _content_type: str, Optional 8793 :param _headers: set to override the headers for a single 8794 request; this effectively ignores the headers 8795 in the spec for a single request. 8796 :type _headers: dict, optional 8797 :param _host_index: set to override the host_index for a single 8798 request; this effectively ignores the host_index 8799 in the spec for a single request. 8800 :type _host_index: int, optional 8801 :return: Returns the result object. 8802 """ # noqa: E501 8803 8804 _param = self._enterprise_get_project_serialize( 8805 org_id=org_id, 8806 team_id=team_id, 8807 project_id=project_id, 8808 _request_auth=_request_auth, 8809 _content_type=_content_type, 8810 _headers=_headers, 8811 _host_index=_host_index, 8812 ) 8813 8814 _response_types_map: Dict[str, Optional[str]] = { 8815 "200": "Project", 8816 "400": "Error400", 8817 "401": "Error401", 8818 "403": "Error403", 8819 "404": "Error404", 8820 "429": "Error429", 8821 } 8822 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8823 response_data.read() 8824 return self.api_client.response_deserialize( 8825 response_data=response_data, 8826 response_types_map=_response_types_map, 8827 ).data 8828 8829 def _enterprise_get_project_serialize( 8830 self, 8831 org_id, 8832 team_id, 8833 project_id, 8834 _request_auth, 8835 _content_type, 8836 _headers, 8837 _host_index, 8838 ) -> RequestSerialized: 8839 8840 _host = None 8841 8842 _collection_formats: Dict[str, str] = {} 8843 8844 _path_params: Dict[str, str] = {} 8845 _query_params: List[Tuple[str, str]] = [] 8846 _header_params: Dict[str, Optional[str]] = _headers or {} 8847 _form_params: List[Tuple[str, str]] = [] 8848 _files: Dict[str, str] = {} 8849 _body_params: Optional[bytes] = None 8850 8851 # process the path parameters 8852 if org_id is not None: 8853 _path_params["org_id"] = org_id 8854 if team_id is not None: 8855 _path_params["team_id"] = team_id 8856 if project_id is not None: 8857 _path_params["project_id"] = project_id 8858 # process the query parameters 8859 # process the header parameters 8860 # process the form parameters 8861 # process the body parameter 8862 8863 # set the HTTP header `Accept` 8864 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 8865 8866 # authentication setting 8867 _auth_settings: List[str] = [] 8868 8869 return self.api_client.param_serialize( 8870 method="GET", 8871 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}", 8872 path_params=_path_params, 8873 query_params=_query_params, 8874 header_params=_header_params, 8875 body=_body_params, 8876 post_params=_form_params, 8877 files=_files, 8878 auth_settings=_auth_settings, 8879 collection_formats=_collection_formats, 8880 _host=_host, 8881 _request_auth=_request_auth, 8882 ) 8883 8884 @validate_call 8885 def enterprise_get_projects( 8886 self, 8887 org_id: Annotated[ 8888 StrictStr, 8889 Field( 8890 description="The ID of the organization from which you want to retrieve the list of available projects." 8891 ), 8892 ], 8893 team_id: Annotated[ 8894 StrictStr, 8895 Field(description="The ID of the team from which you want to retrieve the list of available projects."), 8896 ], 8897 limit: Annotated[ 8898 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 8899 Field( 8900 description="The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value." 8901 ), 8902 ] = None, 8903 cursor: Annotated[ 8904 Optional[StrictStr], 8905 Field( 8906 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 8907 ), 8908 ] = None, 8909 _request_timeout: Union[ 8910 None, 8911 Annotated[StrictFloat, Field(gt=0)], 8912 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8913 ] = None, 8914 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8915 _content_type: Optional[StrictStr] = None, 8916 _headers: Optional[Dict[StrictStr, Any]] = None, 8917 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8918 ) -> ProjectPage: 8919 """List of projects 8920 8921 Retrieves the list of projects in an existing team of an organization. You can retrieve all projects, including all private projects (projects that haven't been specifically shared with you) by enabling Content Admin permissions. To enable Content Admin permissions, see [Content Admin permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins).<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8922 8923 :param org_id: The ID of the organization from which you want to retrieve the list of available projects. (required) 8924 :type org_id: str 8925 :param team_id: The ID of the team from which you want to retrieve the list of available projects. (required) 8926 :type team_id: str 8927 :param limit: The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value. 8928 :type limit: int 8929 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 8930 :type cursor: str 8931 :param _request_timeout: timeout setting for this request. If one 8932 number provided, it will be total request 8933 timeout. It can also be a pair (tuple) of 8934 (connection, read) timeouts. 8935 :type _request_timeout: int, tuple(int, int), optional 8936 :param _request_auth: set to override the auth_settings for an a single 8937 request; this effectively ignores the 8938 authentication in the spec for a single request. 8939 :type _request_auth: dict, optional 8940 :param _content_type: force content-type for the request. 8941 :type _content_type: str, Optional 8942 :param _headers: set to override the headers for a single 8943 request; this effectively ignores the headers 8944 in the spec for a single request. 8945 :type _headers: dict, optional 8946 :param _host_index: set to override the host_index for a single 8947 request; this effectively ignores the host_index 8948 in the spec for a single request. 8949 :type _host_index: int, optional 8950 :return: Returns the result object. 8951 """ # noqa: E501 8952 8953 _param = self._enterprise_get_projects_serialize( 8954 org_id=org_id, 8955 team_id=team_id, 8956 limit=limit, 8957 cursor=cursor, 8958 _request_auth=_request_auth, 8959 _content_type=_content_type, 8960 _headers=_headers, 8961 _host_index=_host_index, 8962 ) 8963 8964 _response_types_map: Dict[str, Optional[str]] = { 8965 "200": "ProjectPage", 8966 "400": "Error400", 8967 "401": "Error401", 8968 "403": "Error403", 8969 "404": "Error404", 8970 "429": "Error429", 8971 } 8972 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8973 response_data.read() 8974 return self.api_client.response_deserialize( 8975 response_data=response_data, 8976 response_types_map=_response_types_map, 8977 ).data 8978 8979 def _enterprise_get_projects_serialize( 8980 self, 8981 org_id, 8982 team_id, 8983 limit, 8984 cursor, 8985 _request_auth, 8986 _content_type, 8987 _headers, 8988 _host_index, 8989 ) -> RequestSerialized: 8990 8991 _host = None 8992 8993 _collection_formats: Dict[str, str] = {} 8994 8995 _path_params: Dict[str, str] = {} 8996 _query_params: List[Tuple[str, str]] = [] 8997 _header_params: Dict[str, Optional[str]] = _headers or {} 8998 _form_params: List[Tuple[str, str]] = [] 8999 _files: Dict[str, str] = {} 9000 _body_params: Optional[bytes] = None 9001 9002 # process the path parameters 9003 if org_id is not None: 9004 _path_params["org_id"] = org_id 9005 if team_id is not None: 9006 _path_params["team_id"] = team_id 9007 # process the query parameters 9008 if limit is not None: 9009 9010 _query_params.append(("limit", limit)) 9011 9012 if cursor is not None: 9013 9014 _query_params.append(("cursor", cursor)) 9015 9016 # process the header parameters 9017 # process the form parameters 9018 # process the body parameter 9019 9020 # set the HTTP header `Accept` 9021 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9022 9023 # authentication setting 9024 _auth_settings: List[str] = [] 9025 9026 return self.api_client.param_serialize( 9027 method="GET", 9028 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects", 9029 path_params=_path_params, 9030 query_params=_query_params, 9031 header_params=_header_params, 9032 body=_body_params, 9033 post_params=_form_params, 9034 files=_files, 9035 auth_settings=_auth_settings, 9036 collection_formats=_collection_formats, 9037 _host=_host, 9038 _request_auth=_request_auth, 9039 ) 9040 9041 @validate_call 9042 def enterprise_update_project( 9043 self, 9044 org_id: Annotated[StrictStr, Field(description="The ID of an Organization.")], 9045 team_id: Annotated[StrictStr, Field(description="The ID of a Team.")], 9046 project_id: Annotated[StrictStr, Field(description="The ID of a Project.")], 9047 update_project_request: UpdateProjectRequest, 9048 _request_timeout: Union[ 9049 None, 9050 Annotated[StrictFloat, Field(gt=0)], 9051 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9052 ] = None, 9053 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9054 _content_type: Optional[StrictStr] = None, 9055 _headers: Optional[Dict[StrictStr, Any]] = None, 9056 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9057 ) -> Project: 9058 """Update project 9059 9060 Update information about a project, such as the project name.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9061 9062 :param org_id: The ID of an Organization. (required) 9063 :type org_id: str 9064 :param team_id: The ID of a Team. (required) 9065 :type team_id: str 9066 :param project_id: The ID of a Project. (required) 9067 :type project_id: str 9068 :param update_project_request: (required) 9069 :type update_project_request: UpdateProjectRequest 9070 :param _request_timeout: timeout setting for this request. If one 9071 number provided, it will be total request 9072 timeout. It can also be a pair (tuple) of 9073 (connection, read) timeouts. 9074 :type _request_timeout: int, tuple(int, int), optional 9075 :param _request_auth: set to override the auth_settings for an a single 9076 request; this effectively ignores the 9077 authentication in the spec for a single request. 9078 :type _request_auth: dict, optional 9079 :param _content_type: force content-type for the request. 9080 :type _content_type: str, Optional 9081 :param _headers: set to override the headers for a single 9082 request; this effectively ignores the headers 9083 in the spec for a single request. 9084 :type _headers: dict, optional 9085 :param _host_index: set to override the host_index for a single 9086 request; this effectively ignores the host_index 9087 in the spec for a single request. 9088 :type _host_index: int, optional 9089 :return: Returns the result object. 9090 """ # noqa: E501 9091 9092 _param = self._enterprise_update_project_serialize( 9093 org_id=org_id, 9094 team_id=team_id, 9095 project_id=project_id, 9096 update_project_request=update_project_request, 9097 _request_auth=_request_auth, 9098 _content_type=_content_type, 9099 _headers=_headers, 9100 _host_index=_host_index, 9101 ) 9102 9103 _response_types_map: Dict[str, Optional[str]] = { 9104 "200": "Project", 9105 "400": "Error400", 9106 "401": "Error401", 9107 "403": "Error403", 9108 "404": "Error404", 9109 "409": "Error409", 9110 "429": "Error429", 9111 } 9112 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9113 response_data.read() 9114 return self.api_client.response_deserialize( 9115 response_data=response_data, 9116 response_types_map=_response_types_map, 9117 ).data 9118 9119 def _enterprise_update_project_serialize( 9120 self, 9121 org_id, 9122 team_id, 9123 project_id, 9124 update_project_request, 9125 _request_auth, 9126 _content_type, 9127 _headers, 9128 _host_index, 9129 ) -> RequestSerialized: 9130 9131 _host = None 9132 9133 _collection_formats: Dict[str, str] = {} 9134 9135 _path_params: Dict[str, str] = {} 9136 _query_params: List[Tuple[str, str]] = [] 9137 _header_params: Dict[str, Optional[str]] = _headers or {} 9138 _form_params: List[Tuple[str, str]] = [] 9139 _files: Dict[str, str] = {} 9140 _body_params: Optional[bytes] = None 9141 9142 # process the path parameters 9143 if org_id is not None: 9144 _path_params["org_id"] = org_id 9145 if team_id is not None: 9146 _path_params["team_id"] = team_id 9147 if project_id is not None: 9148 _path_params["project_id"] = project_id 9149 # process the query parameters 9150 # process the header parameters 9151 # process the form parameters 9152 # process the body parameter 9153 if update_project_request is not None: 9154 _body_params = update_project_request 9155 9156 # set the HTTP header `Accept` 9157 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9158 9159 # set the HTTP header `Content-Type` 9160 if _content_type: 9161 _header_params["Content-Type"] = _content_type 9162 else: 9163 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 9164 if _default_content_type is not None: 9165 _header_params["Content-Type"] = _default_content_type 9166 9167 # authentication setting 9168 _auth_settings: List[str] = [] 9169 9170 return self.api_client.param_serialize( 9171 method="PATCH", 9172 resource_path="/v2/orgs/{org_id}/teams/{team_id}/projects/{project_id}", 9173 path_params=_path_params, 9174 query_params=_query_params, 9175 header_params=_header_params, 9176 body=_body_params, 9177 post_params=_form_params, 9178 files=_files, 9179 auth_settings=_auth_settings, 9180 collection_formats=_collection_formats, 9181 _host=_host, 9182 _request_auth=_request_auth, 9183 ) 9184 9185 @validate_call 9186 def enterprise_post_user_sessions_reset( 9187 self, 9188 email: Annotated[ 9189 StrictStr, 9190 Field( 9191 description="Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices." 9192 ), 9193 ], 9194 _request_timeout: Union[ 9195 None, 9196 Annotated[StrictFloat, Field(gt=0)], 9197 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9198 ] = None, 9199 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9200 _content_type: Optional[StrictStr] = None, 9201 _headers: Optional[Dict[StrictStr, Any]] = None, 9202 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9203 ) -> None: 9204 """Reset all sessions of a user 9205 9206 Reset all sessions of a user. Admins can now take immediate action to restrict user access to company data in case of security concerns. Calling this API ends all active Miro sessions across devices for a particular user, requiring the user to sign in again. This is useful in situations where a user leaves the company, their credentials are compromised, or there's suspicious activity on their account.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>sessions:delete</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9207 9208 :param email: Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices. (required) 9209 :type email: str 9210 :param _request_timeout: timeout setting for this request. If one 9211 number provided, it will be total request 9212 timeout. It can also be a pair (tuple) of 9213 (connection, read) timeouts. 9214 :type _request_timeout: int, tuple(int, int), optional 9215 :param _request_auth: set to override the auth_settings for an a single 9216 request; this effectively ignores the 9217 authentication in the spec for a single request. 9218 :type _request_auth: dict, optional 9219 :param _content_type: force content-type for the request. 9220 :type _content_type: str, Optional 9221 :param _headers: set to override the headers for a single 9222 request; this effectively ignores the headers 9223 in the spec for a single request. 9224 :type _headers: dict, optional 9225 :param _host_index: set to override the host_index for a single 9226 request; this effectively ignores the host_index 9227 in the spec for a single request. 9228 :type _host_index: int, optional 9229 :return: Returns the result object. 9230 """ # noqa: E501 9231 9232 _param = self._enterprise_post_user_sessions_reset_serialize( 9233 email=email, 9234 _request_auth=_request_auth, 9235 _content_type=_content_type, 9236 _headers=_headers, 9237 _host_index=_host_index, 9238 ) 9239 9240 _response_types_map: Dict[str, Optional[str]] = { 9241 "200": None, 9242 "400": None, 9243 "401": None, 9244 "403": None, 9245 "404": None, 9246 "429": None, 9247 } 9248 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9249 response_data.read() 9250 return self.api_client.response_deserialize( 9251 response_data=response_data, 9252 response_types_map=_response_types_map, 9253 ).data 9254 9255 def _enterprise_post_user_sessions_reset_serialize( 9256 self, 9257 email, 9258 _request_auth, 9259 _content_type, 9260 _headers, 9261 _host_index, 9262 ) -> RequestSerialized: 9263 9264 _host = None 9265 9266 _collection_formats: Dict[str, str] = {} 9267 9268 _path_params: Dict[str, str] = {} 9269 _query_params: List[Tuple[str, str]] = [] 9270 _header_params: Dict[str, Optional[str]] = _headers or {} 9271 _form_params: List[Tuple[str, str]] = [] 9272 _files: Dict[str, str] = {} 9273 _body_params: Optional[bytes] = None 9274 9275 # process the path parameters 9276 # process the query parameters 9277 if email is not None: 9278 9279 _query_params.append(("email", email)) 9280 9281 # process the header parameters 9282 # process the form parameters 9283 # process the body parameter 9284 9285 # authentication setting 9286 _auth_settings: List[str] = [] 9287 9288 return self.api_client.param_serialize( 9289 method="POST", 9290 resource_path="/v2/sessions/reset_all", 9291 path_params=_path_params, 9292 query_params=_query_params, 9293 header_params=_header_params, 9294 body=_body_params, 9295 post_params=_form_params, 9296 files=_files, 9297 auth_settings=_auth_settings, 9298 collection_formats=_collection_formats, 9299 _host=_host, 9300 _request_auth=_request_auth, 9301 ) 9302 9303 @validate_call 9304 def enterprise_boards_create_group( 9305 self, 9306 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9307 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9308 create_board_user_groups_request: CreateBoardUserGroupsRequest, 9309 _request_timeout: Union[ 9310 None, 9311 Annotated[StrictFloat, Field(gt=0)], 9312 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9313 ] = None, 9314 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9315 _content_type: Optional[StrictStr] = None, 9316 _headers: Optional[Dict[StrictStr, Any]] = None, 9317 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9318 ) -> BoardUserGroup: 9319 """Create board user group assignments 9320 9321 Shares a board with user groups with a specified role. Updates the role if already shared.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9322 9323 :param org_id: The ID of an organization. (required) 9324 :type org_id: str 9325 :param board_id: The ID of the board. (required) 9326 :type board_id: str 9327 :param create_board_user_groups_request: (required) 9328 :type create_board_user_groups_request: CreateBoardUserGroupsRequest 9329 :param _request_timeout: timeout setting for this request. If one 9330 number provided, it will be total request 9331 timeout. It can also be a pair (tuple) of 9332 (connection, read) timeouts. 9333 :type _request_timeout: int, tuple(int, int), optional 9334 :param _request_auth: set to override the auth_settings for an a single 9335 request; this effectively ignores the 9336 authentication in the spec for a single request. 9337 :type _request_auth: dict, optional 9338 :param _content_type: force content-type for the request. 9339 :type _content_type: str, Optional 9340 :param _headers: set to override the headers for a single 9341 request; this effectively ignores the headers 9342 in the spec for a single request. 9343 :type _headers: dict, optional 9344 :param _host_index: set to override the host_index for a single 9345 request; this effectively ignores the host_index 9346 in the spec for a single request. 9347 :type _host_index: int, optional 9348 :return: Returns the result object. 9349 """ # noqa: E501 9350 9351 _param = self._enterprise_boards_create_group_serialize( 9352 org_id=org_id, 9353 board_id=board_id, 9354 create_board_user_groups_request=create_board_user_groups_request, 9355 _request_auth=_request_auth, 9356 _content_type=_content_type, 9357 _headers=_headers, 9358 _host_index=_host_index, 9359 ) 9360 9361 _response_types_map: Dict[str, Optional[str]] = { 9362 "200": "BoardUserGroup", 9363 "400": None, 9364 "401": None, 9365 "403": None, 9366 "409": None, 9367 "429": None, 9368 } 9369 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9370 response_data.read() 9371 return self.api_client.response_deserialize( 9372 response_data=response_data, 9373 response_types_map=_response_types_map, 9374 ).data 9375 9376 def _enterprise_boards_create_group_serialize( 9377 self, 9378 org_id, 9379 board_id, 9380 create_board_user_groups_request, 9381 _request_auth, 9382 _content_type, 9383 _headers, 9384 _host_index, 9385 ) -> RequestSerialized: 9386 9387 _host = None 9388 9389 _collection_formats: Dict[str, str] = {} 9390 9391 _path_params: Dict[str, str] = {} 9392 _query_params: List[Tuple[str, str]] = [] 9393 _header_params: Dict[str, Optional[str]] = _headers or {} 9394 _form_params: List[Tuple[str, str]] = [] 9395 _files: Dict[str, str] = {} 9396 _body_params: Optional[bytes] = None 9397 9398 # process the path parameters 9399 if org_id is not None: 9400 _path_params["org_id"] = org_id 9401 if board_id is not None: 9402 _path_params["board_id"] = board_id 9403 # process the query parameters 9404 # process the header parameters 9405 # process the form parameters 9406 # process the body parameter 9407 if create_board_user_groups_request is not None: 9408 _body_params = create_board_user_groups_request 9409 9410 # set the HTTP header `Accept` 9411 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9412 9413 # set the HTTP header `Content-Type` 9414 if _content_type: 9415 _header_params["Content-Type"] = _content_type 9416 else: 9417 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 9418 if _default_content_type is not None: 9419 _header_params["Content-Type"] = _default_content_type 9420 9421 # authentication setting 9422 _auth_settings: List[str] = [] 9423 9424 return self.api_client.param_serialize( 9425 method="POST", 9426 resource_path="/v2/orgs/{org_id}/boards/{board_id}/groups", 9427 path_params=_path_params, 9428 query_params=_query_params, 9429 header_params=_header_params, 9430 body=_body_params, 9431 post_params=_form_params, 9432 files=_files, 9433 auth_settings=_auth_settings, 9434 collection_formats=_collection_formats, 9435 _host=_host, 9436 _request_auth=_request_auth, 9437 ) 9438 9439 @validate_call 9440 def enterprise_boards_delete_groups( 9441 self, 9442 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9443 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9444 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 9445 _request_timeout: Union[ 9446 None, 9447 Annotated[StrictFloat, Field(gt=0)], 9448 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9449 ] = None, 9450 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9451 _content_type: Optional[StrictStr] = None, 9452 _headers: Optional[Dict[StrictStr, Any]] = None, 9453 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9454 ) -> None: 9455 """Delete board user group assignment 9456 9457 Removes a user group from the specified board.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9458 9459 :param org_id: The ID of an organization. (required) 9460 :type org_id: str 9461 :param board_id: The ID of the board. (required) 9462 :type board_id: str 9463 :param group_id: The ID of a user group. (required) 9464 :type group_id: str 9465 :param _request_timeout: timeout setting for this request. If one 9466 number provided, it will be total request 9467 timeout. It can also be a pair (tuple) of 9468 (connection, read) timeouts. 9469 :type _request_timeout: int, tuple(int, int), optional 9470 :param _request_auth: set to override the auth_settings for an a single 9471 request; this effectively ignores the 9472 authentication in the spec for a single request. 9473 :type _request_auth: dict, optional 9474 :param _content_type: force content-type for the request. 9475 :type _content_type: str, Optional 9476 :param _headers: set to override the headers for a single 9477 request; this effectively ignores the headers 9478 in the spec for a single request. 9479 :type _headers: dict, optional 9480 :param _host_index: set to override the host_index for a single 9481 request; this effectively ignores the host_index 9482 in the spec for a single request. 9483 :type _host_index: int, optional 9484 :return: Returns the result object. 9485 """ # noqa: E501 9486 9487 _param = self._enterprise_boards_delete_groups_serialize( 9488 org_id=org_id, 9489 board_id=board_id, 9490 group_id=group_id, 9491 _request_auth=_request_auth, 9492 _content_type=_content_type, 9493 _headers=_headers, 9494 _host_index=_host_index, 9495 ) 9496 9497 _response_types_map: Dict[str, Optional[str]] = { 9498 "204": None, 9499 "400": None, 9500 "401": None, 9501 "403": None, 9502 "404": None, 9503 "409": None, 9504 "429": None, 9505 } 9506 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9507 response_data.read() 9508 return self.api_client.response_deserialize( 9509 response_data=response_data, 9510 response_types_map=_response_types_map, 9511 ).data 9512 9513 def _enterprise_boards_delete_groups_serialize( 9514 self, 9515 org_id, 9516 board_id, 9517 group_id, 9518 _request_auth, 9519 _content_type, 9520 _headers, 9521 _host_index, 9522 ) -> RequestSerialized: 9523 9524 _host = None 9525 9526 _collection_formats: Dict[str, str] = {} 9527 9528 _path_params: Dict[str, str] = {} 9529 _query_params: List[Tuple[str, str]] = [] 9530 _header_params: Dict[str, Optional[str]] = _headers or {} 9531 _form_params: List[Tuple[str, str]] = [] 9532 _files: Dict[str, str] = {} 9533 _body_params: Optional[bytes] = None 9534 9535 # process the path parameters 9536 if org_id is not None: 9537 _path_params["org_id"] = org_id 9538 if board_id is not None: 9539 _path_params["board_id"] = board_id 9540 if group_id is not None: 9541 _path_params["group_id"] = group_id 9542 # process the query parameters 9543 # process the header parameters 9544 # process the form parameters 9545 # process the body parameter 9546 9547 # authentication setting 9548 _auth_settings: List[str] = [] 9549 9550 return self.api_client.param_serialize( 9551 method="DELETE", 9552 resource_path="/v2/orgs/{org_id}/boards/{board_id}/groups/{group_id}", 9553 path_params=_path_params, 9554 query_params=_query_params, 9555 header_params=_header_params, 9556 body=_body_params, 9557 post_params=_form_params, 9558 files=_files, 9559 auth_settings=_auth_settings, 9560 collection_formats=_collection_formats, 9561 _host=_host, 9562 _request_auth=_request_auth, 9563 ) 9564 9565 @validate_call 9566 def enterprise_boards_get_groups( 9567 self, 9568 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9569 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9570 limit: Annotated[ 9571 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 9572 Field(description="The maximum number of user groups in the result list."), 9573 ] = None, 9574 cursor: Annotated[ 9575 Optional[StrictStr], 9576 Field( 9577 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 9578 ), 9579 ] = None, 9580 _request_timeout: Union[ 9581 None, 9582 Annotated[StrictFloat, Field(gt=0)], 9583 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9584 ] = None, 9585 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9586 _content_type: Optional[StrictStr] = None, 9587 _headers: Optional[Dict[StrictStr, Any]] = None, 9588 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9589 ) -> BoardUserGroupsPage: 9590 """Get board user group assignments 9591 9592 Retrieves information about user groups invited to the specified board.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9593 9594 :param org_id: The ID of an organization. (required) 9595 :type org_id: str 9596 :param board_id: The ID of the board. (required) 9597 :type board_id: str 9598 :param limit: The maximum number of user groups in the result list. 9599 :type limit: int 9600 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 9601 :type cursor: str 9602 :param _request_timeout: timeout setting for this request. If one 9603 number provided, it will be total request 9604 timeout. It can also be a pair (tuple) of 9605 (connection, read) timeouts. 9606 :type _request_timeout: int, tuple(int, int), optional 9607 :param _request_auth: set to override the auth_settings for an a single 9608 request; this effectively ignores the 9609 authentication in the spec for a single request. 9610 :type _request_auth: dict, optional 9611 :param _content_type: force content-type for the request. 9612 :type _content_type: str, Optional 9613 :param _headers: set to override the headers for a single 9614 request; this effectively ignores the headers 9615 in the spec for a single request. 9616 :type _headers: dict, optional 9617 :param _host_index: set to override the host_index for a single 9618 request; this effectively ignores the host_index 9619 in the spec for a single request. 9620 :type _host_index: int, optional 9621 :return: Returns the result object. 9622 """ # noqa: E501 9623 9624 _param = self._enterprise_boards_get_groups_serialize( 9625 org_id=org_id, 9626 board_id=board_id, 9627 limit=limit, 9628 cursor=cursor, 9629 _request_auth=_request_auth, 9630 _content_type=_content_type, 9631 _headers=_headers, 9632 _host_index=_host_index, 9633 ) 9634 9635 _response_types_map: Dict[str, Optional[str]] = { 9636 "200": "BoardUserGroupsPage", 9637 "400": None, 9638 "401": None, 9639 "403": None, 9640 "404": None, 9641 "429": None, 9642 } 9643 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9644 response_data.read() 9645 return self.api_client.response_deserialize( 9646 response_data=response_data, 9647 response_types_map=_response_types_map, 9648 ).data 9649 9650 def _enterprise_boards_get_groups_serialize( 9651 self, 9652 org_id, 9653 board_id, 9654 limit, 9655 cursor, 9656 _request_auth, 9657 _content_type, 9658 _headers, 9659 _host_index, 9660 ) -> RequestSerialized: 9661 9662 _host = None 9663 9664 _collection_formats: Dict[str, str] = {} 9665 9666 _path_params: Dict[str, str] = {} 9667 _query_params: List[Tuple[str, str]] = [] 9668 _header_params: Dict[str, Optional[str]] = _headers or {} 9669 _form_params: List[Tuple[str, str]] = [] 9670 _files: Dict[str, str] = {} 9671 _body_params: Optional[bytes] = None 9672 9673 # process the path parameters 9674 if org_id is not None: 9675 _path_params["org_id"] = org_id 9676 if board_id is not None: 9677 _path_params["board_id"] = board_id 9678 # process the query parameters 9679 if limit is not None: 9680 9681 _query_params.append(("limit", limit)) 9682 9683 if cursor is not None: 9684 9685 _query_params.append(("cursor", cursor)) 9686 9687 # process the header parameters 9688 # process the form parameters 9689 # process the body parameter 9690 9691 # set the HTTP header `Accept` 9692 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9693 9694 # authentication setting 9695 _auth_settings: List[str] = [] 9696 9697 return self.api_client.param_serialize( 9698 method="GET", 9699 resource_path="/v2/orgs/{org_id}/boards/{board_id}/groups", 9700 path_params=_path_params, 9701 query_params=_query_params, 9702 header_params=_header_params, 9703 body=_body_params, 9704 post_params=_form_params, 9705 files=_files, 9706 auth_settings=_auth_settings, 9707 collection_formats=_collection_formats, 9708 _host=_host, 9709 _request_auth=_request_auth, 9710 ) 9711 9712 @validate_call 9713 def enterprise_project_create_group( 9714 self, 9715 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9716 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9717 create_project_user_groups_request: CreateProjectUserGroupsRequest, 9718 _request_timeout: Union[ 9719 None, 9720 Annotated[StrictFloat, Field(gt=0)], 9721 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9722 ] = None, 9723 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9724 _content_type: Optional[StrictStr] = None, 9725 _headers: Optional[Dict[StrictStr, Any]] = None, 9726 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9727 ) -> ProjectUserGroup: 9728 """Create project user group assignments 9729 9730 Shares a project with user groups with a specified role. Updates the role if already shared.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9731 9732 :param org_id: The ID of an organization. (required) 9733 :type org_id: str 9734 :param project_id: The ID of the project. (required) 9735 :type project_id: str 9736 :param create_project_user_groups_request: (required) 9737 :type create_project_user_groups_request: CreateProjectUserGroupsRequest 9738 :param _request_timeout: timeout setting for this request. If one 9739 number provided, it will be total request 9740 timeout. It can also be a pair (tuple) of 9741 (connection, read) timeouts. 9742 :type _request_timeout: int, tuple(int, int), optional 9743 :param _request_auth: set to override the auth_settings for an a single 9744 request; this effectively ignores the 9745 authentication in the spec for a single request. 9746 :type _request_auth: dict, optional 9747 :param _content_type: force content-type for the request. 9748 :type _content_type: str, Optional 9749 :param _headers: set to override the headers for a single 9750 request; this effectively ignores the headers 9751 in the spec for a single request. 9752 :type _headers: dict, optional 9753 :param _host_index: set to override the host_index for a single 9754 request; this effectively ignores the host_index 9755 in the spec for a single request. 9756 :type _host_index: int, optional 9757 :return: Returns the result object. 9758 """ # noqa: E501 9759 9760 _param = self._enterprise_project_create_group_serialize( 9761 org_id=org_id, 9762 project_id=project_id, 9763 create_project_user_groups_request=create_project_user_groups_request, 9764 _request_auth=_request_auth, 9765 _content_type=_content_type, 9766 _headers=_headers, 9767 _host_index=_host_index, 9768 ) 9769 9770 _response_types_map: Dict[str, Optional[str]] = { 9771 "200": "ProjectUserGroup", 9772 "400": None, 9773 "401": None, 9774 "403": None, 9775 "409": None, 9776 "429": None, 9777 } 9778 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9779 response_data.read() 9780 return self.api_client.response_deserialize( 9781 response_data=response_data, 9782 response_types_map=_response_types_map, 9783 ).data 9784 9785 def _enterprise_project_create_group_serialize( 9786 self, 9787 org_id, 9788 project_id, 9789 create_project_user_groups_request, 9790 _request_auth, 9791 _content_type, 9792 _headers, 9793 _host_index, 9794 ) -> RequestSerialized: 9795 9796 _host = None 9797 9798 _collection_formats: Dict[str, str] = {} 9799 9800 _path_params: Dict[str, str] = {} 9801 _query_params: List[Tuple[str, str]] = [] 9802 _header_params: Dict[str, Optional[str]] = _headers or {} 9803 _form_params: List[Tuple[str, str]] = [] 9804 _files: Dict[str, str] = {} 9805 _body_params: Optional[bytes] = None 9806 9807 # process the path parameters 9808 if org_id is not None: 9809 _path_params["org_id"] = org_id 9810 if project_id is not None: 9811 _path_params["project_id"] = project_id 9812 # process the query parameters 9813 # process the header parameters 9814 # process the form parameters 9815 # process the body parameter 9816 if create_project_user_groups_request is not None: 9817 _body_params = create_project_user_groups_request 9818 9819 # set the HTTP header `Accept` 9820 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 9821 9822 # set the HTTP header `Content-Type` 9823 if _content_type: 9824 _header_params["Content-Type"] = _content_type 9825 else: 9826 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 9827 if _default_content_type is not None: 9828 _header_params["Content-Type"] = _default_content_type 9829 9830 # authentication setting 9831 _auth_settings: List[str] = [] 9832 9833 return self.api_client.param_serialize( 9834 method="POST", 9835 resource_path="/v2/orgs/{org_id}/projects/{project_id}/groups", 9836 path_params=_path_params, 9837 query_params=_query_params, 9838 header_params=_header_params, 9839 body=_body_params, 9840 post_params=_form_params, 9841 files=_files, 9842 auth_settings=_auth_settings, 9843 collection_formats=_collection_formats, 9844 _host=_host, 9845 _request_auth=_request_auth, 9846 ) 9847 9848 @validate_call 9849 def enterprise_project_delete_groups( 9850 self, 9851 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9852 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9853 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 9854 _request_timeout: Union[ 9855 None, 9856 Annotated[StrictFloat, Field(gt=0)], 9857 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9858 ] = None, 9859 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9860 _content_type: Optional[StrictStr] = None, 9861 _headers: Optional[Dict[StrictStr, Any]] = None, 9862 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9863 ) -> None: 9864 """Delete project user group assignment 9865 9866 Removes a user group from the specified project.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9867 9868 :param org_id: The ID of an organization. (required) 9869 :type org_id: str 9870 :param project_id: The ID of the project. (required) 9871 :type project_id: str 9872 :param group_id: The ID of a user group. (required) 9873 :type group_id: str 9874 :param _request_timeout: timeout setting for this request. If one 9875 number provided, it will be total request 9876 timeout. It can also be a pair (tuple) of 9877 (connection, read) timeouts. 9878 :type _request_timeout: int, tuple(int, int), optional 9879 :param _request_auth: set to override the auth_settings for an a single 9880 request; this effectively ignores the 9881 authentication in the spec for a single request. 9882 :type _request_auth: dict, optional 9883 :param _content_type: force content-type for the request. 9884 :type _content_type: str, Optional 9885 :param _headers: set to override the headers for a single 9886 request; this effectively ignores the headers 9887 in the spec for a single request. 9888 :type _headers: dict, optional 9889 :param _host_index: set to override the host_index for a single 9890 request; this effectively ignores the host_index 9891 in the spec for a single request. 9892 :type _host_index: int, optional 9893 :return: Returns the result object. 9894 """ # noqa: E501 9895 9896 _param = self._enterprise_project_delete_groups_serialize( 9897 org_id=org_id, 9898 project_id=project_id, 9899 group_id=group_id, 9900 _request_auth=_request_auth, 9901 _content_type=_content_type, 9902 _headers=_headers, 9903 _host_index=_host_index, 9904 ) 9905 9906 _response_types_map: Dict[str, Optional[str]] = { 9907 "204": None, 9908 "400": None, 9909 "401": None, 9910 "403": None, 9911 "404": None, 9912 "409": None, 9913 "429": None, 9914 } 9915 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9916 response_data.read() 9917 return self.api_client.response_deserialize( 9918 response_data=response_data, 9919 response_types_map=_response_types_map, 9920 ).data 9921 9922 def _enterprise_project_delete_groups_serialize( 9923 self, 9924 org_id, 9925 project_id, 9926 group_id, 9927 _request_auth, 9928 _content_type, 9929 _headers, 9930 _host_index, 9931 ) -> RequestSerialized: 9932 9933 _host = None 9934 9935 _collection_formats: Dict[str, str] = {} 9936 9937 _path_params: Dict[str, str] = {} 9938 _query_params: List[Tuple[str, str]] = [] 9939 _header_params: Dict[str, Optional[str]] = _headers or {} 9940 _form_params: List[Tuple[str, str]] = [] 9941 _files: Dict[str, str] = {} 9942 _body_params: Optional[bytes] = None 9943 9944 # process the path parameters 9945 if org_id is not None: 9946 _path_params["org_id"] = org_id 9947 if project_id is not None: 9948 _path_params["project_id"] = project_id 9949 if group_id is not None: 9950 _path_params["group_id"] = group_id 9951 # process the query parameters 9952 # process the header parameters 9953 # process the form parameters 9954 # process the body parameter 9955 9956 # authentication setting 9957 _auth_settings: List[str] = [] 9958 9959 return self.api_client.param_serialize( 9960 method="DELETE", 9961 resource_path="/v2/orgs/{org_id}/projects/{project_id}/groups/{group_id}", 9962 path_params=_path_params, 9963 query_params=_query_params, 9964 header_params=_header_params, 9965 body=_body_params, 9966 post_params=_form_params, 9967 files=_files, 9968 auth_settings=_auth_settings, 9969 collection_formats=_collection_formats, 9970 _host=_host, 9971 _request_auth=_request_auth, 9972 ) 9973 9974 @validate_call 9975 def enterprise_projects_get_groups( 9976 self, 9977 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9978 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9979 limit: Annotated[ 9980 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 9981 Field(description="The maximum number of user groups in the result list."), 9982 ] = None, 9983 cursor: Annotated[ 9984 Optional[StrictStr], 9985 Field( 9986 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 9987 ), 9988 ] = None, 9989 _request_timeout: Union[ 9990 None, 9991 Annotated[StrictFloat, Field(gt=0)], 9992 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9993 ] = None, 9994 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9995 _content_type: Optional[StrictStr] = None, 9996 _headers: Optional[Dict[StrictStr, Any]] = None, 9997 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9998 ) -> ProjectUserGroupsPage: 9999 """Get project user group assignments 10000 10001 Retrieves information about user groups invited to the specified project.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10002 10003 :param org_id: The ID of an organization. (required) 10004 :type org_id: str 10005 :param project_id: The ID of the project. (required) 10006 :type project_id: str 10007 :param limit: The maximum number of user groups in the result list. 10008 :type limit: int 10009 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 10010 :type cursor: str 10011 :param _request_timeout: timeout setting for this request. If one 10012 number provided, it will be total request 10013 timeout. It can also be a pair (tuple) of 10014 (connection, read) timeouts. 10015 :type _request_timeout: int, tuple(int, int), optional 10016 :param _request_auth: set to override the auth_settings for an a single 10017 request; this effectively ignores the 10018 authentication in the spec for a single request. 10019 :type _request_auth: dict, optional 10020 :param _content_type: force content-type for the request. 10021 :type _content_type: str, Optional 10022 :param _headers: set to override the headers for a single 10023 request; this effectively ignores the headers 10024 in the spec for a single request. 10025 :type _headers: dict, optional 10026 :param _host_index: set to override the host_index for a single 10027 request; this effectively ignores the host_index 10028 in the spec for a single request. 10029 :type _host_index: int, optional 10030 :return: Returns the result object. 10031 """ # noqa: E501 10032 10033 _param = self._enterprise_projects_get_groups_serialize( 10034 org_id=org_id, 10035 project_id=project_id, 10036 limit=limit, 10037 cursor=cursor, 10038 _request_auth=_request_auth, 10039 _content_type=_content_type, 10040 _headers=_headers, 10041 _host_index=_host_index, 10042 ) 10043 10044 _response_types_map: Dict[str, Optional[str]] = { 10045 "200": "ProjectUserGroupsPage", 10046 "400": None, 10047 "401": None, 10048 "403": None, 10049 "404": None, 10050 "429": None, 10051 } 10052 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10053 response_data.read() 10054 return self.api_client.response_deserialize( 10055 response_data=response_data, 10056 response_types_map=_response_types_map, 10057 ).data 10058 10059 def _enterprise_projects_get_groups_serialize( 10060 self, 10061 org_id, 10062 project_id, 10063 limit, 10064 cursor, 10065 _request_auth, 10066 _content_type, 10067 _headers, 10068 _host_index, 10069 ) -> RequestSerialized: 10070 10071 _host = None 10072 10073 _collection_formats: Dict[str, str] = {} 10074 10075 _path_params: Dict[str, str] = {} 10076 _query_params: List[Tuple[str, str]] = [] 10077 _header_params: Dict[str, Optional[str]] = _headers or {} 10078 _form_params: List[Tuple[str, str]] = [] 10079 _files: Dict[str, str] = {} 10080 _body_params: Optional[bytes] = None 10081 10082 # process the path parameters 10083 if org_id is not None: 10084 _path_params["org_id"] = org_id 10085 if project_id is not None: 10086 _path_params["project_id"] = project_id 10087 # process the query parameters 10088 if limit is not None: 10089 10090 _query_params.append(("limit", limit)) 10091 10092 if cursor is not None: 10093 10094 _query_params.append(("cursor", cursor)) 10095 10096 # process the header parameters 10097 # process the form parameters 10098 # process the body parameter 10099 10100 # set the HTTP header `Accept` 10101 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10102 10103 # authentication setting 10104 _auth_settings: List[str] = [] 10105 10106 return self.api_client.param_serialize( 10107 method="GET", 10108 resource_path="/v2/orgs/{org_id}/projects/{project_id}/groups", 10109 path_params=_path_params, 10110 query_params=_query_params, 10111 header_params=_header_params, 10112 body=_body_params, 10113 post_params=_form_params, 10114 files=_files, 10115 auth_settings=_auth_settings, 10116 collection_formats=_collection_formats, 10117 _host=_host, 10118 _request_auth=_request_auth, 10119 ) 10120 10121 @validate_call 10122 def enterprise_delete_team_member( 10123 self, 10124 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10125 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10126 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10127 _request_timeout: Union[ 10128 None, 10129 Annotated[StrictFloat, Field(gt=0)], 10130 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10131 ] = None, 10132 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10133 _content_type: Optional[StrictStr] = None, 10134 _headers: Optional[Dict[StrictStr, Any]] = None, 10135 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10136 ) -> None: 10137 """Delete team member from team 10138 10139 Deletes team member from team by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10140 10141 :param org_id: The ID of an organization. (required) 10142 :type org_id: str 10143 :param team_id: The ID of a team. (required) 10144 :type team_id: str 10145 :param member_id: The id of the Team Member (required) 10146 :type member_id: str 10147 :param _request_timeout: timeout setting for this request. If one 10148 number provided, it will be total request 10149 timeout. It can also be a pair (tuple) of 10150 (connection, read) timeouts. 10151 :type _request_timeout: int, tuple(int, int), optional 10152 :param _request_auth: set to override the auth_settings for an a single 10153 request; this effectively ignores the 10154 authentication in the spec for a single request. 10155 :type _request_auth: dict, optional 10156 :param _content_type: force content-type for the request. 10157 :type _content_type: str, Optional 10158 :param _headers: set to override the headers for a single 10159 request; this effectively ignores the headers 10160 in the spec for a single request. 10161 :type _headers: dict, optional 10162 :param _host_index: set to override the host_index for a single 10163 request; this effectively ignores the host_index 10164 in the spec for a single request. 10165 :type _host_index: int, optional 10166 :return: Returns the result object. 10167 """ # noqa: E501 10168 10169 _param = self._enterprise_delete_team_member_serialize( 10170 org_id=org_id, 10171 team_id=team_id, 10172 member_id=member_id, 10173 _request_auth=_request_auth, 10174 _content_type=_content_type, 10175 _headers=_headers, 10176 _host_index=_host_index, 10177 ) 10178 10179 _response_types_map: Dict[str, Optional[str]] = { 10180 "204": None, 10181 "400": None, 10182 "401": None, 10183 "403": None, 10184 "404": None, 10185 "409": None, 10186 "429": None, 10187 } 10188 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10189 response_data.read() 10190 return self.api_client.response_deserialize( 10191 response_data=response_data, 10192 response_types_map=_response_types_map, 10193 ).data 10194 10195 def _enterprise_delete_team_member_serialize( 10196 self, 10197 org_id, 10198 team_id, 10199 member_id, 10200 _request_auth, 10201 _content_type, 10202 _headers, 10203 _host_index, 10204 ) -> RequestSerialized: 10205 10206 _host = None 10207 10208 _collection_formats: Dict[str, str] = {} 10209 10210 _path_params: Dict[str, str] = {} 10211 _query_params: List[Tuple[str, str]] = [] 10212 _header_params: Dict[str, Optional[str]] = _headers or {} 10213 _form_params: List[Tuple[str, str]] = [] 10214 _files: Dict[str, str] = {} 10215 _body_params: Optional[bytes] = None 10216 10217 # process the path parameters 10218 if org_id is not None: 10219 _path_params["org_id"] = org_id 10220 if team_id is not None: 10221 _path_params["team_id"] = team_id 10222 if member_id is not None: 10223 _path_params["member_id"] = member_id 10224 # process the query parameters 10225 # process the header parameters 10226 # process the form parameters 10227 # process the body parameter 10228 10229 # authentication setting 10230 _auth_settings: List[str] = [] 10231 10232 return self.api_client.param_serialize( 10233 method="DELETE", 10234 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}", 10235 path_params=_path_params, 10236 query_params=_query_params, 10237 header_params=_header_params, 10238 body=_body_params, 10239 post_params=_form_params, 10240 files=_files, 10241 auth_settings=_auth_settings, 10242 collection_formats=_collection_formats, 10243 _host=_host, 10244 _request_auth=_request_auth, 10245 ) 10246 10247 @validate_call 10248 def enterprise_get_team_member( 10249 self, 10250 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10251 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10252 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10253 _request_timeout: Union[ 10254 None, 10255 Annotated[StrictFloat, Field(gt=0)], 10256 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10257 ] = None, 10258 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10259 _content_type: Optional[StrictStr] = None, 10260 _headers: Optional[Dict[StrictStr, Any]] = None, 10261 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10262 ) -> TeamMember: 10263 """Get team member 10264 10265 Retrieves team member by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10266 10267 :param org_id: The ID of an organization. (required) 10268 :type org_id: str 10269 :param team_id: The ID of a team. (required) 10270 :type team_id: str 10271 :param member_id: The id of the Team Member (required) 10272 :type member_id: str 10273 :param _request_timeout: timeout setting for this request. If one 10274 number provided, it will be total request 10275 timeout. It can also be a pair (tuple) of 10276 (connection, read) timeouts. 10277 :type _request_timeout: int, tuple(int, int), optional 10278 :param _request_auth: set to override the auth_settings for an a single 10279 request; this effectively ignores the 10280 authentication in the spec for a single request. 10281 :type _request_auth: dict, optional 10282 :param _content_type: force content-type for the request. 10283 :type _content_type: str, Optional 10284 :param _headers: set to override the headers for a single 10285 request; this effectively ignores the headers 10286 in the spec for a single request. 10287 :type _headers: dict, optional 10288 :param _host_index: set to override the host_index for a single 10289 request; this effectively ignores the host_index 10290 in the spec for a single request. 10291 :type _host_index: int, optional 10292 :return: Returns the result object. 10293 """ # noqa: E501 10294 10295 _param = self._enterprise_get_team_member_serialize( 10296 org_id=org_id, 10297 team_id=team_id, 10298 member_id=member_id, 10299 _request_auth=_request_auth, 10300 _content_type=_content_type, 10301 _headers=_headers, 10302 _host_index=_host_index, 10303 ) 10304 10305 _response_types_map: Dict[str, Optional[str]] = { 10306 "200": "TeamMember", 10307 "400": None, 10308 "401": None, 10309 "403": None, 10310 "404": None, 10311 "429": None, 10312 } 10313 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10314 response_data.read() 10315 return self.api_client.response_deserialize( 10316 response_data=response_data, 10317 response_types_map=_response_types_map, 10318 ).data 10319 10320 def _enterprise_get_team_member_serialize( 10321 self, 10322 org_id, 10323 team_id, 10324 member_id, 10325 _request_auth, 10326 _content_type, 10327 _headers, 10328 _host_index, 10329 ) -> RequestSerialized: 10330 10331 _host = None 10332 10333 _collection_formats: Dict[str, str] = {} 10334 10335 _path_params: Dict[str, str] = {} 10336 _query_params: List[Tuple[str, str]] = [] 10337 _header_params: Dict[str, Optional[str]] = _headers or {} 10338 _form_params: List[Tuple[str, str]] = [] 10339 _files: Dict[str, str] = {} 10340 _body_params: Optional[bytes] = None 10341 10342 # process the path parameters 10343 if org_id is not None: 10344 _path_params["org_id"] = org_id 10345 if team_id is not None: 10346 _path_params["team_id"] = team_id 10347 if member_id is not None: 10348 _path_params["member_id"] = member_id 10349 # process the query parameters 10350 # process the header parameters 10351 # process the form parameters 10352 # process the body parameter 10353 10354 # set the HTTP header `Accept` 10355 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10356 10357 # authentication setting 10358 _auth_settings: List[str] = [] 10359 10360 return self.api_client.param_serialize( 10361 method="GET", 10362 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}", 10363 path_params=_path_params, 10364 query_params=_query_params, 10365 header_params=_header_params, 10366 body=_body_params, 10367 post_params=_form_params, 10368 files=_files, 10369 auth_settings=_auth_settings, 10370 collection_formats=_collection_formats, 10371 _host=_host, 10372 _request_auth=_request_auth, 10373 ) 10374 10375 @validate_call 10376 def enterprise_get_team_members( 10377 self, 10378 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10379 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10380 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 10381 cursor: Annotated[ 10382 Optional[StrictStr], 10383 Field( 10384 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 10385 ), 10386 ] = None, 10387 role: Annotated[ 10388 Optional[StrictStr], 10389 Field( 10390 description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": (Deprecated) Team-guest user, user with access only to a team without access to organization. ' 10391 ), 10392 ] = None, 10393 _request_timeout: Union[ 10394 None, 10395 Annotated[StrictFloat, Field(gt=0)], 10396 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10397 ] = None, 10398 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10399 _content_type: Optional[StrictStr] = None, 10400 _headers: Optional[Dict[StrictStr, Any]] = None, 10401 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10402 ) -> TeamMembersPage: 10403 """List team members 10404 10405 Retrieves team members by cursor.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10406 10407 :param org_id: The ID of an organization. (required) 10408 :type org_id: str 10409 :param team_id: The ID of a team. (required) 10410 :type team_id: str 10411 :param limit: 10412 :type limit: int 10413 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 10414 :type cursor: str 10415 :param role: Role query. Filters members by role using full word match. Accepted values are: * \"member\": Team member with full member permissions. * \"admin\": Admin of a team. Team member with permission to manage team. * \"non_team\": External user, non-team user. * \"team_guest\": (Deprecated) Team-guest user, user with access only to a team without access to organization. 10416 :type role: str 10417 :param _request_timeout: timeout setting for this request. If one 10418 number provided, it will be total request 10419 timeout. It can also be a pair (tuple) of 10420 (connection, read) timeouts. 10421 :type _request_timeout: int, tuple(int, int), optional 10422 :param _request_auth: set to override the auth_settings for an a single 10423 request; this effectively ignores the 10424 authentication in the spec for a single request. 10425 :type _request_auth: dict, optional 10426 :param _content_type: force content-type for the request. 10427 :type _content_type: str, Optional 10428 :param _headers: set to override the headers for a single 10429 request; this effectively ignores the headers 10430 in the spec for a single request. 10431 :type _headers: dict, optional 10432 :param _host_index: set to override the host_index for a single 10433 request; this effectively ignores the host_index 10434 in the spec for a single request. 10435 :type _host_index: int, optional 10436 :return: Returns the result object. 10437 """ # noqa: E501 10438 10439 _param = self._enterprise_get_team_members_serialize( 10440 org_id=org_id, 10441 team_id=team_id, 10442 limit=limit, 10443 cursor=cursor, 10444 role=role, 10445 _request_auth=_request_auth, 10446 _content_type=_content_type, 10447 _headers=_headers, 10448 _host_index=_host_index, 10449 ) 10450 10451 _response_types_map: Dict[str, Optional[str]] = { 10452 "200": "TeamMembersPage", 10453 "400": None, 10454 "401": None, 10455 "403": None, 10456 "404": None, 10457 "429": None, 10458 } 10459 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10460 response_data.read() 10461 return self.api_client.response_deserialize( 10462 response_data=response_data, 10463 response_types_map=_response_types_map, 10464 ).data 10465 10466 def _enterprise_get_team_members_serialize( 10467 self, 10468 org_id, 10469 team_id, 10470 limit, 10471 cursor, 10472 role, 10473 _request_auth, 10474 _content_type, 10475 _headers, 10476 _host_index, 10477 ) -> RequestSerialized: 10478 10479 _host = None 10480 10481 _collection_formats: Dict[str, str] = {} 10482 10483 _path_params: Dict[str, str] = {} 10484 _query_params: List[Tuple[str, str]] = [] 10485 _header_params: Dict[str, Optional[str]] = _headers or {} 10486 _form_params: List[Tuple[str, str]] = [] 10487 _files: Dict[str, str] = {} 10488 _body_params: Optional[bytes] = None 10489 10490 # process the path parameters 10491 if org_id is not None: 10492 _path_params["org_id"] = org_id 10493 if team_id is not None: 10494 _path_params["team_id"] = team_id 10495 # process the query parameters 10496 if limit is not None: 10497 10498 _query_params.append(("limit", limit)) 10499 10500 if cursor is not None: 10501 10502 _query_params.append(("cursor", cursor)) 10503 10504 if role is not None: 10505 10506 _query_params.append(("role", role)) 10507 10508 # process the header parameters 10509 # process the form parameters 10510 # process the body parameter 10511 10512 # set the HTTP header `Accept` 10513 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10514 10515 # authentication setting 10516 _auth_settings: List[str] = [] 10517 10518 return self.api_client.param_serialize( 10519 method="GET", 10520 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members", 10521 path_params=_path_params, 10522 query_params=_query_params, 10523 header_params=_header_params, 10524 body=_body_params, 10525 post_params=_form_params, 10526 files=_files, 10527 auth_settings=_auth_settings, 10528 collection_formats=_collection_formats, 10529 _host=_host, 10530 _request_auth=_request_auth, 10531 ) 10532 10533 @validate_call 10534 def enterprise_invite_team_member( 10535 self, 10536 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10537 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10538 team_member_invite: TeamMemberInvite, 10539 _request_timeout: Union[ 10540 None, 10541 Annotated[StrictFloat, Field(gt=0)], 10542 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10543 ] = None, 10544 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10545 _content_type: Optional[StrictStr] = None, 10546 _headers: Optional[Dict[StrictStr, Any]] = None, 10547 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10548 ) -> TeamMember: 10549 """Invite team members 10550 10551 Invites a new Miro user to an existing team. The user must exist in your Miro organization. Users who do not exist in your Miro organization can be invited to the team via [SCIM](https://developers.miro.com/docs/scim) and an external identity provider, such as Okta or Azure Active Directory.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10552 10553 :param org_id: The ID of an organization. (required) 10554 :type org_id: str 10555 :param team_id: The ID of a team. (required) 10556 :type team_id: str 10557 :param team_member_invite: (required) 10558 :type team_member_invite: TeamMemberInvite 10559 :param _request_timeout: timeout setting for this request. If one 10560 number provided, it will be total request 10561 timeout. It can also be a pair (tuple) of 10562 (connection, read) timeouts. 10563 :type _request_timeout: int, tuple(int, int), optional 10564 :param _request_auth: set to override the auth_settings for an a single 10565 request; this effectively ignores the 10566 authentication in the spec for a single request. 10567 :type _request_auth: dict, optional 10568 :param _content_type: force content-type for the request. 10569 :type _content_type: str, Optional 10570 :param _headers: set to override the headers for a single 10571 request; this effectively ignores the headers 10572 in the spec for a single request. 10573 :type _headers: dict, optional 10574 :param _host_index: set to override the host_index for a single 10575 request; this effectively ignores the host_index 10576 in the spec for a single request. 10577 :type _host_index: int, optional 10578 :return: Returns the result object. 10579 """ # noqa: E501 10580 10581 _param = self._enterprise_invite_team_member_serialize( 10582 org_id=org_id, 10583 team_id=team_id, 10584 team_member_invite=team_member_invite, 10585 _request_auth=_request_auth, 10586 _content_type=_content_type, 10587 _headers=_headers, 10588 _host_index=_host_index, 10589 ) 10590 10591 _response_types_map: Dict[str, Optional[str]] = { 10592 "201": "TeamMember", 10593 "400": None, 10594 "401": None, 10595 "403": None, 10596 "404": None, 10597 "409": None, 10598 "429": None, 10599 } 10600 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10601 response_data.read() 10602 return self.api_client.response_deserialize( 10603 response_data=response_data, 10604 response_types_map=_response_types_map, 10605 ).data 10606 10607 def _enterprise_invite_team_member_serialize( 10608 self, 10609 org_id, 10610 team_id, 10611 team_member_invite, 10612 _request_auth, 10613 _content_type, 10614 _headers, 10615 _host_index, 10616 ) -> RequestSerialized: 10617 10618 _host = None 10619 10620 _collection_formats: Dict[str, str] = {} 10621 10622 _path_params: Dict[str, str] = {} 10623 _query_params: List[Tuple[str, str]] = [] 10624 _header_params: Dict[str, Optional[str]] = _headers or {} 10625 _form_params: List[Tuple[str, str]] = [] 10626 _files: Dict[str, str] = {} 10627 _body_params: Optional[bytes] = None 10628 10629 # process the path parameters 10630 if org_id is not None: 10631 _path_params["org_id"] = org_id 10632 if team_id is not None: 10633 _path_params["team_id"] = team_id 10634 # process the query parameters 10635 # process the header parameters 10636 # process the form parameters 10637 # process the body parameter 10638 if team_member_invite is not None: 10639 _body_params = team_member_invite 10640 10641 # set the HTTP header `Accept` 10642 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10643 10644 # set the HTTP header `Content-Type` 10645 if _content_type: 10646 _header_params["Content-Type"] = _content_type 10647 else: 10648 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 10649 if _default_content_type is not None: 10650 _header_params["Content-Type"] = _default_content_type 10651 10652 # authentication setting 10653 _auth_settings: List[str] = [] 10654 10655 return self.api_client.param_serialize( 10656 method="POST", 10657 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members", 10658 path_params=_path_params, 10659 query_params=_query_params, 10660 header_params=_header_params, 10661 body=_body_params, 10662 post_params=_form_params, 10663 files=_files, 10664 auth_settings=_auth_settings, 10665 collection_formats=_collection_formats, 10666 _host=_host, 10667 _request_auth=_request_auth, 10668 ) 10669 10670 @validate_call 10671 def enterprise_update_team_member( 10672 self, 10673 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10674 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10675 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10676 team_member_changes: TeamMemberChanges, 10677 _request_timeout: Union[ 10678 None, 10679 Annotated[StrictFloat, Field(gt=0)], 10680 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10681 ] = None, 10682 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10683 _content_type: Optional[StrictStr] = None, 10684 _headers: Optional[Dict[StrictStr, Any]] = None, 10685 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10686 ) -> TeamMember: 10687 """Update team member 10688 10689 Updates team member role in team by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10690 10691 :param org_id: The ID of an organization. (required) 10692 :type org_id: str 10693 :param team_id: The ID of a team. (required) 10694 :type team_id: str 10695 :param member_id: The id of the Team Member (required) 10696 :type member_id: str 10697 :param team_member_changes: (required) 10698 :type team_member_changes: TeamMemberChanges 10699 :param _request_timeout: timeout setting for this request. If one 10700 number provided, it will be total request 10701 timeout. It can also be a pair (tuple) of 10702 (connection, read) timeouts. 10703 :type _request_timeout: int, tuple(int, int), optional 10704 :param _request_auth: set to override the auth_settings for an a single 10705 request; this effectively ignores the 10706 authentication in the spec for a single request. 10707 :type _request_auth: dict, optional 10708 :param _content_type: force content-type for the request. 10709 :type _content_type: str, Optional 10710 :param _headers: set to override the headers for a single 10711 request; this effectively ignores the headers 10712 in the spec for a single request. 10713 :type _headers: dict, optional 10714 :param _host_index: set to override the host_index for a single 10715 request; this effectively ignores the host_index 10716 in the spec for a single request. 10717 :type _host_index: int, optional 10718 :return: Returns the result object. 10719 """ # noqa: E501 10720 10721 _param = self._enterprise_update_team_member_serialize( 10722 org_id=org_id, 10723 team_id=team_id, 10724 member_id=member_id, 10725 team_member_changes=team_member_changes, 10726 _request_auth=_request_auth, 10727 _content_type=_content_type, 10728 _headers=_headers, 10729 _host_index=_host_index, 10730 ) 10731 10732 _response_types_map: Dict[str, Optional[str]] = { 10733 "200": "TeamMember", 10734 "400": None, 10735 "401": None, 10736 "403": None, 10737 "404": None, 10738 "409": None, 10739 "429": None, 10740 } 10741 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10742 response_data.read() 10743 return self.api_client.response_deserialize( 10744 response_data=response_data, 10745 response_types_map=_response_types_map, 10746 ).data 10747 10748 def _enterprise_update_team_member_serialize( 10749 self, 10750 org_id, 10751 team_id, 10752 member_id, 10753 team_member_changes, 10754 _request_auth, 10755 _content_type, 10756 _headers, 10757 _host_index, 10758 ) -> RequestSerialized: 10759 10760 _host = None 10761 10762 _collection_formats: Dict[str, str] = {} 10763 10764 _path_params: Dict[str, str] = {} 10765 _query_params: List[Tuple[str, str]] = [] 10766 _header_params: Dict[str, Optional[str]] = _headers or {} 10767 _form_params: List[Tuple[str, str]] = [] 10768 _files: Dict[str, str] = {} 10769 _body_params: Optional[bytes] = None 10770 10771 # process the path parameters 10772 if org_id is not None: 10773 _path_params["org_id"] = org_id 10774 if team_id is not None: 10775 _path_params["team_id"] = team_id 10776 if member_id is not None: 10777 _path_params["member_id"] = member_id 10778 # process the query parameters 10779 # process the header parameters 10780 # process the form parameters 10781 # process the body parameter 10782 if team_member_changes is not None: 10783 _body_params = team_member_changes 10784 10785 # set the HTTP header `Accept` 10786 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10787 10788 # set the HTTP header `Content-Type` 10789 if _content_type: 10790 _header_params["Content-Type"] = _content_type 10791 else: 10792 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 10793 if _default_content_type is not None: 10794 _header_params["Content-Type"] = _default_content_type 10795 10796 # authentication setting 10797 _auth_settings: List[str] = [] 10798 10799 return self.api_client.param_serialize( 10800 method="PATCH", 10801 resource_path="/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}", 10802 path_params=_path_params, 10803 query_params=_query_params, 10804 header_params=_header_params, 10805 body=_body_params, 10806 post_params=_form_params, 10807 files=_files, 10808 auth_settings=_auth_settings, 10809 collection_formats=_collection_formats, 10810 _host=_host, 10811 _request_auth=_request_auth, 10812 ) 10813 10814 @validate_call 10815 def enterprise_get_default_team_settings( 10816 self, 10817 org_id: Annotated[StrictStr, Field(description="The id of an Organization.")], 10818 _request_timeout: Union[ 10819 None, 10820 Annotated[StrictFloat, Field(gt=0)], 10821 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10822 ] = None, 10823 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10824 _content_type: Optional[StrictStr] = None, 10825 _headers: Optional[Dict[StrictStr, Any]] = None, 10826 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10827 ) -> TeamSettings: 10828 """Get default team settings 10829 10830 Retrieves default team settings of an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10831 10832 :param org_id: The id of an Organization. (required) 10833 :type org_id: str 10834 :param _request_timeout: timeout setting for this request. If one 10835 number provided, it will be total request 10836 timeout. It can also be a pair (tuple) of 10837 (connection, read) timeouts. 10838 :type _request_timeout: int, tuple(int, int), optional 10839 :param _request_auth: set to override the auth_settings for an a single 10840 request; this effectively ignores the 10841 authentication in the spec for a single request. 10842 :type _request_auth: dict, optional 10843 :param _content_type: force content-type for the request. 10844 :type _content_type: str, Optional 10845 :param _headers: set to override the headers for a single 10846 request; this effectively ignores the headers 10847 in the spec for a single request. 10848 :type _headers: dict, optional 10849 :param _host_index: set to override the host_index for a single 10850 request; this effectively ignores the host_index 10851 in the spec for a single request. 10852 :type _host_index: int, optional 10853 :return: Returns the result object. 10854 """ # noqa: E501 10855 10856 _param = self._enterprise_get_default_team_settings_serialize( 10857 org_id=org_id, 10858 _request_auth=_request_auth, 10859 _content_type=_content_type, 10860 _headers=_headers, 10861 _host_index=_host_index, 10862 ) 10863 10864 _response_types_map: Dict[str, Optional[str]] = { 10865 "200": "TeamSettings", 10866 "400": None, 10867 "401": None, 10868 "403": None, 10869 "404": None, 10870 "429": None, 10871 } 10872 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10873 response_data.read() 10874 return self.api_client.response_deserialize( 10875 response_data=response_data, 10876 response_types_map=_response_types_map, 10877 ).data 10878 10879 def _enterprise_get_default_team_settings_serialize( 10880 self, 10881 org_id, 10882 _request_auth, 10883 _content_type, 10884 _headers, 10885 _host_index, 10886 ) -> RequestSerialized: 10887 10888 _host = None 10889 10890 _collection_formats: Dict[str, str] = {} 10891 10892 _path_params: Dict[str, str] = {} 10893 _query_params: List[Tuple[str, str]] = [] 10894 _header_params: Dict[str, Optional[str]] = _headers or {} 10895 _form_params: List[Tuple[str, str]] = [] 10896 _files: Dict[str, str] = {} 10897 _body_params: Optional[bytes] = None 10898 10899 # process the path parameters 10900 if org_id is not None: 10901 _path_params["org_id"] = org_id 10902 # process the query parameters 10903 # process the header parameters 10904 # process the form parameters 10905 # process the body parameter 10906 10907 # set the HTTP header `Accept` 10908 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 10909 10910 # authentication setting 10911 _auth_settings: List[str] = [] 10912 10913 return self.api_client.param_serialize( 10914 method="GET", 10915 resource_path="/v2/orgs/{org_id}/default_teams_settings", 10916 path_params=_path_params, 10917 query_params=_query_params, 10918 header_params=_header_params, 10919 body=_body_params, 10920 post_params=_form_params, 10921 files=_files, 10922 auth_settings=_auth_settings, 10923 collection_formats=_collection_formats, 10924 _host=_host, 10925 _request_auth=_request_auth, 10926 ) 10927 10928 @validate_call 10929 def enterprise_get_team_settings( 10930 self, 10931 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10932 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10933 _request_timeout: Union[ 10934 None, 10935 Annotated[StrictFloat, Field(gt=0)], 10936 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10937 ] = None, 10938 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10939 _content_type: Optional[StrictStr] = None, 10940 _headers: Optional[Dict[StrictStr, Any]] = None, 10941 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10942 ) -> TeamSettings: 10943 """Get team settings 10944 10945 Retrieves team settings of an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10946 10947 :param org_id: The ID of an organization. (required) 10948 :type org_id: str 10949 :param team_id: The ID of a team. (required) 10950 :type team_id: str 10951 :param _request_timeout: timeout setting for this request. If one 10952 number provided, it will be total request 10953 timeout. It can also be a pair (tuple) of 10954 (connection, read) timeouts. 10955 :type _request_timeout: int, tuple(int, int), optional 10956 :param _request_auth: set to override the auth_settings for an a single 10957 request; this effectively ignores the 10958 authentication in the spec for a single request. 10959 :type _request_auth: dict, optional 10960 :param _content_type: force content-type for the request. 10961 :type _content_type: str, Optional 10962 :param _headers: set to override the headers for a single 10963 request; this effectively ignores the headers 10964 in the spec for a single request. 10965 :type _headers: dict, optional 10966 :param _host_index: set to override the host_index for a single 10967 request; this effectively ignores the host_index 10968 in the spec for a single request. 10969 :type _host_index: int, optional 10970 :return: Returns the result object. 10971 """ # noqa: E501 10972 10973 _param = self._enterprise_get_team_settings_serialize( 10974 org_id=org_id, 10975 team_id=team_id, 10976 _request_auth=_request_auth, 10977 _content_type=_content_type, 10978 _headers=_headers, 10979 _host_index=_host_index, 10980 ) 10981 10982 _response_types_map: Dict[str, Optional[str]] = { 10983 "200": "TeamSettings", 10984 "400": None, 10985 "401": None, 10986 "403": None, 10987 "404": None, 10988 "429": None, 10989 } 10990 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10991 response_data.read() 10992 return self.api_client.response_deserialize( 10993 response_data=response_data, 10994 response_types_map=_response_types_map, 10995 ).data 10996 10997 def _enterprise_get_team_settings_serialize( 10998 self, 10999 org_id, 11000 team_id, 11001 _request_auth, 11002 _content_type, 11003 _headers, 11004 _host_index, 11005 ) -> RequestSerialized: 11006 11007 _host = None 11008 11009 _collection_formats: Dict[str, str] = {} 11010 11011 _path_params: Dict[str, str] = {} 11012 _query_params: List[Tuple[str, str]] = [] 11013 _header_params: Dict[str, Optional[str]] = _headers or {} 11014 _form_params: List[Tuple[str, str]] = [] 11015 _files: Dict[str, str] = {} 11016 _body_params: Optional[bytes] = None 11017 11018 # process the path parameters 11019 if org_id is not None: 11020 _path_params["org_id"] = org_id 11021 if team_id is not None: 11022 _path_params["team_id"] = team_id 11023 # process the query parameters 11024 # process the header parameters 11025 # process the form parameters 11026 # process the body parameter 11027 11028 # set the HTTP header `Accept` 11029 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11030 11031 # authentication setting 11032 _auth_settings: List[str] = [] 11033 11034 return self.api_client.param_serialize( 11035 method="GET", 11036 resource_path="/v2/orgs/{org_id}/teams/{team_id}/settings", 11037 path_params=_path_params, 11038 query_params=_query_params, 11039 header_params=_header_params, 11040 body=_body_params, 11041 post_params=_form_params, 11042 files=_files, 11043 auth_settings=_auth_settings, 11044 collection_formats=_collection_formats, 11045 _host=_host, 11046 _request_auth=_request_auth, 11047 ) 11048 11049 @validate_call 11050 def enterprise_update_team_settings( 11051 self, 11052 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11053 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11054 team_settings_changes: TeamSettingsChanges, 11055 _request_timeout: Union[ 11056 None, 11057 Annotated[StrictFloat, Field(gt=0)], 11058 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11059 ] = None, 11060 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11061 _content_type: Optional[StrictStr] = None, 11062 _headers: Optional[Dict[StrictStr, Any]] = None, 11063 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11064 ) -> TeamSettings: 11065 """Update team settings 11066 11067 Updates team settings of an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11068 11069 :param org_id: The ID of an organization. (required) 11070 :type org_id: str 11071 :param team_id: The ID of a team. (required) 11072 :type team_id: str 11073 :param team_settings_changes: (required) 11074 :type team_settings_changes: TeamSettingsChanges 11075 :param _request_timeout: timeout setting for this request. If one 11076 number provided, it will be total request 11077 timeout. It can also be a pair (tuple) of 11078 (connection, read) timeouts. 11079 :type _request_timeout: int, tuple(int, int), optional 11080 :param _request_auth: set to override the auth_settings for an a single 11081 request; this effectively ignores the 11082 authentication in the spec for a single request. 11083 :type _request_auth: dict, optional 11084 :param _content_type: force content-type for the request. 11085 :type _content_type: str, Optional 11086 :param _headers: set to override the headers for a single 11087 request; this effectively ignores the headers 11088 in the spec for a single request. 11089 :type _headers: dict, optional 11090 :param _host_index: set to override the host_index for a single 11091 request; this effectively ignores the host_index 11092 in the spec for a single request. 11093 :type _host_index: int, optional 11094 :return: Returns the result object. 11095 """ # noqa: E501 11096 11097 _param = self._enterprise_update_team_settings_serialize( 11098 org_id=org_id, 11099 team_id=team_id, 11100 team_settings_changes=team_settings_changes, 11101 _request_auth=_request_auth, 11102 _content_type=_content_type, 11103 _headers=_headers, 11104 _host_index=_host_index, 11105 ) 11106 11107 _response_types_map: Dict[str, Optional[str]] = { 11108 "200": "TeamSettings", 11109 "400": None, 11110 "401": None, 11111 "403": None, 11112 "404": None, 11113 "409": None, 11114 "429": None, 11115 } 11116 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11117 response_data.read() 11118 return self.api_client.response_deserialize( 11119 response_data=response_data, 11120 response_types_map=_response_types_map, 11121 ).data 11122 11123 def _enterprise_update_team_settings_serialize( 11124 self, 11125 org_id, 11126 team_id, 11127 team_settings_changes, 11128 _request_auth, 11129 _content_type, 11130 _headers, 11131 _host_index, 11132 ) -> RequestSerialized: 11133 11134 _host = None 11135 11136 _collection_formats: Dict[str, str] = {} 11137 11138 _path_params: Dict[str, str] = {} 11139 _query_params: List[Tuple[str, str]] = [] 11140 _header_params: Dict[str, Optional[str]] = _headers or {} 11141 _form_params: List[Tuple[str, str]] = [] 11142 _files: Dict[str, str] = {} 11143 _body_params: Optional[bytes] = None 11144 11145 # process the path parameters 11146 if org_id is not None: 11147 _path_params["org_id"] = org_id 11148 if team_id is not None: 11149 _path_params["team_id"] = team_id 11150 # process the query parameters 11151 # process the header parameters 11152 # process the form parameters 11153 # process the body parameter 11154 if team_settings_changes is not None: 11155 _body_params = team_settings_changes 11156 11157 # set the HTTP header `Accept` 11158 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11159 11160 # set the HTTP header `Content-Type` 11161 if _content_type: 11162 _header_params["Content-Type"] = _content_type 11163 else: 11164 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 11165 if _default_content_type is not None: 11166 _header_params["Content-Type"] = _default_content_type 11167 11168 # authentication setting 11169 _auth_settings: List[str] = [] 11170 11171 return self.api_client.param_serialize( 11172 method="PATCH", 11173 resource_path="/v2/orgs/{org_id}/teams/{team_id}/settings", 11174 path_params=_path_params, 11175 query_params=_query_params, 11176 header_params=_header_params, 11177 body=_body_params, 11178 post_params=_form_params, 11179 files=_files, 11180 auth_settings=_auth_settings, 11181 collection_formats=_collection_formats, 11182 _host=_host, 11183 _request_auth=_request_auth, 11184 ) 11185 11186 @validate_call 11187 def enterprise_teams_create_group( 11188 self, 11189 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11190 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11191 create_team_group_request: CreateTeamGroupRequest, 11192 _request_timeout: Union[ 11193 None, 11194 Annotated[StrictFloat, Field(gt=0)], 11195 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11196 ] = None, 11197 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11198 _content_type: Optional[StrictStr] = None, 11199 _headers: Optional[Dict[StrictStr, Any]] = None, 11200 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11201 ) -> TeamGroup: 11202 """Create user group to team connection 11203 11204 Adds a user group to a team in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p>' 11205 11206 :param org_id: The ID of an organization. (required) 11207 :type org_id: str 11208 :param team_id: The ID of a team. (required) 11209 :type team_id: str 11210 :param create_team_group_request: (required) 11211 :type create_team_group_request: CreateTeamGroupRequest 11212 :param _request_timeout: timeout setting for this request. If one 11213 number provided, it will be total request 11214 timeout. It can also be a pair (tuple) of 11215 (connection, read) timeouts. 11216 :type _request_timeout: int, tuple(int, int), optional 11217 :param _request_auth: set to override the auth_settings for an a single 11218 request; this effectively ignores the 11219 authentication in the spec for a single request. 11220 :type _request_auth: dict, optional 11221 :param _content_type: force content-type for the request. 11222 :type _content_type: str, Optional 11223 :param _headers: set to override the headers for a single 11224 request; this effectively ignores the headers 11225 in the spec for a single request. 11226 :type _headers: dict, optional 11227 :param _host_index: set to override the host_index for a single 11228 request; this effectively ignores the host_index 11229 in the spec for a single request. 11230 :type _host_index: int, optional 11231 :return: Returns the result object. 11232 """ # noqa: E501 11233 11234 _param = self._enterprise_teams_create_group_serialize( 11235 org_id=org_id, 11236 team_id=team_id, 11237 create_team_group_request=create_team_group_request, 11238 _request_auth=_request_auth, 11239 _content_type=_content_type, 11240 _headers=_headers, 11241 _host_index=_host_index, 11242 ) 11243 11244 _response_types_map: Dict[str, Optional[str]] = { 11245 "201": "TeamGroup", 11246 "400": None, 11247 "401": None, 11248 "403": None, 11249 "409": None, 11250 "429": None, 11251 } 11252 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11253 response_data.read() 11254 return self.api_client.response_deserialize( 11255 response_data=response_data, 11256 response_types_map=_response_types_map, 11257 ).data 11258 11259 def _enterprise_teams_create_group_serialize( 11260 self, 11261 org_id, 11262 team_id, 11263 create_team_group_request, 11264 _request_auth, 11265 _content_type, 11266 _headers, 11267 _host_index, 11268 ) -> RequestSerialized: 11269 11270 _host = None 11271 11272 _collection_formats: Dict[str, str] = {} 11273 11274 _path_params: Dict[str, str] = {} 11275 _query_params: List[Tuple[str, str]] = [] 11276 _header_params: Dict[str, Optional[str]] = _headers or {} 11277 _form_params: List[Tuple[str, str]] = [] 11278 _files: Dict[str, str] = {} 11279 _body_params: Optional[bytes] = None 11280 11281 # process the path parameters 11282 if org_id is not None: 11283 _path_params["org_id"] = org_id 11284 if team_id is not None: 11285 _path_params["team_id"] = team_id 11286 # process the query parameters 11287 # process the header parameters 11288 # process the form parameters 11289 # process the body parameter 11290 if create_team_group_request is not None: 11291 _body_params = create_team_group_request 11292 11293 # set the HTTP header `Accept` 11294 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11295 11296 # set the HTTP header `Content-Type` 11297 if _content_type: 11298 _header_params["Content-Type"] = _content_type 11299 else: 11300 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 11301 if _default_content_type is not None: 11302 _header_params["Content-Type"] = _default_content_type 11303 11304 # authentication setting 11305 _auth_settings: List[str] = [] 11306 11307 return self.api_client.param_serialize( 11308 method="POST", 11309 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups", 11310 path_params=_path_params, 11311 query_params=_query_params, 11312 header_params=_header_params, 11313 body=_body_params, 11314 post_params=_form_params, 11315 files=_files, 11316 auth_settings=_auth_settings, 11317 collection_formats=_collection_formats, 11318 _host=_host, 11319 _request_auth=_request_auth, 11320 ) 11321 11322 @validate_call 11323 def enterprise_teams_delete_group( 11324 self, 11325 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11326 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11327 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 11328 _request_timeout: Union[ 11329 None, 11330 Annotated[StrictFloat, Field(gt=0)], 11331 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11332 ] = None, 11333 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11334 _content_type: Optional[StrictStr] = None, 11335 _headers: Optional[Dict[StrictStr, Any]] = None, 11336 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11337 ) -> None: 11338 """Delete user group to team connection 11339 11340 Removes a user group from a team in an existing organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11341 11342 :param org_id: The ID of an organization. (required) 11343 :type org_id: str 11344 :param team_id: The ID of a team. (required) 11345 :type team_id: str 11346 :param group_id: The ID of a user group. (required) 11347 :type group_id: str 11348 :param _request_timeout: timeout setting for this request. If one 11349 number provided, it will be total request 11350 timeout. It can also be a pair (tuple) of 11351 (connection, read) timeouts. 11352 :type _request_timeout: int, tuple(int, int), optional 11353 :param _request_auth: set to override the auth_settings for an a single 11354 request; this effectively ignores the 11355 authentication in the spec for a single request. 11356 :type _request_auth: dict, optional 11357 :param _content_type: force content-type for the request. 11358 :type _content_type: str, Optional 11359 :param _headers: set to override the headers for a single 11360 request; this effectively ignores the headers 11361 in the spec for a single request. 11362 :type _headers: dict, optional 11363 :param _host_index: set to override the host_index for a single 11364 request; this effectively ignores the host_index 11365 in the spec for a single request. 11366 :type _host_index: int, optional 11367 :return: Returns the result object. 11368 """ # noqa: E501 11369 11370 _param = self._enterprise_teams_delete_group_serialize( 11371 org_id=org_id, 11372 team_id=team_id, 11373 group_id=group_id, 11374 _request_auth=_request_auth, 11375 _content_type=_content_type, 11376 _headers=_headers, 11377 _host_index=_host_index, 11378 ) 11379 11380 _response_types_map: Dict[str, Optional[str]] = { 11381 "204": None, 11382 "400": None, 11383 "401": None, 11384 "403": None, 11385 "404": None, 11386 "409": None, 11387 "429": None, 11388 } 11389 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11390 response_data.read() 11391 return self.api_client.response_deserialize( 11392 response_data=response_data, 11393 response_types_map=_response_types_map, 11394 ).data 11395 11396 def _enterprise_teams_delete_group_serialize( 11397 self, 11398 org_id, 11399 team_id, 11400 group_id, 11401 _request_auth, 11402 _content_type, 11403 _headers, 11404 _host_index, 11405 ) -> RequestSerialized: 11406 11407 _host = None 11408 11409 _collection_formats: Dict[str, str] = {} 11410 11411 _path_params: Dict[str, str] = {} 11412 _query_params: List[Tuple[str, str]] = [] 11413 _header_params: Dict[str, Optional[str]] = _headers or {} 11414 _form_params: List[Tuple[str, str]] = [] 11415 _files: Dict[str, str] = {} 11416 _body_params: Optional[bytes] = None 11417 11418 # process the path parameters 11419 if org_id is not None: 11420 _path_params["org_id"] = org_id 11421 if team_id is not None: 11422 _path_params["team_id"] = team_id 11423 if group_id is not None: 11424 _path_params["group_id"] = group_id 11425 # process the query parameters 11426 # process the header parameters 11427 # process the form parameters 11428 # process the body parameter 11429 11430 # authentication setting 11431 _auth_settings: List[str] = [] 11432 11433 return self.api_client.param_serialize( 11434 method="DELETE", 11435 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups/{group_id}", 11436 path_params=_path_params, 11437 query_params=_query_params, 11438 header_params=_header_params, 11439 body=_body_params, 11440 post_params=_form_params, 11441 files=_files, 11442 auth_settings=_auth_settings, 11443 collection_formats=_collection_formats, 11444 _host=_host, 11445 _request_auth=_request_auth, 11446 ) 11447 11448 @validate_call 11449 def enterprise_teams_get_group( 11450 self, 11451 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11452 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11453 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 11454 _request_timeout: Union[ 11455 None, 11456 Annotated[StrictFloat, Field(gt=0)], 11457 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11458 ] = None, 11459 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11460 _content_type: Optional[StrictStr] = None, 11461 _headers: Optional[Dict[StrictStr, Any]] = None, 11462 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11463 ) -> TeamGroup: 11464 """Get user group of a team 11465 11466 Retrieves information about a specific user group of a team.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11467 11468 :param org_id: The ID of an organization. (required) 11469 :type org_id: str 11470 :param team_id: The ID of a team. (required) 11471 :type team_id: str 11472 :param group_id: The ID of a user group. (required) 11473 :type group_id: str 11474 :param _request_timeout: timeout setting for this request. If one 11475 number provided, it will be total request 11476 timeout. It can also be a pair (tuple) of 11477 (connection, read) timeouts. 11478 :type _request_timeout: int, tuple(int, int), optional 11479 :param _request_auth: set to override the auth_settings for an a single 11480 request; this effectively ignores the 11481 authentication in the spec for a single request. 11482 :type _request_auth: dict, optional 11483 :param _content_type: force content-type for the request. 11484 :type _content_type: str, Optional 11485 :param _headers: set to override the headers for a single 11486 request; this effectively ignores the headers 11487 in the spec for a single request. 11488 :type _headers: dict, optional 11489 :param _host_index: set to override the host_index for a single 11490 request; this effectively ignores the host_index 11491 in the spec for a single request. 11492 :type _host_index: int, optional 11493 :return: Returns the result object. 11494 """ # noqa: E501 11495 11496 _param = self._enterprise_teams_get_group_serialize( 11497 org_id=org_id, 11498 team_id=team_id, 11499 group_id=group_id, 11500 _request_auth=_request_auth, 11501 _content_type=_content_type, 11502 _headers=_headers, 11503 _host_index=_host_index, 11504 ) 11505 11506 _response_types_map: Dict[str, Optional[str]] = { 11507 "200": "TeamGroup", 11508 "400": None, 11509 "401": None, 11510 "403": None, 11511 "404": None, 11512 "429": None, 11513 } 11514 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11515 response_data.read() 11516 return self.api_client.response_deserialize( 11517 response_data=response_data, 11518 response_types_map=_response_types_map, 11519 ).data 11520 11521 def _enterprise_teams_get_group_serialize( 11522 self, 11523 org_id, 11524 team_id, 11525 group_id, 11526 _request_auth, 11527 _content_type, 11528 _headers, 11529 _host_index, 11530 ) -> RequestSerialized: 11531 11532 _host = None 11533 11534 _collection_formats: Dict[str, str] = {} 11535 11536 _path_params: Dict[str, str] = {} 11537 _query_params: List[Tuple[str, str]] = [] 11538 _header_params: Dict[str, Optional[str]] = _headers or {} 11539 _form_params: List[Tuple[str, str]] = [] 11540 _files: Dict[str, str] = {} 11541 _body_params: Optional[bytes] = None 11542 11543 # process the path parameters 11544 if org_id is not None: 11545 _path_params["org_id"] = org_id 11546 if team_id is not None: 11547 _path_params["team_id"] = team_id 11548 if group_id is not None: 11549 _path_params["group_id"] = group_id 11550 # process the query parameters 11551 # process the header parameters 11552 # process the form parameters 11553 # process the body parameter 11554 11555 # set the HTTP header `Accept` 11556 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11557 11558 # authentication setting 11559 _auth_settings: List[str] = [] 11560 11561 return self.api_client.param_serialize( 11562 method="GET", 11563 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups/{group_id}", 11564 path_params=_path_params, 11565 query_params=_query_params, 11566 header_params=_header_params, 11567 body=_body_params, 11568 post_params=_form_params, 11569 files=_files, 11570 auth_settings=_auth_settings, 11571 collection_formats=_collection_formats, 11572 _host=_host, 11573 _request_auth=_request_auth, 11574 ) 11575 11576 @validate_call 11577 def enterprise_teams_get_groups( 11578 self, 11579 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11580 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11581 limit: Annotated[ 11582 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 11583 Field(description="The maximum number of user groups in the result list."), 11584 ] = None, 11585 cursor: Annotated[ 11586 Optional[StrictStr], 11587 Field( 11588 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 11589 ), 11590 ] = None, 11591 _request_timeout: Union[ 11592 None, 11593 Annotated[StrictFloat, Field(gt=0)], 11594 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11595 ] = None, 11596 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11597 _content_type: Optional[StrictStr] = None, 11598 _headers: Optional[Dict[StrictStr, Any]] = None, 11599 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11600 ) -> TeamGroupsPage: 11601 """List of user group to team connections 11602 11603 Retrieves the list of user groups that are part of a team in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11604 11605 :param org_id: The ID of an organization. (required) 11606 :type org_id: str 11607 :param team_id: The ID of a team. (required) 11608 :type team_id: str 11609 :param limit: The maximum number of user groups in the result list. 11610 :type limit: int 11611 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 11612 :type cursor: str 11613 :param _request_timeout: timeout setting for this request. If one 11614 number provided, it will be total request 11615 timeout. It can also be a pair (tuple) of 11616 (connection, read) timeouts. 11617 :type _request_timeout: int, tuple(int, int), optional 11618 :param _request_auth: set to override the auth_settings for an a single 11619 request; this effectively ignores the 11620 authentication in the spec for a single request. 11621 :type _request_auth: dict, optional 11622 :param _content_type: force content-type for the request. 11623 :type _content_type: str, Optional 11624 :param _headers: set to override the headers for a single 11625 request; this effectively ignores the headers 11626 in the spec for a single request. 11627 :type _headers: dict, optional 11628 :param _host_index: set to override the host_index for a single 11629 request; this effectively ignores the host_index 11630 in the spec for a single request. 11631 :type _host_index: int, optional 11632 :return: Returns the result object. 11633 """ # noqa: E501 11634 11635 _param = self._enterprise_teams_get_groups_serialize( 11636 org_id=org_id, 11637 team_id=team_id, 11638 limit=limit, 11639 cursor=cursor, 11640 _request_auth=_request_auth, 11641 _content_type=_content_type, 11642 _headers=_headers, 11643 _host_index=_host_index, 11644 ) 11645 11646 _response_types_map: Dict[str, Optional[str]] = { 11647 "200": "TeamGroupsPage", 11648 "400": None, 11649 "401": None, 11650 "403": None, 11651 "429": None, 11652 } 11653 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11654 response_data.read() 11655 return self.api_client.response_deserialize( 11656 response_data=response_data, 11657 response_types_map=_response_types_map, 11658 ).data 11659 11660 def _enterprise_teams_get_groups_serialize( 11661 self, 11662 org_id, 11663 team_id, 11664 limit, 11665 cursor, 11666 _request_auth, 11667 _content_type, 11668 _headers, 11669 _host_index, 11670 ) -> RequestSerialized: 11671 11672 _host = None 11673 11674 _collection_formats: Dict[str, str] = {} 11675 11676 _path_params: Dict[str, str] = {} 11677 _query_params: List[Tuple[str, str]] = [] 11678 _header_params: Dict[str, Optional[str]] = _headers or {} 11679 _form_params: List[Tuple[str, str]] = [] 11680 _files: Dict[str, str] = {} 11681 _body_params: Optional[bytes] = None 11682 11683 # process the path parameters 11684 if org_id is not None: 11685 _path_params["org_id"] = org_id 11686 if team_id is not None: 11687 _path_params["team_id"] = team_id 11688 # process the query parameters 11689 if limit is not None: 11690 11691 _query_params.append(("limit", limit)) 11692 11693 if cursor is not None: 11694 11695 _query_params.append(("cursor", cursor)) 11696 11697 # process the header parameters 11698 # process the form parameters 11699 # process the body parameter 11700 11701 # set the HTTP header `Accept` 11702 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11703 11704 # authentication setting 11705 _auth_settings: List[str] = [] 11706 11707 return self.api_client.param_serialize( 11708 method="GET", 11709 resource_path="/v2/orgs/{org_id}/teams/{team_id}/groups", 11710 path_params=_path_params, 11711 query_params=_query_params, 11712 header_params=_header_params, 11713 body=_body_params, 11714 post_params=_form_params, 11715 files=_files, 11716 auth_settings=_auth_settings, 11717 collection_formats=_collection_formats, 11718 _host=_host, 11719 _request_auth=_request_auth, 11720 ) 11721 11722 @validate_call 11723 def enterprise_create_team( 11724 self, 11725 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11726 create_team_request: CreateTeamRequest, 11727 _request_timeout: Union[ 11728 None, 11729 Annotated[StrictFloat, Field(gt=0)], 11730 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11731 ] = None, 11732 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11733 _content_type: Optional[StrictStr] = None, 11734 _headers: Optional[Dict[StrictStr, Any]] = None, 11735 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11736 ) -> Team: 11737 """Create team 11738 11739 Creates a new team in an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11740 11741 :param org_id: The ID of an organization. (required) 11742 :type org_id: str 11743 :param create_team_request: (required) 11744 :type create_team_request: CreateTeamRequest 11745 :param _request_timeout: timeout setting for this request. If one 11746 number provided, it will be total request 11747 timeout. It can also be a pair (tuple) of 11748 (connection, read) timeouts. 11749 :type _request_timeout: int, tuple(int, int), optional 11750 :param _request_auth: set to override the auth_settings for an a single 11751 request; this effectively ignores the 11752 authentication in the spec for a single request. 11753 :type _request_auth: dict, optional 11754 :param _content_type: force content-type for the request. 11755 :type _content_type: str, Optional 11756 :param _headers: set to override the headers for a single 11757 request; this effectively ignores the headers 11758 in the spec for a single request. 11759 :type _headers: dict, optional 11760 :param _host_index: set to override the host_index for a single 11761 request; this effectively ignores the host_index 11762 in the spec for a single request. 11763 :type _host_index: int, optional 11764 :return: Returns the result object. 11765 """ # noqa: E501 11766 11767 _param = self._enterprise_create_team_serialize( 11768 org_id=org_id, 11769 create_team_request=create_team_request, 11770 _request_auth=_request_auth, 11771 _content_type=_content_type, 11772 _headers=_headers, 11773 _host_index=_host_index, 11774 ) 11775 11776 _response_types_map: Dict[str, Optional[str]] = { 11777 "201": "Team", 11778 "400": None, 11779 "401": None, 11780 "403": None, 11781 "404": None, 11782 "429": None, 11783 } 11784 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11785 response_data.read() 11786 return self.api_client.response_deserialize( 11787 response_data=response_data, 11788 response_types_map=_response_types_map, 11789 ).data 11790 11791 def _enterprise_create_team_serialize( 11792 self, 11793 org_id, 11794 create_team_request, 11795 _request_auth, 11796 _content_type, 11797 _headers, 11798 _host_index, 11799 ) -> RequestSerialized: 11800 11801 _host = None 11802 11803 _collection_formats: Dict[str, str] = {} 11804 11805 _path_params: Dict[str, str] = {} 11806 _query_params: List[Tuple[str, str]] = [] 11807 _header_params: Dict[str, Optional[str]] = _headers or {} 11808 _form_params: List[Tuple[str, str]] = [] 11809 _files: Dict[str, str] = {} 11810 _body_params: Optional[bytes] = None 11811 11812 # process the path parameters 11813 if org_id is not None: 11814 _path_params["org_id"] = org_id 11815 # process the query parameters 11816 # process the header parameters 11817 # process the form parameters 11818 # process the body parameter 11819 if create_team_request is not None: 11820 _body_params = create_team_request 11821 11822 # set the HTTP header `Accept` 11823 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 11824 11825 # set the HTTP header `Content-Type` 11826 if _content_type: 11827 _header_params["Content-Type"] = _content_type 11828 else: 11829 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 11830 if _default_content_type is not None: 11831 _header_params["Content-Type"] = _default_content_type 11832 11833 # authentication setting 11834 _auth_settings: List[str] = [] 11835 11836 return self.api_client.param_serialize( 11837 method="POST", 11838 resource_path="/v2/orgs/{org_id}/teams", 11839 path_params=_path_params, 11840 query_params=_query_params, 11841 header_params=_header_params, 11842 body=_body_params, 11843 post_params=_form_params, 11844 files=_files, 11845 auth_settings=_auth_settings, 11846 collection_formats=_collection_formats, 11847 _host=_host, 11848 _request_auth=_request_auth, 11849 ) 11850 11851 @validate_call 11852 def enterprise_delete_team( 11853 self, 11854 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11855 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11856 _request_timeout: Union[ 11857 None, 11858 Annotated[StrictFloat, Field(gt=0)], 11859 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11860 ] = None, 11861 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11862 _content_type: Optional[StrictStr] = None, 11863 _headers: Optional[Dict[StrictStr, Any]] = None, 11864 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11865 ) -> None: 11866 """Delete team 11867 11868 Deletes an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11869 11870 :param org_id: The ID of an organization. (required) 11871 :type org_id: str 11872 :param team_id: The ID of a team. (required) 11873 :type team_id: str 11874 :param _request_timeout: timeout setting for this request. If one 11875 number provided, it will be total request 11876 timeout. It can also be a pair (tuple) of 11877 (connection, read) timeouts. 11878 :type _request_timeout: int, tuple(int, int), optional 11879 :param _request_auth: set to override the auth_settings for an a single 11880 request; this effectively ignores the 11881 authentication in the spec for a single request. 11882 :type _request_auth: dict, optional 11883 :param _content_type: force content-type for the request. 11884 :type _content_type: str, Optional 11885 :param _headers: set to override the headers for a single 11886 request; this effectively ignores the headers 11887 in the spec for a single request. 11888 :type _headers: dict, optional 11889 :param _host_index: set to override the host_index for a single 11890 request; this effectively ignores the host_index 11891 in the spec for a single request. 11892 :type _host_index: int, optional 11893 :return: Returns the result object. 11894 """ # noqa: E501 11895 11896 _param = self._enterprise_delete_team_serialize( 11897 org_id=org_id, 11898 team_id=team_id, 11899 _request_auth=_request_auth, 11900 _content_type=_content_type, 11901 _headers=_headers, 11902 _host_index=_host_index, 11903 ) 11904 11905 _response_types_map: Dict[str, Optional[str]] = { 11906 "204": None, 11907 "400": None, 11908 "401": None, 11909 "403": None, 11910 "404": None, 11911 "429": None, 11912 } 11913 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11914 response_data.read() 11915 return self.api_client.response_deserialize( 11916 response_data=response_data, 11917 response_types_map=_response_types_map, 11918 ).data 11919 11920 def _enterprise_delete_team_serialize( 11921 self, 11922 org_id, 11923 team_id, 11924 _request_auth, 11925 _content_type, 11926 _headers, 11927 _host_index, 11928 ) -> RequestSerialized: 11929 11930 _host = None 11931 11932 _collection_formats: Dict[str, str] = {} 11933 11934 _path_params: Dict[str, str] = {} 11935 _query_params: List[Tuple[str, str]] = [] 11936 _header_params: Dict[str, Optional[str]] = _headers or {} 11937 _form_params: List[Tuple[str, str]] = [] 11938 _files: Dict[str, str] = {} 11939 _body_params: Optional[bytes] = None 11940 11941 # process the path parameters 11942 if org_id is not None: 11943 _path_params["org_id"] = org_id 11944 if team_id is not None: 11945 _path_params["team_id"] = team_id 11946 # process the query parameters 11947 # process the header parameters 11948 # process the form parameters 11949 # process the body parameter 11950 11951 # authentication setting 11952 _auth_settings: List[str] = [] 11953 11954 return self.api_client.param_serialize( 11955 method="DELETE", 11956 resource_path="/v2/orgs/{org_id}/teams/{team_id}", 11957 path_params=_path_params, 11958 query_params=_query_params, 11959 header_params=_header_params, 11960 body=_body_params, 11961 post_params=_form_params, 11962 files=_files, 11963 auth_settings=_auth_settings, 11964 collection_formats=_collection_formats, 11965 _host=_host, 11966 _request_auth=_request_auth, 11967 ) 11968 11969 @validate_call 11970 def enterprise_get_team( 11971 self, 11972 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11973 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11974 _request_timeout: Union[ 11975 None, 11976 Annotated[StrictFloat, Field(gt=0)], 11977 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11978 ] = None, 11979 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11980 _content_type: Optional[StrictStr] = None, 11981 _headers: Optional[Dict[StrictStr, Any]] = None, 11982 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11983 ) -> Team: 11984 """Get team 11985 11986 Retrieves team information for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11987 11988 :param org_id: The ID of an organization. (required) 11989 :type org_id: str 11990 :param team_id: The ID of a team. (required) 11991 :type team_id: str 11992 :param _request_timeout: timeout setting for this request. If one 11993 number provided, it will be total request 11994 timeout. It can also be a pair (tuple) of 11995 (connection, read) timeouts. 11996 :type _request_timeout: int, tuple(int, int), optional 11997 :param _request_auth: set to override the auth_settings for an a single 11998 request; this effectively ignores the 11999 authentication in the spec for a single request. 12000 :type _request_auth: dict, optional 12001 :param _content_type: force content-type for the request. 12002 :type _content_type: str, Optional 12003 :param _headers: set to override the headers for a single 12004 request; this effectively ignores the headers 12005 in the spec for a single request. 12006 :type _headers: dict, optional 12007 :param _host_index: set to override the host_index for a single 12008 request; this effectively ignores the host_index 12009 in the spec for a single request. 12010 :type _host_index: int, optional 12011 :return: Returns the result object. 12012 """ # noqa: E501 12013 12014 _param = self._enterprise_get_team_serialize( 12015 org_id=org_id, 12016 team_id=team_id, 12017 _request_auth=_request_auth, 12018 _content_type=_content_type, 12019 _headers=_headers, 12020 _host_index=_host_index, 12021 ) 12022 12023 _response_types_map: Dict[str, Optional[str]] = { 12024 "200": "Team", 12025 "400": None, 12026 "401": None, 12027 "403": None, 12028 "404": None, 12029 "429": None, 12030 } 12031 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12032 response_data.read() 12033 return self.api_client.response_deserialize( 12034 response_data=response_data, 12035 response_types_map=_response_types_map, 12036 ).data 12037 12038 def _enterprise_get_team_serialize( 12039 self, 12040 org_id, 12041 team_id, 12042 _request_auth, 12043 _content_type, 12044 _headers, 12045 _host_index, 12046 ) -> RequestSerialized: 12047 12048 _host = None 12049 12050 _collection_formats: Dict[str, str] = {} 12051 12052 _path_params: Dict[str, str] = {} 12053 _query_params: List[Tuple[str, str]] = [] 12054 _header_params: Dict[str, Optional[str]] = _headers or {} 12055 _form_params: List[Tuple[str, str]] = [] 12056 _files: Dict[str, str] = {} 12057 _body_params: Optional[bytes] = None 12058 12059 # process the path parameters 12060 if org_id is not None: 12061 _path_params["org_id"] = org_id 12062 if team_id is not None: 12063 _path_params["team_id"] = team_id 12064 # process the query parameters 12065 # process the header parameters 12066 # process the form parameters 12067 # process the body parameter 12068 12069 # set the HTTP header `Accept` 12070 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 12071 12072 # authentication setting 12073 _auth_settings: List[str] = [] 12074 12075 return self.api_client.param_serialize( 12076 method="GET", 12077 resource_path="/v2/orgs/{org_id}/teams/{team_id}", 12078 path_params=_path_params, 12079 query_params=_query_params, 12080 header_params=_header_params, 12081 body=_body_params, 12082 post_params=_form_params, 12083 files=_files, 12084 auth_settings=_auth_settings, 12085 collection_formats=_collection_formats, 12086 _host=_host, 12087 _request_auth=_request_auth, 12088 ) 12089 12090 @validate_call 12091 def enterprise_get_teams( 12092 self, 12093 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 12094 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 12095 cursor: Annotated[ 12096 Optional[StrictStr], 12097 Field( 12098 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 12099 ), 12100 ] = None, 12101 name: Annotated[ 12102 Optional[StrictStr], 12103 Field( 12104 description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".' 12105 ), 12106 ] = None, 12107 _request_timeout: Union[ 12108 None, 12109 Annotated[StrictFloat, Field(gt=0)], 12110 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12111 ] = None, 12112 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12113 _content_type: Optional[StrictStr] = None, 12114 _headers: Optional[Dict[StrictStr, Any]] = None, 12115 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12116 ) -> TeamsPage: 12117 """List teams 12118 12119 Retrieves list of teams in an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 12120 12121 :param org_id: The ID of an organization. (required) 12122 :type org_id: str 12123 :param limit: 12124 :type limit: int 12125 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 12126 :type cursor: str 12127 :param name: Name query. Filters teams by name using case insensitive partial match. A value \"dev\" will return both \"Developer's team\" and \"Team for developers\". 12128 :type name: str 12129 :param _request_timeout: timeout setting for this request. If one 12130 number provided, it will be total request 12131 timeout. It can also be a pair (tuple) of 12132 (connection, read) timeouts. 12133 :type _request_timeout: int, tuple(int, int), optional 12134 :param _request_auth: set to override the auth_settings for an a single 12135 request; this effectively ignores the 12136 authentication in the spec for a single request. 12137 :type _request_auth: dict, optional 12138 :param _content_type: force content-type for the request. 12139 :type _content_type: str, Optional 12140 :param _headers: set to override the headers for a single 12141 request; this effectively ignores the headers 12142 in the spec for a single request. 12143 :type _headers: dict, optional 12144 :param _host_index: set to override the host_index for a single 12145 request; this effectively ignores the host_index 12146 in the spec for a single request. 12147 :type _host_index: int, optional 12148 :return: Returns the result object. 12149 """ # noqa: E501 12150 12151 _param = self._enterprise_get_teams_serialize( 12152 org_id=org_id, 12153 limit=limit, 12154 cursor=cursor, 12155 name=name, 12156 _request_auth=_request_auth, 12157 _content_type=_content_type, 12158 _headers=_headers, 12159 _host_index=_host_index, 12160 ) 12161 12162 _response_types_map: Dict[str, Optional[str]] = { 12163 "200": "TeamsPage", 12164 "400": None, 12165 "401": None, 12166 "403": None, 12167 "404": None, 12168 "429": None, 12169 } 12170 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12171 response_data.read() 12172 return self.api_client.response_deserialize( 12173 response_data=response_data, 12174 response_types_map=_response_types_map, 12175 ).data 12176 12177 def _enterprise_get_teams_serialize( 12178 self, 12179 org_id, 12180 limit, 12181 cursor, 12182 name, 12183 _request_auth, 12184 _content_type, 12185 _headers, 12186 _host_index, 12187 ) -> RequestSerialized: 12188 12189 _host = None 12190 12191 _collection_formats: Dict[str, str] = {} 12192 12193 _path_params: Dict[str, str] = {} 12194 _query_params: List[Tuple[str, str]] = [] 12195 _header_params: Dict[str, Optional[str]] = _headers or {} 12196 _form_params: List[Tuple[str, str]] = [] 12197 _files: Dict[str, str] = {} 12198 _body_params: Optional[bytes] = None 12199 12200 # process the path parameters 12201 if org_id is not None: 12202 _path_params["org_id"] = org_id 12203 # process the query parameters 12204 if limit is not None: 12205 12206 _query_params.append(("limit", limit)) 12207 12208 if cursor is not None: 12209 12210 _query_params.append(("cursor", cursor)) 12211 12212 if name is not None: 12213 12214 _query_params.append(("name", name)) 12215 12216 # process the header parameters 12217 # process the form parameters 12218 # process the body parameter 12219 12220 # set the HTTP header `Accept` 12221 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 12222 12223 # authentication setting 12224 _auth_settings: List[str] = [] 12225 12226 return self.api_client.param_serialize( 12227 method="GET", 12228 resource_path="/v2/orgs/{org_id}/teams", 12229 path_params=_path_params, 12230 query_params=_query_params, 12231 header_params=_header_params, 12232 body=_body_params, 12233 post_params=_form_params, 12234 files=_files, 12235 auth_settings=_auth_settings, 12236 collection_formats=_collection_formats, 12237 _host=_host, 12238 _request_auth=_request_auth, 12239 ) 12240 12241 @validate_call 12242 def enterprise_update_team( 12243 self, 12244 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 12245 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 12246 team_changes: TeamChanges, 12247 _request_timeout: Union[ 12248 None, 12249 Annotated[StrictFloat, Field(gt=0)], 12250 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12251 ] = None, 12252 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12253 _content_type: Optional[StrictStr] = None, 12254 _headers: Optional[Dict[StrictStr, Any]] = None, 12255 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12256 ) -> Team: 12257 """Update team 12258 12259 Updates an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 12260 12261 :param org_id: The ID of an organization. (required) 12262 :type org_id: str 12263 :param team_id: The ID of a team. (required) 12264 :type team_id: str 12265 :param team_changes: (required) 12266 :type team_changes: TeamChanges 12267 :param _request_timeout: timeout setting for this request. If one 12268 number provided, it will be total request 12269 timeout. It can also be a pair (tuple) of 12270 (connection, read) timeouts. 12271 :type _request_timeout: int, tuple(int, int), optional 12272 :param _request_auth: set to override the auth_settings for an a single 12273 request; this effectively ignores the 12274 authentication in the spec for a single request. 12275 :type _request_auth: dict, optional 12276 :param _content_type: force content-type for the request. 12277 :type _content_type: str, Optional 12278 :param _headers: set to override the headers for a single 12279 request; this effectively ignores the headers 12280 in the spec for a single request. 12281 :type _headers: dict, optional 12282 :param _host_index: set to override the host_index for a single 12283 request; this effectively ignores the host_index 12284 in the spec for a single request. 12285 :type _host_index: int, optional 12286 :return: Returns the result object. 12287 """ # noqa: E501 12288 12289 _param = self._enterprise_update_team_serialize( 12290 org_id=org_id, 12291 team_id=team_id, 12292 team_changes=team_changes, 12293 _request_auth=_request_auth, 12294 _content_type=_content_type, 12295 _headers=_headers, 12296 _host_index=_host_index, 12297 ) 12298 12299 _response_types_map: Dict[str, Optional[str]] = { 12300 "200": "Team", 12301 "400": None, 12302 "401": None, 12303 "403": None, 12304 "404": None, 12305 "429": None, 12306 } 12307 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12308 response_data.read() 12309 return self.api_client.response_deserialize( 12310 response_data=response_data, 12311 response_types_map=_response_types_map, 12312 ).data 12313 12314 def _enterprise_update_team_serialize( 12315 self, 12316 org_id, 12317 team_id, 12318 team_changes, 12319 _request_auth, 12320 _content_type, 12321 _headers, 12322 _host_index, 12323 ) -> RequestSerialized: 12324 12325 _host = None 12326 12327 _collection_formats: Dict[str, str] = {} 12328 12329 _path_params: Dict[str, str] = {} 12330 _query_params: List[Tuple[str, str]] = [] 12331 _header_params: Dict[str, Optional[str]] = _headers or {} 12332 _form_params: List[Tuple[str, str]] = [] 12333 _files: Dict[str, str] = {} 12334 _body_params: Optional[bytes] = None 12335 12336 # process the path parameters 12337 if org_id is not None: 12338 _path_params["org_id"] = org_id 12339 if team_id is not None: 12340 _path_params["team_id"] = team_id 12341 # process the query parameters 12342 # process the header parameters 12343 # process the form parameters 12344 # process the body parameter 12345 if team_changes is not None: 12346 _body_params = team_changes 12347 12348 # set the HTTP header `Accept` 12349 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 12350 12351 # set the HTTP header `Content-Type` 12352 if _content_type: 12353 _header_params["Content-Type"] = _content_type 12354 else: 12355 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 12356 if _default_content_type is not None: 12357 _header_params["Content-Type"] = _default_content_type 12358 12359 # authentication setting 12360 _auth_settings: List[str] = [] 12361 12362 return self.api_client.param_serialize( 12363 method="PATCH", 12364 resource_path="/v2/orgs/{org_id}/teams/{team_id}", 12365 path_params=_path_params, 12366 query_params=_query_params, 12367 header_params=_header_params, 12368 body=_body_params, 12369 post_params=_form_params, 12370 files=_files, 12371 auth_settings=_auth_settings, 12372 collection_formats=_collection_formats, 12373 _host=_host, 12374 _request_auth=_request_auth, 12375 ) 12376 12377 @validate_call 12378 def create_user( 12379 self, 12380 create_user_resource: CreateUserResource, 12381 _request_timeout: Union[ 12382 None, 12383 Annotated[StrictFloat, Field(gt=0)], 12384 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12385 ] = None, 12386 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12387 _content_type: Optional[StrictStr] = None, 12388 _headers: Optional[Dict[StrictStr, Any]] = None, 12389 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12390 ) -> UserResource: 12391 """Create user 12392 12393 Creates a new user in the organization. <br><br> <br>Note</b>: All newly provisioned users are added to the default team. 12394 12395 :param create_user_resource: (required) 12396 :type create_user_resource: CreateUserResource 12397 :param _request_timeout: timeout setting for this request. If one 12398 number provided, it will be total request 12399 timeout. It can also be a pair (tuple) of 12400 (connection, read) timeouts. 12401 :type _request_timeout: int, tuple(int, int), optional 12402 :param _request_auth: set to override the auth_settings for an a single 12403 request; this effectively ignores the 12404 authentication in the spec for a single request. 12405 :type _request_auth: dict, optional 12406 :param _content_type: force content-type for the request. 12407 :type _content_type: str, Optional 12408 :param _headers: set to override the headers for a single 12409 request; this effectively ignores the headers 12410 in the spec for a single request. 12411 :type _headers: dict, optional 12412 :param _host_index: set to override the host_index for a single 12413 request; this effectively ignores the host_index 12414 in the spec for a single request. 12415 :type _host_index: int, optional 12416 :return: Returns the result object. 12417 """ # noqa: E501 12418 12419 _param = self._create_user_serialize( 12420 create_user_resource=create_user_resource, 12421 _request_auth=_request_auth, 12422 _content_type=_content_type, 12423 _headers=_headers, 12424 _host_index=_host_index, 12425 ) 12426 12427 _response_types_map: Dict[str, Optional[str]] = { 12428 "201": "UserResource", 12429 "400": None, 12430 "401": None, 12431 "403": None, 12432 "404": None, 12433 "409": None, 12434 "413": None, 12435 "429": None, 12436 "500": None, 12437 } 12438 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12439 response_data.read() 12440 return self.api_client.response_deserialize( 12441 response_data=response_data, 12442 response_types_map=_response_types_map, 12443 ).data 12444 12445 def _create_user_serialize( 12446 self, 12447 create_user_resource, 12448 _request_auth, 12449 _content_type, 12450 _headers, 12451 _host_index, 12452 ) -> RequestSerialized: 12453 12454 _host = None 12455 12456 _collection_formats: Dict[str, str] = {} 12457 12458 _path_params: Dict[str, str] = {} 12459 _query_params: List[Tuple[str, str]] = [] 12460 _header_params: Dict[str, Optional[str]] = _headers or {} 12461 _form_params: List[Tuple[str, str]] = [] 12462 _files: Dict[str, str] = {} 12463 _body_params: Optional[bytes] = None 12464 12465 # process the path parameters 12466 # process the query parameters 12467 # process the header parameters 12468 # process the form parameters 12469 # process the body parameter 12470 if create_user_resource is not None: 12471 _body_params = create_user_resource 12472 12473 # set the HTTP header `Accept` 12474 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 12475 12476 # set the HTTP header `Content-Type` 12477 if _content_type: 12478 _header_params["Content-Type"] = _content_type 12479 else: 12480 _default_content_type = self.api_client.select_header_content_type( 12481 ["application/scim+json", "application/json"] 12482 ) 12483 if _default_content_type is not None: 12484 _header_params["Content-Type"] = _default_content_type 12485 12486 # authentication setting 12487 _auth_settings: List[str] = [] 12488 12489 return self.api_client.param_serialize( 12490 method="POST", 12491 resource_path="/Users", 12492 path_params=_path_params, 12493 query_params=_query_params, 12494 header_params=_header_params, 12495 body=_body_params, 12496 post_params=_form_params, 12497 files=_files, 12498 auth_settings=_auth_settings, 12499 collection_formats=_collection_formats, 12500 _host=_host, 12501 _request_auth=_request_auth, 12502 ) 12503 12504 @validate_call 12505 def delete_user( 12506 self, 12507 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 12508 _request_timeout: Union[ 12509 None, 12510 Annotated[StrictFloat, Field(gt=0)], 12511 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12512 ] = None, 12513 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12514 _content_type: Optional[StrictStr] = None, 12515 _headers: Optional[Dict[StrictStr, Any]] = None, 12516 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12517 ) -> None: 12518 """Delete user 12519 12520 Deletes a single user from the organization.<br><br> Note: A user who is the last admin in the team or the last admin in the organization cannot be deleted. User must be a member in the organization to be deleted. Users that have guest role in the organization cannot be deleted. <br><br> After a user is deleted, the ownership of all the boards that belong to the deleted user is transferred to the oldest team member who currently has an admin role. 12521 12522 :param id: User ID. A server-assigned, unique identifier for this user. (required) 12523 :type id: str 12524 :param _request_timeout: timeout setting for this request. If one 12525 number provided, it will be total request 12526 timeout. It can also be a pair (tuple) of 12527 (connection, read) timeouts. 12528 :type _request_timeout: int, tuple(int, int), optional 12529 :param _request_auth: set to override the auth_settings for an a single 12530 request; this effectively ignores the 12531 authentication in the spec for a single request. 12532 :type _request_auth: dict, optional 12533 :param _content_type: force content-type for the request. 12534 :type _content_type: str, Optional 12535 :param _headers: set to override the headers for a single 12536 request; this effectively ignores the headers 12537 in the spec for a single request. 12538 :type _headers: dict, optional 12539 :param _host_index: set to override the host_index for a single 12540 request; this effectively ignores the host_index 12541 in the spec for a single request. 12542 :type _host_index: int, optional 12543 :return: Returns the result object. 12544 """ # noqa: E501 12545 12546 _param = self._delete_user_serialize( 12547 id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 12548 ) 12549 12550 _response_types_map: Dict[str, Optional[str]] = { 12551 "204": None, 12552 "400": None, 12553 "401": None, 12554 "403": None, 12555 "404": None, 12556 "409": None, 12557 "429": None, 12558 "500": None, 12559 } 12560 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12561 response_data.read() 12562 return self.api_client.response_deserialize( 12563 response_data=response_data, 12564 response_types_map=_response_types_map, 12565 ).data 12566 12567 def _delete_user_serialize( 12568 self, 12569 id, 12570 _request_auth, 12571 _content_type, 12572 _headers, 12573 _host_index, 12574 ) -> RequestSerialized: 12575 12576 _host = None 12577 12578 _collection_formats: Dict[str, str] = {} 12579 12580 _path_params: Dict[str, str] = {} 12581 _query_params: List[Tuple[str, str]] = [] 12582 _header_params: Dict[str, Optional[str]] = _headers or {} 12583 _form_params: List[Tuple[str, str]] = [] 12584 _files: Dict[str, str] = {} 12585 _body_params: Optional[bytes] = None 12586 12587 # process the path parameters 12588 if id is not None: 12589 _path_params["id"] = id 12590 # process the query parameters 12591 # process the header parameters 12592 # process the form parameters 12593 # process the body parameter 12594 12595 # authentication setting 12596 _auth_settings: List[str] = [] 12597 12598 return self.api_client.param_serialize( 12599 method="DELETE", 12600 resource_path="/Users/{id}", 12601 path_params=_path_params, 12602 query_params=_query_params, 12603 header_params=_header_params, 12604 body=_body_params, 12605 post_params=_form_params, 12606 files=_files, 12607 auth_settings=_auth_settings, 12608 collection_formats=_collection_formats, 12609 _host=_host, 12610 _request_auth=_request_auth, 12611 ) 12612 12613 @validate_call 12614 def get_user( 12615 self, 12616 id: Annotated[StrictStr, Field(description="User ID of the user to be retrieved")], 12617 attributes: Annotated[ 12618 Optional[StrictStr], 12619 Field( 12620 description="A comma-separated list of attribute names to return in the response. <br><br> <br>Example attributes</b> - id, userName, displayName, name, userType, active, emails, photos, groups, roles. <br><br> <br>Note</b>: It is also possible to fetch attributes within complex attributes, for Example: emails.value" 12621 ), 12622 ] = None, 12623 _request_timeout: Union[ 12624 None, 12625 Annotated[StrictFloat, Field(gt=0)], 12626 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12627 ] = None, 12628 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12629 _content_type: Optional[StrictStr] = None, 12630 _headers: Optional[Dict[StrictStr, Any]] = None, 12631 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12632 ) -> UserResource: 12633 """Get user 12634 12635 Retrieves a single user resource. <br><b> <br>Note</b>: Returns only users that are members in the organization. It does not return users that are added in the organization as guests. 12636 12637 :param id: User ID of the user to be retrieved (required) 12638 :type id: str 12639 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> <br>Example attributes</b> - id, userName, displayName, name, userType, active, emails, photos, groups, roles. <br><br> <br>Note</b>: It is also possible to fetch attributes within complex attributes, for Example: emails.value 12640 :type attributes: str 12641 :param _request_timeout: timeout setting for this request. If one 12642 number provided, it will be total request 12643 timeout. It can also be a pair (tuple) of 12644 (connection, read) timeouts. 12645 :type _request_timeout: int, tuple(int, int), optional 12646 :param _request_auth: set to override the auth_settings for an a single 12647 request; this effectively ignores the 12648 authentication in the spec for a single request. 12649 :type _request_auth: dict, optional 12650 :param _content_type: force content-type for the request. 12651 :type _content_type: str, Optional 12652 :param _headers: set to override the headers for a single 12653 request; this effectively ignores the headers 12654 in the spec for a single request. 12655 :type _headers: dict, optional 12656 :param _host_index: set to override the host_index for a single 12657 request; this effectively ignores the host_index 12658 in the spec for a single request. 12659 :type _host_index: int, optional 12660 :return: Returns the result object. 12661 """ # noqa: E501 12662 12663 _param = self._get_user_serialize( 12664 id=id, 12665 attributes=attributes, 12666 _request_auth=_request_auth, 12667 _content_type=_content_type, 12668 _headers=_headers, 12669 _host_index=_host_index, 12670 ) 12671 12672 _response_types_map: Dict[str, Optional[str]] = { 12673 "200": "UserResource", 12674 "400": None, 12675 "401": None, 12676 "403": None, 12677 "404": None, 12678 "429": None, 12679 "500": None, 12680 } 12681 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12682 response_data.read() 12683 return self.api_client.response_deserialize( 12684 response_data=response_data, 12685 response_types_map=_response_types_map, 12686 ).data 12687 12688 def _get_user_serialize( 12689 self, 12690 id, 12691 attributes, 12692 _request_auth, 12693 _content_type, 12694 _headers, 12695 _host_index, 12696 ) -> RequestSerialized: 12697 12698 _host = None 12699 12700 _collection_formats: Dict[str, str] = {} 12701 12702 _path_params: Dict[str, str] = {} 12703 _query_params: List[Tuple[str, str]] = [] 12704 _header_params: Dict[str, Optional[str]] = _headers or {} 12705 _form_params: List[Tuple[str, str]] = [] 12706 _files: Dict[str, str] = {} 12707 _body_params: Optional[bytes] = None 12708 12709 # process the path parameters 12710 if id is not None: 12711 _path_params["id"] = id 12712 # process the query parameters 12713 if attributes is not None: 12714 12715 _query_params.append(("attributes", attributes)) 12716 12717 # process the header parameters 12718 # process the form parameters 12719 # process the body parameter 12720 12721 # set the HTTP header `Accept` 12722 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 12723 12724 # authentication setting 12725 _auth_settings: List[str] = [] 12726 12727 return self.api_client.param_serialize( 12728 method="GET", 12729 resource_path="/Users/{id}", 12730 path_params=_path_params, 12731 query_params=_query_params, 12732 header_params=_header_params, 12733 body=_body_params, 12734 post_params=_form_params, 12735 files=_files, 12736 auth_settings=_auth_settings, 12737 collection_formats=_collection_formats, 12738 _host=_host, 12739 _request_auth=_request_auth, 12740 ) 12741 12742 @validate_call 12743 def list_users( 12744 self, 12745 attributes: Annotated[ 12746 Optional[StrictStr], 12747 Field( 12748 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter." 12749 ), 12750 ] = None, 12751 filter: Annotated[ 12752 Optional[StrictStr], 12753 Field( 12754 description='You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical "and"<br> or = Logical "or"<br> not = "Not" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br> <u>Example filters</u>:<br><br> For fetching users with user name as user@miro.com: userName eq "user@miro.com" <br><br> For fetching all active users in the organization: active eq true <br><br> For fetching users with "user" in their displayName: displayName co "user" <br><br> For fetching users that are member of a specific group (team): groups.value eq "3458764577585056871" <br><br> For fetching users that are not of userType Full: userType ne "Full"' 12755 ), 12756 ] = None, 12757 start_index: Annotated[ 12758 Optional[StrictInt], 12759 Field( 12760 description="Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1" 12761 ), 12762 ] = None, 12763 count: Annotated[ 12764 Optional[StrictInt], 12765 Field( 12766 description="Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12" 12767 ), 12768 ] = None, 12769 sort_by: Annotated[ 12770 Optional[StrictStr], 12771 Field( 12772 description="Specifies the attribute whose value will be used to order the response. <br><br> Example: sortBy=userName, sortBy=emails.value" 12773 ), 12774 ] = None, 12775 sort_order: Annotated[ 12776 Optional[StrictStr], 12777 Field( 12778 description="Defines the order in which the sortBy parameter is applied. <br><br> Example: sortOrder=ascending" 12779 ), 12780 ] = None, 12781 _request_timeout: Union[ 12782 None, 12783 Annotated[StrictFloat, Field(gt=0)], 12784 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12785 ] = None, 12786 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12787 _content_type: Optional[StrictStr] = None, 12788 _headers: Optional[Dict[StrictStr, Any]] = None, 12789 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12790 ) -> UserListResponse: 12791 """List users 12792 12793 Retrieves the list of users in your organization. <br><b> <br>Note</b>: The API returns users that are members in the organization, it does not return users that are added in the organization as guests. 12794 12795 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter. 12796 :type attributes: str 12797 :param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical \"and\"<br> or = Logical \"or\"<br> not = \"Not\" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br> <u>Example filters</u>:<br><br> For fetching users with user name as user@miro.com: userName eq \"user@miro.com\" <br><br> For fetching all active users in the organization: active eq true <br><br> For fetching users with \"user\" in their displayName: displayName co \"user\" <br><br> For fetching users that are member of a specific group (team): groups.value eq \"3458764577585056871\" <br><br> For fetching users that are not of userType Full: userType ne \"Full\" 12798 :type filter: str 12799 :param start_index: Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1 12800 :type start_index: int 12801 :param count: Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12 12802 :type count: int 12803 :param sort_by: Specifies the attribute whose value will be used to order the response. <br><br> Example: sortBy=userName, sortBy=emails.value 12804 :type sort_by: str 12805 :param sort_order: Defines the order in which the sortBy parameter is applied. <br><br> Example: sortOrder=ascending 12806 :type sort_order: str 12807 :param _request_timeout: timeout setting for this request. If one 12808 number provided, it will be total request 12809 timeout. It can also be a pair (tuple) of 12810 (connection, read) timeouts. 12811 :type _request_timeout: int, tuple(int, int), optional 12812 :param _request_auth: set to override the auth_settings for an a single 12813 request; this effectively ignores the 12814 authentication in the spec for a single request. 12815 :type _request_auth: dict, optional 12816 :param _content_type: force content-type for the request. 12817 :type _content_type: str, Optional 12818 :param _headers: set to override the headers for a single 12819 request; this effectively ignores the headers 12820 in the spec for a single request. 12821 :type _headers: dict, optional 12822 :param _host_index: set to override the host_index for a single 12823 request; this effectively ignores the host_index 12824 in the spec for a single request. 12825 :type _host_index: int, optional 12826 :return: Returns the result object. 12827 """ # noqa: E501 12828 12829 _param = self._list_users_serialize( 12830 attributes=attributes, 12831 filter=filter, 12832 start_index=start_index, 12833 count=count, 12834 sort_by=sort_by, 12835 sort_order=sort_order, 12836 _request_auth=_request_auth, 12837 _content_type=_content_type, 12838 _headers=_headers, 12839 _host_index=_host_index, 12840 ) 12841 12842 _response_types_map: Dict[str, Optional[str]] = { 12843 "200": "UserListResponse", 12844 "400": None, 12845 "401": None, 12846 "403": None, 12847 "404": None, 12848 "429": None, 12849 "500": None, 12850 } 12851 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12852 response_data.read() 12853 return self.api_client.response_deserialize( 12854 response_data=response_data, 12855 response_types_map=_response_types_map, 12856 ).data 12857 12858 def _list_users_serialize( 12859 self, 12860 attributes, 12861 filter, 12862 start_index, 12863 count, 12864 sort_by, 12865 sort_order, 12866 _request_auth, 12867 _content_type, 12868 _headers, 12869 _host_index, 12870 ) -> RequestSerialized: 12871 12872 _host = None 12873 12874 _collection_formats: Dict[str, str] = {} 12875 12876 _path_params: Dict[str, str] = {} 12877 _query_params: List[Tuple[str, str]] = [] 12878 _header_params: Dict[str, Optional[str]] = _headers or {} 12879 _form_params: List[Tuple[str, str]] = [] 12880 _files: Dict[str, str] = {} 12881 _body_params: Optional[bytes] = None 12882 12883 # process the path parameters 12884 # process the query parameters 12885 if attributes is not None: 12886 12887 _query_params.append(("attributes", attributes)) 12888 12889 if filter is not None: 12890 12891 _query_params.append(("filter", filter)) 12892 12893 if start_index is not None: 12894 12895 _query_params.append(("startIndex", start_index)) 12896 12897 if count is not None: 12898 12899 _query_params.append(("count", count)) 12900 12901 if sort_by is not None: 12902 12903 _query_params.append(("sortBy", sort_by)) 12904 12905 if sort_order is not None: 12906 12907 _query_params.append(("sortOrder", sort_order)) 12908 12909 # process the header parameters 12910 # process the form parameters 12911 # process the body parameter 12912 12913 # set the HTTP header `Accept` 12914 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 12915 12916 # authentication setting 12917 _auth_settings: List[str] = [] 12918 12919 return self.api_client.param_serialize( 12920 method="GET", 12921 resource_path="/Users", 12922 path_params=_path_params, 12923 query_params=_query_params, 12924 header_params=_header_params, 12925 body=_body_params, 12926 post_params=_form_params, 12927 files=_files, 12928 auth_settings=_auth_settings, 12929 collection_formats=_collection_formats, 12930 _host=_host, 12931 _request_auth=_request_auth, 12932 ) 12933 12934 @validate_call 12935 def patch_user( 12936 self, 12937 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 12938 patch_user_resource: Annotated[ 12939 PatchUserResource, 12940 Field( 12941 description='Payload to update user information. <br><br> The body of a PATCH request must contain the attribute `Operations`, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one "op" member.' 12942 ), 12943 ], 12944 _request_timeout: Union[ 12945 None, 12946 Annotated[StrictFloat, Field(gt=0)], 12947 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12948 ] = None, 12949 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12950 _content_type: Optional[StrictStr] = None, 12951 _headers: Optional[Dict[StrictStr, Any]] = None, 12952 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12953 ) -> UserResource: 12954 """Patch user 12955 12956 Updates an existing user resource, overwriting values for specified attributes. Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided. <br><br> Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated. 12957 12958 :param id: User ID. A server-assigned, unique identifier for this user. (required) 12959 :type id: str 12960 :param patch_user_resource: Payload to update user information. <br><br> The body of a PATCH request must contain the attribute `Operations`, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one \"op\" member. (required) 12961 :type patch_user_resource: PatchUserResource 12962 :param _request_timeout: timeout setting for this request. If one 12963 number provided, it will be total request 12964 timeout. It can also be a pair (tuple) of 12965 (connection, read) timeouts. 12966 :type _request_timeout: int, tuple(int, int), optional 12967 :param _request_auth: set to override the auth_settings for an a single 12968 request; this effectively ignores the 12969 authentication in the spec for a single request. 12970 :type _request_auth: dict, optional 12971 :param _content_type: force content-type for the request. 12972 :type _content_type: str, Optional 12973 :param _headers: set to override the headers for a single 12974 request; this effectively ignores the headers 12975 in the spec for a single request. 12976 :type _headers: dict, optional 12977 :param _host_index: set to override the host_index for a single 12978 request; this effectively ignores the host_index 12979 in the spec for a single request. 12980 :type _host_index: int, optional 12981 :return: Returns the result object. 12982 """ # noqa: E501 12983 12984 _param = self._patch_user_serialize( 12985 id=id, 12986 patch_user_resource=patch_user_resource, 12987 _request_auth=_request_auth, 12988 _content_type=_content_type, 12989 _headers=_headers, 12990 _host_index=_host_index, 12991 ) 12992 12993 _response_types_map: Dict[str, Optional[str]] = { 12994 "200": "UserResource", 12995 "400": None, 12996 "401": None, 12997 "403": None, 12998 "404": None, 12999 "409": None, 13000 "429": None, 13001 "500": None, 13002 } 13003 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13004 response_data.read() 13005 return self.api_client.response_deserialize( 13006 response_data=response_data, 13007 response_types_map=_response_types_map, 13008 ).data 13009 13010 def _patch_user_serialize( 13011 self, 13012 id, 13013 patch_user_resource, 13014 _request_auth, 13015 _content_type, 13016 _headers, 13017 _host_index, 13018 ) -> RequestSerialized: 13019 13020 _host = None 13021 13022 _collection_formats: Dict[str, str] = {} 13023 13024 _path_params: Dict[str, str] = {} 13025 _query_params: List[Tuple[str, str]] = [] 13026 _header_params: Dict[str, Optional[str]] = _headers or {} 13027 _form_params: List[Tuple[str, str]] = [] 13028 _files: Dict[str, str] = {} 13029 _body_params: Optional[bytes] = None 13030 13031 # process the path parameters 13032 if id is not None: 13033 _path_params["id"] = id 13034 # process the query parameters 13035 # process the header parameters 13036 # process the form parameters 13037 # process the body parameter 13038 if patch_user_resource is not None: 13039 _body_params = patch_user_resource 13040 13041 # set the HTTP header `Accept` 13042 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 13043 13044 # set the HTTP header `Content-Type` 13045 if _content_type: 13046 _header_params["Content-Type"] = _content_type 13047 else: 13048 _default_content_type = self.api_client.select_header_content_type( 13049 ["application/scim+json", "application/json"] 13050 ) 13051 if _default_content_type is not None: 13052 _header_params["Content-Type"] = _default_content_type 13053 13054 # authentication setting 13055 _auth_settings: List[str] = [] 13056 13057 return self.api_client.param_serialize( 13058 method="PATCH", 13059 resource_path="/Users/{id}", 13060 path_params=_path_params, 13061 query_params=_query_params, 13062 header_params=_header_params, 13063 body=_body_params, 13064 post_params=_form_params, 13065 files=_files, 13066 auth_settings=_auth_settings, 13067 collection_formats=_collection_formats, 13068 _host=_host, 13069 _request_auth=_request_auth, 13070 ) 13071 13072 @validate_call 13073 def replace_user( 13074 self, 13075 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 13076 user_resource: Annotated[UserResource, Field(description="Payload to update user information.")], 13077 _request_timeout: Union[ 13078 None, 13079 Annotated[StrictFloat, Field(gt=0)], 13080 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13081 ] = None, 13082 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13083 _content_type: Optional[StrictStr] = None, 13084 _headers: Optional[Dict[StrictStr, Any]] = None, 13085 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13086 ) -> UserResource: 13087 """Replace user 13088 13089 Updates an existing user resource. This is the easiest way to replace user information. <br><br> If the user is deactivated, <br> userName, userType, and roles.value cannot be updated. <br> emails.value, emails.display, emails.primary get ignored and do not return any error. <br><br> Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated. 13090 13091 :param id: User ID. A server-assigned, unique identifier for this user. (required) 13092 :type id: str 13093 :param user_resource: Payload to update user information. (required) 13094 :type user_resource: UserResource 13095 :param _request_timeout: timeout setting for this request. If one 13096 number provided, it will be total request 13097 timeout. It can also be a pair (tuple) of 13098 (connection, read) timeouts. 13099 :type _request_timeout: int, tuple(int, int), optional 13100 :param _request_auth: set to override the auth_settings for an a single 13101 request; this effectively ignores the 13102 authentication in the spec for a single request. 13103 :type _request_auth: dict, optional 13104 :param _content_type: force content-type for the request. 13105 :type _content_type: str, Optional 13106 :param _headers: set to override the headers for a single 13107 request; this effectively ignores the headers 13108 in the spec for a single request. 13109 :type _headers: dict, optional 13110 :param _host_index: set to override the host_index for a single 13111 request; this effectively ignores the host_index 13112 in the spec for a single request. 13113 :type _host_index: int, optional 13114 :return: Returns the result object. 13115 """ # noqa: E501 13116 13117 _param = self._replace_user_serialize( 13118 id=id, 13119 user_resource=user_resource, 13120 _request_auth=_request_auth, 13121 _content_type=_content_type, 13122 _headers=_headers, 13123 _host_index=_host_index, 13124 ) 13125 13126 _response_types_map: Dict[str, Optional[str]] = { 13127 "200": "UserResource", 13128 "400": None, 13129 "401": None, 13130 "403": None, 13131 "404": None, 13132 "409": None, 13133 "429": None, 13134 "500": None, 13135 } 13136 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13137 response_data.read() 13138 return self.api_client.response_deserialize( 13139 response_data=response_data, 13140 response_types_map=_response_types_map, 13141 ).data 13142 13143 def _replace_user_serialize( 13144 self, 13145 id, 13146 user_resource, 13147 _request_auth, 13148 _content_type, 13149 _headers, 13150 _host_index, 13151 ) -> RequestSerialized: 13152 13153 _host = None 13154 13155 _collection_formats: Dict[str, str] = {} 13156 13157 _path_params: Dict[str, str] = {} 13158 _query_params: List[Tuple[str, str]] = [] 13159 _header_params: Dict[str, Optional[str]] = _headers or {} 13160 _form_params: List[Tuple[str, str]] = [] 13161 _files: Dict[str, str] = {} 13162 _body_params: Optional[bytes] = None 13163 13164 # process the path parameters 13165 if id is not None: 13166 _path_params["id"] = id 13167 # process the query parameters 13168 # process the header parameters 13169 # process the form parameters 13170 # process the body parameter 13171 if user_resource is not None: 13172 _body_params = user_resource 13173 13174 # set the HTTP header `Accept` 13175 _header_params["Accept"] = self.api_client.select_header_accept(["application/scim+json", "application/json"]) 13176 13177 # set the HTTP header `Content-Type` 13178 if _content_type: 13179 _header_params["Content-Type"] = _content_type 13180 else: 13181 _default_content_type = self.api_client.select_header_content_type( 13182 ["application/scim+json", "application/json"] 13183 ) 13184 if _default_content_type is not None: 13185 _header_params["Content-Type"] = _default_content_type 13186 13187 # authentication setting 13188 _auth_settings: List[str] = [] 13189 13190 return self.api_client.param_serialize( 13191 method="PUT", 13192 resource_path="/Users/{id}", 13193 path_params=_path_params, 13194 query_params=_query_params, 13195 header_params=_header_params, 13196 body=_body_params, 13197 post_params=_form_params, 13198 files=_files, 13199 auth_settings=_auth_settings, 13200 collection_formats=_collection_formats, 13201 _host=_host, 13202 _request_auth=_request_auth, 13203 ) 13204 13205 @validate_call 13206 def enterprise_create_group_member( 13207 self, 13208 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13209 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13210 create_group_member_request: CreateGroupMemberRequest, 13211 _request_timeout: Union[ 13212 None, 13213 Annotated[StrictFloat, Field(gt=0)], 13214 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13215 ] = None, 13216 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13217 _content_type: Optional[StrictStr] = None, 13218 _headers: Optional[Dict[StrictStr, Any]] = None, 13219 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13220 ) -> GroupMember: 13221 """Create user group member 13222 13223 Adds a member to a user group in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13224 13225 :param org_id: The ID of an organization. (required) 13226 :type org_id: str 13227 :param group_id: The ID of a user group. (required) 13228 :type group_id: str 13229 :param create_group_member_request: (required) 13230 :type create_group_member_request: CreateGroupMemberRequest 13231 :param _request_timeout: timeout setting for this request. If one 13232 number provided, it will be total request 13233 timeout. It can also be a pair (tuple) of 13234 (connection, read) timeouts. 13235 :type _request_timeout: int, tuple(int, int), optional 13236 :param _request_auth: set to override the auth_settings for an a single 13237 request; this effectively ignores the 13238 authentication in the spec for a single request. 13239 :type _request_auth: dict, optional 13240 :param _content_type: force content-type for the request. 13241 :type _content_type: str, Optional 13242 :param _headers: set to override the headers for a single 13243 request; this effectively ignores the headers 13244 in the spec for a single request. 13245 :type _headers: dict, optional 13246 :param _host_index: set to override the host_index for a single 13247 request; this effectively ignores the host_index 13248 in the spec for a single request. 13249 :type _host_index: int, optional 13250 :return: Returns the result object. 13251 """ # noqa: E501 13252 13253 _param = self._enterprise_create_group_member_serialize( 13254 org_id=org_id, 13255 group_id=group_id, 13256 create_group_member_request=create_group_member_request, 13257 _request_auth=_request_auth, 13258 _content_type=_content_type, 13259 _headers=_headers, 13260 _host_index=_host_index, 13261 ) 13262 13263 _response_types_map: Dict[str, Optional[str]] = { 13264 "201": "GroupMember", 13265 "400": None, 13266 "401": None, 13267 "403": None, 13268 "409": None, 13269 "429": None, 13270 } 13271 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13272 response_data.read() 13273 return self.api_client.response_deserialize( 13274 response_data=response_data, 13275 response_types_map=_response_types_map, 13276 ).data 13277 13278 def _enterprise_create_group_member_serialize( 13279 self, 13280 org_id, 13281 group_id, 13282 create_group_member_request, 13283 _request_auth, 13284 _content_type, 13285 _headers, 13286 _host_index, 13287 ) -> RequestSerialized: 13288 13289 _host = None 13290 13291 _collection_formats: Dict[str, str] = {} 13292 13293 _path_params: Dict[str, str] = {} 13294 _query_params: List[Tuple[str, str]] = [] 13295 _header_params: Dict[str, Optional[str]] = _headers or {} 13296 _form_params: List[Tuple[str, str]] = [] 13297 _files: Dict[str, str] = {} 13298 _body_params: Optional[bytes] = None 13299 13300 # process the path parameters 13301 if org_id is not None: 13302 _path_params["org_id"] = org_id 13303 if group_id is not None: 13304 _path_params["group_id"] = group_id 13305 # process the query parameters 13306 # process the header parameters 13307 # process the form parameters 13308 # process the body parameter 13309 if create_group_member_request is not None: 13310 _body_params = create_group_member_request 13311 13312 # set the HTTP header `Accept` 13313 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13314 13315 # set the HTTP header `Content-Type` 13316 if _content_type: 13317 _header_params["Content-Type"] = _content_type 13318 else: 13319 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 13320 if _default_content_type is not None: 13321 _header_params["Content-Type"] = _default_content_type 13322 13323 # authentication setting 13324 _auth_settings: List[str] = [] 13325 13326 return self.api_client.param_serialize( 13327 method="POST", 13328 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members", 13329 path_params=_path_params, 13330 query_params=_query_params, 13331 header_params=_header_params, 13332 body=_body_params, 13333 post_params=_form_params, 13334 files=_files, 13335 auth_settings=_auth_settings, 13336 collection_formats=_collection_formats, 13337 _host=_host, 13338 _request_auth=_request_auth, 13339 ) 13340 13341 @validate_call 13342 def enterprise_delete_group_member( 13343 self, 13344 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13345 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13346 member_id: Annotated[StrictStr, Field(description="The ID of a group member.")], 13347 _request_timeout: Union[ 13348 None, 13349 Annotated[StrictFloat, Field(gt=0)], 13350 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13351 ] = None, 13352 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13353 _content_type: Optional[StrictStr] = None, 13354 _headers: Optional[Dict[StrictStr, Any]] = None, 13355 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13356 ) -> None: 13357 """Delete user group member 13358 13359 Removes a member from a user group in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13360 13361 :param org_id: The ID of an organization. (required) 13362 :type org_id: str 13363 :param group_id: The ID of a user group. (required) 13364 :type group_id: str 13365 :param member_id: The ID of a group member. (required) 13366 :type member_id: str 13367 :param _request_timeout: timeout setting for this request. If one 13368 number provided, it will be total request 13369 timeout. It can also be a pair (tuple) of 13370 (connection, read) timeouts. 13371 :type _request_timeout: int, tuple(int, int), optional 13372 :param _request_auth: set to override the auth_settings for an a single 13373 request; this effectively ignores the 13374 authentication in the spec for a single request. 13375 :type _request_auth: dict, optional 13376 :param _content_type: force content-type for the request. 13377 :type _content_type: str, Optional 13378 :param _headers: set to override the headers for a single 13379 request; this effectively ignores the headers 13380 in the spec for a single request. 13381 :type _headers: dict, optional 13382 :param _host_index: set to override the host_index for a single 13383 request; this effectively ignores the host_index 13384 in the spec for a single request. 13385 :type _host_index: int, optional 13386 :return: Returns the result object. 13387 """ # noqa: E501 13388 13389 _param = self._enterprise_delete_group_member_serialize( 13390 org_id=org_id, 13391 group_id=group_id, 13392 member_id=member_id, 13393 _request_auth=_request_auth, 13394 _content_type=_content_type, 13395 _headers=_headers, 13396 _host_index=_host_index, 13397 ) 13398 13399 _response_types_map: Dict[str, Optional[str]] = { 13400 "204": None, 13401 "400": None, 13402 "401": None, 13403 "403": None, 13404 "404": None, 13405 "429": None, 13406 } 13407 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13408 response_data.read() 13409 return self.api_client.response_deserialize( 13410 response_data=response_data, 13411 response_types_map=_response_types_map, 13412 ).data 13413 13414 def _enterprise_delete_group_member_serialize( 13415 self, 13416 org_id, 13417 group_id, 13418 member_id, 13419 _request_auth, 13420 _content_type, 13421 _headers, 13422 _host_index, 13423 ) -> RequestSerialized: 13424 13425 _host = None 13426 13427 _collection_formats: Dict[str, str] = {} 13428 13429 _path_params: Dict[str, str] = {} 13430 _query_params: List[Tuple[str, str]] = [] 13431 _header_params: Dict[str, Optional[str]] = _headers or {} 13432 _form_params: List[Tuple[str, str]] = [] 13433 _files: Dict[str, str] = {} 13434 _body_params: Optional[bytes] = None 13435 13436 # process the path parameters 13437 if org_id is not None: 13438 _path_params["org_id"] = org_id 13439 if group_id is not None: 13440 _path_params["group_id"] = group_id 13441 if member_id is not None: 13442 _path_params["member_id"] = member_id 13443 # process the query parameters 13444 # process the header parameters 13445 # process the form parameters 13446 # process the body parameter 13447 13448 # authentication setting 13449 _auth_settings: List[str] = [] 13450 13451 return self.api_client.param_serialize( 13452 method="DELETE", 13453 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members/{member_id}", 13454 path_params=_path_params, 13455 query_params=_query_params, 13456 header_params=_header_params, 13457 body=_body_params, 13458 post_params=_form_params, 13459 files=_files, 13460 auth_settings=_auth_settings, 13461 collection_formats=_collection_formats, 13462 _host=_host, 13463 _request_auth=_request_auth, 13464 ) 13465 13466 @validate_call 13467 def enterprise_get_group_member( 13468 self, 13469 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13470 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13471 member_id: Annotated[StrictStr, Field(description="The ID of a group member.")], 13472 _request_timeout: Union[ 13473 None, 13474 Annotated[StrictFloat, Field(gt=0)], 13475 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13476 ] = None, 13477 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13478 _content_type: Optional[StrictStr] = None, 13479 _headers: Optional[Dict[StrictStr, Any]] = None, 13480 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13481 ) -> GroupMember: 13482 """Get user group member 13483 13484 Retrieves information about a user group member in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13485 13486 :param org_id: The ID of an organization. (required) 13487 :type org_id: str 13488 :param group_id: The ID of a user group. (required) 13489 :type group_id: str 13490 :param member_id: The ID of a group member. (required) 13491 :type member_id: str 13492 :param _request_timeout: timeout setting for this request. If one 13493 number provided, it will be total request 13494 timeout. It can also be a pair (tuple) of 13495 (connection, read) timeouts. 13496 :type _request_timeout: int, tuple(int, int), optional 13497 :param _request_auth: set to override the auth_settings for an a single 13498 request; this effectively ignores the 13499 authentication in the spec for a single request. 13500 :type _request_auth: dict, optional 13501 :param _content_type: force content-type for the request. 13502 :type _content_type: str, Optional 13503 :param _headers: set to override the headers for a single 13504 request; this effectively ignores the headers 13505 in the spec for a single request. 13506 :type _headers: dict, optional 13507 :param _host_index: set to override the host_index for a single 13508 request; this effectively ignores the host_index 13509 in the spec for a single request. 13510 :type _host_index: int, optional 13511 :return: Returns the result object. 13512 """ # noqa: E501 13513 13514 _param = self._enterprise_get_group_member_serialize( 13515 org_id=org_id, 13516 group_id=group_id, 13517 member_id=member_id, 13518 _request_auth=_request_auth, 13519 _content_type=_content_type, 13520 _headers=_headers, 13521 _host_index=_host_index, 13522 ) 13523 13524 _response_types_map: Dict[str, Optional[str]] = { 13525 "200": "GroupMember", 13526 "400": None, 13527 "401": None, 13528 "403": None, 13529 "404": None, 13530 "429": None, 13531 } 13532 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13533 response_data.read() 13534 return self.api_client.response_deserialize( 13535 response_data=response_data, 13536 response_types_map=_response_types_map, 13537 ).data 13538 13539 def _enterprise_get_group_member_serialize( 13540 self, 13541 org_id, 13542 group_id, 13543 member_id, 13544 _request_auth, 13545 _content_type, 13546 _headers, 13547 _host_index, 13548 ) -> RequestSerialized: 13549 13550 _host = None 13551 13552 _collection_formats: Dict[str, str] = {} 13553 13554 _path_params: Dict[str, str] = {} 13555 _query_params: List[Tuple[str, str]] = [] 13556 _header_params: Dict[str, Optional[str]] = _headers or {} 13557 _form_params: List[Tuple[str, str]] = [] 13558 _files: Dict[str, str] = {} 13559 _body_params: Optional[bytes] = None 13560 13561 # process the path parameters 13562 if org_id is not None: 13563 _path_params["org_id"] = org_id 13564 if group_id is not None: 13565 _path_params["group_id"] = group_id 13566 if member_id is not None: 13567 _path_params["member_id"] = member_id 13568 # process the query parameters 13569 # process the header parameters 13570 # process the form parameters 13571 # process the body parameter 13572 13573 # set the HTTP header `Accept` 13574 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13575 13576 # authentication setting 13577 _auth_settings: List[str] = [] 13578 13579 return self.api_client.param_serialize( 13580 method="GET", 13581 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members/{member_id}", 13582 path_params=_path_params, 13583 query_params=_query_params, 13584 header_params=_header_params, 13585 body=_body_params, 13586 post_params=_form_params, 13587 files=_files, 13588 auth_settings=_auth_settings, 13589 collection_formats=_collection_formats, 13590 _host=_host, 13591 _request_auth=_request_auth, 13592 ) 13593 13594 @validate_call 13595 def enterprise_get_group_members( 13596 self, 13597 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13598 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13599 limit: Annotated[ 13600 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 13601 Field(description="The maximum number of members in the result list."), 13602 ] = None, 13603 cursor: Annotated[ 13604 Optional[StrictStr], 13605 Field( 13606 description="A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 13607 ), 13608 ] = None, 13609 _request_timeout: Union[ 13610 None, 13611 Annotated[StrictFloat, Field(gt=0)], 13612 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13613 ] = None, 13614 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13615 _content_type: Optional[StrictStr] = None, 13616 _headers: Optional[Dict[StrictStr, Any]] = None, 13617 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13618 ) -> GroupMembersPage: 13619 """List of user group members 13620 13621 Retrieves the list of members who are part of a team in an existing organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13622 13623 :param org_id: The ID of an organization. (required) 13624 :type org_id: str 13625 :param group_id: The ID of a user group. (required) 13626 :type group_id: str 13627 :param limit: The maximum number of members in the result list. 13628 :type limit: int 13629 :param cursor: A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 13630 :type cursor: str 13631 :param _request_timeout: timeout setting for this request. If one 13632 number provided, it will be total request 13633 timeout. It can also be a pair (tuple) of 13634 (connection, read) timeouts. 13635 :type _request_timeout: int, tuple(int, int), optional 13636 :param _request_auth: set to override the auth_settings for an a single 13637 request; this effectively ignores the 13638 authentication in the spec for a single request. 13639 :type _request_auth: dict, optional 13640 :param _content_type: force content-type for the request. 13641 :type _content_type: str, Optional 13642 :param _headers: set to override the headers for a single 13643 request; this effectively ignores the headers 13644 in the spec for a single request. 13645 :type _headers: dict, optional 13646 :param _host_index: set to override the host_index for a single 13647 request; this effectively ignores the host_index 13648 in the spec for a single request. 13649 :type _host_index: int, optional 13650 :return: Returns the result object. 13651 """ # noqa: E501 13652 13653 _param = self._enterprise_get_group_members_serialize( 13654 org_id=org_id, 13655 group_id=group_id, 13656 limit=limit, 13657 cursor=cursor, 13658 _request_auth=_request_auth, 13659 _content_type=_content_type, 13660 _headers=_headers, 13661 _host_index=_host_index, 13662 ) 13663 13664 _response_types_map: Dict[str, Optional[str]] = { 13665 "200": "GroupMembersPage", 13666 "400": None, 13667 "401": None, 13668 "403": None, 13669 "429": None, 13670 } 13671 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13672 response_data.read() 13673 return self.api_client.response_deserialize( 13674 response_data=response_data, 13675 response_types_map=_response_types_map, 13676 ).data 13677 13678 def _enterprise_get_group_members_serialize( 13679 self, 13680 org_id, 13681 group_id, 13682 limit, 13683 cursor, 13684 _request_auth, 13685 _content_type, 13686 _headers, 13687 _host_index, 13688 ) -> RequestSerialized: 13689 13690 _host = None 13691 13692 _collection_formats: Dict[str, str] = {} 13693 13694 _path_params: Dict[str, str] = {} 13695 _query_params: List[Tuple[str, str]] = [] 13696 _header_params: Dict[str, Optional[str]] = _headers or {} 13697 _form_params: List[Tuple[str, str]] = [] 13698 _files: Dict[str, str] = {} 13699 _body_params: Optional[bytes] = None 13700 13701 # process the path parameters 13702 if org_id is not None: 13703 _path_params["org_id"] = org_id 13704 if group_id is not None: 13705 _path_params["group_id"] = group_id 13706 # process the query parameters 13707 if limit is not None: 13708 13709 _query_params.append(("limit", limit)) 13710 13711 if cursor is not None: 13712 13713 _query_params.append(("cursor", cursor)) 13714 13715 # process the header parameters 13716 # process the form parameters 13717 # process the body parameter 13718 13719 # set the HTTP header `Accept` 13720 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13721 13722 # authentication setting 13723 _auth_settings: List[str] = [] 13724 13725 return self.api_client.param_serialize( 13726 method="GET", 13727 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members", 13728 path_params=_path_params, 13729 query_params=_query_params, 13730 header_params=_header_params, 13731 body=_body_params, 13732 post_params=_form_params, 13733 files=_files, 13734 auth_settings=_auth_settings, 13735 collection_formats=_collection_formats, 13736 _host=_host, 13737 _request_auth=_request_auth, 13738 ) 13739 13740 @validate_call 13741 def enterprise_update_group_members( 13742 self, 13743 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13744 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13745 update_user_group_members_request: UpdateUserGroupMembersRequest, 13746 _request_timeout: Union[ 13747 None, 13748 Annotated[StrictFloat, Field(gt=0)], 13749 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13750 ] = None, 13751 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13752 _content_type: Optional[StrictStr] = None, 13753 _headers: Optional[Dict[StrictStr, Any]] = None, 13754 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13755 ) -> List[UpdateUserGroupMembersResultInner]: 13756 """Bulk edit of membership in user group 13757 13758 Add and remove members in one request. For example, remove user A and add user B.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> per item. For example, if you want to add 10 users and remove 5, the rate limiting applicable will be 750 credits. This is because each user addition or deletion takes Level 1 rate limiting of 50 credits, so 15 * 50 = 750.<br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13759 13760 :param org_id: The ID of an organization. (required) 13761 :type org_id: str 13762 :param group_id: The ID of a user group. (required) 13763 :type group_id: str 13764 :param update_user_group_members_request: (required) 13765 :type update_user_group_members_request: UpdateUserGroupMembersRequest 13766 :param _request_timeout: timeout setting for this request. If one 13767 number provided, it will be total request 13768 timeout. It can also be a pair (tuple) of 13769 (connection, read) timeouts. 13770 :type _request_timeout: int, tuple(int, int), optional 13771 :param _request_auth: set to override the auth_settings for an a single 13772 request; this effectively ignores the 13773 authentication in the spec for a single request. 13774 :type _request_auth: dict, optional 13775 :param _content_type: force content-type for the request. 13776 :type _content_type: str, Optional 13777 :param _headers: set to override the headers for a single 13778 request; this effectively ignores the headers 13779 in the spec for a single request. 13780 :type _headers: dict, optional 13781 :param _host_index: set to override the host_index for a single 13782 request; this effectively ignores the host_index 13783 in the spec for a single request. 13784 :type _host_index: int, optional 13785 :return: Returns the result object. 13786 """ # noqa: E501 13787 13788 _param = self._enterprise_update_group_members_serialize( 13789 org_id=org_id, 13790 group_id=group_id, 13791 update_user_group_members_request=update_user_group_members_request, 13792 _request_auth=_request_auth, 13793 _content_type=_content_type, 13794 _headers=_headers, 13795 _host_index=_host_index, 13796 ) 13797 13798 _response_types_map: Dict[str, Optional[str]] = { 13799 "207": "List[UpdateUserGroupMembersResultInner]", 13800 "400": None, 13801 "401": None, 13802 "403": None, 13803 "404": None, 13804 "409": None, 13805 "413": None, 13806 "429": None, 13807 } 13808 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13809 response_data.read() 13810 return self.api_client.response_deserialize( 13811 response_data=response_data, 13812 response_types_map=_response_types_map, 13813 ).data 13814 13815 def _enterprise_update_group_members_serialize( 13816 self, 13817 org_id, 13818 group_id, 13819 update_user_group_members_request, 13820 _request_auth, 13821 _content_type, 13822 _headers, 13823 _host_index, 13824 ) -> RequestSerialized: 13825 13826 _host = None 13827 13828 _collection_formats: Dict[str, str] = {} 13829 13830 _path_params: Dict[str, str] = {} 13831 _query_params: List[Tuple[str, str]] = [] 13832 _header_params: Dict[str, Optional[str]] = _headers or {} 13833 _form_params: List[Tuple[str, str]] = [] 13834 _files: Dict[str, str] = {} 13835 _body_params: Optional[bytes] = None 13836 13837 # process the path parameters 13838 if org_id is not None: 13839 _path_params["org_id"] = org_id 13840 if group_id is not None: 13841 _path_params["group_id"] = group_id 13842 # process the query parameters 13843 # process the header parameters 13844 # process the form parameters 13845 # process the body parameter 13846 if update_user_group_members_request is not None: 13847 _body_params = update_user_group_members_request 13848 13849 # set the HTTP header `Accept` 13850 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13851 13852 # set the HTTP header `Content-Type` 13853 if _content_type: 13854 _header_params["Content-Type"] = _content_type 13855 else: 13856 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 13857 if _default_content_type is not None: 13858 _header_params["Content-Type"] = _default_content_type 13859 13860 # authentication setting 13861 _auth_settings: List[str] = [] 13862 13863 return self.api_client.param_serialize( 13864 method="PATCH", 13865 resource_path="/v2/orgs/{org_id}/groups/{group_id}/members", 13866 path_params=_path_params, 13867 query_params=_query_params, 13868 header_params=_header_params, 13869 body=_body_params, 13870 post_params=_form_params, 13871 files=_files, 13872 auth_settings=_auth_settings, 13873 collection_formats=_collection_formats, 13874 _host=_host, 13875 _request_auth=_request_auth, 13876 ) 13877 13878 @validate_call 13879 def enterprise_groups_get_team( 13880 self, 13881 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13882 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13883 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 13884 _request_timeout: Union[ 13885 None, 13886 Annotated[StrictFloat, Field(gt=0)], 13887 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13888 ] = None, 13889 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13890 _content_type: Optional[StrictStr] = None, 13891 _headers: Optional[Dict[StrictStr, Any]] = None, 13892 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13893 ) -> GroupTeam: 13894 """Get user group team 13895 13896 Retrieves information of a team that the user group is a part of in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13897 13898 :param org_id: The ID of an organization. (required) 13899 :type org_id: str 13900 :param group_id: The ID of a user group. (required) 13901 :type group_id: str 13902 :param team_id: The ID of a team. (required) 13903 :type team_id: str 13904 :param _request_timeout: timeout setting for this request. If one 13905 number provided, it will be total request 13906 timeout. It can also be a pair (tuple) of 13907 (connection, read) timeouts. 13908 :type _request_timeout: int, tuple(int, int), optional 13909 :param _request_auth: set to override the auth_settings for an a single 13910 request; this effectively ignores the 13911 authentication in the spec for a single request. 13912 :type _request_auth: dict, optional 13913 :param _content_type: force content-type for the request. 13914 :type _content_type: str, Optional 13915 :param _headers: set to override the headers for a single 13916 request; this effectively ignores the headers 13917 in the spec for a single request. 13918 :type _headers: dict, optional 13919 :param _host_index: set to override the host_index for a single 13920 request; this effectively ignores the host_index 13921 in the spec for a single request. 13922 :type _host_index: int, optional 13923 :return: Returns the result object. 13924 """ # noqa: E501 13925 13926 _param = self._enterprise_groups_get_team_serialize( 13927 org_id=org_id, 13928 group_id=group_id, 13929 team_id=team_id, 13930 _request_auth=_request_auth, 13931 _content_type=_content_type, 13932 _headers=_headers, 13933 _host_index=_host_index, 13934 ) 13935 13936 _response_types_map: Dict[str, Optional[str]] = { 13937 "200": "GroupTeam", 13938 "400": None, 13939 "401": None, 13940 "403": None, 13941 "429": None, 13942 } 13943 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13944 response_data.read() 13945 return self.api_client.response_deserialize( 13946 response_data=response_data, 13947 response_types_map=_response_types_map, 13948 ).data 13949 13950 def _enterprise_groups_get_team_serialize( 13951 self, 13952 org_id, 13953 group_id, 13954 team_id, 13955 _request_auth, 13956 _content_type, 13957 _headers, 13958 _host_index, 13959 ) -> RequestSerialized: 13960 13961 _host = None 13962 13963 _collection_formats: Dict[str, str] = {} 13964 13965 _path_params: Dict[str, str] = {} 13966 _query_params: List[Tuple[str, str]] = [] 13967 _header_params: Dict[str, Optional[str]] = _headers or {} 13968 _form_params: List[Tuple[str, str]] = [] 13969 _files: Dict[str, str] = {} 13970 _body_params: Optional[bytes] = None 13971 13972 # process the path parameters 13973 if org_id is not None: 13974 _path_params["org_id"] = org_id 13975 if group_id is not None: 13976 _path_params["group_id"] = group_id 13977 if team_id is not None: 13978 _path_params["team_id"] = team_id 13979 # process the query parameters 13980 # process the header parameters 13981 # process the form parameters 13982 # process the body parameter 13983 13984 # set the HTTP header `Accept` 13985 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 13986 13987 # authentication setting 13988 _auth_settings: List[str] = [] 13989 13990 return self.api_client.param_serialize( 13991 method="GET", 13992 resource_path="/v2/orgs/{org_id}/groups/{group_id}/teams/{team_id}", 13993 path_params=_path_params, 13994 query_params=_query_params, 13995 header_params=_header_params, 13996 body=_body_params, 13997 post_params=_form_params, 13998 files=_files, 13999 auth_settings=_auth_settings, 14000 collection_formats=_collection_formats, 14001 _host=_host, 14002 _request_auth=_request_auth, 14003 ) 14004 14005 @validate_call 14006 def enterprise_groups_get_teams( 14007 self, 14008 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14009 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14010 limit: Annotated[ 14011 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 14012 Field(description="The maximum number of teams in the result list."), 14013 ] = None, 14014 cursor: Annotated[ 14015 Optional[StrictStr], 14016 Field( 14017 description="A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 14018 ), 14019 ] = None, 14020 _request_timeout: Union[ 14021 None, 14022 Annotated[StrictFloat, Field(gt=0)], 14023 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14024 ] = None, 14025 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14026 _content_type: Optional[StrictStr] = None, 14027 _headers: Optional[Dict[StrictStr, Any]] = None, 14028 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14029 ) -> GroupTeamsPage: 14030 """Get teams of a user group 14031 14032 Retrieves the list of teams that the user group is a part of.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14033 14034 :param org_id: The ID of an organization. (required) 14035 :type org_id: str 14036 :param group_id: The ID of a user group. (required) 14037 :type group_id: str 14038 :param limit: The maximum number of teams in the result list. 14039 :type limit: int 14040 :param cursor: A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 14041 :type cursor: str 14042 :param _request_timeout: timeout setting for this request. If one 14043 number provided, it will be total request 14044 timeout. It can also be a pair (tuple) of 14045 (connection, read) timeouts. 14046 :type _request_timeout: int, tuple(int, int), optional 14047 :param _request_auth: set to override the auth_settings for an a single 14048 request; this effectively ignores the 14049 authentication in the spec for a single request. 14050 :type _request_auth: dict, optional 14051 :param _content_type: force content-type for the request. 14052 :type _content_type: str, Optional 14053 :param _headers: set to override the headers for a single 14054 request; this effectively ignores the headers 14055 in the spec for a single request. 14056 :type _headers: dict, optional 14057 :param _host_index: set to override the host_index for a single 14058 request; this effectively ignores the host_index 14059 in the spec for a single request. 14060 :type _host_index: int, optional 14061 :return: Returns the result object. 14062 """ # noqa: E501 14063 14064 _param = self._enterprise_groups_get_teams_serialize( 14065 org_id=org_id, 14066 group_id=group_id, 14067 limit=limit, 14068 cursor=cursor, 14069 _request_auth=_request_auth, 14070 _content_type=_content_type, 14071 _headers=_headers, 14072 _host_index=_host_index, 14073 ) 14074 14075 _response_types_map: Dict[str, Optional[str]] = { 14076 "200": "GroupTeamsPage", 14077 "400": None, 14078 "401": None, 14079 "403": None, 14080 "429": None, 14081 } 14082 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14083 response_data.read() 14084 return self.api_client.response_deserialize( 14085 response_data=response_data, 14086 response_types_map=_response_types_map, 14087 ).data 14088 14089 def _enterprise_groups_get_teams_serialize( 14090 self, 14091 org_id, 14092 group_id, 14093 limit, 14094 cursor, 14095 _request_auth, 14096 _content_type, 14097 _headers, 14098 _host_index, 14099 ) -> RequestSerialized: 14100 14101 _host = None 14102 14103 _collection_formats: Dict[str, str] = {} 14104 14105 _path_params: Dict[str, str] = {} 14106 _query_params: List[Tuple[str, str]] = [] 14107 _header_params: Dict[str, Optional[str]] = _headers or {} 14108 _form_params: List[Tuple[str, str]] = [] 14109 _files: Dict[str, str] = {} 14110 _body_params: Optional[bytes] = None 14111 14112 # process the path parameters 14113 if org_id is not None: 14114 _path_params["org_id"] = org_id 14115 if group_id is not None: 14116 _path_params["group_id"] = group_id 14117 # process the query parameters 14118 if limit is not None: 14119 14120 _query_params.append(("limit", limit)) 14121 14122 if cursor is not None: 14123 14124 _query_params.append(("cursor", cursor)) 14125 14126 # process the header parameters 14127 # process the form parameters 14128 # process the body parameter 14129 14130 # set the HTTP header `Accept` 14131 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14132 14133 # authentication setting 14134 _auth_settings: List[str] = [] 14135 14136 return self.api_client.param_serialize( 14137 method="GET", 14138 resource_path="/v2/orgs/{org_id}/groups/{group_id}/teams", 14139 path_params=_path_params, 14140 query_params=_query_params, 14141 header_params=_header_params, 14142 body=_body_params, 14143 post_params=_form_params, 14144 files=_files, 14145 auth_settings=_auth_settings, 14146 collection_formats=_collection_formats, 14147 _host=_host, 14148 _request_auth=_request_auth, 14149 ) 14150 14151 @validate_call 14152 def enterprise_create_group( 14153 self, 14154 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14155 create_group_request: CreateGroupRequest, 14156 _request_timeout: Union[ 14157 None, 14158 Annotated[StrictFloat, Field(gt=0)], 14159 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14160 ] = None, 14161 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14162 _content_type: Optional[StrictStr] = None, 14163 _headers: Optional[Dict[StrictStr, Any]] = None, 14164 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14165 ) -> Group: 14166 """Create user group 14167 14168 Creates a new user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14169 14170 :param org_id: The ID of an organization. (required) 14171 :type org_id: str 14172 :param create_group_request: (required) 14173 :type create_group_request: CreateGroupRequest 14174 :param _request_timeout: timeout setting for this request. If one 14175 number provided, it will be total request 14176 timeout. It can also be a pair (tuple) of 14177 (connection, read) timeouts. 14178 :type _request_timeout: int, tuple(int, int), optional 14179 :param _request_auth: set to override the auth_settings for an a single 14180 request; this effectively ignores the 14181 authentication in the spec for a single request. 14182 :type _request_auth: dict, optional 14183 :param _content_type: force content-type for the request. 14184 :type _content_type: str, Optional 14185 :param _headers: set to override the headers for a single 14186 request; this effectively ignores the headers 14187 in the spec for a single request. 14188 :type _headers: dict, optional 14189 :param _host_index: set to override the host_index for a single 14190 request; this effectively ignores the host_index 14191 in the spec for a single request. 14192 :type _host_index: int, optional 14193 :return: Returns the result object. 14194 """ # noqa: E501 14195 14196 _param = self._enterprise_create_group_serialize( 14197 org_id=org_id, 14198 create_group_request=create_group_request, 14199 _request_auth=_request_auth, 14200 _content_type=_content_type, 14201 _headers=_headers, 14202 _host_index=_host_index, 14203 ) 14204 14205 _response_types_map: Dict[str, Optional[str]] = { 14206 "201": "Group", 14207 "400": None, 14208 "401": None, 14209 "403": None, 14210 "409": None, 14211 "429": None, 14212 } 14213 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14214 response_data.read() 14215 return self.api_client.response_deserialize( 14216 response_data=response_data, 14217 response_types_map=_response_types_map, 14218 ).data 14219 14220 def _enterprise_create_group_serialize( 14221 self, 14222 org_id, 14223 create_group_request, 14224 _request_auth, 14225 _content_type, 14226 _headers, 14227 _host_index, 14228 ) -> RequestSerialized: 14229 14230 _host = None 14231 14232 _collection_formats: Dict[str, str] = {} 14233 14234 _path_params: Dict[str, str] = {} 14235 _query_params: List[Tuple[str, str]] = [] 14236 _header_params: Dict[str, Optional[str]] = _headers or {} 14237 _form_params: List[Tuple[str, str]] = [] 14238 _files: Dict[str, str] = {} 14239 _body_params: Optional[bytes] = None 14240 14241 # process the path parameters 14242 if org_id is not None: 14243 _path_params["org_id"] = org_id 14244 # process the query parameters 14245 # process the header parameters 14246 # process the form parameters 14247 # process the body parameter 14248 if create_group_request is not None: 14249 _body_params = create_group_request 14250 14251 # set the HTTP header `Accept` 14252 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14253 14254 # set the HTTP header `Content-Type` 14255 if _content_type: 14256 _header_params["Content-Type"] = _content_type 14257 else: 14258 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 14259 if _default_content_type is not None: 14260 _header_params["Content-Type"] = _default_content_type 14261 14262 # authentication setting 14263 _auth_settings: List[str] = [] 14264 14265 return self.api_client.param_serialize( 14266 method="POST", 14267 resource_path="/v2/orgs/{org_id}/groups", 14268 path_params=_path_params, 14269 query_params=_query_params, 14270 header_params=_header_params, 14271 body=_body_params, 14272 post_params=_form_params, 14273 files=_files, 14274 auth_settings=_auth_settings, 14275 collection_formats=_collection_formats, 14276 _host=_host, 14277 _request_auth=_request_auth, 14278 ) 14279 14280 @validate_call 14281 def enterprise_delete_group( 14282 self, 14283 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14284 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14285 _request_timeout: Union[ 14286 None, 14287 Annotated[StrictFloat, Field(gt=0)], 14288 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14289 ] = None, 14290 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14291 _content_type: Optional[StrictStr] = None, 14292 _headers: Optional[Dict[StrictStr, Any]] = None, 14293 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14294 ) -> None: 14295 """Delete user group 14296 14297 Deletes a user group from an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14298 14299 :param org_id: The ID of an organization. (required) 14300 :type org_id: str 14301 :param group_id: The ID of a user group. (required) 14302 :type group_id: str 14303 :param _request_timeout: timeout setting for this request. If one 14304 number provided, it will be total request 14305 timeout. It can also be a pair (tuple) of 14306 (connection, read) timeouts. 14307 :type _request_timeout: int, tuple(int, int), optional 14308 :param _request_auth: set to override the auth_settings for an a single 14309 request; this effectively ignores the 14310 authentication in the spec for a single request. 14311 :type _request_auth: dict, optional 14312 :param _content_type: force content-type for the request. 14313 :type _content_type: str, Optional 14314 :param _headers: set to override the headers for a single 14315 request; this effectively ignores the headers 14316 in the spec for a single request. 14317 :type _headers: dict, optional 14318 :param _host_index: set to override the host_index for a single 14319 request; this effectively ignores the host_index 14320 in the spec for a single request. 14321 :type _host_index: int, optional 14322 :return: Returns the result object. 14323 """ # noqa: E501 14324 14325 _param = self._enterprise_delete_group_serialize( 14326 org_id=org_id, 14327 group_id=group_id, 14328 _request_auth=_request_auth, 14329 _content_type=_content_type, 14330 _headers=_headers, 14331 _host_index=_host_index, 14332 ) 14333 14334 _response_types_map: Dict[str, Optional[str]] = { 14335 "204": None, 14336 "400": None, 14337 "401": None, 14338 "403": None, 14339 "404": None, 14340 "429": None, 14341 } 14342 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14343 response_data.read() 14344 return self.api_client.response_deserialize( 14345 response_data=response_data, 14346 response_types_map=_response_types_map, 14347 ).data 14348 14349 def _enterprise_delete_group_serialize( 14350 self, 14351 org_id, 14352 group_id, 14353 _request_auth, 14354 _content_type, 14355 _headers, 14356 _host_index, 14357 ) -> RequestSerialized: 14358 14359 _host = None 14360 14361 _collection_formats: Dict[str, str] = {} 14362 14363 _path_params: Dict[str, str] = {} 14364 _query_params: List[Tuple[str, str]] = [] 14365 _header_params: Dict[str, Optional[str]] = _headers or {} 14366 _form_params: List[Tuple[str, str]] = [] 14367 _files: Dict[str, str] = {} 14368 _body_params: Optional[bytes] = None 14369 14370 # process the path parameters 14371 if org_id is not None: 14372 _path_params["org_id"] = org_id 14373 if group_id is not None: 14374 _path_params["group_id"] = group_id 14375 # process the query parameters 14376 # process the header parameters 14377 # process the form parameters 14378 # process the body parameter 14379 14380 # authentication setting 14381 _auth_settings: List[str] = [] 14382 14383 return self.api_client.param_serialize( 14384 method="DELETE", 14385 resource_path="/v2/orgs/{org_id}/groups/{group_id}", 14386 path_params=_path_params, 14387 query_params=_query_params, 14388 header_params=_header_params, 14389 body=_body_params, 14390 post_params=_form_params, 14391 files=_files, 14392 auth_settings=_auth_settings, 14393 collection_formats=_collection_formats, 14394 _host=_host, 14395 _request_auth=_request_auth, 14396 ) 14397 14398 @validate_call 14399 def enterprise_get_group( 14400 self, 14401 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14402 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14403 _request_timeout: Union[ 14404 None, 14405 Annotated[StrictFloat, Field(gt=0)], 14406 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14407 ] = None, 14408 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14409 _content_type: Optional[StrictStr] = None, 14410 _headers: Optional[Dict[StrictStr, Any]] = None, 14411 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14412 ) -> Group: 14413 """Get user group 14414 14415 Retrieves a user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14416 14417 :param org_id: The ID of an organization. (required) 14418 :type org_id: str 14419 :param group_id: The ID of a user group. (required) 14420 :type group_id: str 14421 :param _request_timeout: timeout setting for this request. If one 14422 number provided, it will be total request 14423 timeout. It can also be a pair (tuple) of 14424 (connection, read) timeouts. 14425 :type _request_timeout: int, tuple(int, int), optional 14426 :param _request_auth: set to override the auth_settings for an a single 14427 request; this effectively ignores the 14428 authentication in the spec for a single request. 14429 :type _request_auth: dict, optional 14430 :param _content_type: force content-type for the request. 14431 :type _content_type: str, Optional 14432 :param _headers: set to override the headers for a single 14433 request; this effectively ignores the headers 14434 in the spec for a single request. 14435 :type _headers: dict, optional 14436 :param _host_index: set to override the host_index for a single 14437 request; this effectively ignores the host_index 14438 in the spec for a single request. 14439 :type _host_index: int, optional 14440 :return: Returns the result object. 14441 """ # noqa: E501 14442 14443 _param = self._enterprise_get_group_serialize( 14444 org_id=org_id, 14445 group_id=group_id, 14446 _request_auth=_request_auth, 14447 _content_type=_content_type, 14448 _headers=_headers, 14449 _host_index=_host_index, 14450 ) 14451 14452 _response_types_map: Dict[str, Optional[str]] = { 14453 "200": "Group", 14454 "400": None, 14455 "401": None, 14456 "403": None, 14457 "404": None, 14458 "429": None, 14459 } 14460 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14461 response_data.read() 14462 return self.api_client.response_deserialize( 14463 response_data=response_data, 14464 response_types_map=_response_types_map, 14465 ).data 14466 14467 def _enterprise_get_group_serialize( 14468 self, 14469 org_id, 14470 group_id, 14471 _request_auth, 14472 _content_type, 14473 _headers, 14474 _host_index, 14475 ) -> RequestSerialized: 14476 14477 _host = None 14478 14479 _collection_formats: Dict[str, str] = {} 14480 14481 _path_params: Dict[str, str] = {} 14482 _query_params: List[Tuple[str, str]] = [] 14483 _header_params: Dict[str, Optional[str]] = _headers or {} 14484 _form_params: List[Tuple[str, str]] = [] 14485 _files: Dict[str, str] = {} 14486 _body_params: Optional[bytes] = None 14487 14488 # process the path parameters 14489 if org_id is not None: 14490 _path_params["org_id"] = org_id 14491 if group_id is not None: 14492 _path_params["group_id"] = group_id 14493 # process the query parameters 14494 # process the header parameters 14495 # process the form parameters 14496 # process the body parameter 14497 14498 # set the HTTP header `Accept` 14499 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14500 14501 # authentication setting 14502 _auth_settings: List[str] = [] 14503 14504 return self.api_client.param_serialize( 14505 method="GET", 14506 resource_path="/v2/orgs/{org_id}/groups/{group_id}", 14507 path_params=_path_params, 14508 query_params=_query_params, 14509 header_params=_header_params, 14510 body=_body_params, 14511 post_params=_form_params, 14512 files=_files, 14513 auth_settings=_auth_settings, 14514 collection_formats=_collection_formats, 14515 _host=_host, 14516 _request_auth=_request_auth, 14517 ) 14518 14519 @validate_call 14520 def enterprise_get_groups( 14521 self, 14522 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14523 limit: Annotated[ 14524 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 14525 Field(description="The maximum number of user groups in the result list."), 14526 ] = None, 14527 cursor: Annotated[ 14528 Optional[StrictStr], 14529 Field( 14530 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 14531 ), 14532 ] = None, 14533 _request_timeout: Union[ 14534 None, 14535 Annotated[StrictFloat, Field(gt=0)], 14536 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14537 ] = None, 14538 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14539 _content_type: Optional[StrictStr] = None, 14540 _headers: Optional[Dict[StrictStr, Any]] = None, 14541 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14542 ) -> GroupsPage: 14543 """List of user groups 14544 14545 Retrieves the list of user groups in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14546 14547 :param org_id: The ID of an organization. (required) 14548 :type org_id: str 14549 :param limit: The maximum number of user groups in the result list. 14550 :type limit: int 14551 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 14552 :type cursor: str 14553 :param _request_timeout: timeout setting for this request. If one 14554 number provided, it will be total request 14555 timeout. It can also be a pair (tuple) of 14556 (connection, read) timeouts. 14557 :type _request_timeout: int, tuple(int, int), optional 14558 :param _request_auth: set to override the auth_settings for an a single 14559 request; this effectively ignores the 14560 authentication in the spec for a single request. 14561 :type _request_auth: dict, optional 14562 :param _content_type: force content-type for the request. 14563 :type _content_type: str, Optional 14564 :param _headers: set to override the headers for a single 14565 request; this effectively ignores the headers 14566 in the spec for a single request. 14567 :type _headers: dict, optional 14568 :param _host_index: set to override the host_index for a single 14569 request; this effectively ignores the host_index 14570 in the spec for a single request. 14571 :type _host_index: int, optional 14572 :return: Returns the result object. 14573 """ # noqa: E501 14574 14575 _param = self._enterprise_get_groups_serialize( 14576 org_id=org_id, 14577 limit=limit, 14578 cursor=cursor, 14579 _request_auth=_request_auth, 14580 _content_type=_content_type, 14581 _headers=_headers, 14582 _host_index=_host_index, 14583 ) 14584 14585 _response_types_map: Dict[str, Optional[str]] = { 14586 "200": "GroupsPage", 14587 "400": None, 14588 "401": None, 14589 "403": None, 14590 "429": None, 14591 } 14592 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14593 response_data.read() 14594 return self.api_client.response_deserialize( 14595 response_data=response_data, 14596 response_types_map=_response_types_map, 14597 ).data 14598 14599 def _enterprise_get_groups_serialize( 14600 self, 14601 org_id, 14602 limit, 14603 cursor, 14604 _request_auth, 14605 _content_type, 14606 _headers, 14607 _host_index, 14608 ) -> RequestSerialized: 14609 14610 _host = None 14611 14612 _collection_formats: Dict[str, str] = {} 14613 14614 _path_params: Dict[str, str] = {} 14615 _query_params: List[Tuple[str, str]] = [] 14616 _header_params: Dict[str, Optional[str]] = _headers or {} 14617 _form_params: List[Tuple[str, str]] = [] 14618 _files: Dict[str, str] = {} 14619 _body_params: Optional[bytes] = None 14620 14621 # process the path parameters 14622 if org_id is not None: 14623 _path_params["org_id"] = org_id 14624 # process the query parameters 14625 if limit is not None: 14626 14627 _query_params.append(("limit", limit)) 14628 14629 if cursor is not None: 14630 14631 _query_params.append(("cursor", cursor)) 14632 14633 # process the header parameters 14634 # process the form parameters 14635 # process the body parameter 14636 14637 # set the HTTP header `Accept` 14638 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14639 14640 # authentication setting 14641 _auth_settings: List[str] = [] 14642 14643 return self.api_client.param_serialize( 14644 method="GET", 14645 resource_path="/v2/orgs/{org_id}/groups", 14646 path_params=_path_params, 14647 query_params=_query_params, 14648 header_params=_header_params, 14649 body=_body_params, 14650 post_params=_form_params, 14651 files=_files, 14652 auth_settings=_auth_settings, 14653 collection_formats=_collection_formats, 14654 _host=_host, 14655 _request_auth=_request_auth, 14656 ) 14657 14658 @validate_call 14659 def enterprise_update_group( 14660 self, 14661 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14662 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14663 update_group_request: UpdateGroupRequest, 14664 _request_timeout: Union[ 14665 None, 14666 Annotated[StrictFloat, Field(gt=0)], 14667 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14668 ] = None, 14669 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14670 _content_type: Optional[StrictStr] = None, 14671 _headers: Optional[Dict[StrictStr, Any]] = None, 14672 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14673 ) -> Group: 14674 """Update user group 14675 14676 Updates a user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14677 14678 :param org_id: The ID of an organization. (required) 14679 :type org_id: str 14680 :param group_id: The ID of a user group. (required) 14681 :type group_id: str 14682 :param update_group_request: (required) 14683 :type update_group_request: UpdateGroupRequest 14684 :param _request_timeout: timeout setting for this request. If one 14685 number provided, it will be total request 14686 timeout. It can also be a pair (tuple) of 14687 (connection, read) timeouts. 14688 :type _request_timeout: int, tuple(int, int), optional 14689 :param _request_auth: set to override the auth_settings for an a single 14690 request; this effectively ignores the 14691 authentication in the spec for a single request. 14692 :type _request_auth: dict, optional 14693 :param _content_type: force content-type for the request. 14694 :type _content_type: str, Optional 14695 :param _headers: set to override the headers for a single 14696 request; this effectively ignores the headers 14697 in the spec for a single request. 14698 :type _headers: dict, optional 14699 :param _host_index: set to override the host_index for a single 14700 request; this effectively ignores the host_index 14701 in the spec for a single request. 14702 :type _host_index: int, optional 14703 :return: Returns the result object. 14704 """ # noqa: E501 14705 14706 _param = self._enterprise_update_group_serialize( 14707 org_id=org_id, 14708 group_id=group_id, 14709 update_group_request=update_group_request, 14710 _request_auth=_request_auth, 14711 _content_type=_content_type, 14712 _headers=_headers, 14713 _host_index=_host_index, 14714 ) 14715 14716 _response_types_map: Dict[str, Optional[str]] = { 14717 "200": "Group", 14718 "400": None, 14719 "401": None, 14720 "403": None, 14721 "404": None, 14722 "409": None, 14723 "429": None, 14724 } 14725 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14726 response_data.read() 14727 return self.api_client.response_deserialize( 14728 response_data=response_data, 14729 response_types_map=_response_types_map, 14730 ).data 14731 14732 def _enterprise_update_group_serialize( 14733 self, 14734 org_id, 14735 group_id, 14736 update_group_request, 14737 _request_auth, 14738 _content_type, 14739 _headers, 14740 _host_index, 14741 ) -> RequestSerialized: 14742 14743 _host = None 14744 14745 _collection_formats: Dict[str, str] = {} 14746 14747 _path_params: Dict[str, str] = {} 14748 _query_params: List[Tuple[str, str]] = [] 14749 _header_params: Dict[str, Optional[str]] = _headers or {} 14750 _form_params: List[Tuple[str, str]] = [] 14751 _files: Dict[str, str] = {} 14752 _body_params: Optional[bytes] = None 14753 14754 # process the path parameters 14755 if org_id is not None: 14756 _path_params["org_id"] = org_id 14757 if group_id is not None: 14758 _path_params["group_id"] = group_id 14759 # process the query parameters 14760 # process the header parameters 14761 # process the form parameters 14762 # process the body parameter 14763 if update_group_request is not None: 14764 _body_params = update_group_request 14765 14766 # set the HTTP header `Accept` 14767 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14768 14769 # set the HTTP header `Content-Type` 14770 if _content_type: 14771 _header_params["Content-Type"] = _content_type 14772 else: 14773 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 14774 if _default_content_type is not None: 14775 _header_params["Content-Type"] = _default_content_type 14776 14777 # authentication setting 14778 _auth_settings: List[str] = [] 14779 14780 return self.api_client.param_serialize( 14781 method="PATCH", 14782 resource_path="/v2/orgs/{org_id}/groups/{group_id}", 14783 path_params=_path_params, 14784 query_params=_query_params, 14785 header_params=_header_params, 14786 body=_body_params, 14787 post_params=_form_params, 14788 files=_files, 14789 auth_settings=_auth_settings, 14790 collection_formats=_collection_formats, 14791 _host=_host, 14792 _request_auth=_request_auth, 14793 ) 14794 14795 @validate_call 14796 def create_app_card_item( 14797 self, 14798 board_id: Annotated[ 14799 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 14800 ], 14801 app_card_create_request: AppCardCreateRequest, 14802 _request_timeout: Union[ 14803 None, 14804 Annotated[StrictFloat, Field(gt=0)], 14805 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14806 ] = None, 14807 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14808 _content_type: Optional[StrictStr] = None, 14809 _headers: Optional[Dict[StrictStr, Any]] = None, 14810 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14811 ) -> AppCardItem: 14812 """Create app card item 14813 14814 Adds an app card item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 14815 14816 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 14817 :type board_id: str 14818 :param app_card_create_request: (required) 14819 :type app_card_create_request: AppCardCreateRequest 14820 :param _request_timeout: timeout setting for this request. If one 14821 number provided, it will be total request 14822 timeout. It can also be a pair (tuple) of 14823 (connection, read) timeouts. 14824 :type _request_timeout: int, tuple(int, int), optional 14825 :param _request_auth: set to override the auth_settings for an a single 14826 request; this effectively ignores the 14827 authentication in the spec for a single request. 14828 :type _request_auth: dict, optional 14829 :param _content_type: force content-type for the request. 14830 :type _content_type: str, Optional 14831 :param _headers: set to override the headers for a single 14832 request; this effectively ignores the headers 14833 in the spec for a single request. 14834 :type _headers: dict, optional 14835 :param _host_index: set to override the host_index for a single 14836 request; this effectively ignores the host_index 14837 in the spec for a single request. 14838 :type _host_index: int, optional 14839 :return: Returns the result object. 14840 """ # noqa: E501 14841 14842 _param = self._create_app_card_item_serialize( 14843 board_id=board_id, 14844 app_card_create_request=app_card_create_request, 14845 _request_auth=_request_auth, 14846 _content_type=_content_type, 14847 _headers=_headers, 14848 _host_index=_host_index, 14849 ) 14850 14851 _response_types_map: Dict[str, Optional[str]] = { 14852 "201": "AppCardItem", 14853 "400": None, 14854 "404": None, 14855 "429": None, 14856 } 14857 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14858 response_data.read() 14859 return self.api_client.response_deserialize( 14860 response_data=response_data, 14861 response_types_map=_response_types_map, 14862 ).data 14863 14864 def _create_app_card_item_serialize( 14865 self, 14866 board_id, 14867 app_card_create_request, 14868 _request_auth, 14869 _content_type, 14870 _headers, 14871 _host_index, 14872 ) -> RequestSerialized: 14873 14874 _host = None 14875 14876 _collection_formats: Dict[str, str] = {} 14877 14878 _path_params: Dict[str, str] = {} 14879 _query_params: List[Tuple[str, str]] = [] 14880 _header_params: Dict[str, Optional[str]] = _headers or {} 14881 _form_params: List[Tuple[str, str]] = [] 14882 _files: Dict[str, str] = {} 14883 _body_params: Optional[bytes] = None 14884 14885 # process the path parameters 14886 if board_id is not None: 14887 _path_params["board_id"] = board_id 14888 # process the query parameters 14889 # process the header parameters 14890 # process the form parameters 14891 # process the body parameter 14892 if app_card_create_request is not None: 14893 _body_params = app_card_create_request 14894 14895 # set the HTTP header `Accept` 14896 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 14897 14898 # set the HTTP header `Content-Type` 14899 if _content_type: 14900 _header_params["Content-Type"] = _content_type 14901 else: 14902 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 14903 if _default_content_type is not None: 14904 _header_params["Content-Type"] = _default_content_type 14905 14906 # authentication setting 14907 _auth_settings: List[str] = [] 14908 14909 return self.api_client.param_serialize( 14910 method="POST", 14911 resource_path="/v2/boards/{board_id}/app_cards", 14912 path_params=_path_params, 14913 query_params=_query_params, 14914 header_params=_header_params, 14915 body=_body_params, 14916 post_params=_form_params, 14917 files=_files, 14918 auth_settings=_auth_settings, 14919 collection_formats=_collection_formats, 14920 _host=_host, 14921 _request_auth=_request_auth, 14922 ) 14923 14924 @validate_call 14925 def delete_app_card_item( 14926 self, 14927 board_id: Annotated[ 14928 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete an item.") 14929 ], 14930 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 14931 _request_timeout: Union[ 14932 None, 14933 Annotated[StrictFloat, Field(gt=0)], 14934 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14935 ] = None, 14936 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14937 _content_type: Optional[StrictStr] = None, 14938 _headers: Optional[Dict[StrictStr, Any]] = None, 14939 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14940 ) -> object: 14941 """Delete app card item 14942 14943 Deletes an app card item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 14944 14945 :param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) 14946 :type board_id: str 14947 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 14948 :type item_id: str 14949 :param _request_timeout: timeout setting for this request. If one 14950 number provided, it will be total request 14951 timeout. It can also be a pair (tuple) of 14952 (connection, read) timeouts. 14953 :type _request_timeout: int, tuple(int, int), optional 14954 :param _request_auth: set to override the auth_settings for an a single 14955 request; this effectively ignores the 14956 authentication in the spec for a single request. 14957 :type _request_auth: dict, optional 14958 :param _content_type: force content-type for the request. 14959 :type _content_type: str, Optional 14960 :param _headers: set to override the headers for a single 14961 request; this effectively ignores the headers 14962 in the spec for a single request. 14963 :type _headers: dict, optional 14964 :param _host_index: set to override the host_index for a single 14965 request; this effectively ignores the host_index 14966 in the spec for a single request. 14967 :type _host_index: int, optional 14968 :return: Returns the result object. 14969 """ # noqa: E501 14970 14971 _param = self._delete_app_card_item_serialize( 14972 board_id=board_id, 14973 item_id=item_id, 14974 _request_auth=_request_auth, 14975 _content_type=_content_type, 14976 _headers=_headers, 14977 _host_index=_host_index, 14978 ) 14979 14980 _response_types_map: Dict[str, Optional[str]] = { 14981 "204": "object", 14982 "400": None, 14983 "404": None, 14984 "429": None, 14985 } 14986 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14987 response_data.read() 14988 return self.api_client.response_deserialize( 14989 response_data=response_data, 14990 response_types_map=_response_types_map, 14991 ).data 14992 14993 def _delete_app_card_item_serialize( 14994 self, 14995 board_id, 14996 item_id, 14997 _request_auth, 14998 _content_type, 14999 _headers, 15000 _host_index, 15001 ) -> RequestSerialized: 15002 15003 _host = None 15004 15005 _collection_formats: Dict[str, str] = {} 15006 15007 _path_params: Dict[str, str] = {} 15008 _query_params: List[Tuple[str, str]] = [] 15009 _header_params: Dict[str, Optional[str]] = _headers or {} 15010 _form_params: List[Tuple[str, str]] = [] 15011 _files: Dict[str, str] = {} 15012 _body_params: Optional[bytes] = None 15013 15014 # process the path parameters 15015 if board_id is not None: 15016 _path_params["board_id"] = board_id 15017 if item_id is not None: 15018 _path_params["item_id"] = item_id 15019 # process the query parameters 15020 # process the header parameters 15021 # process the form parameters 15022 # process the body parameter 15023 15024 # set the HTTP header `Accept` 15025 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15026 15027 # authentication setting 15028 _auth_settings: List[str] = [] 15029 15030 return self.api_client.param_serialize( 15031 method="DELETE", 15032 resource_path="/v2/boards/{board_id}/app_cards/{item_id}", 15033 path_params=_path_params, 15034 query_params=_query_params, 15035 header_params=_header_params, 15036 body=_body_params, 15037 post_params=_form_params, 15038 files=_files, 15039 auth_settings=_auth_settings, 15040 collection_formats=_collection_formats, 15041 _host=_host, 15042 _request_auth=_request_auth, 15043 ) 15044 15045 @validate_call 15046 def get_app_card_item( 15047 self, 15048 board_id: Annotated[ 15049 StrictStr, 15050 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 15051 ], 15052 item_id: Annotated[ 15053 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 15054 ], 15055 _request_timeout: Union[ 15056 None, 15057 Annotated[StrictFloat, Field(gt=0)], 15058 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15059 ] = None, 15060 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15061 _content_type: Optional[StrictStr] = None, 15062 _headers: Optional[Dict[StrictStr, Any]] = None, 15063 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15064 ) -> AppCardItem: 15065 """Get app card item 15066 15067 Retrieves information for a specific app card item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15068 15069 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 15070 :type board_id: str 15071 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 15072 :type item_id: str 15073 :param _request_timeout: timeout setting for this request. If one 15074 number provided, it will be total request 15075 timeout. It can also be a pair (tuple) of 15076 (connection, read) timeouts. 15077 :type _request_timeout: int, tuple(int, int), optional 15078 :param _request_auth: set to override the auth_settings for an a single 15079 request; this effectively ignores the 15080 authentication in the spec for a single request. 15081 :type _request_auth: dict, optional 15082 :param _content_type: force content-type for the request. 15083 :type _content_type: str, Optional 15084 :param _headers: set to override the headers for a single 15085 request; this effectively ignores the headers 15086 in the spec for a single request. 15087 :type _headers: dict, optional 15088 :param _host_index: set to override the host_index for a single 15089 request; this effectively ignores the host_index 15090 in the spec for a single request. 15091 :type _host_index: int, optional 15092 :return: Returns the result object. 15093 """ # noqa: E501 15094 15095 _param = self._get_app_card_item_serialize( 15096 board_id=board_id, 15097 item_id=item_id, 15098 _request_auth=_request_auth, 15099 _content_type=_content_type, 15100 _headers=_headers, 15101 _host_index=_host_index, 15102 ) 15103 15104 _response_types_map: Dict[str, Optional[str]] = { 15105 "200": "AppCardItem", 15106 "400": None, 15107 "404": None, 15108 "429": None, 15109 } 15110 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15111 response_data.read() 15112 return self.api_client.response_deserialize( 15113 response_data=response_data, 15114 response_types_map=_response_types_map, 15115 ).data 15116 15117 def _get_app_card_item_serialize( 15118 self, 15119 board_id, 15120 item_id, 15121 _request_auth, 15122 _content_type, 15123 _headers, 15124 _host_index, 15125 ) -> RequestSerialized: 15126 15127 _host = None 15128 15129 _collection_formats: Dict[str, str] = {} 15130 15131 _path_params: Dict[str, str] = {} 15132 _query_params: List[Tuple[str, str]] = [] 15133 _header_params: Dict[str, Optional[str]] = _headers or {} 15134 _form_params: List[Tuple[str, str]] = [] 15135 _files: Dict[str, str] = {} 15136 _body_params: Optional[bytes] = None 15137 15138 # process the path parameters 15139 if board_id is not None: 15140 _path_params["board_id"] = board_id 15141 if item_id is not None: 15142 _path_params["item_id"] = item_id 15143 # process the query parameters 15144 # process the header parameters 15145 # process the form parameters 15146 # process the body parameter 15147 15148 # set the HTTP header `Accept` 15149 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15150 15151 # authentication setting 15152 _auth_settings: List[str] = [] 15153 15154 return self.api_client.param_serialize( 15155 method="GET", 15156 resource_path="/v2/boards/{board_id}/app_cards/{item_id}", 15157 path_params=_path_params, 15158 query_params=_query_params, 15159 header_params=_header_params, 15160 body=_body_params, 15161 post_params=_form_params, 15162 files=_files, 15163 auth_settings=_auth_settings, 15164 collection_formats=_collection_formats, 15165 _host=_host, 15166 _request_auth=_request_auth, 15167 ) 15168 15169 @validate_call 15170 def update_app_card_item( 15171 self, 15172 board_id: Annotated[ 15173 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 15174 ], 15175 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 15176 app_card_update_request: AppCardUpdateRequest, 15177 _request_timeout: Union[ 15178 None, 15179 Annotated[StrictFloat, Field(gt=0)], 15180 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15181 ] = None, 15182 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15183 _content_type: Optional[StrictStr] = None, 15184 _headers: Optional[Dict[StrictStr, Any]] = None, 15185 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15186 ) -> AppCardItem: 15187 """Update app card item 15188 15189 Updates an app card item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15190 15191 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 15192 :type board_id: str 15193 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 15194 :type item_id: str 15195 :param app_card_update_request: (required) 15196 :type app_card_update_request: AppCardUpdateRequest 15197 :param _request_timeout: timeout setting for this request. If one 15198 number provided, it will be total request 15199 timeout. It can also be a pair (tuple) of 15200 (connection, read) timeouts. 15201 :type _request_timeout: int, tuple(int, int), optional 15202 :param _request_auth: set to override the auth_settings for an a single 15203 request; this effectively ignores the 15204 authentication in the spec for a single request. 15205 :type _request_auth: dict, optional 15206 :param _content_type: force content-type for the request. 15207 :type _content_type: str, Optional 15208 :param _headers: set to override the headers for a single 15209 request; this effectively ignores the headers 15210 in the spec for a single request. 15211 :type _headers: dict, optional 15212 :param _host_index: set to override the host_index for a single 15213 request; this effectively ignores the host_index 15214 in the spec for a single request. 15215 :type _host_index: int, optional 15216 :return: Returns the result object. 15217 """ # noqa: E501 15218 15219 _param = self._update_app_card_item_serialize( 15220 board_id=board_id, 15221 item_id=item_id, 15222 app_card_update_request=app_card_update_request, 15223 _request_auth=_request_auth, 15224 _content_type=_content_type, 15225 _headers=_headers, 15226 _host_index=_host_index, 15227 ) 15228 15229 _response_types_map: Dict[str, Optional[str]] = { 15230 "200": "AppCardItem", 15231 "400": None, 15232 "404": None, 15233 "409": None, 15234 "429": None, 15235 } 15236 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15237 response_data.read() 15238 return self.api_client.response_deserialize( 15239 response_data=response_data, 15240 response_types_map=_response_types_map, 15241 ).data 15242 15243 def _update_app_card_item_serialize( 15244 self, 15245 board_id, 15246 item_id, 15247 app_card_update_request, 15248 _request_auth, 15249 _content_type, 15250 _headers, 15251 _host_index, 15252 ) -> RequestSerialized: 15253 15254 _host = None 15255 15256 _collection_formats: Dict[str, str] = {} 15257 15258 _path_params: Dict[str, str] = {} 15259 _query_params: List[Tuple[str, str]] = [] 15260 _header_params: Dict[str, Optional[str]] = _headers or {} 15261 _form_params: List[Tuple[str, str]] = [] 15262 _files: Dict[str, str] = {} 15263 _body_params: Optional[bytes] = None 15264 15265 # process the path parameters 15266 if board_id is not None: 15267 _path_params["board_id"] = board_id 15268 if item_id is not None: 15269 _path_params["item_id"] = item_id 15270 # process the query parameters 15271 # process the header parameters 15272 # process the form parameters 15273 # process the body parameter 15274 if app_card_update_request is not None: 15275 _body_params = app_card_update_request 15276 15277 # set the HTTP header `Accept` 15278 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15279 15280 # set the HTTP header `Content-Type` 15281 if _content_type: 15282 _header_params["Content-Type"] = _content_type 15283 else: 15284 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 15285 if _default_content_type is not None: 15286 _header_params["Content-Type"] = _default_content_type 15287 15288 # authentication setting 15289 _auth_settings: List[str] = [] 15290 15291 return self.api_client.param_serialize( 15292 method="PATCH", 15293 resource_path="/v2/boards/{board_id}/app_cards/{item_id}", 15294 path_params=_path_params, 15295 query_params=_query_params, 15296 header_params=_header_params, 15297 body=_body_params, 15298 post_params=_form_params, 15299 files=_files, 15300 auth_settings=_auth_settings, 15301 collection_formats=_collection_formats, 15302 _host=_host, 15303 _request_auth=_request_auth, 15304 ) 15305 15306 @validate_call 15307 def get_board_members( 15308 self, 15309 board_id: Annotated[ 15310 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15311 ], 15312 limit: Optional[Annotated[str, Field(strict=True)]] = None, 15313 offset: Optional[StrictStr] = None, 15314 _request_timeout: Union[ 15315 None, 15316 Annotated[StrictFloat, Field(gt=0)], 15317 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15318 ] = None, 15319 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15320 _content_type: Optional[StrictStr] = None, 15321 _headers: Optional[Dict[StrictStr, Any]] = None, 15322 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15323 ) -> BoardMembersPagedResponse: 15324 """Get all board members 15325 15326 Retrieves a pageable list of members for a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15327 15328 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15329 :type board_id: str 15330 :param limit: 15331 :type limit: str 15332 :param offset: 15333 :type offset: str 15334 :param _request_timeout: timeout setting for this request. If one 15335 number provided, it will be total request 15336 timeout. It can also be a pair (tuple) of 15337 (connection, read) timeouts. 15338 :type _request_timeout: int, tuple(int, int), optional 15339 :param _request_auth: set to override the auth_settings for an a single 15340 request; this effectively ignores the 15341 authentication in the spec for a single request. 15342 :type _request_auth: dict, optional 15343 :param _content_type: force content-type for the request. 15344 :type _content_type: str, Optional 15345 :param _headers: set to override the headers for a single 15346 request; this effectively ignores the headers 15347 in the spec for a single request. 15348 :type _headers: dict, optional 15349 :param _host_index: set to override the host_index for a single 15350 request; this effectively ignores the host_index 15351 in the spec for a single request. 15352 :type _host_index: int, optional 15353 :return: Returns the result object. 15354 """ # noqa: E501 15355 15356 _param = self._get_board_members_serialize( 15357 board_id=board_id, 15358 limit=limit, 15359 offset=offset, 15360 _request_auth=_request_auth, 15361 _content_type=_content_type, 15362 _headers=_headers, 15363 _host_index=_host_index, 15364 ) 15365 15366 _response_types_map: Dict[str, Optional[str]] = { 15367 "200": "BoardMembersPagedResponse", 15368 "400": None, 15369 "404": None, 15370 "429": None, 15371 } 15372 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15373 response_data.read() 15374 return self.api_client.response_deserialize( 15375 response_data=response_data, 15376 response_types_map=_response_types_map, 15377 ).data 15378 15379 def _get_board_members_serialize( 15380 self, 15381 board_id, 15382 limit, 15383 offset, 15384 _request_auth, 15385 _content_type, 15386 _headers, 15387 _host_index, 15388 ) -> RequestSerialized: 15389 15390 _host = None 15391 15392 _collection_formats: Dict[str, str] = {} 15393 15394 _path_params: Dict[str, str] = {} 15395 _query_params: List[Tuple[str, str]] = [] 15396 _header_params: Dict[str, Optional[str]] = _headers or {} 15397 _form_params: List[Tuple[str, str]] = [] 15398 _files: Dict[str, str] = {} 15399 _body_params: Optional[bytes] = None 15400 15401 # process the path parameters 15402 if board_id is not None: 15403 _path_params["board_id"] = board_id 15404 # process the query parameters 15405 if limit is not None: 15406 15407 _query_params.append(("limit", limit)) 15408 15409 if offset is not None: 15410 15411 _query_params.append(("offset", offset)) 15412 15413 # process the header parameters 15414 # process the form parameters 15415 # process the body parameter 15416 15417 # set the HTTP header `Accept` 15418 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15419 15420 # authentication setting 15421 _auth_settings: List[str] = [] 15422 15423 return self.api_client.param_serialize( 15424 method="GET", 15425 resource_path="/v2/boards/{board_id}/members", 15426 path_params=_path_params, 15427 query_params=_query_params, 15428 header_params=_header_params, 15429 body=_body_params, 15430 post_params=_form_params, 15431 files=_files, 15432 auth_settings=_auth_settings, 15433 collection_formats=_collection_formats, 15434 _host=_host, 15435 _request_auth=_request_auth, 15436 ) 15437 15438 @validate_call 15439 def get_specific_board_member( 15440 self, 15441 board_id: Annotated[ 15442 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15443 ], 15444 board_member_id: Annotated[ 15445 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to retrieve.") 15446 ], 15447 _request_timeout: Union[ 15448 None, 15449 Annotated[StrictFloat, Field(gt=0)], 15450 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15451 ] = None, 15452 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15453 _content_type: Optional[StrictStr] = None, 15454 _headers: Optional[Dict[StrictStr, Any]] = None, 15455 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15456 ) -> BoardMemberWithLinks: 15457 """Get specific board member 15458 15459 Retrieves information for a board member.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15460 15461 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15462 :type board_id: str 15463 :param board_member_id: Unique identifier (ID) of the board member whose role you want to retrieve. (required) 15464 :type board_member_id: str 15465 :param _request_timeout: timeout setting for this request. If one 15466 number provided, it will be total request 15467 timeout. It can also be a pair (tuple) of 15468 (connection, read) timeouts. 15469 :type _request_timeout: int, tuple(int, int), optional 15470 :param _request_auth: set to override the auth_settings for an a single 15471 request; this effectively ignores the 15472 authentication in the spec for a single request. 15473 :type _request_auth: dict, optional 15474 :param _content_type: force content-type for the request. 15475 :type _content_type: str, Optional 15476 :param _headers: set to override the headers for a single 15477 request; this effectively ignores the headers 15478 in the spec for a single request. 15479 :type _headers: dict, optional 15480 :param _host_index: set to override the host_index for a single 15481 request; this effectively ignores the host_index 15482 in the spec for a single request. 15483 :type _host_index: int, optional 15484 :return: Returns the result object. 15485 """ # noqa: E501 15486 15487 _param = self._get_specific_board_member_serialize( 15488 board_id=board_id, 15489 board_member_id=board_member_id, 15490 _request_auth=_request_auth, 15491 _content_type=_content_type, 15492 _headers=_headers, 15493 _host_index=_host_index, 15494 ) 15495 15496 _response_types_map: Dict[str, Optional[str]] = { 15497 "200": "BoardMemberWithLinks", 15498 "400": None, 15499 "404": None, 15500 "429": None, 15501 } 15502 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15503 response_data.read() 15504 return self.api_client.response_deserialize( 15505 response_data=response_data, 15506 response_types_map=_response_types_map, 15507 ).data 15508 15509 def _get_specific_board_member_serialize( 15510 self, 15511 board_id, 15512 board_member_id, 15513 _request_auth, 15514 _content_type, 15515 _headers, 15516 _host_index, 15517 ) -> RequestSerialized: 15518 15519 _host = None 15520 15521 _collection_formats: Dict[str, str] = {} 15522 15523 _path_params: Dict[str, str] = {} 15524 _query_params: List[Tuple[str, str]] = [] 15525 _header_params: Dict[str, Optional[str]] = _headers or {} 15526 _form_params: List[Tuple[str, str]] = [] 15527 _files: Dict[str, str] = {} 15528 _body_params: Optional[bytes] = None 15529 15530 # process the path parameters 15531 if board_id is not None: 15532 _path_params["board_id"] = board_id 15533 if board_member_id is not None: 15534 _path_params["board_member_id"] = board_member_id 15535 # process the query parameters 15536 # process the header parameters 15537 # process the form parameters 15538 # process the body parameter 15539 15540 # set the HTTP header `Accept` 15541 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15542 15543 # authentication setting 15544 _auth_settings: List[str] = [] 15545 15546 return self.api_client.param_serialize( 15547 method="GET", 15548 resource_path="/v2/boards/{board_id}/members/{board_member_id}", 15549 path_params=_path_params, 15550 query_params=_query_params, 15551 header_params=_header_params, 15552 body=_body_params, 15553 post_params=_form_params, 15554 files=_files, 15555 auth_settings=_auth_settings, 15556 collection_formats=_collection_formats, 15557 _host=_host, 15558 _request_auth=_request_auth, 15559 ) 15560 15561 @validate_call 15562 def remove_board_member( 15563 self, 15564 board_id: Annotated[ 15565 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete an item.") 15566 ], 15567 board_member_id: Annotated[ 15568 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to delete.") 15569 ], 15570 _request_timeout: Union[ 15571 None, 15572 Annotated[StrictFloat, Field(gt=0)], 15573 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15574 ] = None, 15575 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15576 _content_type: Optional[StrictStr] = None, 15577 _headers: Optional[Dict[StrictStr, Any]] = None, 15578 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15579 ) -> object: 15580 """Remove board member 15581 15582 Removes a board member from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15583 15584 :param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) 15585 :type board_id: str 15586 :param board_member_id: Unique identifier (ID) of the board member whose role you want to delete. (required) 15587 :type board_member_id: str 15588 :param _request_timeout: timeout setting for this request. If one 15589 number provided, it will be total request 15590 timeout. It can also be a pair (tuple) of 15591 (connection, read) timeouts. 15592 :type _request_timeout: int, tuple(int, int), optional 15593 :param _request_auth: set to override the auth_settings for an a single 15594 request; this effectively ignores the 15595 authentication in the spec for a single request. 15596 :type _request_auth: dict, optional 15597 :param _content_type: force content-type for the request. 15598 :type _content_type: str, Optional 15599 :param _headers: set to override the headers for a single 15600 request; this effectively ignores the headers 15601 in the spec for a single request. 15602 :type _headers: dict, optional 15603 :param _host_index: set to override the host_index for a single 15604 request; this effectively ignores the host_index 15605 in the spec for a single request. 15606 :type _host_index: int, optional 15607 :return: Returns the result object. 15608 """ # noqa: E501 15609 15610 _param = self._remove_board_member_serialize( 15611 board_id=board_id, 15612 board_member_id=board_member_id, 15613 _request_auth=_request_auth, 15614 _content_type=_content_type, 15615 _headers=_headers, 15616 _host_index=_host_index, 15617 ) 15618 15619 _response_types_map: Dict[str, Optional[str]] = { 15620 "204": "object", 15621 "400": None, 15622 "404": None, 15623 "429": None, 15624 } 15625 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15626 response_data.read() 15627 return self.api_client.response_deserialize( 15628 response_data=response_data, 15629 response_types_map=_response_types_map, 15630 ).data 15631 15632 def _remove_board_member_serialize( 15633 self, 15634 board_id, 15635 board_member_id, 15636 _request_auth, 15637 _content_type, 15638 _headers, 15639 _host_index, 15640 ) -> RequestSerialized: 15641 15642 _host = None 15643 15644 _collection_formats: Dict[str, str] = {} 15645 15646 _path_params: Dict[str, str] = {} 15647 _query_params: List[Tuple[str, str]] = [] 15648 _header_params: Dict[str, Optional[str]] = _headers or {} 15649 _form_params: List[Tuple[str, str]] = [] 15650 _files: Dict[str, str] = {} 15651 _body_params: Optional[bytes] = None 15652 15653 # process the path parameters 15654 if board_id is not None: 15655 _path_params["board_id"] = board_id 15656 if board_member_id is not None: 15657 _path_params["board_member_id"] = board_member_id 15658 # process the query parameters 15659 # process the header parameters 15660 # process the form parameters 15661 # process the body parameter 15662 15663 # set the HTTP header `Accept` 15664 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15665 15666 # authentication setting 15667 _auth_settings: List[str] = [] 15668 15669 return self.api_client.param_serialize( 15670 method="DELETE", 15671 resource_path="/v2/boards/{board_id}/members/{board_member_id}", 15672 path_params=_path_params, 15673 query_params=_query_params, 15674 header_params=_header_params, 15675 body=_body_params, 15676 post_params=_form_params, 15677 files=_files, 15678 auth_settings=_auth_settings, 15679 collection_formats=_collection_formats, 15680 _host=_host, 15681 _request_auth=_request_auth, 15682 ) 15683 15684 @validate_call 15685 def share_board( 15686 self, 15687 board_id: Annotated[ 15688 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15689 ], 15690 board_members_invite: BoardMembersInvite, 15691 _request_timeout: Union[ 15692 None, 15693 Annotated[StrictFloat, Field(gt=0)], 15694 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15695 ] = None, 15696 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15697 _content_type: Optional[StrictStr] = None, 15698 _headers: Optional[Dict[StrictStr, Any]] = None, 15699 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15700 ) -> InvitationResult: 15701 """Share board 15702 15703 Shares the board and Invites new members to collaborate on a board by sending an invitation email. Depending on the board's Sharing policy, there might be various scenarios where membership in the team is required in order to share the board with a user.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 15704 15705 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15706 :type board_id: str 15707 :param board_members_invite: (required) 15708 :type board_members_invite: BoardMembersInvite 15709 :param _request_timeout: timeout setting for this request. If one 15710 number provided, it will be total request 15711 timeout. It can also be a pair (tuple) of 15712 (connection, read) timeouts. 15713 :type _request_timeout: int, tuple(int, int), optional 15714 :param _request_auth: set to override the auth_settings for an a single 15715 request; this effectively ignores the 15716 authentication in the spec for a single request. 15717 :type _request_auth: dict, optional 15718 :param _content_type: force content-type for the request. 15719 :type _content_type: str, Optional 15720 :param _headers: set to override the headers for a single 15721 request; this effectively ignores the headers 15722 in the spec for a single request. 15723 :type _headers: dict, optional 15724 :param _host_index: set to override the host_index for a single 15725 request; this effectively ignores the host_index 15726 in the spec for a single request. 15727 :type _host_index: int, optional 15728 :return: Returns the result object. 15729 """ # noqa: E501 15730 15731 _param = self._share_board_serialize( 15732 board_id=board_id, 15733 board_members_invite=board_members_invite, 15734 _request_auth=_request_auth, 15735 _content_type=_content_type, 15736 _headers=_headers, 15737 _host_index=_host_index, 15738 ) 15739 15740 _response_types_map: Dict[str, Optional[str]] = { 15741 "201": "InvitationResult", 15742 "400": None, 15743 "404": None, 15744 "429": None, 15745 } 15746 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15747 response_data.read() 15748 return self.api_client.response_deserialize( 15749 response_data=response_data, 15750 response_types_map=_response_types_map, 15751 ).data 15752 15753 def _share_board_serialize( 15754 self, 15755 board_id, 15756 board_members_invite, 15757 _request_auth, 15758 _content_type, 15759 _headers, 15760 _host_index, 15761 ) -> RequestSerialized: 15762 15763 _host = None 15764 15765 _collection_formats: Dict[str, str] = {} 15766 15767 _path_params: Dict[str, str] = {} 15768 _query_params: List[Tuple[str, str]] = [] 15769 _header_params: Dict[str, Optional[str]] = _headers or {} 15770 _form_params: List[Tuple[str, str]] = [] 15771 _files: Dict[str, str] = {} 15772 _body_params: Optional[bytes] = None 15773 15774 # process the path parameters 15775 if board_id is not None: 15776 _path_params["board_id"] = board_id 15777 # process the query parameters 15778 # process the header parameters 15779 # process the form parameters 15780 # process the body parameter 15781 if board_members_invite is not None: 15782 _body_params = board_members_invite 15783 15784 # set the HTTP header `Accept` 15785 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15786 15787 # set the HTTP header `Content-Type` 15788 if _content_type: 15789 _header_params["Content-Type"] = _content_type 15790 else: 15791 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 15792 if _default_content_type is not None: 15793 _header_params["Content-Type"] = _default_content_type 15794 15795 # authentication setting 15796 _auth_settings: List[str] = [] 15797 15798 return self.api_client.param_serialize( 15799 method="POST", 15800 resource_path="/v2/boards/{board_id}/members", 15801 path_params=_path_params, 15802 query_params=_query_params, 15803 header_params=_header_params, 15804 body=_body_params, 15805 post_params=_form_params, 15806 files=_files, 15807 auth_settings=_auth_settings, 15808 collection_formats=_collection_formats, 15809 _host=_host, 15810 _request_auth=_request_auth, 15811 ) 15812 15813 @validate_call 15814 def update_board_member( 15815 self, 15816 board_id: Annotated[ 15817 StrictStr, 15818 Field( 15819 description="Unique identifier (ID) of the board for which you want to update the role of the board member." 15820 ), 15821 ], 15822 board_member_id: Annotated[ 15823 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to update.") 15824 ], 15825 board_member_changes: BoardMemberChanges, 15826 _request_timeout: Union[ 15827 None, 15828 Annotated[StrictFloat, Field(gt=0)], 15829 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15830 ] = None, 15831 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15832 _content_type: Optional[StrictStr] = None, 15833 _headers: Optional[Dict[StrictStr, Any]] = None, 15834 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15835 ) -> BoardMemberWithLinks: 15836 """Update board member 15837 15838 Updates the role of a board member.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15839 15840 :param board_id: Unique identifier (ID) of the board for which you want to update the role of the board member. (required) 15841 :type board_id: str 15842 :param board_member_id: Unique identifier (ID) of the board member whose role you want to update. (required) 15843 :type board_member_id: str 15844 :param board_member_changes: (required) 15845 :type board_member_changes: BoardMemberChanges 15846 :param _request_timeout: timeout setting for this request. If one 15847 number provided, it will be total request 15848 timeout. It can also be a pair (tuple) of 15849 (connection, read) timeouts. 15850 :type _request_timeout: int, tuple(int, int), optional 15851 :param _request_auth: set to override the auth_settings for an a single 15852 request; this effectively ignores the 15853 authentication in the spec for a single request. 15854 :type _request_auth: dict, optional 15855 :param _content_type: force content-type for the request. 15856 :type _content_type: str, Optional 15857 :param _headers: set to override the headers for a single 15858 request; this effectively ignores the headers 15859 in the spec for a single request. 15860 :type _headers: dict, optional 15861 :param _host_index: set to override the host_index for a single 15862 request; this effectively ignores the host_index 15863 in the spec for a single request. 15864 :type _host_index: int, optional 15865 :return: Returns the result object. 15866 """ # noqa: E501 15867 15868 _param = self._update_board_member_serialize( 15869 board_id=board_id, 15870 board_member_id=board_member_id, 15871 board_member_changes=board_member_changes, 15872 _request_auth=_request_auth, 15873 _content_type=_content_type, 15874 _headers=_headers, 15875 _host_index=_host_index, 15876 ) 15877 15878 _response_types_map: Dict[str, Optional[str]] = { 15879 "200": "BoardMemberWithLinks", 15880 "400": None, 15881 "404": None, 15882 "429": None, 15883 } 15884 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15885 response_data.read() 15886 return self.api_client.response_deserialize( 15887 response_data=response_data, 15888 response_types_map=_response_types_map, 15889 ).data 15890 15891 def _update_board_member_serialize( 15892 self, 15893 board_id, 15894 board_member_id, 15895 board_member_changes, 15896 _request_auth, 15897 _content_type, 15898 _headers, 15899 _host_index, 15900 ) -> RequestSerialized: 15901 15902 _host = None 15903 15904 _collection_formats: Dict[str, str] = {} 15905 15906 _path_params: Dict[str, str] = {} 15907 _query_params: List[Tuple[str, str]] = [] 15908 _header_params: Dict[str, Optional[str]] = _headers or {} 15909 _form_params: List[Tuple[str, str]] = [] 15910 _files: Dict[str, str] = {} 15911 _body_params: Optional[bytes] = None 15912 15913 # process the path parameters 15914 if board_id is not None: 15915 _path_params["board_id"] = board_id 15916 if board_member_id is not None: 15917 _path_params["board_member_id"] = board_member_id 15918 # process the query parameters 15919 # process the header parameters 15920 # process the form parameters 15921 # process the body parameter 15922 if board_member_changes is not None: 15923 _body_params = board_member_changes 15924 15925 # set the HTTP header `Accept` 15926 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 15927 15928 # set the HTTP header `Content-Type` 15929 if _content_type: 15930 _header_params["Content-Type"] = _content_type 15931 else: 15932 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 15933 if _default_content_type is not None: 15934 _header_params["Content-Type"] = _default_content_type 15935 15936 # authentication setting 15937 _auth_settings: List[str] = [] 15938 15939 return self.api_client.param_serialize( 15940 method="PATCH", 15941 resource_path="/v2/boards/{board_id}/members/{board_member_id}", 15942 path_params=_path_params, 15943 query_params=_query_params, 15944 header_params=_header_params, 15945 body=_body_params, 15946 post_params=_form_params, 15947 files=_files, 15948 auth_settings=_auth_settings, 15949 collection_formats=_collection_formats, 15950 _host=_host, 15951 _request_auth=_request_auth, 15952 ) 15953 15954 @validate_call 15955 def copy_board( 15956 self, 15957 copy_from: Annotated[ 15958 StrictStr, Field(description="Unique identifier (ID) of the board that you want to copy.") 15959 ], 15960 copy_board_changes: Optional[CopyBoardChanges] = None, 15961 _request_timeout: Union[ 15962 None, 15963 Annotated[StrictFloat, Field(gt=0)], 15964 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15965 ] = None, 15966 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15967 _content_type: Optional[StrictStr] = None, 15968 _headers: Optional[Dict[StrictStr, Any]] = None, 15969 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15970 ) -> BoardWithLinksAndWithoutProject: 15971 """Copy board 15972 15973 Creates a copy of an existing board. You can also update the name, description, sharing policy, and permissions policy for the new board in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a><br/> 15974 15975 :param copy_from: Unique identifier (ID) of the board that you want to copy. (required) 15976 :type copy_from: str 15977 :param copy_board_changes: 15978 :type copy_board_changes: CopyBoardChanges 15979 :param _request_timeout: timeout setting for this request. If one 15980 number provided, it will be total request 15981 timeout. It can also be a pair (tuple) of 15982 (connection, read) timeouts. 15983 :type _request_timeout: int, tuple(int, int), optional 15984 :param _request_auth: set to override the auth_settings for an a single 15985 request; this effectively ignores the 15986 authentication in the spec for a single request. 15987 :type _request_auth: dict, optional 15988 :param _content_type: force content-type for the request. 15989 :type _content_type: str, Optional 15990 :param _headers: set to override the headers for a single 15991 request; this effectively ignores the headers 15992 in the spec for a single request. 15993 :type _headers: dict, optional 15994 :param _host_index: set to override the host_index for a single 15995 request; this effectively ignores the host_index 15996 in the spec for a single request. 15997 :type _host_index: int, optional 15998 :return: Returns the result object. 15999 """ # noqa: E501 16000 16001 _param = self._copy_board_serialize( 16002 copy_from=copy_from, 16003 copy_board_changes=copy_board_changes, 16004 _request_auth=_request_auth, 16005 _content_type=_content_type, 16006 _headers=_headers, 16007 _host_index=_host_index, 16008 ) 16009 16010 _response_types_map: Dict[str, Optional[str]] = { 16011 "201": "BoardWithLinksAndWithoutProject", 16012 "400": None, 16013 "404": None, 16014 "409": None, 16015 "429": None, 16016 } 16017 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16018 response_data.read() 16019 return self.api_client.response_deserialize( 16020 response_data=response_data, 16021 response_types_map=_response_types_map, 16022 ).data 16023 16024 def _copy_board_serialize( 16025 self, 16026 copy_from, 16027 copy_board_changes, 16028 _request_auth, 16029 _content_type, 16030 _headers, 16031 _host_index, 16032 ) -> RequestSerialized: 16033 16034 _host = None 16035 16036 _collection_formats: Dict[str, str] = {} 16037 16038 _path_params: Dict[str, str] = {} 16039 _query_params: List[Tuple[str, str]] = [] 16040 _header_params: Dict[str, Optional[str]] = _headers or {} 16041 _form_params: List[Tuple[str, str]] = [] 16042 _files: Dict[str, str] = {} 16043 _body_params: Optional[bytes] = None 16044 16045 # process the path parameters 16046 # process the query parameters 16047 if copy_from is not None: 16048 16049 _query_params.append(("copy_from", copy_from)) 16050 16051 # process the header parameters 16052 # process the form parameters 16053 # process the body parameter 16054 if copy_board_changes is not None: 16055 _body_params = copy_board_changes 16056 16057 # set the HTTP header `Accept` 16058 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16059 16060 # set the HTTP header `Content-Type` 16061 if _content_type: 16062 _header_params["Content-Type"] = _content_type 16063 else: 16064 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16065 if _default_content_type is not None: 16066 _header_params["Content-Type"] = _default_content_type 16067 16068 # authentication setting 16069 _auth_settings: List[str] = [] 16070 16071 return self.api_client.param_serialize( 16072 method="PUT", 16073 resource_path="/v2/boards", 16074 path_params=_path_params, 16075 query_params=_query_params, 16076 header_params=_header_params, 16077 body=_body_params, 16078 post_params=_form_params, 16079 files=_files, 16080 auth_settings=_auth_settings, 16081 collection_formats=_collection_formats, 16082 _host=_host, 16083 _request_auth=_request_auth, 16084 ) 16085 16086 @validate_call 16087 def create_board( 16088 self, 16089 board_changes: Optional[BoardChanges] = None, 16090 _request_timeout: Union[ 16091 None, 16092 Annotated[StrictFloat, Field(gt=0)], 16093 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16094 ] = None, 16095 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16096 _content_type: Optional[StrictStr] = None, 16097 _headers: Optional[Dict[StrictStr, Any]] = None, 16098 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16099 ) -> BoardWithLinks: 16100 """Create board 16101 16102 Creates a board with the specified name and sharing policies.<br/><h4>Note</h4> You can only create up to 3 team boards with the free plan.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16103 16104 :param board_changes: 16105 :type board_changes: BoardChanges 16106 :param _request_timeout: timeout setting for this request. If one 16107 number provided, it will be total request 16108 timeout. It can also be a pair (tuple) of 16109 (connection, read) timeouts. 16110 :type _request_timeout: int, tuple(int, int), optional 16111 :param _request_auth: set to override the auth_settings for an a single 16112 request; this effectively ignores the 16113 authentication in the spec for a single request. 16114 :type _request_auth: dict, optional 16115 :param _content_type: force content-type for the request. 16116 :type _content_type: str, Optional 16117 :param _headers: set to override the headers for a single 16118 request; this effectively ignores the headers 16119 in the spec for a single request. 16120 :type _headers: dict, optional 16121 :param _host_index: set to override the host_index for a single 16122 request; this effectively ignores the host_index 16123 in the spec for a single request. 16124 :type _host_index: int, optional 16125 :return: Returns the result object. 16126 """ # noqa: E501 16127 16128 _param = self._create_board_serialize( 16129 board_changes=board_changes, 16130 _request_auth=_request_auth, 16131 _content_type=_content_type, 16132 _headers=_headers, 16133 _host_index=_host_index, 16134 ) 16135 16136 _response_types_map: Dict[str, Optional[str]] = { 16137 "201": "BoardWithLinks", 16138 "400": None, 16139 "404": None, 16140 "409": None, 16141 "429": None, 16142 } 16143 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16144 response_data.read() 16145 return self.api_client.response_deserialize( 16146 response_data=response_data, 16147 response_types_map=_response_types_map, 16148 ).data 16149 16150 def _create_board_serialize( 16151 self, 16152 board_changes, 16153 _request_auth, 16154 _content_type, 16155 _headers, 16156 _host_index, 16157 ) -> RequestSerialized: 16158 16159 _host = None 16160 16161 _collection_formats: Dict[str, str] = {} 16162 16163 _path_params: Dict[str, str] = {} 16164 _query_params: List[Tuple[str, str]] = [] 16165 _header_params: Dict[str, Optional[str]] = _headers or {} 16166 _form_params: List[Tuple[str, str]] = [] 16167 _files: Dict[str, str] = {} 16168 _body_params: Optional[bytes] = None 16169 16170 # process the path parameters 16171 # process the query parameters 16172 # process the header parameters 16173 # process the form parameters 16174 # process the body parameter 16175 if board_changes is not None: 16176 _body_params = board_changes 16177 16178 # set the HTTP header `Accept` 16179 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16180 16181 # set the HTTP header `Content-Type` 16182 if _content_type: 16183 _header_params["Content-Type"] = _content_type 16184 else: 16185 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16186 if _default_content_type is not None: 16187 _header_params["Content-Type"] = _default_content_type 16188 16189 # authentication setting 16190 _auth_settings: List[str] = [] 16191 16192 return self.api_client.param_serialize( 16193 method="POST", 16194 resource_path="/v2/boards", 16195 path_params=_path_params, 16196 query_params=_query_params, 16197 header_params=_header_params, 16198 body=_body_params, 16199 post_params=_form_params, 16200 files=_files, 16201 auth_settings=_auth_settings, 16202 collection_formats=_collection_formats, 16203 _host=_host, 16204 _request_auth=_request_auth, 16205 ) 16206 16207 @validate_call 16208 def delete_board( 16209 self, 16210 board_id: Annotated[ 16211 StrictStr, Field(description="Unique identifier (ID) of the board that you want to delete.") 16212 ], 16213 _request_timeout: Union[ 16214 None, 16215 Annotated[StrictFloat, Field(gt=0)], 16216 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16217 ] = None, 16218 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16219 _content_type: Optional[StrictStr] = None, 16220 _headers: Optional[Dict[StrictStr, Any]] = None, 16221 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16222 ) -> object: 16223 """Delete board 16224 16225 Deletes a board. Deleted boards go to Trash (on paid plans) and can be restored via UI within 90 days after deletion.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16226 16227 :param board_id: Unique identifier (ID) of the board that you want to delete. (required) 16228 :type board_id: str 16229 :param _request_timeout: timeout setting for this request. If one 16230 number provided, it will be total request 16231 timeout. It can also be a pair (tuple) of 16232 (connection, read) timeouts. 16233 :type _request_timeout: int, tuple(int, int), optional 16234 :param _request_auth: set to override the auth_settings for an a single 16235 request; this effectively ignores the 16236 authentication in the spec for a single request. 16237 :type _request_auth: dict, optional 16238 :param _content_type: force content-type for the request. 16239 :type _content_type: str, Optional 16240 :param _headers: set to override the headers for a single 16241 request; this effectively ignores the headers 16242 in the spec for a single request. 16243 :type _headers: dict, optional 16244 :param _host_index: set to override the host_index for a single 16245 request; this effectively ignores the host_index 16246 in the spec for a single request. 16247 :type _host_index: int, optional 16248 :return: Returns the result object. 16249 """ # noqa: E501 16250 16251 _param = self._delete_board_serialize( 16252 board_id=board_id, 16253 _request_auth=_request_auth, 16254 _content_type=_content_type, 16255 _headers=_headers, 16256 _host_index=_host_index, 16257 ) 16258 16259 _response_types_map: Dict[str, Optional[str]] = { 16260 "204": "object", 16261 "400": None, 16262 "404": None, 16263 "409": None, 16264 "429": None, 16265 } 16266 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16267 response_data.read() 16268 return self.api_client.response_deserialize( 16269 response_data=response_data, 16270 response_types_map=_response_types_map, 16271 ).data 16272 16273 def _delete_board_serialize( 16274 self, 16275 board_id, 16276 _request_auth, 16277 _content_type, 16278 _headers, 16279 _host_index, 16280 ) -> RequestSerialized: 16281 16282 _host = None 16283 16284 _collection_formats: Dict[str, str] = {} 16285 16286 _path_params: Dict[str, str] = {} 16287 _query_params: List[Tuple[str, str]] = [] 16288 _header_params: Dict[str, Optional[str]] = _headers or {} 16289 _form_params: List[Tuple[str, str]] = [] 16290 _files: Dict[str, str] = {} 16291 _body_params: Optional[bytes] = None 16292 16293 # process the path parameters 16294 if board_id is not None: 16295 _path_params["board_id"] = board_id 16296 # process the query parameters 16297 # process the header parameters 16298 # process the form parameters 16299 # process the body parameter 16300 16301 # set the HTTP header `Accept` 16302 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16303 16304 # authentication setting 16305 _auth_settings: List[str] = [] 16306 16307 return self.api_client.param_serialize( 16308 method="DELETE", 16309 resource_path="/v2/boards/{board_id}", 16310 path_params=_path_params, 16311 query_params=_query_params, 16312 header_params=_header_params, 16313 body=_body_params, 16314 post_params=_form_params, 16315 files=_files, 16316 auth_settings=_auth_settings, 16317 collection_formats=_collection_formats, 16318 _host=_host, 16319 _request_auth=_request_auth, 16320 ) 16321 16322 @validate_call 16323 def get_boards( 16324 self, 16325 team_id: Optional[StrictStr] = None, 16326 project_id: Optional[StrictStr] = None, 16327 query: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None, 16328 owner: Optional[StrictStr] = None, 16329 limit: Optional[Annotated[str, Field(strict=True)]] = None, 16330 offset: Optional[StrictStr] = None, 16331 sort: Optional[StrictStr] = None, 16332 _request_timeout: Union[ 16333 None, 16334 Annotated[StrictFloat, Field(gt=0)], 16335 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16336 ] = None, 16337 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16338 _content_type: Optional[StrictStr] = None, 16339 _headers: Optional[Dict[StrictStr, Any]] = None, 16340 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16341 ) -> BoardsPagedResponse: 16342 """Get boards 16343 16344 Retrieves a list of boards accessible to the user associated with the provided access token. This endpoint supports filtering and sorting through URL query parameters. Customize the response by specifying `team_id`, `project_id`, or other query parameters. Filtering by `team_id` or `project_id` (or both) returns results instantly. For other filters, allow a few seconds for indexing of newly created boards. If you're an Enterprise customer with Company Admin permissions: - Enable **Content Admin** permissions to retrieve all boards, including private boards (those not explicitly shared with you). For details, see the [Content Admin Permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins). - Note that **Private board contents remain inaccessible**. The API allows you to verify their existence but prevents viewing their contents to uphold security best practices. Unauthorized access attempts will return an error. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 16345 16346 :param team_id: 16347 :type team_id: str 16348 :param project_id: 16349 :type project_id: str 16350 :param query: 16351 :type query: str 16352 :param owner: 16353 :type owner: str 16354 :param limit: 16355 :type limit: str 16356 :param offset: 16357 :type offset: str 16358 :param sort: 16359 :type sort: str 16360 :param _request_timeout: timeout setting for this request. If one 16361 number provided, it will be total request 16362 timeout. It can also be a pair (tuple) of 16363 (connection, read) timeouts. 16364 :type _request_timeout: int, tuple(int, int), optional 16365 :param _request_auth: set to override the auth_settings for an a single 16366 request; this effectively ignores the 16367 authentication in the spec for a single request. 16368 :type _request_auth: dict, optional 16369 :param _content_type: force content-type for the request. 16370 :type _content_type: str, Optional 16371 :param _headers: set to override the headers for a single 16372 request; this effectively ignores the headers 16373 in the spec for a single request. 16374 :type _headers: dict, optional 16375 :param _host_index: set to override the host_index for a single 16376 request; this effectively ignores the host_index 16377 in the spec for a single request. 16378 :type _host_index: int, optional 16379 :return: Returns the result object. 16380 """ # noqa: E501 16381 16382 _param = self._get_boards_serialize( 16383 team_id=team_id, 16384 project_id=project_id, 16385 query=query, 16386 owner=owner, 16387 limit=limit, 16388 offset=offset, 16389 sort=sort, 16390 _request_auth=_request_auth, 16391 _content_type=_content_type, 16392 _headers=_headers, 16393 _host_index=_host_index, 16394 ) 16395 16396 _response_types_map: Dict[str, Optional[str]] = { 16397 "200": "BoardsPagedResponse", 16398 "400": None, 16399 "404": None, 16400 "429": None, 16401 } 16402 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16403 response_data.read() 16404 return self.api_client.response_deserialize( 16405 response_data=response_data, 16406 response_types_map=_response_types_map, 16407 ).data 16408 16409 def _get_boards_serialize( 16410 self, 16411 team_id, 16412 project_id, 16413 query, 16414 owner, 16415 limit, 16416 offset, 16417 sort, 16418 _request_auth, 16419 _content_type, 16420 _headers, 16421 _host_index, 16422 ) -> RequestSerialized: 16423 16424 _host = None 16425 16426 _collection_formats: Dict[str, str] = {} 16427 16428 _path_params: Dict[str, str] = {} 16429 _query_params: List[Tuple[str, str]] = [] 16430 _header_params: Dict[str, Optional[str]] = _headers or {} 16431 _form_params: List[Tuple[str, str]] = [] 16432 _files: Dict[str, str] = {} 16433 _body_params: Optional[bytes] = None 16434 16435 # process the path parameters 16436 # process the query parameters 16437 if team_id is not None: 16438 16439 _query_params.append(("team_id", team_id)) 16440 16441 if project_id is not None: 16442 16443 _query_params.append(("project_id", project_id)) 16444 16445 if query is not None: 16446 16447 _query_params.append(("query", query)) 16448 16449 if owner is not None: 16450 16451 _query_params.append(("owner", owner)) 16452 16453 if limit is not None: 16454 16455 _query_params.append(("limit", limit)) 16456 16457 if offset is not None: 16458 16459 _query_params.append(("offset", offset)) 16460 16461 if sort is not None: 16462 16463 _query_params.append(("sort", sort)) 16464 16465 # process the header parameters 16466 # process the form parameters 16467 # process the body parameter 16468 16469 # set the HTTP header `Accept` 16470 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16471 16472 # authentication setting 16473 _auth_settings: List[str] = [] 16474 16475 return self.api_client.param_serialize( 16476 method="GET", 16477 resource_path="/v2/boards", 16478 path_params=_path_params, 16479 query_params=_query_params, 16480 header_params=_header_params, 16481 body=_body_params, 16482 post_params=_form_params, 16483 files=_files, 16484 auth_settings=_auth_settings, 16485 collection_formats=_collection_formats, 16486 _host=_host, 16487 _request_auth=_request_auth, 16488 ) 16489 16490 @validate_call 16491 def get_specific_board( 16492 self, 16493 board_id: Annotated[ 16494 StrictStr, Field(description="Unique identifier (ID) of the board that you want to retrieve.") 16495 ], 16496 _request_timeout: Union[ 16497 None, 16498 Annotated[StrictFloat, Field(gt=0)], 16499 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16500 ] = None, 16501 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16502 _content_type: Optional[StrictStr] = None, 16503 _headers: Optional[Dict[StrictStr, Any]] = None, 16504 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16505 ) -> BoardWithLinksAndLastOpened: 16506 """Get specific board 16507 16508 Retrieves information about a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 16509 16510 :param board_id: Unique identifier (ID) of the board that you want to retrieve. (required) 16511 :type board_id: str 16512 :param _request_timeout: timeout setting for this request. If one 16513 number provided, it will be total request 16514 timeout. It can also be a pair (tuple) of 16515 (connection, read) timeouts. 16516 :type _request_timeout: int, tuple(int, int), optional 16517 :param _request_auth: set to override the auth_settings for an a single 16518 request; this effectively ignores the 16519 authentication in the spec for a single request. 16520 :type _request_auth: dict, optional 16521 :param _content_type: force content-type for the request. 16522 :type _content_type: str, Optional 16523 :param _headers: set to override the headers for a single 16524 request; this effectively ignores the headers 16525 in the spec for a single request. 16526 :type _headers: dict, optional 16527 :param _host_index: set to override the host_index for a single 16528 request; this effectively ignores the host_index 16529 in the spec for a single request. 16530 :type _host_index: int, optional 16531 :return: Returns the result object. 16532 """ # noqa: E501 16533 16534 _param = self._get_specific_board_serialize( 16535 board_id=board_id, 16536 _request_auth=_request_auth, 16537 _content_type=_content_type, 16538 _headers=_headers, 16539 _host_index=_host_index, 16540 ) 16541 16542 _response_types_map: Dict[str, Optional[str]] = { 16543 "200": "BoardWithLinksAndLastOpened", 16544 "400": None, 16545 "404": None, 16546 "429": None, 16547 } 16548 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16549 response_data.read() 16550 return self.api_client.response_deserialize( 16551 response_data=response_data, 16552 response_types_map=_response_types_map, 16553 ).data 16554 16555 def _get_specific_board_serialize( 16556 self, 16557 board_id, 16558 _request_auth, 16559 _content_type, 16560 _headers, 16561 _host_index, 16562 ) -> RequestSerialized: 16563 16564 _host = None 16565 16566 _collection_formats: Dict[str, str] = {} 16567 16568 _path_params: Dict[str, str] = {} 16569 _query_params: List[Tuple[str, str]] = [] 16570 _header_params: Dict[str, Optional[str]] = _headers or {} 16571 _form_params: List[Tuple[str, str]] = [] 16572 _files: Dict[str, str] = {} 16573 _body_params: Optional[bytes] = None 16574 16575 # process the path parameters 16576 if board_id is not None: 16577 _path_params["board_id"] = board_id 16578 # process the query parameters 16579 # process the header parameters 16580 # process the form parameters 16581 # process the body parameter 16582 16583 # set the HTTP header `Accept` 16584 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16585 16586 # authentication setting 16587 _auth_settings: List[str] = [] 16588 16589 return self.api_client.param_serialize( 16590 method="GET", 16591 resource_path="/v2/boards/{board_id}", 16592 path_params=_path_params, 16593 query_params=_query_params, 16594 header_params=_header_params, 16595 body=_body_params, 16596 post_params=_form_params, 16597 files=_files, 16598 auth_settings=_auth_settings, 16599 collection_formats=_collection_formats, 16600 _host=_host, 16601 _request_auth=_request_auth, 16602 ) 16603 16604 @validate_call 16605 def update_board( 16606 self, 16607 board_id: Annotated[ 16608 StrictStr, Field(description="Unique identifier (ID) of the board that you want to update.") 16609 ], 16610 board_changes: BoardChanges, 16611 _request_timeout: Union[ 16612 None, 16613 Annotated[StrictFloat, Field(gt=0)], 16614 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16615 ] = None, 16616 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16617 _content_type: Optional[StrictStr] = None, 16618 _headers: Optional[Dict[StrictStr, Any]] = None, 16619 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16620 ) -> BoardWithLinks: 16621 """Update board 16622 16623 Updates a specific board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 16624 16625 :param board_id: Unique identifier (ID) of the board that you want to update. (required) 16626 :type board_id: str 16627 :param board_changes: (required) 16628 :type board_changes: BoardChanges 16629 :param _request_timeout: timeout setting for this request. If one 16630 number provided, it will be total request 16631 timeout. It can also be a pair (tuple) of 16632 (connection, read) timeouts. 16633 :type _request_timeout: int, tuple(int, int), optional 16634 :param _request_auth: set to override the auth_settings for an a single 16635 request; this effectively ignores the 16636 authentication in the spec for a single request. 16637 :type _request_auth: dict, optional 16638 :param _content_type: force content-type for the request. 16639 :type _content_type: str, Optional 16640 :param _headers: set to override the headers for a single 16641 request; this effectively ignores the headers 16642 in the spec for a single request. 16643 :type _headers: dict, optional 16644 :param _host_index: set to override the host_index for a single 16645 request; this effectively ignores the host_index 16646 in the spec for a single request. 16647 :type _host_index: int, optional 16648 :return: Returns the result object. 16649 """ # noqa: E501 16650 16651 _param = self._update_board_serialize( 16652 board_id=board_id, 16653 board_changes=board_changes, 16654 _request_auth=_request_auth, 16655 _content_type=_content_type, 16656 _headers=_headers, 16657 _host_index=_host_index, 16658 ) 16659 16660 _response_types_map: Dict[str, Optional[str]] = { 16661 "200": "BoardWithLinks", 16662 "202": None, 16663 "400": None, 16664 "404": None, 16665 "409": None, 16666 "429": None, 16667 } 16668 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16669 response_data.read() 16670 return self.api_client.response_deserialize( 16671 response_data=response_data, 16672 response_types_map=_response_types_map, 16673 ).data 16674 16675 def _update_board_serialize( 16676 self, 16677 board_id, 16678 board_changes, 16679 _request_auth, 16680 _content_type, 16681 _headers, 16682 _host_index, 16683 ) -> RequestSerialized: 16684 16685 _host = None 16686 16687 _collection_formats: Dict[str, str] = {} 16688 16689 _path_params: Dict[str, str] = {} 16690 _query_params: List[Tuple[str, str]] = [] 16691 _header_params: Dict[str, Optional[str]] = _headers or {} 16692 _form_params: List[Tuple[str, str]] = [] 16693 _files: Dict[str, str] = {} 16694 _body_params: Optional[bytes] = None 16695 16696 # process the path parameters 16697 if board_id is not None: 16698 _path_params["board_id"] = board_id 16699 # process the query parameters 16700 # process the header parameters 16701 # process the form parameters 16702 # process the body parameter 16703 if board_changes is not None: 16704 _body_params = board_changes 16705 16706 # set the HTTP header `Accept` 16707 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16708 16709 # set the HTTP header `Content-Type` 16710 if _content_type: 16711 _header_params["Content-Type"] = _content_type 16712 else: 16713 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16714 if _default_content_type is not None: 16715 _header_params["Content-Type"] = _default_content_type 16716 16717 # authentication setting 16718 _auth_settings: List[str] = [] 16719 16720 return self.api_client.param_serialize( 16721 method="PATCH", 16722 resource_path="/v2/boards/{board_id}", 16723 path_params=_path_params, 16724 query_params=_query_params, 16725 header_params=_header_params, 16726 body=_body_params, 16727 post_params=_form_params, 16728 files=_files, 16729 auth_settings=_auth_settings, 16730 collection_formats=_collection_formats, 16731 _host=_host, 16732 _request_auth=_request_auth, 16733 ) 16734 16735 @validate_call 16736 def create_card_item( 16737 self, 16738 board_id: Annotated[ 16739 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 16740 ], 16741 card_create_request: CardCreateRequest, 16742 _request_timeout: Union[ 16743 None, 16744 Annotated[StrictFloat, Field(gt=0)], 16745 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16746 ] = None, 16747 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16748 _content_type: Optional[StrictStr] = None, 16749 _headers: Optional[Dict[StrictStr, Any]] = None, 16750 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16751 ) -> CardItem: 16752 """Create card item 16753 16754 Adds a card item to a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 16755 16756 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 16757 :type board_id: str 16758 :param card_create_request: (required) 16759 :type card_create_request: CardCreateRequest 16760 :param _request_timeout: timeout setting for this request. If one 16761 number provided, it will be total request 16762 timeout. It can also be a pair (tuple) of 16763 (connection, read) timeouts. 16764 :type _request_timeout: int, tuple(int, int), optional 16765 :param _request_auth: set to override the auth_settings for an a single 16766 request; this effectively ignores the 16767 authentication in the spec for a single request. 16768 :type _request_auth: dict, optional 16769 :param _content_type: force content-type for the request. 16770 :type _content_type: str, Optional 16771 :param _headers: set to override the headers for a single 16772 request; this effectively ignores the headers 16773 in the spec for a single request. 16774 :type _headers: dict, optional 16775 :param _host_index: set to override the host_index for a single 16776 request; this effectively ignores the host_index 16777 in the spec for a single request. 16778 :type _host_index: int, optional 16779 :return: Returns the result object. 16780 """ # noqa: E501 16781 16782 _param = self._create_card_item_serialize( 16783 board_id=board_id, 16784 card_create_request=card_create_request, 16785 _request_auth=_request_auth, 16786 _content_type=_content_type, 16787 _headers=_headers, 16788 _host_index=_host_index, 16789 ) 16790 16791 _response_types_map: Dict[str, Optional[str]] = { 16792 "201": "CardItem", 16793 "400": None, 16794 "404": None, 16795 "429": None, 16796 } 16797 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16798 response_data.read() 16799 return self.api_client.response_deserialize( 16800 response_data=response_data, 16801 response_types_map=_response_types_map, 16802 ).data 16803 16804 def _create_card_item_serialize( 16805 self, 16806 board_id, 16807 card_create_request, 16808 _request_auth, 16809 _content_type, 16810 _headers, 16811 _host_index, 16812 ) -> RequestSerialized: 16813 16814 _host = None 16815 16816 _collection_formats: Dict[str, str] = {} 16817 16818 _path_params: Dict[str, str] = {} 16819 _query_params: List[Tuple[str, str]] = [] 16820 _header_params: Dict[str, Optional[str]] = _headers or {} 16821 _form_params: List[Tuple[str, str]] = [] 16822 _files: Dict[str, str] = {} 16823 _body_params: Optional[bytes] = None 16824 16825 # process the path parameters 16826 if board_id is not None: 16827 _path_params["board_id"] = board_id 16828 # process the query parameters 16829 # process the header parameters 16830 # process the form parameters 16831 # process the body parameter 16832 if card_create_request is not None: 16833 _body_params = card_create_request 16834 16835 # set the HTTP header `Accept` 16836 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16837 16838 # set the HTTP header `Content-Type` 16839 if _content_type: 16840 _header_params["Content-Type"] = _content_type 16841 else: 16842 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 16843 if _default_content_type is not None: 16844 _header_params["Content-Type"] = _default_content_type 16845 16846 # authentication setting 16847 _auth_settings: List[str] = [] 16848 16849 return self.api_client.param_serialize( 16850 method="POST", 16851 resource_path="/v2/boards/{board_id}/cards", 16852 path_params=_path_params, 16853 query_params=_query_params, 16854 header_params=_header_params, 16855 body=_body_params, 16856 post_params=_form_params, 16857 files=_files, 16858 auth_settings=_auth_settings, 16859 collection_formats=_collection_formats, 16860 _host=_host, 16861 _request_auth=_request_auth, 16862 ) 16863 16864 @validate_call 16865 def delete_card_item( 16866 self, 16867 board_id: Annotated[ 16868 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 16869 ], 16870 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 16871 _request_timeout: Union[ 16872 None, 16873 Annotated[StrictFloat, Field(gt=0)], 16874 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16875 ] = None, 16876 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16877 _content_type: Optional[StrictStr] = None, 16878 _headers: Optional[Dict[StrictStr, Any]] = None, 16879 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16880 ) -> object: 16881 """Delete card item 16882 16883 Deletes a card item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16884 16885 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 16886 :type board_id: str 16887 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 16888 :type item_id: str 16889 :param _request_timeout: timeout setting for this request. If one 16890 number provided, it will be total request 16891 timeout. It can also be a pair (tuple) of 16892 (connection, read) timeouts. 16893 :type _request_timeout: int, tuple(int, int), optional 16894 :param _request_auth: set to override the auth_settings for an a single 16895 request; this effectively ignores the 16896 authentication in the spec for a single request. 16897 :type _request_auth: dict, optional 16898 :param _content_type: force content-type for the request. 16899 :type _content_type: str, Optional 16900 :param _headers: set to override the headers for a single 16901 request; this effectively ignores the headers 16902 in the spec for a single request. 16903 :type _headers: dict, optional 16904 :param _host_index: set to override the host_index for a single 16905 request; this effectively ignores the host_index 16906 in the spec for a single request. 16907 :type _host_index: int, optional 16908 :return: Returns the result object. 16909 """ # noqa: E501 16910 16911 _param = self._delete_card_item_serialize( 16912 board_id=board_id, 16913 item_id=item_id, 16914 _request_auth=_request_auth, 16915 _content_type=_content_type, 16916 _headers=_headers, 16917 _host_index=_host_index, 16918 ) 16919 16920 _response_types_map: Dict[str, Optional[str]] = { 16921 "204": "object", 16922 "400": None, 16923 "404": None, 16924 "429": None, 16925 } 16926 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16927 response_data.read() 16928 return self.api_client.response_deserialize( 16929 response_data=response_data, 16930 response_types_map=_response_types_map, 16931 ).data 16932 16933 def _delete_card_item_serialize( 16934 self, 16935 board_id, 16936 item_id, 16937 _request_auth, 16938 _content_type, 16939 _headers, 16940 _host_index, 16941 ) -> RequestSerialized: 16942 16943 _host = None 16944 16945 _collection_formats: Dict[str, str] = {} 16946 16947 _path_params: Dict[str, str] = {} 16948 _query_params: List[Tuple[str, str]] = [] 16949 _header_params: Dict[str, Optional[str]] = _headers or {} 16950 _form_params: List[Tuple[str, str]] = [] 16951 _files: Dict[str, str] = {} 16952 _body_params: Optional[bytes] = None 16953 16954 # process the path parameters 16955 if board_id is not None: 16956 _path_params["board_id"] = board_id 16957 if item_id is not None: 16958 _path_params["item_id"] = item_id 16959 # process the query parameters 16960 # process the header parameters 16961 # process the form parameters 16962 # process the body parameter 16963 16964 # set the HTTP header `Accept` 16965 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 16966 16967 # authentication setting 16968 _auth_settings: List[str] = [] 16969 16970 return self.api_client.param_serialize( 16971 method="DELETE", 16972 resource_path="/v2/boards/{board_id}/cards/{item_id}", 16973 path_params=_path_params, 16974 query_params=_query_params, 16975 header_params=_header_params, 16976 body=_body_params, 16977 post_params=_form_params, 16978 files=_files, 16979 auth_settings=_auth_settings, 16980 collection_formats=_collection_formats, 16981 _host=_host, 16982 _request_auth=_request_auth, 16983 ) 16984 16985 @validate_call 16986 def get_card_item( 16987 self, 16988 board_id: Annotated[ 16989 StrictStr, 16990 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 16991 ], 16992 item_id: Annotated[ 16993 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 16994 ], 16995 _request_timeout: Union[ 16996 None, 16997 Annotated[StrictFloat, Field(gt=0)], 16998 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16999 ] = None, 17000 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17001 _content_type: Optional[StrictStr] = None, 17002 _headers: Optional[Dict[StrictStr, Any]] = None, 17003 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17004 ) -> CardItem: 17005 """Get card item 17006 17007 Retrieves information for a specific card item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 17008 17009 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 17010 :type board_id: str 17011 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 17012 :type item_id: str 17013 :param _request_timeout: timeout setting for this request. If one 17014 number provided, it will be total request 17015 timeout. It can also be a pair (tuple) of 17016 (connection, read) timeouts. 17017 :type _request_timeout: int, tuple(int, int), optional 17018 :param _request_auth: set to override the auth_settings for an a single 17019 request; this effectively ignores the 17020 authentication in the spec for a single request. 17021 :type _request_auth: dict, optional 17022 :param _content_type: force content-type for the request. 17023 :type _content_type: str, Optional 17024 :param _headers: set to override the headers for a single 17025 request; this effectively ignores the headers 17026 in the spec for a single request. 17027 :type _headers: dict, optional 17028 :param _host_index: set to override the host_index for a single 17029 request; this effectively ignores the host_index 17030 in the spec for a single request. 17031 :type _host_index: int, optional 17032 :return: Returns the result object. 17033 """ # noqa: E501 17034 17035 _param = self._get_card_item_serialize( 17036 board_id=board_id, 17037 item_id=item_id, 17038 _request_auth=_request_auth, 17039 _content_type=_content_type, 17040 _headers=_headers, 17041 _host_index=_host_index, 17042 ) 17043 17044 _response_types_map: Dict[str, Optional[str]] = { 17045 "200": "CardItem", 17046 "400": None, 17047 "404": None, 17048 "429": None, 17049 } 17050 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17051 response_data.read() 17052 return self.api_client.response_deserialize( 17053 response_data=response_data, 17054 response_types_map=_response_types_map, 17055 ).data 17056 17057 def _get_card_item_serialize( 17058 self, 17059 board_id, 17060 item_id, 17061 _request_auth, 17062 _content_type, 17063 _headers, 17064 _host_index, 17065 ) -> RequestSerialized: 17066 17067 _host = None 17068 17069 _collection_formats: Dict[str, str] = {} 17070 17071 _path_params: Dict[str, str] = {} 17072 _query_params: List[Tuple[str, str]] = [] 17073 _header_params: Dict[str, Optional[str]] = _headers or {} 17074 _form_params: List[Tuple[str, str]] = [] 17075 _files: Dict[str, str] = {} 17076 _body_params: Optional[bytes] = None 17077 17078 # process the path parameters 17079 if board_id is not None: 17080 _path_params["board_id"] = board_id 17081 if item_id is not None: 17082 _path_params["item_id"] = item_id 17083 # process the query parameters 17084 # process the header parameters 17085 # process the form parameters 17086 # process the body parameter 17087 17088 # set the HTTP header `Accept` 17089 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17090 17091 # authentication setting 17092 _auth_settings: List[str] = [] 17093 17094 return self.api_client.param_serialize( 17095 method="GET", 17096 resource_path="/v2/boards/{board_id}/cards/{item_id}", 17097 path_params=_path_params, 17098 query_params=_query_params, 17099 header_params=_header_params, 17100 body=_body_params, 17101 post_params=_form_params, 17102 files=_files, 17103 auth_settings=_auth_settings, 17104 collection_formats=_collection_formats, 17105 _host=_host, 17106 _request_auth=_request_auth, 17107 ) 17108 17109 @validate_call 17110 def update_card_item( 17111 self, 17112 board_id: Annotated[ 17113 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 17114 ], 17115 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 17116 card_update_request: CardUpdateRequest, 17117 _request_timeout: Union[ 17118 None, 17119 Annotated[StrictFloat, Field(gt=0)], 17120 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17121 ] = None, 17122 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17123 _content_type: Optional[StrictStr] = None, 17124 _headers: Optional[Dict[StrictStr, Any]] = None, 17125 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17126 ) -> CardItem: 17127 """Update card item 17128 17129 Updates a card item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17130 17131 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 17132 :type board_id: str 17133 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 17134 :type item_id: str 17135 :param card_update_request: (required) 17136 :type card_update_request: CardUpdateRequest 17137 :param _request_timeout: timeout setting for this request. If one 17138 number provided, it will be total request 17139 timeout. It can also be a pair (tuple) of 17140 (connection, read) timeouts. 17141 :type _request_timeout: int, tuple(int, int), optional 17142 :param _request_auth: set to override the auth_settings for an a single 17143 request; this effectively ignores the 17144 authentication in the spec for a single request. 17145 :type _request_auth: dict, optional 17146 :param _content_type: force content-type for the request. 17147 :type _content_type: str, Optional 17148 :param _headers: set to override the headers for a single 17149 request; this effectively ignores the headers 17150 in the spec for a single request. 17151 :type _headers: dict, optional 17152 :param _host_index: set to override the host_index for a single 17153 request; this effectively ignores the host_index 17154 in the spec for a single request. 17155 :type _host_index: int, optional 17156 :return: Returns the result object. 17157 """ # noqa: E501 17158 17159 _param = self._update_card_item_serialize( 17160 board_id=board_id, 17161 item_id=item_id, 17162 card_update_request=card_update_request, 17163 _request_auth=_request_auth, 17164 _content_type=_content_type, 17165 _headers=_headers, 17166 _host_index=_host_index, 17167 ) 17168 17169 _response_types_map: Dict[str, Optional[str]] = { 17170 "200": "CardItem", 17171 "400": None, 17172 "404": None, 17173 "409": None, 17174 "429": None, 17175 } 17176 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17177 response_data.read() 17178 return self.api_client.response_deserialize( 17179 response_data=response_data, 17180 response_types_map=_response_types_map, 17181 ).data 17182 17183 def _update_card_item_serialize( 17184 self, 17185 board_id, 17186 item_id, 17187 card_update_request, 17188 _request_auth, 17189 _content_type, 17190 _headers, 17191 _host_index, 17192 ) -> RequestSerialized: 17193 17194 _host = None 17195 17196 _collection_formats: Dict[str, str] = {} 17197 17198 _path_params: Dict[str, str] = {} 17199 _query_params: List[Tuple[str, str]] = [] 17200 _header_params: Dict[str, Optional[str]] = _headers or {} 17201 _form_params: List[Tuple[str, str]] = [] 17202 _files: Dict[str, str] = {} 17203 _body_params: Optional[bytes] = None 17204 17205 # process the path parameters 17206 if board_id is not None: 17207 _path_params["board_id"] = board_id 17208 if item_id is not None: 17209 _path_params["item_id"] = item_id 17210 # process the query parameters 17211 # process the header parameters 17212 # process the form parameters 17213 # process the body parameter 17214 if card_update_request is not None: 17215 _body_params = card_update_request 17216 17217 # set the HTTP header `Accept` 17218 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17219 17220 # set the HTTP header `Content-Type` 17221 if _content_type: 17222 _header_params["Content-Type"] = _content_type 17223 else: 17224 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 17225 if _default_content_type is not None: 17226 _header_params["Content-Type"] = _default_content_type 17227 17228 # authentication setting 17229 _auth_settings: List[str] = [] 17230 17231 return self.api_client.param_serialize( 17232 method="PATCH", 17233 resource_path="/v2/boards/{board_id}/cards/{item_id}", 17234 path_params=_path_params, 17235 query_params=_query_params, 17236 header_params=_header_params, 17237 body=_body_params, 17238 post_params=_form_params, 17239 files=_files, 17240 auth_settings=_auth_settings, 17241 collection_formats=_collection_formats, 17242 _host=_host, 17243 _request_auth=_request_auth, 17244 ) 17245 17246 @validate_call 17247 def create_connector( 17248 self, 17249 board_id: Annotated[ 17250 StrictStr, 17251 Field(description="Unique identifier (ID) of the board for which you want to create the connector."), 17252 ], 17253 connector_creation_data: ConnectorCreationData, 17254 _request_timeout: Union[ 17255 None, 17256 Annotated[StrictFloat, Field(gt=0)], 17257 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17258 ] = None, 17259 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17260 _content_type: Optional[StrictStr] = None, 17261 _headers: Optional[Dict[StrictStr, Any]] = None, 17262 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17263 ) -> ConnectorWithLinks: 17264 """Create connector 17265 17266 Adds a connector to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17267 17268 :param board_id: Unique identifier (ID) of the board for which you want to create the connector. (required) 17269 :type board_id: str 17270 :param connector_creation_data: (required) 17271 :type connector_creation_data: ConnectorCreationData 17272 :param _request_timeout: timeout setting for this request. If one 17273 number provided, it will be total request 17274 timeout. It can also be a pair (tuple) of 17275 (connection, read) timeouts. 17276 :type _request_timeout: int, tuple(int, int), optional 17277 :param _request_auth: set to override the auth_settings for an a single 17278 request; this effectively ignores the 17279 authentication in the spec for a single request. 17280 :type _request_auth: dict, optional 17281 :param _content_type: force content-type for the request. 17282 :type _content_type: str, Optional 17283 :param _headers: set to override the headers for a single 17284 request; this effectively ignores the headers 17285 in the spec for a single request. 17286 :type _headers: dict, optional 17287 :param _host_index: set to override the host_index for a single 17288 request; this effectively ignores the host_index 17289 in the spec for a single request. 17290 :type _host_index: int, optional 17291 :return: Returns the result object. 17292 """ # noqa: E501 17293 17294 _param = self._create_connector_serialize( 17295 board_id=board_id, 17296 connector_creation_data=connector_creation_data, 17297 _request_auth=_request_auth, 17298 _content_type=_content_type, 17299 _headers=_headers, 17300 _host_index=_host_index, 17301 ) 17302 17303 _response_types_map: Dict[str, Optional[str]] = { 17304 "200": "ConnectorWithLinks", 17305 "400": None, 17306 "404": None, 17307 "429": None, 17308 } 17309 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17310 response_data.read() 17311 return self.api_client.response_deserialize( 17312 response_data=response_data, 17313 response_types_map=_response_types_map, 17314 ).data 17315 17316 def _create_connector_serialize( 17317 self, 17318 board_id, 17319 connector_creation_data, 17320 _request_auth, 17321 _content_type, 17322 _headers, 17323 _host_index, 17324 ) -> RequestSerialized: 17325 17326 _host = None 17327 17328 _collection_formats: Dict[str, str] = {} 17329 17330 _path_params: Dict[str, str] = {} 17331 _query_params: List[Tuple[str, str]] = [] 17332 _header_params: Dict[str, Optional[str]] = _headers or {} 17333 _form_params: List[Tuple[str, str]] = [] 17334 _files: Dict[str, str] = {} 17335 _body_params: Optional[bytes] = None 17336 17337 # process the path parameters 17338 if board_id is not None: 17339 _path_params["board_id"] = board_id 17340 # process the query parameters 17341 # process the header parameters 17342 # process the form parameters 17343 # process the body parameter 17344 if connector_creation_data is not None: 17345 _body_params = connector_creation_data 17346 17347 # set the HTTP header `Accept` 17348 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17349 17350 # set the HTTP header `Content-Type` 17351 if _content_type: 17352 _header_params["Content-Type"] = _content_type 17353 else: 17354 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 17355 if _default_content_type is not None: 17356 _header_params["Content-Type"] = _default_content_type 17357 17358 # authentication setting 17359 _auth_settings: List[str] = [] 17360 17361 return self.api_client.param_serialize( 17362 method="POST", 17363 resource_path="/v2/boards/{board_id}/connectors", 17364 path_params=_path_params, 17365 query_params=_query_params, 17366 header_params=_header_params, 17367 body=_body_params, 17368 post_params=_form_params, 17369 files=_files, 17370 auth_settings=_auth_settings, 17371 collection_formats=_collection_formats, 17372 _host=_host, 17373 _request_auth=_request_auth, 17374 ) 17375 17376 @validate_call 17377 def delete_connector( 17378 self, 17379 board_id: Annotated[ 17380 StrictStr, 17381 Field(description="Unique identifier (ID) of the board from which you want to delete the connector."), 17382 ], 17383 connector_id: Annotated[ 17384 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to delete.") 17385 ], 17386 _request_timeout: Union[ 17387 None, 17388 Annotated[StrictFloat, Field(gt=0)], 17389 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17390 ] = None, 17391 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17392 _content_type: Optional[StrictStr] = None, 17393 _headers: Optional[Dict[StrictStr, Any]] = None, 17394 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17395 ) -> object: 17396 """Delete connector 17397 17398 Deletes the specified connector from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 17399 17400 :param board_id: Unique identifier (ID) of the board from which you want to delete the connector. (required) 17401 :type board_id: str 17402 :param connector_id: Unique identifier (ID) of the connector that you want to delete. (required) 17403 :type connector_id: str 17404 :param _request_timeout: timeout setting for this request. If one 17405 number provided, it will be total request 17406 timeout. It can also be a pair (tuple) of 17407 (connection, read) timeouts. 17408 :type _request_timeout: int, tuple(int, int), optional 17409 :param _request_auth: set to override the auth_settings for an a single 17410 request; this effectively ignores the 17411 authentication in the spec for a single request. 17412 :type _request_auth: dict, optional 17413 :param _content_type: force content-type for the request. 17414 :type _content_type: str, Optional 17415 :param _headers: set to override the headers for a single 17416 request; this effectively ignores the headers 17417 in the spec for a single request. 17418 :type _headers: dict, optional 17419 :param _host_index: set to override the host_index for a single 17420 request; this effectively ignores the host_index 17421 in the spec for a single request. 17422 :type _host_index: int, optional 17423 :return: Returns the result object. 17424 """ # noqa: E501 17425 17426 _param = self._delete_connector_serialize( 17427 board_id=board_id, 17428 connector_id=connector_id, 17429 _request_auth=_request_auth, 17430 _content_type=_content_type, 17431 _headers=_headers, 17432 _host_index=_host_index, 17433 ) 17434 17435 _response_types_map: Dict[str, Optional[str]] = { 17436 "204": "object", 17437 "400": None, 17438 "404": None, 17439 "429": None, 17440 } 17441 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17442 response_data.read() 17443 return self.api_client.response_deserialize( 17444 response_data=response_data, 17445 response_types_map=_response_types_map, 17446 ).data 17447 17448 def _delete_connector_serialize( 17449 self, 17450 board_id, 17451 connector_id, 17452 _request_auth, 17453 _content_type, 17454 _headers, 17455 _host_index, 17456 ) -> RequestSerialized: 17457 17458 _host = None 17459 17460 _collection_formats: Dict[str, str] = {} 17461 17462 _path_params: Dict[str, str] = {} 17463 _query_params: List[Tuple[str, str]] = [] 17464 _header_params: Dict[str, Optional[str]] = _headers or {} 17465 _form_params: List[Tuple[str, str]] = [] 17466 _files: Dict[str, str] = {} 17467 _body_params: Optional[bytes] = None 17468 17469 # process the path parameters 17470 if board_id is not None: 17471 _path_params["board_id"] = board_id 17472 if connector_id is not None: 17473 _path_params["connector_id"] = connector_id 17474 # process the query parameters 17475 # process the header parameters 17476 # process the form parameters 17477 # process the body parameter 17478 17479 # set the HTTP header `Accept` 17480 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17481 17482 # authentication setting 17483 _auth_settings: List[str] = [] 17484 17485 return self.api_client.param_serialize( 17486 method="DELETE", 17487 resource_path="/v2/boards/{board_id}/connectors/{connector_id}", 17488 path_params=_path_params, 17489 query_params=_query_params, 17490 header_params=_header_params, 17491 body=_body_params, 17492 post_params=_form_params, 17493 files=_files, 17494 auth_settings=_auth_settings, 17495 collection_formats=_collection_formats, 17496 _host=_host, 17497 _request_auth=_request_auth, 17498 ) 17499 17500 @validate_call 17501 def get_connector( 17502 self, 17503 board_id: Annotated[ 17504 StrictStr, 17505 Field( 17506 description="Unique identifier (ID) of the board from which you want to retrieve a specific connector." 17507 ), 17508 ], 17509 connector_id: Annotated[ 17510 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to retrieve.") 17511 ], 17512 _request_timeout: Union[ 17513 None, 17514 Annotated[StrictFloat, Field(gt=0)], 17515 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17516 ] = None, 17517 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17518 _content_type: Optional[StrictStr] = None, 17519 _headers: Optional[Dict[StrictStr, Any]] = None, 17520 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17521 ) -> ConnectorWithLinks: 17522 """Get specific connector 17523 17524 Retrieves information for a specific connector on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 17525 17526 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific connector. (required) 17527 :type board_id: str 17528 :param connector_id: Unique identifier (ID) of the connector that you want to retrieve. (required) 17529 :type connector_id: str 17530 :param _request_timeout: timeout setting for this request. If one 17531 number provided, it will be total request 17532 timeout. It can also be a pair (tuple) of 17533 (connection, read) timeouts. 17534 :type _request_timeout: int, tuple(int, int), optional 17535 :param _request_auth: set to override the auth_settings for an a single 17536 request; this effectively ignores the 17537 authentication in the spec for a single request. 17538 :type _request_auth: dict, optional 17539 :param _content_type: force content-type for the request. 17540 :type _content_type: str, Optional 17541 :param _headers: set to override the headers for a single 17542 request; this effectively ignores the headers 17543 in the spec for a single request. 17544 :type _headers: dict, optional 17545 :param _host_index: set to override the host_index for a single 17546 request; this effectively ignores the host_index 17547 in the spec for a single request. 17548 :type _host_index: int, optional 17549 :return: Returns the result object. 17550 """ # noqa: E501 17551 17552 _param = self._get_connector_serialize( 17553 board_id=board_id, 17554 connector_id=connector_id, 17555 _request_auth=_request_auth, 17556 _content_type=_content_type, 17557 _headers=_headers, 17558 _host_index=_host_index, 17559 ) 17560 17561 _response_types_map: Dict[str, Optional[str]] = { 17562 "200": "ConnectorWithLinks", 17563 "400": None, 17564 "404": None, 17565 "429": None, 17566 } 17567 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17568 response_data.read() 17569 return self.api_client.response_deserialize( 17570 response_data=response_data, 17571 response_types_map=_response_types_map, 17572 ).data 17573 17574 def _get_connector_serialize( 17575 self, 17576 board_id, 17577 connector_id, 17578 _request_auth, 17579 _content_type, 17580 _headers, 17581 _host_index, 17582 ) -> RequestSerialized: 17583 17584 _host = None 17585 17586 _collection_formats: Dict[str, str] = {} 17587 17588 _path_params: Dict[str, str] = {} 17589 _query_params: List[Tuple[str, str]] = [] 17590 _header_params: Dict[str, Optional[str]] = _headers or {} 17591 _form_params: List[Tuple[str, str]] = [] 17592 _files: Dict[str, str] = {} 17593 _body_params: Optional[bytes] = None 17594 17595 # process the path parameters 17596 if board_id is not None: 17597 _path_params["board_id"] = board_id 17598 if connector_id is not None: 17599 _path_params["connector_id"] = connector_id 17600 # process the query parameters 17601 # process the header parameters 17602 # process the form parameters 17603 # process the body parameter 17604 17605 # set the HTTP header `Accept` 17606 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17607 17608 # authentication setting 17609 _auth_settings: List[str] = [] 17610 17611 return self.api_client.param_serialize( 17612 method="GET", 17613 resource_path="/v2/boards/{board_id}/connectors/{connector_id}", 17614 path_params=_path_params, 17615 query_params=_query_params, 17616 header_params=_header_params, 17617 body=_body_params, 17618 post_params=_form_params, 17619 files=_files, 17620 auth_settings=_auth_settings, 17621 collection_formats=_collection_formats, 17622 _host=_host, 17623 _request_auth=_request_auth, 17624 ) 17625 17626 @validate_call 17627 def get_connectors( 17628 self, 17629 board_id: Annotated[ 17630 StrictStr, 17631 Field( 17632 description="Unique identifier (ID) of the board from which you want to retrieve a list of connectors." 17633 ), 17634 ], 17635 limit: Optional[Annotated[str, Field(strict=True)]] = None, 17636 cursor: Optional[StrictStr] = None, 17637 _request_timeout: Union[ 17638 None, 17639 Annotated[StrictFloat, Field(gt=0)], 17640 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17641 ] = None, 17642 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17643 _content_type: Optional[StrictStr] = None, 17644 _headers: Optional[Dict[StrictStr, Any]] = None, 17645 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17646 ) -> ConnectorsCursorPaged: 17647 """Get connectors 17648 17649 Retrieves a list of connectors for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17650 17651 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a list of connectors. (required) 17652 :type board_id: str 17653 :param limit: 17654 :type limit: str 17655 :param cursor: 17656 :type cursor: str 17657 :param _request_timeout: timeout setting for this request. If one 17658 number provided, it will be total request 17659 timeout. It can also be a pair (tuple) of 17660 (connection, read) timeouts. 17661 :type _request_timeout: int, tuple(int, int), optional 17662 :param _request_auth: set to override the auth_settings for an a single 17663 request; this effectively ignores the 17664 authentication in the spec for a single request. 17665 :type _request_auth: dict, optional 17666 :param _content_type: force content-type for the request. 17667 :type _content_type: str, Optional 17668 :param _headers: set to override the headers for a single 17669 request; this effectively ignores the headers 17670 in the spec for a single request. 17671 :type _headers: dict, optional 17672 :param _host_index: set to override the host_index for a single 17673 request; this effectively ignores the host_index 17674 in the spec for a single request. 17675 :type _host_index: int, optional 17676 :return: Returns the result object. 17677 """ # noqa: E501 17678 17679 _param = self._get_connectors_serialize( 17680 board_id=board_id, 17681 limit=limit, 17682 cursor=cursor, 17683 _request_auth=_request_auth, 17684 _content_type=_content_type, 17685 _headers=_headers, 17686 _host_index=_host_index, 17687 ) 17688 17689 _response_types_map: Dict[str, Optional[str]] = { 17690 "200": "ConnectorsCursorPaged", 17691 "400": None, 17692 "404": None, 17693 "429": None, 17694 } 17695 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17696 response_data.read() 17697 return self.api_client.response_deserialize( 17698 response_data=response_data, 17699 response_types_map=_response_types_map, 17700 ).data 17701 17702 def _get_connectors_serialize( 17703 self, 17704 board_id, 17705 limit, 17706 cursor, 17707 _request_auth, 17708 _content_type, 17709 _headers, 17710 _host_index, 17711 ) -> RequestSerialized: 17712 17713 _host = None 17714 17715 _collection_formats: Dict[str, str] = {} 17716 17717 _path_params: Dict[str, str] = {} 17718 _query_params: List[Tuple[str, str]] = [] 17719 _header_params: Dict[str, Optional[str]] = _headers or {} 17720 _form_params: List[Tuple[str, str]] = [] 17721 _files: Dict[str, str] = {} 17722 _body_params: Optional[bytes] = None 17723 17724 # process the path parameters 17725 if board_id is not None: 17726 _path_params["board_id"] = board_id 17727 # process the query parameters 17728 if limit is not None: 17729 17730 _query_params.append(("limit", limit)) 17731 17732 if cursor is not None: 17733 17734 _query_params.append(("cursor", cursor)) 17735 17736 # process the header parameters 17737 # process the form parameters 17738 # process the body parameter 17739 17740 # set the HTTP header `Accept` 17741 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17742 17743 # authentication setting 17744 _auth_settings: List[str] = [] 17745 17746 return self.api_client.param_serialize( 17747 method="GET", 17748 resource_path="/v2/boards/{board_id}/connectors", 17749 path_params=_path_params, 17750 query_params=_query_params, 17751 header_params=_header_params, 17752 body=_body_params, 17753 post_params=_form_params, 17754 files=_files, 17755 auth_settings=_auth_settings, 17756 collection_formats=_collection_formats, 17757 _host=_host, 17758 _request_auth=_request_auth, 17759 ) 17760 17761 @validate_call 17762 def update_connector( 17763 self, 17764 board_id: Annotated[ 17765 StrictStr, 17766 Field(description="Unique identifier (ID) of the board for which you want to update the connector."), 17767 ], 17768 connector_id: Annotated[ 17769 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to update.") 17770 ], 17771 connector_changes_data: ConnectorChangesData, 17772 _request_timeout: Union[ 17773 None, 17774 Annotated[StrictFloat, Field(gt=0)], 17775 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17776 ] = None, 17777 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17778 _content_type: Optional[StrictStr] = None, 17779 _headers: Optional[Dict[StrictStr, Any]] = None, 17780 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17781 ) -> ConnectorWithLinks: 17782 """Update connector 17783 17784 Updates a connector on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17785 17786 :param board_id: Unique identifier (ID) of the board for which you want to update the connector. (required) 17787 :type board_id: str 17788 :param connector_id: Unique identifier (ID) of the connector that you want to update. (required) 17789 :type connector_id: str 17790 :param connector_changes_data: (required) 17791 :type connector_changes_data: ConnectorChangesData 17792 :param _request_timeout: timeout setting for this request. If one 17793 number provided, it will be total request 17794 timeout. It can also be a pair (tuple) of 17795 (connection, read) timeouts. 17796 :type _request_timeout: int, tuple(int, int), optional 17797 :param _request_auth: set to override the auth_settings for an a single 17798 request; this effectively ignores the 17799 authentication in the spec for a single request. 17800 :type _request_auth: dict, optional 17801 :param _content_type: force content-type for the request. 17802 :type _content_type: str, Optional 17803 :param _headers: set to override the headers for a single 17804 request; this effectively ignores the headers 17805 in the spec for a single request. 17806 :type _headers: dict, optional 17807 :param _host_index: set to override the host_index for a single 17808 request; this effectively ignores the host_index 17809 in the spec for a single request. 17810 :type _host_index: int, optional 17811 :return: Returns the result object. 17812 """ # noqa: E501 17813 17814 _param = self._update_connector_serialize( 17815 board_id=board_id, 17816 connector_id=connector_id, 17817 connector_changes_data=connector_changes_data, 17818 _request_auth=_request_auth, 17819 _content_type=_content_type, 17820 _headers=_headers, 17821 _host_index=_host_index, 17822 ) 17823 17824 _response_types_map: Dict[str, Optional[str]] = { 17825 "200": "ConnectorWithLinks", 17826 "400": None, 17827 "404": None, 17828 "409": None, 17829 "429": None, 17830 } 17831 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17832 response_data.read() 17833 return self.api_client.response_deserialize( 17834 response_data=response_data, 17835 response_types_map=_response_types_map, 17836 ).data 17837 17838 def _update_connector_serialize( 17839 self, 17840 board_id, 17841 connector_id, 17842 connector_changes_data, 17843 _request_auth, 17844 _content_type, 17845 _headers, 17846 _host_index, 17847 ) -> RequestSerialized: 17848 17849 _host = None 17850 17851 _collection_formats: Dict[str, str] = {} 17852 17853 _path_params: Dict[str, str] = {} 17854 _query_params: List[Tuple[str, str]] = [] 17855 _header_params: Dict[str, Optional[str]] = _headers or {} 17856 _form_params: List[Tuple[str, str]] = [] 17857 _files: Dict[str, str] = {} 17858 _body_params: Optional[bytes] = None 17859 17860 # process the path parameters 17861 if board_id is not None: 17862 _path_params["board_id"] = board_id 17863 if connector_id is not None: 17864 _path_params["connector_id"] = connector_id 17865 # process the query parameters 17866 # process the header parameters 17867 # process the form parameters 17868 # process the body parameter 17869 if connector_changes_data is not None: 17870 _body_params = connector_changes_data 17871 17872 # set the HTTP header `Accept` 17873 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 17874 17875 # set the HTTP header `Content-Type` 17876 if _content_type: 17877 _header_params["Content-Type"] = _content_type 17878 else: 17879 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 17880 if _default_content_type is not None: 17881 _header_params["Content-Type"] = _default_content_type 17882 17883 # authentication setting 17884 _auth_settings: List[str] = [] 17885 17886 return self.api_client.param_serialize( 17887 method="PATCH", 17888 resource_path="/v2/boards/{board_id}/connectors/{connector_id}", 17889 path_params=_path_params, 17890 query_params=_query_params, 17891 header_params=_header_params, 17892 body=_body_params, 17893 post_params=_form_params, 17894 files=_files, 17895 auth_settings=_auth_settings, 17896 collection_formats=_collection_formats, 17897 _host=_host, 17898 _request_auth=_request_auth, 17899 ) 17900 17901 @validate_call 17902 def create_doc_format_item( 17903 self, 17904 board_id: Annotated[ 17905 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 17906 ], 17907 doc_format_create_request: DocFormatCreateRequest, 17908 _request_timeout: Union[ 17909 None, 17910 Annotated[StrictFloat, Field(gt=0)], 17911 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17912 ] = None, 17913 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17914 _content_type: Optional[StrictStr] = None, 17915 _headers: Optional[Dict[StrictStr, Any]] = None, 17916 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17917 ) -> DocFormatItem: 17918 """Create doc format item 17919 17920 Adds a doc format item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17921 17922 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 17923 :type board_id: str 17924 :param doc_format_create_request: (required) 17925 :type doc_format_create_request: DocFormatCreateRequest 17926 :param _request_timeout: timeout setting for this request. If one 17927 number provided, it will be total request 17928 timeout. It can also be a pair (tuple) of 17929 (connection, read) timeouts. 17930 :type _request_timeout: int, tuple(int, int), optional 17931 :param _request_auth: set to override the auth_settings for an a single 17932 request; this effectively ignores the 17933 authentication in the spec for a single request. 17934 :type _request_auth: dict, optional 17935 :param _content_type: force content-type for the request. 17936 :type _content_type: str, Optional 17937 :param _headers: set to override the headers for a single 17938 request; this effectively ignores the headers 17939 in the spec for a single request. 17940 :type _headers: dict, optional 17941 :param _host_index: set to override the host_index for a single 17942 request; this effectively ignores the host_index 17943 in the spec for a single request. 17944 :type _host_index: int, optional 17945 :return: Returns the result object. 17946 """ # noqa: E501 17947 17948 _param = self._create_doc_format_item_serialize( 17949 board_id=board_id, 17950 doc_format_create_request=doc_format_create_request, 17951 _request_auth=_request_auth, 17952 _content_type=_content_type, 17953 _headers=_headers, 17954 _host_index=_host_index, 17955 ) 17956 17957 _response_types_map: Dict[str, Optional[str]] = { 17958 "201": "DocFormatItem", 17959 "400": None, 17960 "404": None, 17961 "429": None, 17962 } 17963 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17964 response_data.read() 17965 return self.api_client.response_deserialize( 17966 response_data=response_data, 17967 response_types_map=_response_types_map, 17968 ).data 17969 17970 def _create_doc_format_item_serialize( 17971 self, 17972 board_id, 17973 doc_format_create_request, 17974 _request_auth, 17975 _content_type, 17976 _headers, 17977 _host_index, 17978 ) -> RequestSerialized: 17979 17980 _host = None 17981 17982 _collection_formats: Dict[str, str] = {} 17983 17984 _path_params: Dict[str, str] = {} 17985 _query_params: List[Tuple[str, str]] = [] 17986 _header_params: Dict[str, Optional[str]] = _headers or {} 17987 _form_params: List[Tuple[str, str]] = [] 17988 _files: Dict[str, str] = {} 17989 _body_params: Optional[bytes] = None 17990 17991 # process the path parameters 17992 if board_id is not None: 17993 _path_params["board_id"] = board_id 17994 # process the query parameters 17995 # process the header parameters 17996 # process the form parameters 17997 # process the body parameter 17998 if doc_format_create_request is not None: 17999 _body_params = doc_format_create_request 18000 18001 # set the HTTP header `Accept` 18002 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18003 18004 # set the HTTP header `Content-Type` 18005 if _content_type: 18006 _header_params["Content-Type"] = _content_type 18007 else: 18008 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 18009 if _default_content_type is not None: 18010 _header_params["Content-Type"] = _default_content_type 18011 18012 # authentication setting 18013 _auth_settings: List[str] = [] 18014 18015 return self.api_client.param_serialize( 18016 method="POST", 18017 resource_path="/v2/boards/{board_id}/docs", 18018 path_params=_path_params, 18019 query_params=_query_params, 18020 header_params=_header_params, 18021 body=_body_params, 18022 post_params=_form_params, 18023 files=_files, 18024 auth_settings=_auth_settings, 18025 collection_formats=_collection_formats, 18026 _host=_host, 18027 _request_auth=_request_auth, 18028 ) 18029 18030 @validate_call 18031 def delete_doc_format_item( 18032 self, 18033 board_id: Annotated[ 18034 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 18035 ], 18036 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 18037 _request_timeout: Union[ 18038 None, 18039 Annotated[StrictFloat, Field(gt=0)], 18040 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18041 ] = None, 18042 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18043 _content_type: Optional[StrictStr] = None, 18044 _headers: Optional[Dict[StrictStr, Any]] = None, 18045 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18046 ) -> object: 18047 """Delete doc format item 18048 18049 Deletes a doc format item from the board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 18050 18051 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 18052 :type board_id: str 18053 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 18054 :type item_id: str 18055 :param _request_timeout: timeout setting for this request. If one 18056 number provided, it will be total request 18057 timeout. It can also be a pair (tuple) of 18058 (connection, read) timeouts. 18059 :type _request_timeout: int, tuple(int, int), optional 18060 :param _request_auth: set to override the auth_settings for an a single 18061 request; this effectively ignores the 18062 authentication in the spec for a single request. 18063 :type _request_auth: dict, optional 18064 :param _content_type: force content-type for the request. 18065 :type _content_type: str, Optional 18066 :param _headers: set to override the headers for a single 18067 request; this effectively ignores the headers 18068 in the spec for a single request. 18069 :type _headers: dict, optional 18070 :param _host_index: set to override the host_index for a single 18071 request; this effectively ignores the host_index 18072 in the spec for a single request. 18073 :type _host_index: int, optional 18074 :return: Returns the result object. 18075 """ # noqa: E501 18076 18077 _param = self._delete_doc_format_item_serialize( 18078 board_id=board_id, 18079 item_id=item_id, 18080 _request_auth=_request_auth, 18081 _content_type=_content_type, 18082 _headers=_headers, 18083 _host_index=_host_index, 18084 ) 18085 18086 _response_types_map: Dict[str, Optional[str]] = { 18087 "204": "object", 18088 "400": None, 18089 "404": None, 18090 "429": None, 18091 } 18092 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18093 response_data.read() 18094 return self.api_client.response_deserialize( 18095 response_data=response_data, 18096 response_types_map=_response_types_map, 18097 ).data 18098 18099 def _delete_doc_format_item_serialize( 18100 self, 18101 board_id, 18102 item_id, 18103 _request_auth, 18104 _content_type, 18105 _headers, 18106 _host_index, 18107 ) -> RequestSerialized: 18108 18109 _host = None 18110 18111 _collection_formats: Dict[str, str] = {} 18112 18113 _path_params: Dict[str, str] = {} 18114 _query_params: List[Tuple[str, str]] = [] 18115 _header_params: Dict[str, Optional[str]] = _headers or {} 18116 _form_params: List[Tuple[str, str]] = [] 18117 _files: Dict[str, str] = {} 18118 _body_params: Optional[bytes] = None 18119 18120 # process the path parameters 18121 if board_id is not None: 18122 _path_params["board_id"] = board_id 18123 if item_id is not None: 18124 _path_params["item_id"] = item_id 18125 # process the query parameters 18126 # process the header parameters 18127 # process the form parameters 18128 # process the body parameter 18129 18130 # set the HTTP header `Accept` 18131 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18132 18133 # authentication setting 18134 _auth_settings: List[str] = [] 18135 18136 return self.api_client.param_serialize( 18137 method="DELETE", 18138 resource_path="/v2/boards/{board_id}/docs/{item_id}", 18139 path_params=_path_params, 18140 query_params=_query_params, 18141 header_params=_header_params, 18142 body=_body_params, 18143 post_params=_form_params, 18144 files=_files, 18145 auth_settings=_auth_settings, 18146 collection_formats=_collection_formats, 18147 _host=_host, 18148 _request_auth=_request_auth, 18149 ) 18150 18151 @validate_call 18152 def get_doc_format_item( 18153 self, 18154 board_id: Annotated[ 18155 StrictStr, 18156 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 18157 ], 18158 item_id: Annotated[ 18159 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 18160 ], 18161 text_content_type: Annotated[ 18162 Optional[StrictStr], Field(description="Controls the contentType of the returned doc's content.") 18163 ] = None, 18164 _request_timeout: Union[ 18165 None, 18166 Annotated[StrictFloat, Field(gt=0)], 18167 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18168 ] = None, 18169 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18170 _content_type: Optional[StrictStr] = None, 18171 _headers: Optional[Dict[StrictStr, Any]] = None, 18172 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18173 ) -> DocFormatItem: 18174 """Get doc format item 18175 18176 Retrieves information for a specific doc format item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 18177 18178 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 18179 :type board_id: str 18180 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 18181 :type item_id: str 18182 :param text_content_type: Controls the contentType of the returned doc's content. 18183 :type text_content_type: str 18184 :param _request_timeout: timeout setting for this request. If one 18185 number provided, it will be total request 18186 timeout. It can also be a pair (tuple) of 18187 (connection, read) timeouts. 18188 :type _request_timeout: int, tuple(int, int), optional 18189 :param _request_auth: set to override the auth_settings for an a single 18190 request; this effectively ignores the 18191 authentication in the spec for a single request. 18192 :type _request_auth: dict, optional 18193 :param _content_type: force content-type for the request. 18194 :type _content_type: str, Optional 18195 :param _headers: set to override the headers for a single 18196 request; this effectively ignores the headers 18197 in the spec for a single request. 18198 :type _headers: dict, optional 18199 :param _host_index: set to override the host_index for a single 18200 request; this effectively ignores the host_index 18201 in the spec for a single request. 18202 :type _host_index: int, optional 18203 :return: Returns the result object. 18204 """ # noqa: E501 18205 18206 _param = self._get_doc_format_item_serialize( 18207 board_id=board_id, 18208 item_id=item_id, 18209 text_content_type=text_content_type, 18210 _request_auth=_request_auth, 18211 _content_type=_content_type, 18212 _headers=_headers, 18213 _host_index=_host_index, 18214 ) 18215 18216 _response_types_map: Dict[str, Optional[str]] = { 18217 "200": "DocFormatItem", 18218 "400": None, 18219 "404": None, 18220 "429": None, 18221 } 18222 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18223 response_data.read() 18224 return self.api_client.response_deserialize( 18225 response_data=response_data, 18226 response_types_map=_response_types_map, 18227 ).data 18228 18229 def _get_doc_format_item_serialize( 18230 self, 18231 board_id, 18232 item_id, 18233 text_content_type, 18234 _request_auth, 18235 _content_type, 18236 _headers, 18237 _host_index, 18238 ) -> RequestSerialized: 18239 18240 _host = None 18241 18242 _collection_formats: Dict[str, str] = {} 18243 18244 _path_params: Dict[str, str] = {} 18245 _query_params: List[Tuple[str, str]] = [] 18246 _header_params: Dict[str, Optional[str]] = _headers or {} 18247 _form_params: List[Tuple[str, str]] = [] 18248 _files: Dict[str, str] = {} 18249 _body_params: Optional[bytes] = None 18250 18251 # process the path parameters 18252 if board_id is not None: 18253 _path_params["board_id"] = board_id 18254 if item_id is not None: 18255 _path_params["item_id"] = item_id 18256 # process the query parameters 18257 if text_content_type is not None: 18258 18259 _query_params.append(("textContentType", text_content_type)) 18260 18261 # process the header parameters 18262 # process the form parameters 18263 # process the body parameter 18264 18265 # set the HTTP header `Accept` 18266 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18267 18268 # authentication setting 18269 _auth_settings: List[str] = [] 18270 18271 return self.api_client.param_serialize( 18272 method="GET", 18273 resource_path="/v2/boards/{board_id}/docs/{item_id}", 18274 path_params=_path_params, 18275 query_params=_query_params, 18276 header_params=_header_params, 18277 body=_body_params, 18278 post_params=_form_params, 18279 files=_files, 18280 auth_settings=_auth_settings, 18281 collection_formats=_collection_formats, 18282 _host=_host, 18283 _request_auth=_request_auth, 18284 ) 18285 18286 @validate_call 18287 def create_document_item_using_file_from_device( 18288 self, 18289 board_id_platform_file_upload: Annotated[ 18290 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 18291 ], 18292 resource: Annotated[ 18293 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 18294 ], 18295 data: Optional[CreateDocumentItemUsingFileFromDeviceRequestData] = None, 18296 _request_timeout: Union[ 18297 None, 18298 Annotated[StrictFloat, Field(gt=0)], 18299 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18300 ] = None, 18301 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18302 _content_type: Optional[StrictStr] = None, 18303 _headers: Optional[Dict[StrictStr, Any]] = None, 18304 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18305 ) -> DocumentItem: 18306 """Create document item using file from device 18307 18308 Adds a document item to a board by selecting file from device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18309 18310 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) 18311 :type board_id_platform_file_upload: str 18312 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 18313 :type resource: bytearray 18314 :param data: 18315 :type data: CreateDocumentItemUsingFileFromDeviceRequestData 18316 :param _request_timeout: timeout setting for this request. If one 18317 number provided, it will be total request 18318 timeout. It can also be a pair (tuple) of 18319 (connection, read) timeouts. 18320 :type _request_timeout: int, tuple(int, int), optional 18321 :param _request_auth: set to override the auth_settings for an a single 18322 request; this effectively ignores the 18323 authentication in the spec for a single request. 18324 :type _request_auth: dict, optional 18325 :param _content_type: force content-type for the request. 18326 :type _content_type: str, Optional 18327 :param _headers: set to override the headers for a single 18328 request; this effectively ignores the headers 18329 in the spec for a single request. 18330 :type _headers: dict, optional 18331 :param _host_index: set to override the host_index for a single 18332 request; this effectively ignores the host_index 18333 in the spec for a single request. 18334 :type _host_index: int, optional 18335 :return: Returns the result object. 18336 """ # noqa: E501 18337 18338 _param = self._create_document_item_using_file_from_device_serialize( 18339 board_id_platform_file_upload=board_id_platform_file_upload, 18340 resource=resource, 18341 data=data, 18342 _request_auth=_request_auth, 18343 _content_type=_content_type, 18344 _headers=_headers, 18345 _host_index=_host_index, 18346 ) 18347 18348 _response_types_map: Dict[str, Optional[str]] = { 18349 "201": "DocumentItem", 18350 } 18351 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18352 response_data.read() 18353 return self.api_client.response_deserialize( 18354 response_data=response_data, 18355 response_types_map=_response_types_map, 18356 ).data 18357 18358 def _create_document_item_using_file_from_device_serialize( 18359 self, 18360 board_id_platform_file_upload, 18361 resource, 18362 data, 18363 _request_auth, 18364 _content_type, 18365 _headers, 18366 _host_index, 18367 ) -> RequestSerialized: 18368 18369 _host = None 18370 18371 _collection_formats: Dict[str, str] = {} 18372 18373 _path_params: Dict[str, str] = {} 18374 _query_params: List[Tuple[str, str]] = [] 18375 _header_params: Dict[str, Optional[str]] = _headers or {} 18376 _form_params: List[Tuple[str, str]] = [] 18377 _files: Dict[str, str] = {} 18378 _body_params: Optional[bytes] = None 18379 18380 # process the path parameters 18381 if board_id_platform_file_upload is not None: 18382 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 18383 # process the query parameters 18384 # process the header parameters 18385 # process the form parameters 18386 if data is not None: 18387 _form_params.append(("data", data)) 18388 if resource is not None: 18389 _files["resource"] = resource 18390 # process the body parameter 18391 18392 # set the HTTP header `Accept` 18393 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18394 18395 # set the HTTP header `Content-Type` 18396 if _content_type: 18397 _header_params["Content-Type"] = _content_type 18398 else: 18399 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 18400 if _default_content_type is not None: 18401 _header_params["Content-Type"] = _default_content_type 18402 18403 # authentication setting 18404 _auth_settings: List[str] = [] 18405 18406 return self.api_client.param_serialize( 18407 method="POST", 18408 resource_path="/v2/boards/{board_id_PlatformFileUpload}/documents", 18409 path_params=_path_params, 18410 query_params=_query_params, 18411 header_params=_header_params, 18412 body=_body_params, 18413 post_params=_form_params, 18414 files=_files, 18415 auth_settings=_auth_settings, 18416 collection_formats=_collection_formats, 18417 _host=_host, 18418 _request_auth=_request_auth, 18419 ) 18420 18421 @validate_call 18422 def create_document_item_using_url( 18423 self, 18424 board_id: Annotated[ 18425 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 18426 ], 18427 document_create_request: DocumentCreateRequest, 18428 _request_timeout: Union[ 18429 None, 18430 Annotated[StrictFloat, Field(gt=0)], 18431 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18432 ] = None, 18433 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18434 _content_type: Optional[StrictStr] = None, 18435 _headers: Optional[Dict[StrictStr, Any]] = None, 18436 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18437 ) -> DocumentItem: 18438 """Create document item using URL 18439 18440 Adds a document item to a board by specifying the URL where the document is hosted.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18441 18442 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 18443 :type board_id: str 18444 :param document_create_request: (required) 18445 :type document_create_request: DocumentCreateRequest 18446 :param _request_timeout: timeout setting for this request. If one 18447 number provided, it will be total request 18448 timeout. It can also be a pair (tuple) of 18449 (connection, read) timeouts. 18450 :type _request_timeout: int, tuple(int, int), optional 18451 :param _request_auth: set to override the auth_settings for an a single 18452 request; this effectively ignores the 18453 authentication in the spec for a single request. 18454 :type _request_auth: dict, optional 18455 :param _content_type: force content-type for the request. 18456 :type _content_type: str, Optional 18457 :param _headers: set to override the headers for a single 18458 request; this effectively ignores the headers 18459 in the spec for a single request. 18460 :type _headers: dict, optional 18461 :param _host_index: set to override the host_index for a single 18462 request; this effectively ignores the host_index 18463 in the spec for a single request. 18464 :type _host_index: int, optional 18465 :return: Returns the result object. 18466 """ # noqa: E501 18467 18468 _param = self._create_document_item_using_url_serialize( 18469 board_id=board_id, 18470 document_create_request=document_create_request, 18471 _request_auth=_request_auth, 18472 _content_type=_content_type, 18473 _headers=_headers, 18474 _host_index=_host_index, 18475 ) 18476 18477 _response_types_map: Dict[str, Optional[str]] = { 18478 "201": "DocumentItem", 18479 "400": None, 18480 "404": None, 18481 "429": None, 18482 } 18483 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18484 response_data.read() 18485 return self.api_client.response_deserialize( 18486 response_data=response_data, 18487 response_types_map=_response_types_map, 18488 ).data 18489 18490 def _create_document_item_using_url_serialize( 18491 self, 18492 board_id, 18493 document_create_request, 18494 _request_auth, 18495 _content_type, 18496 _headers, 18497 _host_index, 18498 ) -> RequestSerialized: 18499 18500 _host = None 18501 18502 _collection_formats: Dict[str, str] = {} 18503 18504 _path_params: Dict[str, str] = {} 18505 _query_params: List[Tuple[str, str]] = [] 18506 _header_params: Dict[str, Optional[str]] = _headers or {} 18507 _form_params: List[Tuple[str, str]] = [] 18508 _files: Dict[str, str] = {} 18509 _body_params: Optional[bytes] = None 18510 18511 # process the path parameters 18512 if board_id is not None: 18513 _path_params["board_id"] = board_id 18514 # process the query parameters 18515 # process the header parameters 18516 # process the form parameters 18517 # process the body parameter 18518 if document_create_request is not None: 18519 _body_params = document_create_request 18520 18521 # set the HTTP header `Accept` 18522 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18523 18524 # set the HTTP header `Content-Type` 18525 if _content_type: 18526 _header_params["Content-Type"] = _content_type 18527 else: 18528 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 18529 if _default_content_type is not None: 18530 _header_params["Content-Type"] = _default_content_type 18531 18532 # authentication setting 18533 _auth_settings: List[str] = [] 18534 18535 return self.api_client.param_serialize( 18536 method="POST", 18537 resource_path="/v2/boards/{board_id}/documents", 18538 path_params=_path_params, 18539 query_params=_query_params, 18540 header_params=_header_params, 18541 body=_body_params, 18542 post_params=_form_params, 18543 files=_files, 18544 auth_settings=_auth_settings, 18545 collection_formats=_collection_formats, 18546 _host=_host, 18547 _request_auth=_request_auth, 18548 ) 18549 18550 @validate_call 18551 def delete_document_item( 18552 self, 18553 board_id: Annotated[ 18554 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 18555 ], 18556 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 18557 _request_timeout: Union[ 18558 None, 18559 Annotated[StrictFloat, Field(gt=0)], 18560 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18561 ] = None, 18562 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18563 _content_type: Optional[StrictStr] = None, 18564 _headers: Optional[Dict[StrictStr, Any]] = None, 18565 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18566 ) -> object: 18567 """Delete document item 18568 18569 Deletes a document item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 18570 18571 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 18572 :type board_id: str 18573 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 18574 :type item_id: str 18575 :param _request_timeout: timeout setting for this request. If one 18576 number provided, it will be total request 18577 timeout. It can also be a pair (tuple) of 18578 (connection, read) timeouts. 18579 :type _request_timeout: int, tuple(int, int), optional 18580 :param _request_auth: set to override the auth_settings for an a single 18581 request; this effectively ignores the 18582 authentication in the spec for a single request. 18583 :type _request_auth: dict, optional 18584 :param _content_type: force content-type for the request. 18585 :type _content_type: str, Optional 18586 :param _headers: set to override the headers for a single 18587 request; this effectively ignores the headers 18588 in the spec for a single request. 18589 :type _headers: dict, optional 18590 :param _host_index: set to override the host_index for a single 18591 request; this effectively ignores the host_index 18592 in the spec for a single request. 18593 :type _host_index: int, optional 18594 :return: Returns the result object. 18595 """ # noqa: E501 18596 18597 _param = self._delete_document_item_serialize( 18598 board_id=board_id, 18599 item_id=item_id, 18600 _request_auth=_request_auth, 18601 _content_type=_content_type, 18602 _headers=_headers, 18603 _host_index=_host_index, 18604 ) 18605 18606 _response_types_map: Dict[str, Optional[str]] = { 18607 "204": "object", 18608 "400": None, 18609 "404": None, 18610 "429": None, 18611 } 18612 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18613 response_data.read() 18614 return self.api_client.response_deserialize( 18615 response_data=response_data, 18616 response_types_map=_response_types_map, 18617 ).data 18618 18619 def _delete_document_item_serialize( 18620 self, 18621 board_id, 18622 item_id, 18623 _request_auth, 18624 _content_type, 18625 _headers, 18626 _host_index, 18627 ) -> RequestSerialized: 18628 18629 _host = None 18630 18631 _collection_formats: Dict[str, str] = {} 18632 18633 _path_params: Dict[str, str] = {} 18634 _query_params: List[Tuple[str, str]] = [] 18635 _header_params: Dict[str, Optional[str]] = _headers or {} 18636 _form_params: List[Tuple[str, str]] = [] 18637 _files: Dict[str, str] = {} 18638 _body_params: Optional[bytes] = None 18639 18640 # process the path parameters 18641 if board_id is not None: 18642 _path_params["board_id"] = board_id 18643 if item_id is not None: 18644 _path_params["item_id"] = item_id 18645 # process the query parameters 18646 # process the header parameters 18647 # process the form parameters 18648 # process the body parameter 18649 18650 # set the HTTP header `Accept` 18651 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18652 18653 # authentication setting 18654 _auth_settings: List[str] = [] 18655 18656 return self.api_client.param_serialize( 18657 method="DELETE", 18658 resource_path="/v2/boards/{board_id}/documents/{item_id}", 18659 path_params=_path_params, 18660 query_params=_query_params, 18661 header_params=_header_params, 18662 body=_body_params, 18663 post_params=_form_params, 18664 files=_files, 18665 auth_settings=_auth_settings, 18666 collection_formats=_collection_formats, 18667 _host=_host, 18668 _request_auth=_request_auth, 18669 ) 18670 18671 @validate_call 18672 def get_document_item( 18673 self, 18674 board_id: Annotated[ 18675 StrictStr, 18676 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 18677 ], 18678 item_id: Annotated[ 18679 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 18680 ], 18681 _request_timeout: Union[ 18682 None, 18683 Annotated[StrictFloat, Field(gt=0)], 18684 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18685 ] = None, 18686 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18687 _content_type: Optional[StrictStr] = None, 18688 _headers: Optional[Dict[StrictStr, Any]] = None, 18689 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18690 ) -> DocumentItem: 18691 """Get document item 18692 18693 Retrieves information for a specific document item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 18694 18695 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 18696 :type board_id: str 18697 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 18698 :type item_id: str 18699 :param _request_timeout: timeout setting for this request. If one 18700 number provided, it will be total request 18701 timeout. It can also be a pair (tuple) of 18702 (connection, read) timeouts. 18703 :type _request_timeout: int, tuple(int, int), optional 18704 :param _request_auth: set to override the auth_settings for an a single 18705 request; this effectively ignores the 18706 authentication in the spec for a single request. 18707 :type _request_auth: dict, optional 18708 :param _content_type: force content-type for the request. 18709 :type _content_type: str, Optional 18710 :param _headers: set to override the headers for a single 18711 request; this effectively ignores the headers 18712 in the spec for a single request. 18713 :type _headers: dict, optional 18714 :param _host_index: set to override the host_index for a single 18715 request; this effectively ignores the host_index 18716 in the spec for a single request. 18717 :type _host_index: int, optional 18718 :return: Returns the result object. 18719 """ # noqa: E501 18720 18721 _param = self._get_document_item_serialize( 18722 board_id=board_id, 18723 item_id=item_id, 18724 _request_auth=_request_auth, 18725 _content_type=_content_type, 18726 _headers=_headers, 18727 _host_index=_host_index, 18728 ) 18729 18730 _response_types_map: Dict[str, Optional[str]] = { 18731 "200": "DocumentItem", 18732 "400": None, 18733 "404": None, 18734 "429": None, 18735 } 18736 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18737 response_data.read() 18738 return self.api_client.response_deserialize( 18739 response_data=response_data, 18740 response_types_map=_response_types_map, 18741 ).data 18742 18743 def _get_document_item_serialize( 18744 self, 18745 board_id, 18746 item_id, 18747 _request_auth, 18748 _content_type, 18749 _headers, 18750 _host_index, 18751 ) -> RequestSerialized: 18752 18753 _host = None 18754 18755 _collection_formats: Dict[str, str] = {} 18756 18757 _path_params: Dict[str, str] = {} 18758 _query_params: List[Tuple[str, str]] = [] 18759 _header_params: Dict[str, Optional[str]] = _headers or {} 18760 _form_params: List[Tuple[str, str]] = [] 18761 _files: Dict[str, str] = {} 18762 _body_params: Optional[bytes] = None 18763 18764 # process the path parameters 18765 if board_id is not None: 18766 _path_params["board_id"] = board_id 18767 if item_id is not None: 18768 _path_params["item_id"] = item_id 18769 # process the query parameters 18770 # process the header parameters 18771 # process the form parameters 18772 # process the body parameter 18773 18774 # set the HTTP header `Accept` 18775 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18776 18777 # authentication setting 18778 _auth_settings: List[str] = [] 18779 18780 return self.api_client.param_serialize( 18781 method="GET", 18782 resource_path="/v2/boards/{board_id}/documents/{item_id}", 18783 path_params=_path_params, 18784 query_params=_query_params, 18785 header_params=_header_params, 18786 body=_body_params, 18787 post_params=_form_params, 18788 files=_files, 18789 auth_settings=_auth_settings, 18790 collection_formats=_collection_formats, 18791 _host=_host, 18792 _request_auth=_request_auth, 18793 ) 18794 18795 @validate_call 18796 def update_document_item_using_file_from_device( 18797 self, 18798 board_id_platform_file_upload: Annotated[ 18799 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 18800 ], 18801 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 18802 resource: Annotated[ 18803 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 18804 ], 18805 data: Optional[UploadFileFromDeviceData] = None, 18806 _request_timeout: Union[ 18807 None, 18808 Annotated[StrictFloat, Field(gt=0)], 18809 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18810 ] = None, 18811 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18812 _content_type: Optional[StrictStr] = None, 18813 _headers: Optional[Dict[StrictStr, Any]] = None, 18814 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18815 ) -> DocumentItem: 18816 """Update document item using file from device 18817 18818 Updates a document item on a board by using file from a device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18819 18820 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) 18821 :type board_id_platform_file_upload: str 18822 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 18823 :type item_id: str 18824 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 18825 :type resource: bytearray 18826 :param data: 18827 :type data: UploadFileFromDeviceData 18828 :param _request_timeout: timeout setting for this request. If one 18829 number provided, it will be total request 18830 timeout. It can also be a pair (tuple) of 18831 (connection, read) timeouts. 18832 :type _request_timeout: int, tuple(int, int), optional 18833 :param _request_auth: set to override the auth_settings for an a single 18834 request; this effectively ignores the 18835 authentication in the spec for a single request. 18836 :type _request_auth: dict, optional 18837 :param _content_type: force content-type for the request. 18838 :type _content_type: str, Optional 18839 :param _headers: set to override the headers for a single 18840 request; this effectively ignores the headers 18841 in the spec for a single request. 18842 :type _headers: dict, optional 18843 :param _host_index: set to override the host_index for a single 18844 request; this effectively ignores the host_index 18845 in the spec for a single request. 18846 :type _host_index: int, optional 18847 :return: Returns the result object. 18848 """ # noqa: E501 18849 18850 _param = self._update_document_item_using_file_from_device_serialize( 18851 board_id_platform_file_upload=board_id_platform_file_upload, 18852 item_id=item_id, 18853 resource=resource, 18854 data=data, 18855 _request_auth=_request_auth, 18856 _content_type=_content_type, 18857 _headers=_headers, 18858 _host_index=_host_index, 18859 ) 18860 18861 _response_types_map: Dict[str, Optional[str]] = { 18862 "200": "DocumentItem", 18863 } 18864 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18865 response_data.read() 18866 return self.api_client.response_deserialize( 18867 response_data=response_data, 18868 response_types_map=_response_types_map, 18869 ).data 18870 18871 def _update_document_item_using_file_from_device_serialize( 18872 self, 18873 board_id_platform_file_upload, 18874 item_id, 18875 resource, 18876 data, 18877 _request_auth, 18878 _content_type, 18879 _headers, 18880 _host_index, 18881 ) -> RequestSerialized: 18882 18883 _host = None 18884 18885 _collection_formats: Dict[str, str] = {} 18886 18887 _path_params: Dict[str, str] = {} 18888 _query_params: List[Tuple[str, str]] = [] 18889 _header_params: Dict[str, Optional[str]] = _headers or {} 18890 _form_params: List[Tuple[str, str]] = [] 18891 _files: Dict[str, str] = {} 18892 _body_params: Optional[bytes] = None 18893 18894 # process the path parameters 18895 if board_id_platform_file_upload is not None: 18896 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 18897 if item_id is not None: 18898 _path_params["item_id"] = item_id 18899 # process the query parameters 18900 # process the header parameters 18901 # process the form parameters 18902 if data is not None: 18903 _form_params.append(("data", data)) 18904 if resource is not None: 18905 _files["resource"] = resource 18906 # process the body parameter 18907 18908 # set the HTTP header `Accept` 18909 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 18910 18911 # set the HTTP header `Content-Type` 18912 if _content_type: 18913 _header_params["Content-Type"] = _content_type 18914 else: 18915 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 18916 if _default_content_type is not None: 18917 _header_params["Content-Type"] = _default_content_type 18918 18919 # authentication setting 18920 _auth_settings: List[str] = [] 18921 18922 return self.api_client.param_serialize( 18923 method="PATCH", 18924 resource_path="/v2/boards/{board_id_PlatformFileUpload}/documents/{item_id}", 18925 path_params=_path_params, 18926 query_params=_query_params, 18927 header_params=_header_params, 18928 body=_body_params, 18929 post_params=_form_params, 18930 files=_files, 18931 auth_settings=_auth_settings, 18932 collection_formats=_collection_formats, 18933 _host=_host, 18934 _request_auth=_request_auth, 18935 ) 18936 18937 @validate_call 18938 def update_document_item_using_url( 18939 self, 18940 board_id: Annotated[ 18941 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 18942 ], 18943 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 18944 document_update_request: DocumentUpdateRequest, 18945 _request_timeout: Union[ 18946 None, 18947 Annotated[StrictFloat, Field(gt=0)], 18948 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18949 ] = None, 18950 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18951 _content_type: Optional[StrictStr] = None, 18952 _headers: Optional[Dict[StrictStr, Any]] = None, 18953 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18954 ) -> DocumentItem: 18955 """Update document item using URL 18956 18957 Updates a document item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18958 18959 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 18960 :type board_id: str 18961 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 18962 :type item_id: str 18963 :param document_update_request: (required) 18964 :type document_update_request: DocumentUpdateRequest 18965 :param _request_timeout: timeout setting for this request. If one 18966 number provided, it will be total request 18967 timeout. It can also be a pair (tuple) of 18968 (connection, read) timeouts. 18969 :type _request_timeout: int, tuple(int, int), optional 18970 :param _request_auth: set to override the auth_settings for an a single 18971 request; this effectively ignores the 18972 authentication in the spec for a single request. 18973 :type _request_auth: dict, optional 18974 :param _content_type: force content-type for the request. 18975 :type _content_type: str, Optional 18976 :param _headers: set to override the headers for a single 18977 request; this effectively ignores the headers 18978 in the spec for a single request. 18979 :type _headers: dict, optional 18980 :param _host_index: set to override the host_index for a single 18981 request; this effectively ignores the host_index 18982 in the spec for a single request. 18983 :type _host_index: int, optional 18984 :return: Returns the result object. 18985 """ # noqa: E501 18986 18987 _param = self._update_document_item_using_url_serialize( 18988 board_id=board_id, 18989 item_id=item_id, 18990 document_update_request=document_update_request, 18991 _request_auth=_request_auth, 18992 _content_type=_content_type, 18993 _headers=_headers, 18994 _host_index=_host_index, 18995 ) 18996 18997 _response_types_map: Dict[str, Optional[str]] = { 18998 "200": "DocumentItem", 18999 "400": None, 19000 "404": None, 19001 "409": None, 19002 "429": None, 19003 } 19004 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19005 response_data.read() 19006 return self.api_client.response_deserialize( 19007 response_data=response_data, 19008 response_types_map=_response_types_map, 19009 ).data 19010 19011 def _update_document_item_using_url_serialize( 19012 self, 19013 board_id, 19014 item_id, 19015 document_update_request, 19016 _request_auth, 19017 _content_type, 19018 _headers, 19019 _host_index, 19020 ) -> RequestSerialized: 19021 19022 _host = None 19023 19024 _collection_formats: Dict[str, str] = {} 19025 19026 _path_params: Dict[str, str] = {} 19027 _query_params: List[Tuple[str, str]] = [] 19028 _header_params: Dict[str, Optional[str]] = _headers or {} 19029 _form_params: List[Tuple[str, str]] = [] 19030 _files: Dict[str, str] = {} 19031 _body_params: Optional[bytes] = None 19032 19033 # process the path parameters 19034 if board_id is not None: 19035 _path_params["board_id"] = board_id 19036 if item_id is not None: 19037 _path_params["item_id"] = item_id 19038 # process the query parameters 19039 # process the header parameters 19040 # process the form parameters 19041 # process the body parameter 19042 if document_update_request is not None: 19043 _body_params = document_update_request 19044 19045 # set the HTTP header `Accept` 19046 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19047 19048 # set the HTTP header `Content-Type` 19049 if _content_type: 19050 _header_params["Content-Type"] = _content_type 19051 else: 19052 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19053 if _default_content_type is not None: 19054 _header_params["Content-Type"] = _default_content_type 19055 19056 # authentication setting 19057 _auth_settings: List[str] = [] 19058 19059 return self.api_client.param_serialize( 19060 method="PATCH", 19061 resource_path="/v2/boards/{board_id}/documents/{item_id}", 19062 path_params=_path_params, 19063 query_params=_query_params, 19064 header_params=_header_params, 19065 body=_body_params, 19066 post_params=_form_params, 19067 files=_files, 19068 auth_settings=_auth_settings, 19069 collection_formats=_collection_formats, 19070 _host=_host, 19071 _request_auth=_request_auth, 19072 ) 19073 19074 @validate_call 19075 def create_embed_item( 19076 self, 19077 board_id: Annotated[ 19078 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 19079 ], 19080 embed_create_request: EmbedCreateRequest, 19081 _request_timeout: Union[ 19082 None, 19083 Annotated[StrictFloat, Field(gt=0)], 19084 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19085 ] = None, 19086 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19087 _content_type: Optional[StrictStr] = None, 19088 _headers: Optional[Dict[StrictStr, Any]] = None, 19089 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19090 ) -> EmbedItem: 19091 """Create embed item 19092 19093 Adds an embed item containing external content to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19094 19095 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 19096 :type board_id: str 19097 :param embed_create_request: (required) 19098 :type embed_create_request: EmbedCreateRequest 19099 :param _request_timeout: timeout setting for this request. If one 19100 number provided, it will be total request 19101 timeout. It can also be a pair (tuple) of 19102 (connection, read) timeouts. 19103 :type _request_timeout: int, tuple(int, int), optional 19104 :param _request_auth: set to override the auth_settings for an a single 19105 request; this effectively ignores the 19106 authentication in the spec for a single request. 19107 :type _request_auth: dict, optional 19108 :param _content_type: force content-type for the request. 19109 :type _content_type: str, Optional 19110 :param _headers: set to override the headers for a single 19111 request; this effectively ignores the headers 19112 in the spec for a single request. 19113 :type _headers: dict, optional 19114 :param _host_index: set to override the host_index for a single 19115 request; this effectively ignores the host_index 19116 in the spec for a single request. 19117 :type _host_index: int, optional 19118 :return: Returns the result object. 19119 """ # noqa: E501 19120 19121 _param = self._create_embed_item_serialize( 19122 board_id=board_id, 19123 embed_create_request=embed_create_request, 19124 _request_auth=_request_auth, 19125 _content_type=_content_type, 19126 _headers=_headers, 19127 _host_index=_host_index, 19128 ) 19129 19130 _response_types_map: Dict[str, Optional[str]] = { 19131 "201": "EmbedItem", 19132 "400": None, 19133 "404": None, 19134 "429": None, 19135 } 19136 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19137 response_data.read() 19138 return self.api_client.response_deserialize( 19139 response_data=response_data, 19140 response_types_map=_response_types_map, 19141 ).data 19142 19143 def _create_embed_item_serialize( 19144 self, 19145 board_id, 19146 embed_create_request, 19147 _request_auth, 19148 _content_type, 19149 _headers, 19150 _host_index, 19151 ) -> RequestSerialized: 19152 19153 _host = None 19154 19155 _collection_formats: Dict[str, str] = {} 19156 19157 _path_params: Dict[str, str] = {} 19158 _query_params: List[Tuple[str, str]] = [] 19159 _header_params: Dict[str, Optional[str]] = _headers or {} 19160 _form_params: List[Tuple[str, str]] = [] 19161 _files: Dict[str, str] = {} 19162 _body_params: Optional[bytes] = None 19163 19164 # process the path parameters 19165 if board_id is not None: 19166 _path_params["board_id"] = board_id 19167 # process the query parameters 19168 # process the header parameters 19169 # process the form parameters 19170 # process the body parameter 19171 if embed_create_request is not None: 19172 _body_params = embed_create_request 19173 19174 # set the HTTP header `Accept` 19175 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19176 19177 # set the HTTP header `Content-Type` 19178 if _content_type: 19179 _header_params["Content-Type"] = _content_type 19180 else: 19181 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19182 if _default_content_type is not None: 19183 _header_params["Content-Type"] = _default_content_type 19184 19185 # authentication setting 19186 _auth_settings: List[str] = [] 19187 19188 return self.api_client.param_serialize( 19189 method="POST", 19190 resource_path="/v2/boards/{board_id}/embeds", 19191 path_params=_path_params, 19192 query_params=_query_params, 19193 header_params=_header_params, 19194 body=_body_params, 19195 post_params=_form_params, 19196 files=_files, 19197 auth_settings=_auth_settings, 19198 collection_formats=_collection_formats, 19199 _host=_host, 19200 _request_auth=_request_auth, 19201 ) 19202 19203 @validate_call 19204 def delete_embed_item( 19205 self, 19206 board_id: Annotated[ 19207 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 19208 ], 19209 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 19210 _request_timeout: Union[ 19211 None, 19212 Annotated[StrictFloat, Field(gt=0)], 19213 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19214 ] = None, 19215 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19216 _content_type: Optional[StrictStr] = None, 19217 _headers: Optional[Dict[StrictStr, Any]] = None, 19218 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19219 ) -> object: 19220 """Delete embed item 19221 19222 Deletes an embed item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 19223 19224 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 19225 :type board_id: str 19226 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 19227 :type item_id: str 19228 :param _request_timeout: timeout setting for this request. If one 19229 number provided, it will be total request 19230 timeout. It can also be a pair (tuple) of 19231 (connection, read) timeouts. 19232 :type _request_timeout: int, tuple(int, int), optional 19233 :param _request_auth: set to override the auth_settings for an a single 19234 request; this effectively ignores the 19235 authentication in the spec for a single request. 19236 :type _request_auth: dict, optional 19237 :param _content_type: force content-type for the request. 19238 :type _content_type: str, Optional 19239 :param _headers: set to override the headers for a single 19240 request; this effectively ignores the headers 19241 in the spec for a single request. 19242 :type _headers: dict, optional 19243 :param _host_index: set to override the host_index for a single 19244 request; this effectively ignores the host_index 19245 in the spec for a single request. 19246 :type _host_index: int, optional 19247 :return: Returns the result object. 19248 """ # noqa: E501 19249 19250 _param = self._delete_embed_item_serialize( 19251 board_id=board_id, 19252 item_id=item_id, 19253 _request_auth=_request_auth, 19254 _content_type=_content_type, 19255 _headers=_headers, 19256 _host_index=_host_index, 19257 ) 19258 19259 _response_types_map: Dict[str, Optional[str]] = { 19260 "204": "object", 19261 "400": None, 19262 "404": None, 19263 "429": None, 19264 } 19265 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19266 response_data.read() 19267 return self.api_client.response_deserialize( 19268 response_data=response_data, 19269 response_types_map=_response_types_map, 19270 ).data 19271 19272 def _delete_embed_item_serialize( 19273 self, 19274 board_id, 19275 item_id, 19276 _request_auth, 19277 _content_type, 19278 _headers, 19279 _host_index, 19280 ) -> RequestSerialized: 19281 19282 _host = None 19283 19284 _collection_formats: Dict[str, str] = {} 19285 19286 _path_params: Dict[str, str] = {} 19287 _query_params: List[Tuple[str, str]] = [] 19288 _header_params: Dict[str, Optional[str]] = _headers or {} 19289 _form_params: List[Tuple[str, str]] = [] 19290 _files: Dict[str, str] = {} 19291 _body_params: Optional[bytes] = None 19292 19293 # process the path parameters 19294 if board_id is not None: 19295 _path_params["board_id"] = board_id 19296 if item_id is not None: 19297 _path_params["item_id"] = item_id 19298 # process the query parameters 19299 # process the header parameters 19300 # process the form parameters 19301 # process the body parameter 19302 19303 # set the HTTP header `Accept` 19304 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19305 19306 # authentication setting 19307 _auth_settings: List[str] = [] 19308 19309 return self.api_client.param_serialize( 19310 method="DELETE", 19311 resource_path="/v2/boards/{board_id}/embeds/{item_id}", 19312 path_params=_path_params, 19313 query_params=_query_params, 19314 header_params=_header_params, 19315 body=_body_params, 19316 post_params=_form_params, 19317 files=_files, 19318 auth_settings=_auth_settings, 19319 collection_formats=_collection_formats, 19320 _host=_host, 19321 _request_auth=_request_auth, 19322 ) 19323 19324 @validate_call 19325 def get_embed_item( 19326 self, 19327 board_id: Annotated[ 19328 StrictStr, 19329 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 19330 ], 19331 item_id: Annotated[ 19332 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 19333 ], 19334 _request_timeout: Union[ 19335 None, 19336 Annotated[StrictFloat, Field(gt=0)], 19337 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19338 ] = None, 19339 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19340 _content_type: Optional[StrictStr] = None, 19341 _headers: Optional[Dict[StrictStr, Any]] = None, 19342 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19343 ) -> EmbedItem: 19344 """Get embed item 19345 19346 Retrieves information for a specific embed item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 19347 19348 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 19349 :type board_id: str 19350 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 19351 :type item_id: str 19352 :param _request_timeout: timeout setting for this request. If one 19353 number provided, it will be total request 19354 timeout. It can also be a pair (tuple) of 19355 (connection, read) timeouts. 19356 :type _request_timeout: int, tuple(int, int), optional 19357 :param _request_auth: set to override the auth_settings for an a single 19358 request; this effectively ignores the 19359 authentication in the spec for a single request. 19360 :type _request_auth: dict, optional 19361 :param _content_type: force content-type for the request. 19362 :type _content_type: str, Optional 19363 :param _headers: set to override the headers for a single 19364 request; this effectively ignores the headers 19365 in the spec for a single request. 19366 :type _headers: dict, optional 19367 :param _host_index: set to override the host_index for a single 19368 request; this effectively ignores the host_index 19369 in the spec for a single request. 19370 :type _host_index: int, optional 19371 :return: Returns the result object. 19372 """ # noqa: E501 19373 19374 _param = self._get_embed_item_serialize( 19375 board_id=board_id, 19376 item_id=item_id, 19377 _request_auth=_request_auth, 19378 _content_type=_content_type, 19379 _headers=_headers, 19380 _host_index=_host_index, 19381 ) 19382 19383 _response_types_map: Dict[str, Optional[str]] = { 19384 "200": "EmbedItem", 19385 "400": None, 19386 "404": None, 19387 "429": None, 19388 } 19389 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19390 response_data.read() 19391 return self.api_client.response_deserialize( 19392 response_data=response_data, 19393 response_types_map=_response_types_map, 19394 ).data 19395 19396 def _get_embed_item_serialize( 19397 self, 19398 board_id, 19399 item_id, 19400 _request_auth, 19401 _content_type, 19402 _headers, 19403 _host_index, 19404 ) -> RequestSerialized: 19405 19406 _host = None 19407 19408 _collection_formats: Dict[str, str] = {} 19409 19410 _path_params: Dict[str, str] = {} 19411 _query_params: List[Tuple[str, str]] = [] 19412 _header_params: Dict[str, Optional[str]] = _headers or {} 19413 _form_params: List[Tuple[str, str]] = [] 19414 _files: Dict[str, str] = {} 19415 _body_params: Optional[bytes] = None 19416 19417 # process the path parameters 19418 if board_id is not None: 19419 _path_params["board_id"] = board_id 19420 if item_id is not None: 19421 _path_params["item_id"] = item_id 19422 # process the query parameters 19423 # process the header parameters 19424 # process the form parameters 19425 # process the body parameter 19426 19427 # set the HTTP header `Accept` 19428 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19429 19430 # authentication setting 19431 _auth_settings: List[str] = [] 19432 19433 return self.api_client.param_serialize( 19434 method="GET", 19435 resource_path="/v2/boards/{board_id}/embeds/{item_id}", 19436 path_params=_path_params, 19437 query_params=_query_params, 19438 header_params=_header_params, 19439 body=_body_params, 19440 post_params=_form_params, 19441 files=_files, 19442 auth_settings=_auth_settings, 19443 collection_formats=_collection_formats, 19444 _host=_host, 19445 _request_auth=_request_auth, 19446 ) 19447 19448 @validate_call 19449 def update_embed_item( 19450 self, 19451 board_id: Annotated[ 19452 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 19453 ], 19454 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 19455 embed_update_request: EmbedUpdateRequest, 19456 _request_timeout: Union[ 19457 None, 19458 Annotated[StrictFloat, Field(gt=0)], 19459 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19460 ] = None, 19461 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19462 _content_type: Optional[StrictStr] = None, 19463 _headers: Optional[Dict[StrictStr, Any]] = None, 19464 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19465 ) -> EmbedItem: 19466 """Update embed item 19467 19468 Updates an embed item on a board based on the data properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19469 19470 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 19471 :type board_id: str 19472 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 19473 :type item_id: str 19474 :param embed_update_request: (required) 19475 :type embed_update_request: EmbedUpdateRequest 19476 :param _request_timeout: timeout setting for this request. If one 19477 number provided, it will be total request 19478 timeout. It can also be a pair (tuple) of 19479 (connection, read) timeouts. 19480 :type _request_timeout: int, tuple(int, int), optional 19481 :param _request_auth: set to override the auth_settings for an a single 19482 request; this effectively ignores the 19483 authentication in the spec for a single request. 19484 :type _request_auth: dict, optional 19485 :param _content_type: force content-type for the request. 19486 :type _content_type: str, Optional 19487 :param _headers: set to override the headers for a single 19488 request; this effectively ignores the headers 19489 in the spec for a single request. 19490 :type _headers: dict, optional 19491 :param _host_index: set to override the host_index for a single 19492 request; this effectively ignores the host_index 19493 in the spec for a single request. 19494 :type _host_index: int, optional 19495 :return: Returns the result object. 19496 """ # noqa: E501 19497 19498 _param = self._update_embed_item_serialize( 19499 board_id=board_id, 19500 item_id=item_id, 19501 embed_update_request=embed_update_request, 19502 _request_auth=_request_auth, 19503 _content_type=_content_type, 19504 _headers=_headers, 19505 _host_index=_host_index, 19506 ) 19507 19508 _response_types_map: Dict[str, Optional[str]] = { 19509 "200": "EmbedItem", 19510 "400": None, 19511 "404": None, 19512 "409": None, 19513 "429": None, 19514 } 19515 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19516 response_data.read() 19517 return self.api_client.response_deserialize( 19518 response_data=response_data, 19519 response_types_map=_response_types_map, 19520 ).data 19521 19522 def _update_embed_item_serialize( 19523 self, 19524 board_id, 19525 item_id, 19526 embed_update_request, 19527 _request_auth, 19528 _content_type, 19529 _headers, 19530 _host_index, 19531 ) -> RequestSerialized: 19532 19533 _host = None 19534 19535 _collection_formats: Dict[str, str] = {} 19536 19537 _path_params: Dict[str, str] = {} 19538 _query_params: List[Tuple[str, str]] = [] 19539 _header_params: Dict[str, Optional[str]] = _headers or {} 19540 _form_params: List[Tuple[str, str]] = [] 19541 _files: Dict[str, str] = {} 19542 _body_params: Optional[bytes] = None 19543 19544 # process the path parameters 19545 if board_id is not None: 19546 _path_params["board_id"] = board_id 19547 if item_id is not None: 19548 _path_params["item_id"] = item_id 19549 # process the query parameters 19550 # process the header parameters 19551 # process the form parameters 19552 # process the body parameter 19553 if embed_update_request is not None: 19554 _body_params = embed_update_request 19555 19556 # set the HTTP header `Accept` 19557 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19558 19559 # set the HTTP header `Content-Type` 19560 if _content_type: 19561 _header_params["Content-Type"] = _content_type 19562 else: 19563 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19564 if _default_content_type is not None: 19565 _header_params["Content-Type"] = _default_content_type 19566 19567 # authentication setting 19568 _auth_settings: List[str] = [] 19569 19570 return self.api_client.param_serialize( 19571 method="PATCH", 19572 resource_path="/v2/boards/{board_id}/embeds/{item_id}", 19573 path_params=_path_params, 19574 query_params=_query_params, 19575 header_params=_header_params, 19576 body=_body_params, 19577 post_params=_form_params, 19578 files=_files, 19579 auth_settings=_auth_settings, 19580 collection_formats=_collection_formats, 19581 _host=_host, 19582 _request_auth=_request_auth, 19583 ) 19584 19585 @validate_call 19586 def create_frame_item( 19587 self, 19588 board_id: Annotated[ 19589 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create a frame.") 19590 ], 19591 frame_create_request: FrameCreateRequest, 19592 _request_timeout: Union[ 19593 None, 19594 Annotated[StrictFloat, Field(gt=0)], 19595 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19596 ] = None, 19597 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19598 _content_type: Optional[StrictStr] = None, 19599 _headers: Optional[Dict[StrictStr, Any]] = None, 19600 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19601 ) -> FrameItem: 19602 """Create frame 19603 19604 Adds a frame to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19605 19606 :param board_id: Unique identifier (ID) of the board where you want to create a frame. (required) 19607 :type board_id: str 19608 :param frame_create_request: (required) 19609 :type frame_create_request: FrameCreateRequest 19610 :param _request_timeout: timeout setting for this request. If one 19611 number provided, it will be total request 19612 timeout. It can also be a pair (tuple) of 19613 (connection, read) timeouts. 19614 :type _request_timeout: int, tuple(int, int), optional 19615 :param _request_auth: set to override the auth_settings for an a single 19616 request; this effectively ignores the 19617 authentication in the spec for a single request. 19618 :type _request_auth: dict, optional 19619 :param _content_type: force content-type for the request. 19620 :type _content_type: str, Optional 19621 :param _headers: set to override the headers for a single 19622 request; this effectively ignores the headers 19623 in the spec for a single request. 19624 :type _headers: dict, optional 19625 :param _host_index: set to override the host_index for a single 19626 request; this effectively ignores the host_index 19627 in the spec for a single request. 19628 :type _host_index: int, optional 19629 :return: Returns the result object. 19630 """ # noqa: E501 19631 19632 _param = self._create_frame_item_serialize( 19633 board_id=board_id, 19634 frame_create_request=frame_create_request, 19635 _request_auth=_request_auth, 19636 _content_type=_content_type, 19637 _headers=_headers, 19638 _host_index=_host_index, 19639 ) 19640 19641 _response_types_map: Dict[str, Optional[str]] = { 19642 "201": "FrameItem", 19643 "400": "CreateFrameItem400Response", 19644 "404": "CreateFrameItem400Response", 19645 "429": "CreateFrameItem400Response", 19646 } 19647 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19648 response_data.read() 19649 return self.api_client.response_deserialize( 19650 response_data=response_data, 19651 response_types_map=_response_types_map, 19652 ).data 19653 19654 def _create_frame_item_serialize( 19655 self, 19656 board_id, 19657 frame_create_request, 19658 _request_auth, 19659 _content_type, 19660 _headers, 19661 _host_index, 19662 ) -> RequestSerialized: 19663 19664 _host = None 19665 19666 _collection_formats: Dict[str, str] = {} 19667 19668 _path_params: Dict[str, str] = {} 19669 _query_params: List[Tuple[str, str]] = [] 19670 _header_params: Dict[str, Optional[str]] = _headers or {} 19671 _form_params: List[Tuple[str, str]] = [] 19672 _files: Dict[str, str] = {} 19673 _body_params: Optional[bytes] = None 19674 19675 # process the path parameters 19676 if board_id is not None: 19677 _path_params["board_id"] = board_id 19678 # process the query parameters 19679 # process the header parameters 19680 # process the form parameters 19681 # process the body parameter 19682 if frame_create_request is not None: 19683 _body_params = frame_create_request 19684 19685 # set the HTTP header `Accept` 19686 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19687 19688 # set the HTTP header `Content-Type` 19689 if _content_type: 19690 _header_params["Content-Type"] = _content_type 19691 else: 19692 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 19693 if _default_content_type is not None: 19694 _header_params["Content-Type"] = _default_content_type 19695 19696 # authentication setting 19697 _auth_settings: List[str] = [] 19698 19699 return self.api_client.param_serialize( 19700 method="POST", 19701 resource_path="/v2/boards/{board_id}/frames", 19702 path_params=_path_params, 19703 query_params=_query_params, 19704 header_params=_header_params, 19705 body=_body_params, 19706 post_params=_form_params, 19707 files=_files, 19708 auth_settings=_auth_settings, 19709 collection_formats=_collection_formats, 19710 _host=_host, 19711 _request_auth=_request_auth, 19712 ) 19713 19714 @validate_call 19715 def delete_frame_item( 19716 self, 19717 board_id: Annotated[ 19718 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the frame.") 19719 ], 19720 item_id: Annotated[ 19721 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to delete.") 19722 ], 19723 _request_timeout: Union[ 19724 None, 19725 Annotated[StrictFloat, Field(gt=0)], 19726 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19727 ] = None, 19728 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19729 _content_type: Optional[StrictStr] = None, 19730 _headers: Optional[Dict[StrictStr, Any]] = None, 19731 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19732 ) -> object: 19733 """Delete frame 19734 19735 Deletes a frame from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 19736 19737 :param board_id: Unique identifier (ID) of the board from which you want to delete the frame. (required) 19738 :type board_id: str 19739 :param item_id: Unique identifier (ID) of the frame that you want to delete. (required) 19740 :type item_id: str 19741 :param _request_timeout: timeout setting for this request. If one 19742 number provided, it will be total request 19743 timeout. It can also be a pair (tuple) of 19744 (connection, read) timeouts. 19745 :type _request_timeout: int, tuple(int, int), optional 19746 :param _request_auth: set to override the auth_settings for an a single 19747 request; this effectively ignores the 19748 authentication in the spec for a single request. 19749 :type _request_auth: dict, optional 19750 :param _content_type: force content-type for the request. 19751 :type _content_type: str, Optional 19752 :param _headers: set to override the headers for a single 19753 request; this effectively ignores the headers 19754 in the spec for a single request. 19755 :type _headers: dict, optional 19756 :param _host_index: set to override the host_index for a single 19757 request; this effectively ignores the host_index 19758 in the spec for a single request. 19759 :type _host_index: int, optional 19760 :return: Returns the result object. 19761 """ # noqa: E501 19762 19763 _param = self._delete_frame_item_serialize( 19764 board_id=board_id, 19765 item_id=item_id, 19766 _request_auth=_request_auth, 19767 _content_type=_content_type, 19768 _headers=_headers, 19769 _host_index=_host_index, 19770 ) 19771 19772 _response_types_map: Dict[str, Optional[str]] = { 19773 "204": "object", 19774 "400": "CreateFrameItem400Response", 19775 "404": "CreateFrameItem400Response", 19776 "429": "CreateFrameItem400Response", 19777 } 19778 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19779 response_data.read() 19780 return self.api_client.response_deserialize( 19781 response_data=response_data, 19782 response_types_map=_response_types_map, 19783 ).data 19784 19785 def _delete_frame_item_serialize( 19786 self, 19787 board_id, 19788 item_id, 19789 _request_auth, 19790 _content_type, 19791 _headers, 19792 _host_index, 19793 ) -> RequestSerialized: 19794 19795 _host = None 19796 19797 _collection_formats: Dict[str, str] = {} 19798 19799 _path_params: Dict[str, str] = {} 19800 _query_params: List[Tuple[str, str]] = [] 19801 _header_params: Dict[str, Optional[str]] = _headers or {} 19802 _form_params: List[Tuple[str, str]] = [] 19803 _files: Dict[str, str] = {} 19804 _body_params: Optional[bytes] = None 19805 19806 # process the path parameters 19807 if board_id is not None: 19808 _path_params["board_id"] = board_id 19809 if item_id is not None: 19810 _path_params["item_id"] = item_id 19811 # process the query parameters 19812 # process the header parameters 19813 # process the form parameters 19814 # process the body parameter 19815 19816 # set the HTTP header `Accept` 19817 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19818 19819 # authentication setting 19820 _auth_settings: List[str] = [] 19821 19822 return self.api_client.param_serialize( 19823 method="DELETE", 19824 resource_path="/v2/boards/{board_id}/frames/{item_id}", 19825 path_params=_path_params, 19826 query_params=_query_params, 19827 header_params=_header_params, 19828 body=_body_params, 19829 post_params=_form_params, 19830 files=_files, 19831 auth_settings=_auth_settings, 19832 collection_formats=_collection_formats, 19833 _host=_host, 19834 _request_auth=_request_auth, 19835 ) 19836 19837 @validate_call 19838 def get_frame_item( 19839 self, 19840 board_id: Annotated[ 19841 StrictStr, 19842 Field(description="Unique identifier (ID) of the board that contains the frame that you want to retrieve"), 19843 ], 19844 item_id: Annotated[ 19845 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to retrieve.") 19846 ], 19847 _request_timeout: Union[ 19848 None, 19849 Annotated[StrictFloat, Field(gt=0)], 19850 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19851 ] = None, 19852 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19853 _content_type: Optional[StrictStr] = None, 19854 _headers: Optional[Dict[StrictStr, Any]] = None, 19855 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19856 ) -> FrameItem: 19857 """Get frame 19858 19859 Retrieves information for a specific frame on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 19860 19861 :param board_id: Unique identifier (ID) of the board that contains the frame that you want to retrieve (required) 19862 :type board_id: str 19863 :param item_id: Unique identifier (ID) of the frame that you want to retrieve. (required) 19864 :type item_id: str 19865 :param _request_timeout: timeout setting for this request. If one 19866 number provided, it will be total request 19867 timeout. It can also be a pair (tuple) of 19868 (connection, read) timeouts. 19869 :type _request_timeout: int, tuple(int, int), optional 19870 :param _request_auth: set to override the auth_settings for an a single 19871 request; this effectively ignores the 19872 authentication in the spec for a single request. 19873 :type _request_auth: dict, optional 19874 :param _content_type: force content-type for the request. 19875 :type _content_type: str, Optional 19876 :param _headers: set to override the headers for a single 19877 request; this effectively ignores the headers 19878 in the spec for a single request. 19879 :type _headers: dict, optional 19880 :param _host_index: set to override the host_index for a single 19881 request; this effectively ignores the host_index 19882 in the spec for a single request. 19883 :type _host_index: int, optional 19884 :return: Returns the result object. 19885 """ # noqa: E501 19886 19887 _param = self._get_frame_item_serialize( 19888 board_id=board_id, 19889 item_id=item_id, 19890 _request_auth=_request_auth, 19891 _content_type=_content_type, 19892 _headers=_headers, 19893 _host_index=_host_index, 19894 ) 19895 19896 _response_types_map: Dict[str, Optional[str]] = { 19897 "200": "FrameItem", 19898 "400": "CreateFrameItem400Response", 19899 "404": "CreateFrameItem400Response", 19900 "429": "CreateFrameItem400Response", 19901 } 19902 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19903 response_data.read() 19904 return self.api_client.response_deserialize( 19905 response_data=response_data, 19906 response_types_map=_response_types_map, 19907 ).data 19908 19909 def _get_frame_item_serialize( 19910 self, 19911 board_id, 19912 item_id, 19913 _request_auth, 19914 _content_type, 19915 _headers, 19916 _host_index, 19917 ) -> RequestSerialized: 19918 19919 _host = None 19920 19921 _collection_formats: Dict[str, str] = {} 19922 19923 _path_params: Dict[str, str] = {} 19924 _query_params: List[Tuple[str, str]] = [] 19925 _header_params: Dict[str, Optional[str]] = _headers or {} 19926 _form_params: List[Tuple[str, str]] = [] 19927 _files: Dict[str, str] = {} 19928 _body_params: Optional[bytes] = None 19929 19930 # process the path parameters 19931 if board_id is not None: 19932 _path_params["board_id"] = board_id 19933 if item_id is not None: 19934 _path_params["item_id"] = item_id 19935 # process the query parameters 19936 # process the header parameters 19937 # process the form parameters 19938 # process the body parameter 19939 19940 # set the HTTP header `Accept` 19941 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 19942 19943 # authentication setting 19944 _auth_settings: List[str] = [] 19945 19946 return self.api_client.param_serialize( 19947 method="GET", 19948 resource_path="/v2/boards/{board_id}/frames/{item_id}", 19949 path_params=_path_params, 19950 query_params=_query_params, 19951 header_params=_header_params, 19952 body=_body_params, 19953 post_params=_form_params, 19954 files=_files, 19955 auth_settings=_auth_settings, 19956 collection_formats=_collection_formats, 19957 _host=_host, 19958 _request_auth=_request_auth, 19959 ) 19960 19961 @validate_call 19962 def update_frame_item( 19963 self, 19964 board_id: Annotated[ 19965 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the frame.") 19966 ], 19967 item_id: Annotated[ 19968 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to update.") 19969 ], 19970 frame_update_request: FrameUpdateRequest, 19971 _request_timeout: Union[ 19972 None, 19973 Annotated[StrictFloat, Field(gt=0)], 19974 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19975 ] = None, 19976 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19977 _content_type: Optional[StrictStr] = None, 19978 _headers: Optional[Dict[StrictStr, Any]] = None, 19979 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19980 ) -> FrameItem: 19981 """Update frame 19982 19983 Updates a frame on a board based on the data, style, or geometry properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19984 19985 :param board_id: Unique identifier (ID) of the board where you want to update the frame. (required) 19986 :type board_id: str 19987 :param item_id: Unique identifier (ID) of the frame that you want to update. (required) 19988 :type item_id: str 19989 :param frame_update_request: (required) 19990 :type frame_update_request: FrameUpdateRequest 19991 :param _request_timeout: timeout setting for this request. If one 19992 number provided, it will be total request 19993 timeout. It can also be a pair (tuple) of 19994 (connection, read) timeouts. 19995 :type _request_timeout: int, tuple(int, int), optional 19996 :param _request_auth: set to override the auth_settings for an a single 19997 request; this effectively ignores the 19998 authentication in the spec for a single request. 19999 :type _request_auth: dict, optional 20000 :param _content_type: force content-type for the request. 20001 :type _content_type: str, Optional 20002 :param _headers: set to override the headers for a single 20003 request; this effectively ignores the headers 20004 in the spec for a single request. 20005 :type _headers: dict, optional 20006 :param _host_index: set to override the host_index for a single 20007 request; this effectively ignores the host_index 20008 in the spec for a single request. 20009 :type _host_index: int, optional 20010 :return: Returns the result object. 20011 """ # noqa: E501 20012 20013 _param = self._update_frame_item_serialize( 20014 board_id=board_id, 20015 item_id=item_id, 20016 frame_update_request=frame_update_request, 20017 _request_auth=_request_auth, 20018 _content_type=_content_type, 20019 _headers=_headers, 20020 _host_index=_host_index, 20021 ) 20022 20023 _response_types_map: Dict[str, Optional[str]] = { 20024 "200": "FrameItem", 20025 "400": "CreateFrameItem400Response", 20026 "404": "CreateFrameItem400Response", 20027 "409": "UpdateFrameItem409Response", 20028 "429": "CreateFrameItem400Response", 20029 } 20030 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20031 response_data.read() 20032 return self.api_client.response_deserialize( 20033 response_data=response_data, 20034 response_types_map=_response_types_map, 20035 ).data 20036 20037 def _update_frame_item_serialize( 20038 self, 20039 board_id, 20040 item_id, 20041 frame_update_request, 20042 _request_auth, 20043 _content_type, 20044 _headers, 20045 _host_index, 20046 ) -> RequestSerialized: 20047 20048 _host = None 20049 20050 _collection_formats: Dict[str, str] = {} 20051 20052 _path_params: Dict[str, str] = {} 20053 _query_params: List[Tuple[str, str]] = [] 20054 _header_params: Dict[str, Optional[str]] = _headers or {} 20055 _form_params: List[Tuple[str, str]] = [] 20056 _files: Dict[str, str] = {} 20057 _body_params: Optional[bytes] = None 20058 20059 # process the path parameters 20060 if board_id is not None: 20061 _path_params["board_id"] = board_id 20062 if item_id is not None: 20063 _path_params["item_id"] = item_id 20064 # process the query parameters 20065 # process the header parameters 20066 # process the form parameters 20067 # process the body parameter 20068 if frame_update_request is not None: 20069 _body_params = frame_update_request 20070 20071 # set the HTTP header `Accept` 20072 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20073 20074 # set the HTTP header `Content-Type` 20075 if _content_type: 20076 _header_params["Content-Type"] = _content_type 20077 else: 20078 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 20079 if _default_content_type is not None: 20080 _header_params["Content-Type"] = _default_content_type 20081 20082 # authentication setting 20083 _auth_settings: List[str] = [] 20084 20085 return self.api_client.param_serialize( 20086 method="PATCH", 20087 resource_path="/v2/boards/{board_id}/frames/{item_id}", 20088 path_params=_path_params, 20089 query_params=_query_params, 20090 header_params=_header_params, 20091 body=_body_params, 20092 post_params=_form_params, 20093 files=_files, 20094 auth_settings=_auth_settings, 20095 collection_formats=_collection_formats, 20096 _host=_host, 20097 _request_auth=_request_auth, 20098 ) 20099 20100 @validate_call 20101 def create_group( 20102 self, 20103 board_id: StrictStr, 20104 group: Group, 20105 _request_timeout: Union[ 20106 None, 20107 Annotated[StrictFloat, Field(gt=0)], 20108 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20109 ] = None, 20110 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20111 _content_type: Optional[StrictStr] = None, 20112 _headers: Optional[Dict[StrictStr, Any]] = None, 20113 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20114 ) -> GroupResponseShort: 20115 """Create group 20116 20117 Creates a group of items on a board. The group is created with the items that are passed in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20118 20119 :param board_id: (required) 20120 :type board_id: str 20121 :param group: (required) 20122 :type group: Group 20123 :param _request_timeout: timeout setting for this request. If one 20124 number provided, it will be total request 20125 timeout. It can also be a pair (tuple) of 20126 (connection, read) timeouts. 20127 :type _request_timeout: int, tuple(int, int), optional 20128 :param _request_auth: set to override the auth_settings for an a single 20129 request; this effectively ignores the 20130 authentication in the spec for a single request. 20131 :type _request_auth: dict, optional 20132 :param _content_type: force content-type for the request. 20133 :type _content_type: str, Optional 20134 :param _headers: set to override the headers for a single 20135 request; this effectively ignores the headers 20136 in the spec for a single request. 20137 :type _headers: dict, optional 20138 :param _host_index: set to override the host_index for a single 20139 request; this effectively ignores the host_index 20140 in the spec for a single request. 20141 :type _host_index: int, optional 20142 :return: Returns the result object. 20143 """ # noqa: E501 20144 20145 _param = self._create_group_serialize( 20146 board_id=board_id, 20147 group=group, 20148 _request_auth=_request_auth, 20149 _content_type=_content_type, 20150 _headers=_headers, 20151 _host_index=_host_index, 20152 ) 20153 20154 _response_types_map: Dict[str, Optional[str]] = { 20155 "201": "GroupResponseShort", 20156 "400": "GetAllGroups400Response", 20157 "404": "GetAllGroups404Response", 20158 "429": "GetAllGroups429Response", 20159 } 20160 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20161 response_data.read() 20162 return self.api_client.response_deserialize( 20163 response_data=response_data, 20164 response_types_map=_response_types_map, 20165 ).data 20166 20167 def _create_group_serialize( 20168 self, 20169 board_id, 20170 group, 20171 _request_auth, 20172 _content_type, 20173 _headers, 20174 _host_index, 20175 ) -> RequestSerialized: 20176 20177 _host = None 20178 20179 _collection_formats: Dict[str, str] = {} 20180 20181 _path_params: Dict[str, str] = {} 20182 _query_params: List[Tuple[str, str]] = [] 20183 _header_params: Dict[str, Optional[str]] = _headers or {} 20184 _form_params: List[Tuple[str, str]] = [] 20185 _files: Dict[str, str] = {} 20186 _body_params: Optional[bytes] = None 20187 20188 # process the path parameters 20189 if board_id is not None: 20190 _path_params["board_id"] = board_id 20191 # process the query parameters 20192 # process the header parameters 20193 # process the form parameters 20194 # process the body parameter 20195 if group is not None: 20196 _body_params = group 20197 20198 # set the HTTP header `Accept` 20199 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20200 20201 # set the HTTP header `Content-Type` 20202 if _content_type: 20203 _header_params["Content-Type"] = _content_type 20204 else: 20205 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 20206 if _default_content_type is not None: 20207 _header_params["Content-Type"] = _default_content_type 20208 20209 # authentication setting 20210 _auth_settings: List[str] = [] 20211 20212 return self.api_client.param_serialize( 20213 method="POST", 20214 resource_path="/v2/boards/{board_id}/groups", 20215 path_params=_path_params, 20216 query_params=_query_params, 20217 header_params=_header_params, 20218 body=_body_params, 20219 post_params=_form_params, 20220 files=_files, 20221 auth_settings=_auth_settings, 20222 collection_formats=_collection_formats, 20223 _host=_host, 20224 _request_auth=_request_auth, 20225 ) 20226 20227 @validate_call 20228 def delete_group( 20229 self, 20230 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20231 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20232 delete_items: Annotated[ 20233 StrictBool, 20234 Field( 20235 description="Indicates whether the items should be removed. Set to `true` to delete items in the group." 20236 ), 20237 ], 20238 _request_timeout: Union[ 20239 None, 20240 Annotated[StrictFloat, Field(gt=0)], 20241 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20242 ] = None, 20243 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20244 _content_type: Optional[StrictStr] = None, 20245 _headers: Optional[Dict[StrictStr, Any]] = None, 20246 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20247 ) -> object: 20248 """Deletes the group 20249 20250 Deletes a group from a board. All the items in the group are deleted along with the group. <b>Note - this endpoint will delete items which are locked as well. </b> <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 20251 20252 :param board_id: Unique identifier (ID) of the board. (required) 20253 :type board_id: str 20254 :param group_id: Unique identifier (ID) of the group. (required) 20255 :type group_id: str 20256 :param delete_items: Indicates whether the items should be removed. Set to `true` to delete items in the group. (required) 20257 :type delete_items: bool 20258 :param _request_timeout: timeout setting for this request. If one 20259 number provided, it will be total request 20260 timeout. It can also be a pair (tuple) of 20261 (connection, read) timeouts. 20262 :type _request_timeout: int, tuple(int, int), optional 20263 :param _request_auth: set to override the auth_settings for an a single 20264 request; this effectively ignores the 20265 authentication in the spec for a single request. 20266 :type _request_auth: dict, optional 20267 :param _content_type: force content-type for the request. 20268 :type _content_type: str, Optional 20269 :param _headers: set to override the headers for a single 20270 request; this effectively ignores the headers 20271 in the spec for a single request. 20272 :type _headers: dict, optional 20273 :param _host_index: set to override the host_index for a single 20274 request; this effectively ignores the host_index 20275 in the spec for a single request. 20276 :type _host_index: int, optional 20277 :return: Returns the result object. 20278 """ # noqa: E501 20279 20280 _param = self._delete_group_serialize( 20281 board_id=board_id, 20282 group_id=group_id, 20283 delete_items=delete_items, 20284 _request_auth=_request_auth, 20285 _content_type=_content_type, 20286 _headers=_headers, 20287 _host_index=_host_index, 20288 ) 20289 20290 _response_types_map: Dict[str, Optional[str]] = { 20291 "204": "object", 20292 "400": "UnGroup400Response", 20293 "404": "UnGroup404Response", 20294 "429": "UnGroup429Response", 20295 } 20296 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20297 response_data.read() 20298 return self.api_client.response_deserialize( 20299 response_data=response_data, 20300 response_types_map=_response_types_map, 20301 ).data 20302 20303 def _delete_group_serialize( 20304 self, 20305 board_id, 20306 group_id, 20307 delete_items, 20308 _request_auth, 20309 _content_type, 20310 _headers, 20311 _host_index, 20312 ) -> RequestSerialized: 20313 20314 _host = None 20315 20316 _collection_formats: Dict[str, str] = {} 20317 20318 _path_params: Dict[str, str] = {} 20319 _query_params: List[Tuple[str, str]] = [] 20320 _header_params: Dict[str, Optional[str]] = _headers or {} 20321 _form_params: List[Tuple[str, str]] = [] 20322 _files: Dict[str, str] = {} 20323 _body_params: Optional[bytes] = None 20324 20325 # process the path parameters 20326 if board_id is not None: 20327 _path_params["board_id"] = board_id 20328 if group_id is not None: 20329 _path_params["group_id"] = group_id 20330 # process the query parameters 20331 if delete_items is not None: 20332 20333 _query_params.append(("delete_items", delete_items)) 20334 20335 # process the header parameters 20336 # process the form parameters 20337 # process the body parameter 20338 20339 # set the HTTP header `Accept` 20340 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20341 20342 # authentication setting 20343 _auth_settings: List[str] = [] 20344 20345 return self.api_client.param_serialize( 20346 method="DELETE", 20347 resource_path="/v2/boards/{board_id}/groups/{group_id}?", 20348 path_params=_path_params, 20349 query_params=_query_params, 20350 header_params=_header_params, 20351 body=_body_params, 20352 post_params=_form_params, 20353 files=_files, 20354 auth_settings=_auth_settings, 20355 collection_formats=_collection_formats, 20356 _host=_host, 20357 _request_auth=_request_auth, 20358 ) 20359 20360 @validate_call 20361 def get_all_groups( 20362 self, 20363 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20364 limit: Annotated[ 20365 Optional[Annotated[int, Field(le=50, strict=True, ge=10)]], 20366 Field(description="The maximum number of items to return at one time, default is 10, maximum is 50."), 20367 ] = None, 20368 cursor: Optional[StrictStr] = None, 20369 _request_timeout: Union[ 20370 None, 20371 Annotated[StrictFloat, Field(gt=0)], 20372 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20373 ] = None, 20374 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20375 _content_type: Optional[StrictStr] = None, 20376 _headers: Optional[Dict[StrictStr, Any]] = None, 20377 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20378 ) -> GetAllGroups200Response: 20379 """Get all groups on a board 20380 20381 Returns all the groups and the items of the respective groups within a specific board.<br/> This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request.<br/> For example, if you set the `limit` query parameter to `10` and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20382 20383 :param board_id: Unique identifier (ID) of the board. (required) 20384 :type board_id: str 20385 :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. 20386 :type limit: int 20387 :param cursor: 20388 :type cursor: str 20389 :param _request_timeout: timeout setting for this request. If one 20390 number provided, it will be total request 20391 timeout. It can also be a pair (tuple) of 20392 (connection, read) timeouts. 20393 :type _request_timeout: int, tuple(int, int), optional 20394 :param _request_auth: set to override the auth_settings for an a single 20395 request; this effectively ignores the 20396 authentication in the spec for a single request. 20397 :type _request_auth: dict, optional 20398 :param _content_type: force content-type for the request. 20399 :type _content_type: str, Optional 20400 :param _headers: set to override the headers for a single 20401 request; this effectively ignores the headers 20402 in the spec for a single request. 20403 :type _headers: dict, optional 20404 :param _host_index: set to override the host_index for a single 20405 request; this effectively ignores the host_index 20406 in the spec for a single request. 20407 :type _host_index: int, optional 20408 :return: Returns the result object. 20409 """ # noqa: E501 20410 20411 _param = self._get_all_groups_serialize( 20412 board_id=board_id, 20413 limit=limit, 20414 cursor=cursor, 20415 _request_auth=_request_auth, 20416 _content_type=_content_type, 20417 _headers=_headers, 20418 _host_index=_host_index, 20419 ) 20420 20421 _response_types_map: Dict[str, Optional[str]] = { 20422 "200": "GetAllGroups200Response", 20423 "400": "GetAllGroups400Response", 20424 "404": "GetAllGroups404Response", 20425 "429": "GetAllGroups429Response", 20426 } 20427 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20428 response_data.read() 20429 return self.api_client.response_deserialize( 20430 response_data=response_data, 20431 response_types_map=_response_types_map, 20432 ).data 20433 20434 def _get_all_groups_serialize( 20435 self, 20436 board_id, 20437 limit, 20438 cursor, 20439 _request_auth, 20440 _content_type, 20441 _headers, 20442 _host_index, 20443 ) -> RequestSerialized: 20444 20445 _host = None 20446 20447 _collection_formats: Dict[str, str] = {} 20448 20449 _path_params: Dict[str, str] = {} 20450 _query_params: List[Tuple[str, str]] = [] 20451 _header_params: Dict[str, Optional[str]] = _headers or {} 20452 _form_params: List[Tuple[str, str]] = [] 20453 _files: Dict[str, str] = {} 20454 _body_params: Optional[bytes] = None 20455 20456 # process the path parameters 20457 if board_id is not None: 20458 _path_params["board_id"] = board_id 20459 # process the query parameters 20460 if limit is not None: 20461 20462 _query_params.append(("limit", limit)) 20463 20464 if cursor is not None: 20465 20466 _query_params.append(("cursor", cursor)) 20467 20468 # process the header parameters 20469 # process the form parameters 20470 # process the body parameter 20471 20472 # set the HTTP header `Accept` 20473 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20474 20475 # authentication setting 20476 _auth_settings: List[str] = [] 20477 20478 return self.api_client.param_serialize( 20479 method="GET", 20480 resource_path="/v2/boards/{board_id}/groups", 20481 path_params=_path_params, 20482 query_params=_query_params, 20483 header_params=_header_params, 20484 body=_body_params, 20485 post_params=_form_params, 20486 files=_files, 20487 auth_settings=_auth_settings, 20488 collection_formats=_collection_formats, 20489 _host=_host, 20490 _request_auth=_request_auth, 20491 ) 20492 20493 @validate_call 20494 def get_group_by_id( 20495 self, 20496 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20497 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20498 _request_timeout: Union[ 20499 None, 20500 Annotated[StrictFloat, Field(gt=0)], 20501 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20502 ] = None, 20503 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20504 _content_type: Optional[StrictStr] = None, 20505 _headers: Optional[Dict[StrictStr, Any]] = None, 20506 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20507 ) -> GroupResponseShort: 20508 """Get a group by its ID 20509 20510 Returns a list of items in a specific group. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item ID 20511 20512 :param board_id: Unique identifier (ID) of the board. (required) 20513 :type board_id: str 20514 :param group_id: Unique identifier (ID) of the group. (required) 20515 :type group_id: str 20516 :param _request_timeout: timeout setting for this request. If one 20517 number provided, it will be total request 20518 timeout. It can also be a pair (tuple) of 20519 (connection, read) timeouts. 20520 :type _request_timeout: int, tuple(int, int), optional 20521 :param _request_auth: set to override the auth_settings for an a single 20522 request; this effectively ignores the 20523 authentication in the spec for a single request. 20524 :type _request_auth: dict, optional 20525 :param _content_type: force content-type for the request. 20526 :type _content_type: str, Optional 20527 :param _headers: set to override the headers for a single 20528 request; this effectively ignores the headers 20529 in the spec for a single request. 20530 :type _headers: dict, optional 20531 :param _host_index: set to override the host_index for a single 20532 request; this effectively ignores the host_index 20533 in the spec for a single request. 20534 :type _host_index: int, optional 20535 :return: Returns the result object. 20536 """ # noqa: E501 20537 20538 _param = self._get_group_by_id_serialize( 20539 board_id=board_id, 20540 group_id=group_id, 20541 _request_auth=_request_auth, 20542 _content_type=_content_type, 20543 _headers=_headers, 20544 _host_index=_host_index, 20545 ) 20546 20547 _response_types_map: Dict[str, Optional[str]] = { 20548 "200": "GroupResponseShort", 20549 "400": "GetAllGroups400Response", 20550 "404": "GetAllGroups404Response", 20551 "429": "GetAllGroups429Response", 20552 } 20553 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20554 response_data.read() 20555 return self.api_client.response_deserialize( 20556 response_data=response_data, 20557 response_types_map=_response_types_map, 20558 ).data 20559 20560 def _get_group_by_id_serialize( 20561 self, 20562 board_id, 20563 group_id, 20564 _request_auth, 20565 _content_type, 20566 _headers, 20567 _host_index, 20568 ) -> RequestSerialized: 20569 20570 _host = None 20571 20572 _collection_formats: Dict[str, str] = {} 20573 20574 _path_params: Dict[str, str] = {} 20575 _query_params: List[Tuple[str, str]] = [] 20576 _header_params: Dict[str, Optional[str]] = _headers or {} 20577 _form_params: List[Tuple[str, str]] = [] 20578 _files: Dict[str, str] = {} 20579 _body_params: Optional[bytes] = None 20580 20581 # process the path parameters 20582 if board_id is not None: 20583 _path_params["board_id"] = board_id 20584 if group_id is not None: 20585 _path_params["group_id"] = group_id 20586 # process the query parameters 20587 # process the header parameters 20588 # process the form parameters 20589 # process the body parameter 20590 20591 # set the HTTP header `Accept` 20592 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20593 20594 # authentication setting 20595 _auth_settings: List[str] = [] 20596 20597 return self.api_client.param_serialize( 20598 method="GET", 20599 resource_path="/v2/boards/{board_id}/groups/{group_id}", 20600 path_params=_path_params, 20601 query_params=_query_params, 20602 header_params=_header_params, 20603 body=_body_params, 20604 post_params=_form_params, 20605 files=_files, 20606 auth_settings=_auth_settings, 20607 collection_formats=_collection_formats, 20608 _host=_host, 20609 _request_auth=_request_auth, 20610 ) 20611 20612 @validate_call 20613 def get_items_by_group_id( 20614 self, 20615 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20616 group_item_id: Annotated[StrictStr, Field(description="The ID of the group item to retrieve.")], 20617 limit: Annotated[ 20618 Optional[Annotated[int, Field(le=50, strict=True, ge=10)]], 20619 Field(description="The maximum number of items to return at one time, default is 10, maximum is 50."), 20620 ] = None, 20621 cursor: Optional[StrictStr] = None, 20622 _request_timeout: Union[ 20623 None, 20624 Annotated[StrictFloat, Field(gt=0)], 20625 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20626 ] = None, 20627 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20628 _content_type: Optional[StrictStr] = None, 20629 _headers: Optional[Dict[StrictStr, Any]] = None, 20630 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20631 ) -> GetItemsByGroupId200Response: 20632 """Get items of a group by ID 20633 20634 Returns a list of items that are a part of any group, within a specific board.<br/> This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request.<br/> For example, if you set the `limit` query parameter to `10` and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items (not 10 groups) in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20635 20636 :param board_id: Unique identifier (ID) of the board. (required) 20637 :type board_id: str 20638 :param group_item_id: The ID of the group item to retrieve. (required) 20639 :type group_item_id: str 20640 :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. 20641 :type limit: int 20642 :param cursor: 20643 :type cursor: str 20644 :param _request_timeout: timeout setting for this request. If one 20645 number provided, it will be total request 20646 timeout. It can also be a pair (tuple) of 20647 (connection, read) timeouts. 20648 :type _request_timeout: int, tuple(int, int), optional 20649 :param _request_auth: set to override the auth_settings for an a single 20650 request; this effectively ignores the 20651 authentication in the spec for a single request. 20652 :type _request_auth: dict, optional 20653 :param _content_type: force content-type for the request. 20654 :type _content_type: str, Optional 20655 :param _headers: set to override the headers for a single 20656 request; this effectively ignores the headers 20657 in the spec for a single request. 20658 :type _headers: dict, optional 20659 :param _host_index: set to override the host_index for a single 20660 request; this effectively ignores the host_index 20661 in the spec for a single request. 20662 :type _host_index: int, optional 20663 :return: Returns the result object. 20664 """ # noqa: E501 20665 20666 _param = self._get_items_by_group_id_serialize( 20667 board_id=board_id, 20668 group_item_id=group_item_id, 20669 limit=limit, 20670 cursor=cursor, 20671 _request_auth=_request_auth, 20672 _content_type=_content_type, 20673 _headers=_headers, 20674 _host_index=_host_index, 20675 ) 20676 20677 _response_types_map: Dict[str, Optional[str]] = { 20678 "200": "GetItemsByGroupId200Response", 20679 "400": "GetAllGroups400Response", 20680 "404": "GetAllGroups404Response", 20681 "429": "GetAllGroups429Response", 20682 } 20683 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20684 response_data.read() 20685 return self.api_client.response_deserialize( 20686 response_data=response_data, 20687 response_types_map=_response_types_map, 20688 ).data 20689 20690 def _get_items_by_group_id_serialize( 20691 self, 20692 board_id, 20693 group_item_id, 20694 limit, 20695 cursor, 20696 _request_auth, 20697 _content_type, 20698 _headers, 20699 _host_index, 20700 ) -> RequestSerialized: 20701 20702 _host = None 20703 20704 _collection_formats: Dict[str, str] = {} 20705 20706 _path_params: Dict[str, str] = {} 20707 _query_params: List[Tuple[str, str]] = [] 20708 _header_params: Dict[str, Optional[str]] = _headers or {} 20709 _form_params: List[Tuple[str, str]] = [] 20710 _files: Dict[str, str] = {} 20711 _body_params: Optional[bytes] = None 20712 20713 # process the path parameters 20714 if board_id is not None: 20715 _path_params["board_id"] = board_id 20716 # process the query parameters 20717 if limit is not None: 20718 20719 _query_params.append(("limit", limit)) 20720 20721 if cursor is not None: 20722 20723 _query_params.append(("cursor", cursor)) 20724 20725 if group_item_id is not None: 20726 20727 _query_params.append(("group_item_id", group_item_id)) 20728 20729 # process the header parameters 20730 # process the form parameters 20731 # process the body parameter 20732 20733 # set the HTTP header `Accept` 20734 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20735 20736 # authentication setting 20737 _auth_settings: List[str] = [] 20738 20739 return self.api_client.param_serialize( 20740 method="GET", 20741 resource_path="/v2/boards/{board_id}/groups/items", 20742 path_params=_path_params, 20743 query_params=_query_params, 20744 header_params=_header_params, 20745 body=_body_params, 20746 post_params=_form_params, 20747 files=_files, 20748 auth_settings=_auth_settings, 20749 collection_formats=_collection_formats, 20750 _host=_host, 20751 _request_auth=_request_auth, 20752 ) 20753 20754 @validate_call 20755 def un_group( 20756 self, 20757 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20758 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20759 delete_items: Annotated[ 20760 Optional[StrictBool], Field(description="Indicates whether the items should be removed. By default, false.") 20761 ] = None, 20762 _request_timeout: Union[ 20763 None, 20764 Annotated[StrictFloat, Field(gt=0)], 20765 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20766 ] = None, 20767 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20768 _content_type: Optional[StrictStr] = None, 20769 _headers: Optional[Dict[StrictStr, Any]] = None, 20770 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20771 ) -> object: 20772 """Ungroup items 20773 20774 Ungroups items from a group.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 20775 20776 :param board_id: Unique identifier (ID) of the board. (required) 20777 :type board_id: str 20778 :param group_id: Unique identifier (ID) of the group. (required) 20779 :type group_id: str 20780 :param delete_items: Indicates whether the items should be removed. By default, false. 20781 :type delete_items: bool 20782 :param _request_timeout: timeout setting for this request. If one 20783 number provided, it will be total request 20784 timeout. It can also be a pair (tuple) of 20785 (connection, read) timeouts. 20786 :type _request_timeout: int, tuple(int, int), optional 20787 :param _request_auth: set to override the auth_settings for an a single 20788 request; this effectively ignores the 20789 authentication in the spec for a single request. 20790 :type _request_auth: dict, optional 20791 :param _content_type: force content-type for the request. 20792 :type _content_type: str, Optional 20793 :param _headers: set to override the headers for a single 20794 request; this effectively ignores the headers 20795 in the spec for a single request. 20796 :type _headers: dict, optional 20797 :param _host_index: set to override the host_index for a single 20798 request; this effectively ignores the host_index 20799 in the spec for a single request. 20800 :type _host_index: int, optional 20801 :return: Returns the result object. 20802 """ # noqa: E501 20803 20804 _param = self._un_group_serialize( 20805 board_id=board_id, 20806 group_id=group_id, 20807 delete_items=delete_items, 20808 _request_auth=_request_auth, 20809 _content_type=_content_type, 20810 _headers=_headers, 20811 _host_index=_host_index, 20812 ) 20813 20814 _response_types_map: Dict[str, Optional[str]] = { 20815 "204": "object", 20816 "400": "UnGroup400Response", 20817 "404": "UnGroup404Response", 20818 "429": "UnGroup429Response", 20819 } 20820 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20821 response_data.read() 20822 return self.api_client.response_deserialize( 20823 response_data=response_data, 20824 response_types_map=_response_types_map, 20825 ).data 20826 20827 def _un_group_serialize( 20828 self, 20829 board_id, 20830 group_id, 20831 delete_items, 20832 _request_auth, 20833 _content_type, 20834 _headers, 20835 _host_index, 20836 ) -> RequestSerialized: 20837 20838 _host = None 20839 20840 _collection_formats: Dict[str, str] = {} 20841 20842 _path_params: Dict[str, str] = {} 20843 _query_params: List[Tuple[str, str]] = [] 20844 _header_params: Dict[str, Optional[str]] = _headers or {} 20845 _form_params: List[Tuple[str, str]] = [] 20846 _files: Dict[str, str] = {} 20847 _body_params: Optional[bytes] = None 20848 20849 # process the path parameters 20850 if board_id is not None: 20851 _path_params["board_id"] = board_id 20852 if group_id is not None: 20853 _path_params["group_id"] = group_id 20854 # process the query parameters 20855 if delete_items is not None: 20856 20857 _query_params.append(("delete_items", delete_items)) 20858 20859 # process the header parameters 20860 # process the form parameters 20861 # process the body parameter 20862 20863 # set the HTTP header `Accept` 20864 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20865 20866 # authentication setting 20867 _auth_settings: List[str] = [] 20868 20869 return self.api_client.param_serialize( 20870 method="DELETE", 20871 resource_path="/v2/boards/{board_id}/groups/{group_id}", 20872 path_params=_path_params, 20873 query_params=_query_params, 20874 header_params=_header_params, 20875 body=_body_params, 20876 post_params=_form_params, 20877 files=_files, 20878 auth_settings=_auth_settings, 20879 collection_formats=_collection_formats, 20880 _host=_host, 20881 _request_auth=_request_auth, 20882 ) 20883 20884 @validate_call 20885 def update_group( 20886 self, 20887 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20888 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20889 group: Group, 20890 _request_timeout: Union[ 20891 None, 20892 Annotated[StrictFloat, Field(gt=0)], 20893 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20894 ] = None, 20895 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20896 _content_type: Optional[StrictStr] = None, 20897 _headers: Optional[Dict[StrictStr, Any]] = None, 20898 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20899 ) -> GroupResponseShort: 20900 """Updates a group with new items 20901 20902 This endpoint updates an existing group by replacing it entirely with a new group. When the update is made, the original group is completely replaced, and a new group ID is assigned. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20903 20904 :param board_id: Unique identifier (ID) of the board. (required) 20905 :type board_id: str 20906 :param group_id: Unique identifier (ID) of the group. (required) 20907 :type group_id: str 20908 :param group: (required) 20909 :type group: Group 20910 :param _request_timeout: timeout setting for this request. If one 20911 number provided, it will be total request 20912 timeout. It can also be a pair (tuple) of 20913 (connection, read) timeouts. 20914 :type _request_timeout: int, tuple(int, int), optional 20915 :param _request_auth: set to override the auth_settings for an a single 20916 request; this effectively ignores the 20917 authentication in the spec for a single request. 20918 :type _request_auth: dict, optional 20919 :param _content_type: force content-type for the request. 20920 :type _content_type: str, Optional 20921 :param _headers: set to override the headers for a single 20922 request; this effectively ignores the headers 20923 in the spec for a single request. 20924 :type _headers: dict, optional 20925 :param _host_index: set to override the host_index for a single 20926 request; this effectively ignores the host_index 20927 in the spec for a single request. 20928 :type _host_index: int, optional 20929 :return: Returns the result object. 20930 """ # noqa: E501 20931 20932 _param = self._update_group_serialize( 20933 board_id=board_id, 20934 group_id=group_id, 20935 group=group, 20936 _request_auth=_request_auth, 20937 _content_type=_content_type, 20938 _headers=_headers, 20939 _host_index=_host_index, 20940 ) 20941 20942 _response_types_map: Dict[str, Optional[str]] = { 20943 "200": "GroupResponseShort", 20944 "400": "GetAllGroups400Response", 20945 "404": "GetAllGroups404Response", 20946 "429": "GetAllGroups429Response", 20947 } 20948 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20949 response_data.read() 20950 return self.api_client.response_deserialize( 20951 response_data=response_data, 20952 response_types_map=_response_types_map, 20953 ).data 20954 20955 def _update_group_serialize( 20956 self, 20957 board_id, 20958 group_id, 20959 group, 20960 _request_auth, 20961 _content_type, 20962 _headers, 20963 _host_index, 20964 ) -> RequestSerialized: 20965 20966 _host = None 20967 20968 _collection_formats: Dict[str, str] = {} 20969 20970 _path_params: Dict[str, str] = {} 20971 _query_params: List[Tuple[str, str]] = [] 20972 _header_params: Dict[str, Optional[str]] = _headers or {} 20973 _form_params: List[Tuple[str, str]] = [] 20974 _files: Dict[str, str] = {} 20975 _body_params: Optional[bytes] = None 20976 20977 # process the path parameters 20978 if board_id is not None: 20979 _path_params["board_id"] = board_id 20980 if group_id is not None: 20981 _path_params["group_id"] = group_id 20982 # process the query parameters 20983 # process the header parameters 20984 # process the form parameters 20985 # process the body parameter 20986 if group is not None: 20987 _body_params = group 20988 20989 # set the HTTP header `Accept` 20990 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 20991 20992 # set the HTTP header `Content-Type` 20993 if _content_type: 20994 _header_params["Content-Type"] = _content_type 20995 else: 20996 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 20997 if _default_content_type is not None: 20998 _header_params["Content-Type"] = _default_content_type 20999 21000 # authentication setting 21001 _auth_settings: List[str] = [] 21002 21003 return self.api_client.param_serialize( 21004 method="PUT", 21005 resource_path="/v2/boards/{board_id}/groups/{group_id}", 21006 path_params=_path_params, 21007 query_params=_query_params, 21008 header_params=_header_params, 21009 body=_body_params, 21010 post_params=_form_params, 21011 files=_files, 21012 auth_settings=_auth_settings, 21013 collection_formats=_collection_formats, 21014 _host=_host, 21015 _request_auth=_request_auth, 21016 ) 21017 21018 @validate_call 21019 def create_image_item_using_local_file( 21020 self, 21021 board_id_platform_file_upload: Annotated[ 21022 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 21023 ], 21024 resource: Annotated[ 21025 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 21026 ], 21027 data: Optional[UploadFileFromDeviceData] = None, 21028 _request_timeout: Union[ 21029 None, 21030 Annotated[StrictFloat, Field(gt=0)], 21031 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21032 ] = None, 21033 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21034 _content_type: Optional[StrictStr] = None, 21035 _headers: Optional[Dict[StrictStr, Any]] = None, 21036 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21037 ) -> ImageItem: 21038 """Create image item using file from device 21039 21040 Adds an image item to a board by specifying a file from device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21041 21042 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) 21043 :type board_id_platform_file_upload: str 21044 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 21045 :type resource: bytearray 21046 :param data: 21047 :type data: UploadFileFromDeviceData 21048 :param _request_timeout: timeout setting for this request. If one 21049 number provided, it will be total request 21050 timeout. It can also be a pair (tuple) of 21051 (connection, read) timeouts. 21052 :type _request_timeout: int, tuple(int, int), optional 21053 :param _request_auth: set to override the auth_settings for an a single 21054 request; this effectively ignores the 21055 authentication in the spec for a single request. 21056 :type _request_auth: dict, optional 21057 :param _content_type: force content-type for the request. 21058 :type _content_type: str, Optional 21059 :param _headers: set to override the headers for a single 21060 request; this effectively ignores the headers 21061 in the spec for a single request. 21062 :type _headers: dict, optional 21063 :param _host_index: set to override the host_index for a single 21064 request; this effectively ignores the host_index 21065 in the spec for a single request. 21066 :type _host_index: int, optional 21067 :return: Returns the result object. 21068 """ # noqa: E501 21069 21070 _param = self._create_image_item_using_local_file_serialize( 21071 board_id_platform_file_upload=board_id_platform_file_upload, 21072 resource=resource, 21073 data=data, 21074 _request_auth=_request_auth, 21075 _content_type=_content_type, 21076 _headers=_headers, 21077 _host_index=_host_index, 21078 ) 21079 21080 _response_types_map: Dict[str, Optional[str]] = { 21081 "201": "ImageItem", 21082 } 21083 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21084 response_data.read() 21085 return self.api_client.response_deserialize( 21086 response_data=response_data, 21087 response_types_map=_response_types_map, 21088 ).data 21089 21090 def _create_image_item_using_local_file_serialize( 21091 self, 21092 board_id_platform_file_upload, 21093 resource, 21094 data, 21095 _request_auth, 21096 _content_type, 21097 _headers, 21098 _host_index, 21099 ) -> RequestSerialized: 21100 21101 _host = None 21102 21103 _collection_formats: Dict[str, str] = {} 21104 21105 _path_params: Dict[str, str] = {} 21106 _query_params: List[Tuple[str, str]] = [] 21107 _header_params: Dict[str, Optional[str]] = _headers or {} 21108 _form_params: List[Tuple[str, str]] = [] 21109 _files: Dict[str, str] = {} 21110 _body_params: Optional[bytes] = None 21111 21112 # process the path parameters 21113 if board_id_platform_file_upload is not None: 21114 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 21115 # process the query parameters 21116 # process the header parameters 21117 # process the form parameters 21118 if data is not None: 21119 _form_params.append(("data", data)) 21120 if resource is not None: 21121 _files["resource"] = resource 21122 # process the body parameter 21123 21124 # set the HTTP header `Accept` 21125 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21126 21127 # set the HTTP header `Content-Type` 21128 if _content_type: 21129 _header_params["Content-Type"] = _content_type 21130 else: 21131 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 21132 if _default_content_type is not None: 21133 _header_params["Content-Type"] = _default_content_type 21134 21135 # authentication setting 21136 _auth_settings: List[str] = [] 21137 21138 return self.api_client.param_serialize( 21139 method="POST", 21140 resource_path="/v2/boards/{board_id_PlatformFileUpload}/images", 21141 path_params=_path_params, 21142 query_params=_query_params, 21143 header_params=_header_params, 21144 body=_body_params, 21145 post_params=_form_params, 21146 files=_files, 21147 auth_settings=_auth_settings, 21148 collection_formats=_collection_formats, 21149 _host=_host, 21150 _request_auth=_request_auth, 21151 ) 21152 21153 @validate_call 21154 def create_image_item_using_url( 21155 self, 21156 board_id: Annotated[ 21157 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 21158 ], 21159 image_create_request: ImageCreateRequest, 21160 _request_timeout: Union[ 21161 None, 21162 Annotated[StrictFloat, Field(gt=0)], 21163 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21164 ] = None, 21165 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21166 _content_type: Optional[StrictStr] = None, 21167 _headers: Optional[Dict[StrictStr, Any]] = None, 21168 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21169 ) -> ImageItem: 21170 """Create image item using URL 21171 21172 Adds an image item to a board by specifying an image URL.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21173 21174 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 21175 :type board_id: str 21176 :param image_create_request: (required) 21177 :type image_create_request: ImageCreateRequest 21178 :param _request_timeout: timeout setting for this request. If one 21179 number provided, it will be total request 21180 timeout. It can also be a pair (tuple) of 21181 (connection, read) timeouts. 21182 :type _request_timeout: int, tuple(int, int), optional 21183 :param _request_auth: set to override the auth_settings for an a single 21184 request; this effectively ignores the 21185 authentication in the spec for a single request. 21186 :type _request_auth: dict, optional 21187 :param _content_type: force content-type for the request. 21188 :type _content_type: str, Optional 21189 :param _headers: set to override the headers for a single 21190 request; this effectively ignores the headers 21191 in the spec for a single request. 21192 :type _headers: dict, optional 21193 :param _host_index: set to override the host_index for a single 21194 request; this effectively ignores the host_index 21195 in the spec for a single request. 21196 :type _host_index: int, optional 21197 :return: Returns the result object. 21198 """ # noqa: E501 21199 21200 _param = self._create_image_item_using_url_serialize( 21201 board_id=board_id, 21202 image_create_request=image_create_request, 21203 _request_auth=_request_auth, 21204 _content_type=_content_type, 21205 _headers=_headers, 21206 _host_index=_host_index, 21207 ) 21208 21209 _response_types_map: Dict[str, Optional[str]] = { 21210 "201": "ImageItem", 21211 "400": None, 21212 "404": None, 21213 "429": None, 21214 } 21215 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21216 response_data.read() 21217 return self.api_client.response_deserialize( 21218 response_data=response_data, 21219 response_types_map=_response_types_map, 21220 ).data 21221 21222 def _create_image_item_using_url_serialize( 21223 self, 21224 board_id, 21225 image_create_request, 21226 _request_auth, 21227 _content_type, 21228 _headers, 21229 _host_index, 21230 ) -> RequestSerialized: 21231 21232 _host = None 21233 21234 _collection_formats: Dict[str, str] = {} 21235 21236 _path_params: Dict[str, str] = {} 21237 _query_params: List[Tuple[str, str]] = [] 21238 _header_params: Dict[str, Optional[str]] = _headers or {} 21239 _form_params: List[Tuple[str, str]] = [] 21240 _files: Dict[str, str] = {} 21241 _body_params: Optional[bytes] = None 21242 21243 # process the path parameters 21244 if board_id is not None: 21245 _path_params["board_id"] = board_id 21246 # process the query parameters 21247 # process the header parameters 21248 # process the form parameters 21249 # process the body parameter 21250 if image_create_request is not None: 21251 _body_params = image_create_request 21252 21253 # set the HTTP header `Accept` 21254 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21255 21256 # set the HTTP header `Content-Type` 21257 if _content_type: 21258 _header_params["Content-Type"] = _content_type 21259 else: 21260 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 21261 if _default_content_type is not None: 21262 _header_params["Content-Type"] = _default_content_type 21263 21264 # authentication setting 21265 _auth_settings: List[str] = [] 21266 21267 return self.api_client.param_serialize( 21268 method="POST", 21269 resource_path="/v2/boards/{board_id}/images", 21270 path_params=_path_params, 21271 query_params=_query_params, 21272 header_params=_header_params, 21273 body=_body_params, 21274 post_params=_form_params, 21275 files=_files, 21276 auth_settings=_auth_settings, 21277 collection_formats=_collection_formats, 21278 _host=_host, 21279 _request_auth=_request_auth, 21280 ) 21281 21282 @validate_call 21283 def delete_image_item( 21284 self, 21285 board_id: Annotated[ 21286 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21287 ], 21288 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21289 _request_timeout: Union[ 21290 None, 21291 Annotated[StrictFloat, Field(gt=0)], 21292 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21293 ] = None, 21294 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21295 _content_type: Optional[StrictStr] = None, 21296 _headers: Optional[Dict[StrictStr, Any]] = None, 21297 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21298 ) -> object: 21299 """Delete image item 21300 21301 Deletes an image item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21302 21303 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21304 :type board_id: str 21305 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21306 :type item_id: str 21307 :param _request_timeout: timeout setting for this request. If one 21308 number provided, it will be total request 21309 timeout. It can also be a pair (tuple) of 21310 (connection, read) timeouts. 21311 :type _request_timeout: int, tuple(int, int), optional 21312 :param _request_auth: set to override the auth_settings for an a single 21313 request; this effectively ignores the 21314 authentication in the spec for a single request. 21315 :type _request_auth: dict, optional 21316 :param _content_type: force content-type for the request. 21317 :type _content_type: str, Optional 21318 :param _headers: set to override the headers for a single 21319 request; this effectively ignores the headers 21320 in the spec for a single request. 21321 :type _headers: dict, optional 21322 :param _host_index: set to override the host_index for a single 21323 request; this effectively ignores the host_index 21324 in the spec for a single request. 21325 :type _host_index: int, optional 21326 :return: Returns the result object. 21327 """ # noqa: E501 21328 21329 _param = self._delete_image_item_serialize( 21330 board_id=board_id, 21331 item_id=item_id, 21332 _request_auth=_request_auth, 21333 _content_type=_content_type, 21334 _headers=_headers, 21335 _host_index=_host_index, 21336 ) 21337 21338 _response_types_map: Dict[str, Optional[str]] = { 21339 "204": "object", 21340 "400": None, 21341 "404": None, 21342 "429": None, 21343 } 21344 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21345 response_data.read() 21346 return self.api_client.response_deserialize( 21347 response_data=response_data, 21348 response_types_map=_response_types_map, 21349 ).data 21350 21351 def _delete_image_item_serialize( 21352 self, 21353 board_id, 21354 item_id, 21355 _request_auth, 21356 _content_type, 21357 _headers, 21358 _host_index, 21359 ) -> RequestSerialized: 21360 21361 _host = None 21362 21363 _collection_formats: Dict[str, str] = {} 21364 21365 _path_params: Dict[str, str] = {} 21366 _query_params: List[Tuple[str, str]] = [] 21367 _header_params: Dict[str, Optional[str]] = _headers or {} 21368 _form_params: List[Tuple[str, str]] = [] 21369 _files: Dict[str, str] = {} 21370 _body_params: Optional[bytes] = None 21371 21372 # process the path parameters 21373 if board_id is not None: 21374 _path_params["board_id"] = board_id 21375 if item_id is not None: 21376 _path_params["item_id"] = item_id 21377 # process the query parameters 21378 # process the header parameters 21379 # process the form parameters 21380 # process the body parameter 21381 21382 # set the HTTP header `Accept` 21383 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21384 21385 # authentication setting 21386 _auth_settings: List[str] = [] 21387 21388 return self.api_client.param_serialize( 21389 method="DELETE", 21390 resource_path="/v2/boards/{board_id}/images/{item_id}", 21391 path_params=_path_params, 21392 query_params=_query_params, 21393 header_params=_header_params, 21394 body=_body_params, 21395 post_params=_form_params, 21396 files=_files, 21397 auth_settings=_auth_settings, 21398 collection_formats=_collection_formats, 21399 _host=_host, 21400 _request_auth=_request_auth, 21401 ) 21402 21403 @validate_call 21404 def get_image_item( 21405 self, 21406 board_id: Annotated[ 21407 StrictStr, 21408 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 21409 ], 21410 item_id: Annotated[ 21411 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 21412 ], 21413 _request_timeout: Union[ 21414 None, 21415 Annotated[StrictFloat, Field(gt=0)], 21416 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21417 ] = None, 21418 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21419 _content_type: Optional[StrictStr] = None, 21420 _headers: Optional[Dict[StrictStr, Any]] = None, 21421 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21422 ) -> ImageItem: 21423 """Get image item 21424 21425 Retrieves information for a specific image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 21426 21427 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 21428 :type board_id: str 21429 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 21430 :type item_id: str 21431 :param _request_timeout: timeout setting for this request. If one 21432 number provided, it will be total request 21433 timeout. It can also be a pair (tuple) of 21434 (connection, read) timeouts. 21435 :type _request_timeout: int, tuple(int, int), optional 21436 :param _request_auth: set to override the auth_settings for an a single 21437 request; this effectively ignores the 21438 authentication in the spec for a single request. 21439 :type _request_auth: dict, optional 21440 :param _content_type: force content-type for the request. 21441 :type _content_type: str, Optional 21442 :param _headers: set to override the headers for a single 21443 request; this effectively ignores the headers 21444 in the spec for a single request. 21445 :type _headers: dict, optional 21446 :param _host_index: set to override the host_index for a single 21447 request; this effectively ignores the host_index 21448 in the spec for a single request. 21449 :type _host_index: int, optional 21450 :return: Returns the result object. 21451 """ # noqa: E501 21452 21453 _param = self._get_image_item_serialize( 21454 board_id=board_id, 21455 item_id=item_id, 21456 _request_auth=_request_auth, 21457 _content_type=_content_type, 21458 _headers=_headers, 21459 _host_index=_host_index, 21460 ) 21461 21462 _response_types_map: Dict[str, Optional[str]] = { 21463 "200": "ImageItem", 21464 "400": None, 21465 "404": None, 21466 "429": None, 21467 } 21468 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21469 response_data.read() 21470 return self.api_client.response_deserialize( 21471 response_data=response_data, 21472 response_types_map=_response_types_map, 21473 ).data 21474 21475 def _get_image_item_serialize( 21476 self, 21477 board_id, 21478 item_id, 21479 _request_auth, 21480 _content_type, 21481 _headers, 21482 _host_index, 21483 ) -> RequestSerialized: 21484 21485 _host = None 21486 21487 _collection_formats: Dict[str, str] = {} 21488 21489 _path_params: Dict[str, str] = {} 21490 _query_params: List[Tuple[str, str]] = [] 21491 _header_params: Dict[str, Optional[str]] = _headers or {} 21492 _form_params: List[Tuple[str, str]] = [] 21493 _files: Dict[str, str] = {} 21494 _body_params: Optional[bytes] = None 21495 21496 # process the path parameters 21497 if board_id is not None: 21498 _path_params["board_id"] = board_id 21499 if item_id is not None: 21500 _path_params["item_id"] = item_id 21501 # process the query parameters 21502 # process the header parameters 21503 # process the form parameters 21504 # process the body parameter 21505 21506 # set the HTTP header `Accept` 21507 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21508 21509 # authentication setting 21510 _auth_settings: List[str] = [] 21511 21512 return self.api_client.param_serialize( 21513 method="GET", 21514 resource_path="/v2/boards/{board_id}/images/{item_id}", 21515 path_params=_path_params, 21516 query_params=_query_params, 21517 header_params=_header_params, 21518 body=_body_params, 21519 post_params=_form_params, 21520 files=_files, 21521 auth_settings=_auth_settings, 21522 collection_formats=_collection_formats, 21523 _host=_host, 21524 _request_auth=_request_auth, 21525 ) 21526 21527 @validate_call 21528 def update_image_item_using_file_from_device( 21529 self, 21530 board_id_platform_file_upload: Annotated[ 21531 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 21532 ], 21533 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 21534 resource: Annotated[ 21535 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 21536 ], 21537 data: Optional[UploadFileFromDeviceData] = None, 21538 _request_timeout: Union[ 21539 None, 21540 Annotated[StrictFloat, Field(gt=0)], 21541 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21542 ] = None, 21543 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21544 _content_type: Optional[StrictStr] = None, 21545 _headers: Optional[Dict[StrictStr, Any]] = None, 21546 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21547 ) -> ImageItem: 21548 """Update image item using file from device 21549 21550 Updates an image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21551 21552 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) 21553 :type board_id_platform_file_upload: str 21554 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 21555 :type item_id: str 21556 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 21557 :type resource: bytearray 21558 :param data: 21559 :type data: UploadFileFromDeviceData 21560 :param _request_timeout: timeout setting for this request. If one 21561 number provided, it will be total request 21562 timeout. It can also be a pair (tuple) of 21563 (connection, read) timeouts. 21564 :type _request_timeout: int, tuple(int, int), optional 21565 :param _request_auth: set to override the auth_settings for an a single 21566 request; this effectively ignores the 21567 authentication in the spec for a single request. 21568 :type _request_auth: dict, optional 21569 :param _content_type: force content-type for the request. 21570 :type _content_type: str, Optional 21571 :param _headers: set to override the headers for a single 21572 request; this effectively ignores the headers 21573 in the spec for a single request. 21574 :type _headers: dict, optional 21575 :param _host_index: set to override the host_index for a single 21576 request; this effectively ignores the host_index 21577 in the spec for a single request. 21578 :type _host_index: int, optional 21579 :return: Returns the result object. 21580 """ # noqa: E501 21581 21582 _param = self._update_image_item_using_file_from_device_serialize( 21583 board_id_platform_file_upload=board_id_platform_file_upload, 21584 item_id=item_id, 21585 resource=resource, 21586 data=data, 21587 _request_auth=_request_auth, 21588 _content_type=_content_type, 21589 _headers=_headers, 21590 _host_index=_host_index, 21591 ) 21592 21593 _response_types_map: Dict[str, Optional[str]] = { 21594 "200": "ImageItem", 21595 } 21596 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21597 response_data.read() 21598 return self.api_client.response_deserialize( 21599 response_data=response_data, 21600 response_types_map=_response_types_map, 21601 ).data 21602 21603 def _update_image_item_using_file_from_device_serialize( 21604 self, 21605 board_id_platform_file_upload, 21606 item_id, 21607 resource, 21608 data, 21609 _request_auth, 21610 _content_type, 21611 _headers, 21612 _host_index, 21613 ) -> RequestSerialized: 21614 21615 _host = None 21616 21617 _collection_formats: Dict[str, str] = {} 21618 21619 _path_params: Dict[str, str] = {} 21620 _query_params: List[Tuple[str, str]] = [] 21621 _header_params: Dict[str, Optional[str]] = _headers or {} 21622 _form_params: List[Tuple[str, str]] = [] 21623 _files: Dict[str, str] = {} 21624 _body_params: Optional[bytes] = None 21625 21626 # process the path parameters 21627 if board_id_platform_file_upload is not None: 21628 _path_params["board_id_PlatformFileUpload"] = board_id_platform_file_upload 21629 if item_id is not None: 21630 _path_params["item_id"] = item_id 21631 # process the query parameters 21632 # process the header parameters 21633 # process the form parameters 21634 if data is not None: 21635 _form_params.append(("data", data)) 21636 if resource is not None: 21637 _files["resource"] = resource 21638 # process the body parameter 21639 21640 # set the HTTP header `Accept` 21641 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21642 21643 # set the HTTP header `Content-Type` 21644 if _content_type: 21645 _header_params["Content-Type"] = _content_type 21646 else: 21647 _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) 21648 if _default_content_type is not None: 21649 _header_params["Content-Type"] = _default_content_type 21650 21651 # authentication setting 21652 _auth_settings: List[str] = [] 21653 21654 return self.api_client.param_serialize( 21655 method="PATCH", 21656 resource_path="/v2/boards/{board_id_PlatformFileUpload}/images/{item_id}", 21657 path_params=_path_params, 21658 query_params=_query_params, 21659 header_params=_header_params, 21660 body=_body_params, 21661 post_params=_form_params, 21662 files=_files, 21663 auth_settings=_auth_settings, 21664 collection_formats=_collection_formats, 21665 _host=_host, 21666 _request_auth=_request_auth, 21667 ) 21668 21669 @validate_call 21670 def update_image_item_using_url( 21671 self, 21672 board_id: Annotated[ 21673 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 21674 ], 21675 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 21676 image_update_request: ImageUpdateRequest, 21677 _request_timeout: Union[ 21678 None, 21679 Annotated[StrictFloat, Field(gt=0)], 21680 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21681 ] = None, 21682 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21683 _content_type: Optional[StrictStr] = None, 21684 _headers: Optional[Dict[StrictStr, Any]] = None, 21685 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21686 ) -> ImageItem: 21687 """Update image item using URL 21688 21689 Updates an image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21690 21691 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 21692 :type board_id: str 21693 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 21694 :type item_id: str 21695 :param image_update_request: (required) 21696 :type image_update_request: ImageUpdateRequest 21697 :param _request_timeout: timeout setting for this request. If one 21698 number provided, it will be total request 21699 timeout. It can also be a pair (tuple) of 21700 (connection, read) timeouts. 21701 :type _request_timeout: int, tuple(int, int), optional 21702 :param _request_auth: set to override the auth_settings for an a single 21703 request; this effectively ignores the 21704 authentication in the spec for a single request. 21705 :type _request_auth: dict, optional 21706 :param _content_type: force content-type for the request. 21707 :type _content_type: str, Optional 21708 :param _headers: set to override the headers for a single 21709 request; this effectively ignores the headers 21710 in the spec for a single request. 21711 :type _headers: dict, optional 21712 :param _host_index: set to override the host_index for a single 21713 request; this effectively ignores the host_index 21714 in the spec for a single request. 21715 :type _host_index: int, optional 21716 :return: Returns the result object. 21717 """ # noqa: E501 21718 21719 _param = self._update_image_item_using_url_serialize( 21720 board_id=board_id, 21721 item_id=item_id, 21722 image_update_request=image_update_request, 21723 _request_auth=_request_auth, 21724 _content_type=_content_type, 21725 _headers=_headers, 21726 _host_index=_host_index, 21727 ) 21728 21729 _response_types_map: Dict[str, Optional[str]] = { 21730 "200": "ImageItem", 21731 "400": None, 21732 "404": None, 21733 "409": None, 21734 "429": None, 21735 } 21736 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21737 response_data.read() 21738 return self.api_client.response_deserialize( 21739 response_data=response_data, 21740 response_types_map=_response_types_map, 21741 ).data 21742 21743 def _update_image_item_using_url_serialize( 21744 self, 21745 board_id, 21746 item_id, 21747 image_update_request, 21748 _request_auth, 21749 _content_type, 21750 _headers, 21751 _host_index, 21752 ) -> RequestSerialized: 21753 21754 _host = None 21755 21756 _collection_formats: Dict[str, str] = {} 21757 21758 _path_params: Dict[str, str] = {} 21759 _query_params: List[Tuple[str, str]] = [] 21760 _header_params: Dict[str, Optional[str]] = _headers or {} 21761 _form_params: List[Tuple[str, str]] = [] 21762 _files: Dict[str, str] = {} 21763 _body_params: Optional[bytes] = None 21764 21765 # process the path parameters 21766 if board_id is not None: 21767 _path_params["board_id"] = board_id 21768 if item_id is not None: 21769 _path_params["item_id"] = item_id 21770 # process the query parameters 21771 # process the header parameters 21772 # process the form parameters 21773 # process the body parameter 21774 if image_update_request is not None: 21775 _body_params = image_update_request 21776 21777 # set the HTTP header `Accept` 21778 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21779 21780 # set the HTTP header `Content-Type` 21781 if _content_type: 21782 _header_params["Content-Type"] = _content_type 21783 else: 21784 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 21785 if _default_content_type is not None: 21786 _header_params["Content-Type"] = _default_content_type 21787 21788 # authentication setting 21789 _auth_settings: List[str] = [] 21790 21791 return self.api_client.param_serialize( 21792 method="PATCH", 21793 resource_path="/v2/boards/{board_id}/images/{item_id}", 21794 path_params=_path_params, 21795 query_params=_query_params, 21796 header_params=_header_params, 21797 body=_body_params, 21798 post_params=_form_params, 21799 files=_files, 21800 auth_settings=_auth_settings, 21801 collection_formats=_collection_formats, 21802 _host=_host, 21803 _request_auth=_request_auth, 21804 ) 21805 21806 @validate_call 21807 def delete_item( 21808 self, 21809 board_id: Annotated[ 21810 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21811 ], 21812 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21813 _request_timeout: Union[ 21814 None, 21815 Annotated[StrictFloat, Field(gt=0)], 21816 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21817 ] = None, 21818 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21819 _content_type: Optional[StrictStr] = None, 21820 _headers: Optional[Dict[StrictStr, Any]] = None, 21821 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21822 ) -> object: 21823 """Delete item 21824 21825 Deletes an item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21826 21827 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21828 :type board_id: str 21829 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21830 :type item_id: str 21831 :param _request_timeout: timeout setting for this request. If one 21832 number provided, it will be total request 21833 timeout. It can also be a pair (tuple) of 21834 (connection, read) timeouts. 21835 :type _request_timeout: int, tuple(int, int), optional 21836 :param _request_auth: set to override the auth_settings for an a single 21837 request; this effectively ignores the 21838 authentication in the spec for a single request. 21839 :type _request_auth: dict, optional 21840 :param _content_type: force content-type for the request. 21841 :type _content_type: str, Optional 21842 :param _headers: set to override the headers for a single 21843 request; this effectively ignores the headers 21844 in the spec for a single request. 21845 :type _headers: dict, optional 21846 :param _host_index: set to override the host_index for a single 21847 request; this effectively ignores the host_index 21848 in the spec for a single request. 21849 :type _host_index: int, optional 21850 :return: Returns the result object. 21851 """ # noqa: E501 21852 21853 _param = self._delete_item_serialize( 21854 board_id=board_id, 21855 item_id=item_id, 21856 _request_auth=_request_auth, 21857 _content_type=_content_type, 21858 _headers=_headers, 21859 _host_index=_host_index, 21860 ) 21861 21862 _response_types_map: Dict[str, Optional[str]] = { 21863 "204": "object", 21864 "400": None, 21865 "404": None, 21866 "429": None, 21867 } 21868 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21869 response_data.read() 21870 return self.api_client.response_deserialize( 21871 response_data=response_data, 21872 response_types_map=_response_types_map, 21873 ).data 21874 21875 def _delete_item_serialize( 21876 self, 21877 board_id, 21878 item_id, 21879 _request_auth, 21880 _content_type, 21881 _headers, 21882 _host_index, 21883 ) -> RequestSerialized: 21884 21885 _host = None 21886 21887 _collection_formats: Dict[str, str] = {} 21888 21889 _path_params: Dict[str, str] = {} 21890 _query_params: List[Tuple[str, str]] = [] 21891 _header_params: Dict[str, Optional[str]] = _headers or {} 21892 _form_params: List[Tuple[str, str]] = [] 21893 _files: Dict[str, str] = {} 21894 _body_params: Optional[bytes] = None 21895 21896 # process the path parameters 21897 if board_id is not None: 21898 _path_params["board_id"] = board_id 21899 if item_id is not None: 21900 _path_params["item_id"] = item_id 21901 # process the query parameters 21902 # process the header parameters 21903 # process the form parameters 21904 # process the body parameter 21905 21906 # set the HTTP header `Accept` 21907 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 21908 21909 # authentication setting 21910 _auth_settings: List[str] = [] 21911 21912 return self.api_client.param_serialize( 21913 method="DELETE", 21914 resource_path="/v2/boards/{board_id}/items/{item_id}", 21915 path_params=_path_params, 21916 query_params=_query_params, 21917 header_params=_header_params, 21918 body=_body_params, 21919 post_params=_form_params, 21920 files=_files, 21921 auth_settings=_auth_settings, 21922 collection_formats=_collection_formats, 21923 _host=_host, 21924 _request_auth=_request_auth, 21925 ) 21926 21927 @validate_call 21928 def delete_item_experimental( 21929 self, 21930 board_id: Annotated[ 21931 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21932 ], 21933 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21934 _request_timeout: Union[ 21935 None, 21936 Annotated[StrictFloat, Field(gt=0)], 21937 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21938 ] = None, 21939 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21940 _content_type: Optional[StrictStr] = None, 21941 _headers: Optional[Dict[StrictStr, Any]] = None, 21942 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21943 ) -> object: 21944 """Delete item 21945 21946 Deletes an item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21947 21948 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21949 :type board_id: str 21950 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21951 :type item_id: str 21952 :param _request_timeout: timeout setting for this request. If one 21953 number provided, it will be total request 21954 timeout. It can also be a pair (tuple) of 21955 (connection, read) timeouts. 21956 :type _request_timeout: int, tuple(int, int), optional 21957 :param _request_auth: set to override the auth_settings for an a single 21958 request; this effectively ignores the 21959 authentication in the spec for a single request. 21960 :type _request_auth: dict, optional 21961 :param _content_type: force content-type for the request. 21962 :type _content_type: str, Optional 21963 :param _headers: set to override the headers for a single 21964 request; this effectively ignores the headers 21965 in the spec for a single request. 21966 :type _headers: dict, optional 21967 :param _host_index: set to override the host_index for a single 21968 request; this effectively ignores the host_index 21969 in the spec for a single request. 21970 :type _host_index: int, optional 21971 :return: Returns the result object. 21972 """ # noqa: E501 21973 21974 _param = self._delete_item_experimental_serialize( 21975 board_id=board_id, 21976 item_id=item_id, 21977 _request_auth=_request_auth, 21978 _content_type=_content_type, 21979 _headers=_headers, 21980 _host_index=_host_index, 21981 ) 21982 21983 _response_types_map: Dict[str, Optional[str]] = { 21984 "204": "object", 21985 "400": "CreateFrameItem400Response", 21986 "404": "CreateFrameItem400Response", 21987 "429": "CreateFrameItem400Response", 21988 } 21989 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21990 response_data.read() 21991 return self.api_client.response_deserialize( 21992 response_data=response_data, 21993 response_types_map=_response_types_map, 21994 ).data 21995 21996 def _delete_item_experimental_serialize( 21997 self, 21998 board_id, 21999 item_id, 22000 _request_auth, 22001 _content_type, 22002 _headers, 22003 _host_index, 22004 ) -> RequestSerialized: 22005 22006 _host = None 22007 22008 _collection_formats: Dict[str, str] = {} 22009 22010 _path_params: Dict[str, str] = {} 22011 _query_params: List[Tuple[str, str]] = [] 22012 _header_params: Dict[str, Optional[str]] = _headers or {} 22013 _form_params: List[Tuple[str, str]] = [] 22014 _files: Dict[str, str] = {} 22015 _body_params: Optional[bytes] = None 22016 22017 # process the path parameters 22018 if board_id is not None: 22019 _path_params["board_id"] = board_id 22020 if item_id is not None: 22021 _path_params["item_id"] = item_id 22022 # process the query parameters 22023 # process the header parameters 22024 # process the form parameters 22025 # process the body parameter 22026 22027 # set the HTTP header `Accept` 22028 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22029 22030 # authentication setting 22031 _auth_settings: List[str] = [] 22032 22033 return self.api_client.param_serialize( 22034 method="DELETE", 22035 resource_path="/v2-experimental/boards/{board_id}/items/{item_id}", 22036 path_params=_path_params, 22037 query_params=_query_params, 22038 header_params=_header_params, 22039 body=_body_params, 22040 post_params=_form_params, 22041 files=_files, 22042 auth_settings=_auth_settings, 22043 collection_formats=_collection_formats, 22044 _host=_host, 22045 _request_auth=_request_auth, 22046 ) 22047 22048 @validate_call 22049 def get_items( 22050 self, 22051 board_id: Annotated[ 22052 StrictStr, 22053 Field( 22054 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 22055 ), 22056 ], 22057 limit: Optional[Annotated[str, Field(strict=True)]] = None, 22058 type: Optional[StrictStr] = None, 22059 cursor: Optional[StrictStr] = None, 22060 _request_timeout: Union[ 22061 None, 22062 Annotated[StrictFloat, Field(gt=0)], 22063 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22064 ] = None, 22065 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22066 _content_type: Optional[StrictStr] = None, 22067 _headers: Optional[Dict[StrictStr, Any]] = None, 22068 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22069 ) -> GenericItemCursorPaged: 22070 """Get items on board 22071 22072 Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22073 22074 :param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) 22075 :type board_id: str 22076 :param limit: 22077 :type limit: str 22078 :param type: 22079 :type type: str 22080 :param cursor: 22081 :type cursor: str 22082 :param _request_timeout: timeout setting for this request. If one 22083 number provided, it will be total request 22084 timeout. It can also be a pair (tuple) of 22085 (connection, read) timeouts. 22086 :type _request_timeout: int, tuple(int, int), optional 22087 :param _request_auth: set to override the auth_settings for an a single 22088 request; this effectively ignores the 22089 authentication in the spec for a single request. 22090 :type _request_auth: dict, optional 22091 :param _content_type: force content-type for the request. 22092 :type _content_type: str, Optional 22093 :param _headers: set to override the headers for a single 22094 request; this effectively ignores the headers 22095 in the spec for a single request. 22096 :type _headers: dict, optional 22097 :param _host_index: set to override the host_index for a single 22098 request; this effectively ignores the host_index 22099 in the spec for a single request. 22100 :type _host_index: int, optional 22101 :return: Returns the result object. 22102 """ # noqa: E501 22103 22104 _param = self._get_items_serialize( 22105 board_id=board_id, 22106 limit=limit, 22107 type=type, 22108 cursor=cursor, 22109 _request_auth=_request_auth, 22110 _content_type=_content_type, 22111 _headers=_headers, 22112 _host_index=_host_index, 22113 ) 22114 22115 _response_types_map: Dict[str, Optional[str]] = { 22116 "200": "GenericItemCursorPaged", 22117 "400": None, 22118 "404": None, 22119 "429": None, 22120 } 22121 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22122 response_data.read() 22123 return self.api_client.response_deserialize( 22124 response_data=response_data, 22125 response_types_map=_response_types_map, 22126 ).data 22127 22128 def _get_items_serialize( 22129 self, 22130 board_id, 22131 limit, 22132 type, 22133 cursor, 22134 _request_auth, 22135 _content_type, 22136 _headers, 22137 _host_index, 22138 ) -> RequestSerialized: 22139 22140 _host = None 22141 22142 _collection_formats: Dict[str, str] = {} 22143 22144 _path_params: Dict[str, str] = {} 22145 _query_params: List[Tuple[str, str]] = [] 22146 _header_params: Dict[str, Optional[str]] = _headers or {} 22147 _form_params: List[Tuple[str, str]] = [] 22148 _files: Dict[str, str] = {} 22149 _body_params: Optional[bytes] = None 22150 22151 # process the path parameters 22152 if board_id is not None: 22153 _path_params["board_id"] = board_id 22154 # process the query parameters 22155 if limit is not None: 22156 22157 _query_params.append(("limit", limit)) 22158 22159 if type is not None: 22160 22161 _query_params.append(("type", type)) 22162 22163 if cursor is not None: 22164 22165 _query_params.append(("cursor", cursor)) 22166 22167 # process the header parameters 22168 # process the form parameters 22169 # process the body parameter 22170 22171 # set the HTTP header `Accept` 22172 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22173 22174 # authentication setting 22175 _auth_settings: List[str] = [] 22176 22177 return self.api_client.param_serialize( 22178 method="GET", 22179 resource_path="/v2/boards/{board_id}/items", 22180 path_params=_path_params, 22181 query_params=_query_params, 22182 header_params=_header_params, 22183 body=_body_params, 22184 post_params=_form_params, 22185 files=_files, 22186 auth_settings=_auth_settings, 22187 collection_formats=_collection_formats, 22188 _host=_host, 22189 _request_auth=_request_auth, 22190 ) 22191 22192 @validate_call 22193 def get_items_within_frame( 22194 self, 22195 board_id_platform_containers: Annotated[ 22196 StrictStr, 22197 Field( 22198 description="Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items." 22199 ), 22200 ], 22201 parent_item_id: Annotated[ 22202 str, 22203 Field( 22204 strict=True, description="ID of the frame for which you want to retrieve the list of available items." 22205 ), 22206 ], 22207 limit: Optional[Annotated[str, Field(strict=True)]] = None, 22208 type: Optional[StrictStr] = None, 22209 cursor: Optional[StrictStr] = None, 22210 _request_timeout: Union[ 22211 None, 22212 Annotated[StrictFloat, Field(gt=0)], 22213 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22214 ] = None, 22215 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22216 _content_type: Optional[StrictStr] = None, 22217 _headers: Optional[Dict[StrictStr, Any]] = None, 22218 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22219 ) -> GenericItemCursorPaged: 22220 """Get items within frame 22221 22222 Retrieves a list of items within a specific frame. A frame is a parent item and all items within a frame are child items. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22223 22224 :param board_id_platform_containers: Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items. (required) 22225 :type board_id_platform_containers: str 22226 :param parent_item_id: ID of the frame for which you want to retrieve the list of available items. (required) 22227 :type parent_item_id: str 22228 :param limit: 22229 :type limit: str 22230 :param type: 22231 :type type: str 22232 :param cursor: 22233 :type cursor: str 22234 :param _request_timeout: timeout setting for this request. If one 22235 number provided, it will be total request 22236 timeout. It can also be a pair (tuple) of 22237 (connection, read) timeouts. 22238 :type _request_timeout: int, tuple(int, int), optional 22239 :param _request_auth: set to override the auth_settings for an a single 22240 request; this effectively ignores the 22241 authentication in the spec for a single request. 22242 :type _request_auth: dict, optional 22243 :param _content_type: force content-type for the request. 22244 :type _content_type: str, Optional 22245 :param _headers: set to override the headers for a single 22246 request; this effectively ignores the headers 22247 in the spec for a single request. 22248 :type _headers: dict, optional 22249 :param _host_index: set to override the host_index for a single 22250 request; this effectively ignores the host_index 22251 in the spec for a single request. 22252 :type _host_index: int, optional 22253 :return: Returns the result object. 22254 """ # noqa: E501 22255 22256 _param = self._get_items_within_frame_serialize( 22257 board_id_platform_containers=board_id_platform_containers, 22258 parent_item_id=parent_item_id, 22259 limit=limit, 22260 type=type, 22261 cursor=cursor, 22262 _request_auth=_request_auth, 22263 _content_type=_content_type, 22264 _headers=_headers, 22265 _host_index=_host_index, 22266 ) 22267 22268 _response_types_map: Dict[str, Optional[str]] = { 22269 "200": "GenericItemCursorPaged", 22270 "400": "CreateFrameItem400Response", 22271 "404": "CreateFrameItem400Response", 22272 "429": "CreateFrameItem400Response", 22273 } 22274 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22275 response_data.read() 22276 return self.api_client.response_deserialize( 22277 response_data=response_data, 22278 response_types_map=_response_types_map, 22279 ).data 22280 22281 def _get_items_within_frame_serialize( 22282 self, 22283 board_id_platform_containers, 22284 parent_item_id, 22285 limit, 22286 type, 22287 cursor, 22288 _request_auth, 22289 _content_type, 22290 _headers, 22291 _host_index, 22292 ) -> RequestSerialized: 22293 22294 _host = None 22295 22296 _collection_formats: Dict[str, str] = {} 22297 22298 _path_params: Dict[str, str] = {} 22299 _query_params: List[Tuple[str, str]] = [] 22300 _header_params: Dict[str, Optional[str]] = _headers or {} 22301 _form_params: List[Tuple[str, str]] = [] 22302 _files: Dict[str, str] = {} 22303 _body_params: Optional[bytes] = None 22304 22305 # process the path parameters 22306 if board_id_platform_containers is not None: 22307 _path_params["board_id_PlatformContainers"] = board_id_platform_containers 22308 # process the query parameters 22309 if parent_item_id is not None: 22310 22311 _query_params.append(("parent_item_id", parent_item_id)) 22312 22313 if limit is not None: 22314 22315 _query_params.append(("limit", limit)) 22316 22317 if type is not None: 22318 22319 _query_params.append(("type", type)) 22320 22321 if cursor is not None: 22322 22323 _query_params.append(("cursor", cursor)) 22324 22325 # process the header parameters 22326 # process the form parameters 22327 # process the body parameter 22328 22329 # set the HTTP header `Accept` 22330 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22331 22332 # authentication setting 22333 _auth_settings: List[str] = [] 22334 22335 return self.api_client.param_serialize( 22336 method="GET", 22337 resource_path="/v2/boards/{board_id_PlatformContainers}/items", 22338 path_params=_path_params, 22339 query_params=_query_params, 22340 header_params=_header_params, 22341 body=_body_params, 22342 post_params=_form_params, 22343 files=_files, 22344 auth_settings=_auth_settings, 22345 collection_formats=_collection_formats, 22346 _host=_host, 22347 _request_auth=_request_auth, 22348 ) 22349 22350 @validate_call 22351 def get_specific_item( 22352 self, 22353 board_id: Annotated[ 22354 StrictStr, 22355 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 22356 ], 22357 item_id: Annotated[ 22358 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 22359 ], 22360 _request_timeout: Union[ 22361 None, 22362 Annotated[StrictFloat, Field(gt=0)], 22363 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22364 ] = None, 22365 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22366 _content_type: Optional[StrictStr] = None, 22367 _headers: Optional[Dict[StrictStr, Any]] = None, 22368 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22369 ) -> GenericItem: 22370 """Get specific item on board 22371 22372 Retrieves information for a specific item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 22373 22374 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 22375 :type board_id: str 22376 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 22377 :type item_id: str 22378 :param _request_timeout: timeout setting for this request. If one 22379 number provided, it will be total request 22380 timeout. It can also be a pair (tuple) of 22381 (connection, read) timeouts. 22382 :type _request_timeout: int, tuple(int, int), optional 22383 :param _request_auth: set to override the auth_settings for an a single 22384 request; this effectively ignores the 22385 authentication in the spec for a single request. 22386 :type _request_auth: dict, optional 22387 :param _content_type: force content-type for the request. 22388 :type _content_type: str, Optional 22389 :param _headers: set to override the headers for a single 22390 request; this effectively ignores the headers 22391 in the spec for a single request. 22392 :type _headers: dict, optional 22393 :param _host_index: set to override the host_index for a single 22394 request; this effectively ignores the host_index 22395 in the spec for a single request. 22396 :type _host_index: int, optional 22397 :return: Returns the result object. 22398 """ # noqa: E501 22399 22400 _param = self._get_specific_item_serialize( 22401 board_id=board_id, 22402 item_id=item_id, 22403 _request_auth=_request_auth, 22404 _content_type=_content_type, 22405 _headers=_headers, 22406 _host_index=_host_index, 22407 ) 22408 22409 _response_types_map: Dict[str, Optional[str]] = { 22410 "200": "GenericItem", 22411 "400": None, 22412 "404": None, 22413 "429": None, 22414 } 22415 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22416 response_data.read() 22417 return self.api_client.response_deserialize( 22418 response_data=response_data, 22419 response_types_map=_response_types_map, 22420 ).data 22421 22422 def _get_specific_item_serialize( 22423 self, 22424 board_id, 22425 item_id, 22426 _request_auth, 22427 _content_type, 22428 _headers, 22429 _host_index, 22430 ) -> RequestSerialized: 22431 22432 _host = None 22433 22434 _collection_formats: Dict[str, str] = {} 22435 22436 _path_params: Dict[str, str] = {} 22437 _query_params: List[Tuple[str, str]] = [] 22438 _header_params: Dict[str, Optional[str]] = _headers or {} 22439 _form_params: List[Tuple[str, str]] = [] 22440 _files: Dict[str, str] = {} 22441 _body_params: Optional[bytes] = None 22442 22443 # process the path parameters 22444 if board_id is not None: 22445 _path_params["board_id"] = board_id 22446 if item_id is not None: 22447 _path_params["item_id"] = item_id 22448 # process the query parameters 22449 # process the header parameters 22450 # process the form parameters 22451 # process the body parameter 22452 22453 # set the HTTP header `Accept` 22454 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22455 22456 # authentication setting 22457 _auth_settings: List[str] = [] 22458 22459 return self.api_client.param_serialize( 22460 method="GET", 22461 resource_path="/v2/boards/{board_id}/items/{item_id}", 22462 path_params=_path_params, 22463 query_params=_query_params, 22464 header_params=_header_params, 22465 body=_body_params, 22466 post_params=_form_params, 22467 files=_files, 22468 auth_settings=_auth_settings, 22469 collection_formats=_collection_formats, 22470 _host=_host, 22471 _request_auth=_request_auth, 22472 ) 22473 22474 @validate_call 22475 def update_item_position_or_parent( 22476 self, 22477 board_id: Annotated[ 22478 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 22479 ], 22480 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 22481 generic_item_update: GenericItemUpdate, 22482 _request_timeout: Union[ 22483 None, 22484 Annotated[StrictFloat, Field(gt=0)], 22485 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22486 ] = None, 22487 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22488 _content_type: Optional[StrictStr] = None, 22489 _headers: Optional[Dict[StrictStr, Any]] = None, 22490 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22491 ) -> GenericItem: 22492 """Update item position or parent 22493 22494 Updates the position or the parent of an item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22495 22496 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 22497 :type board_id: str 22498 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 22499 :type item_id: str 22500 :param generic_item_update: (required) 22501 :type generic_item_update: GenericItemUpdate 22502 :param _request_timeout: timeout setting for this request. If one 22503 number provided, it will be total request 22504 timeout. It can also be a pair (tuple) of 22505 (connection, read) timeouts. 22506 :type _request_timeout: int, tuple(int, int), optional 22507 :param _request_auth: set to override the auth_settings for an a single 22508 request; this effectively ignores the 22509 authentication in the spec for a single request. 22510 :type _request_auth: dict, optional 22511 :param _content_type: force content-type for the request. 22512 :type _content_type: str, Optional 22513 :param _headers: set to override the headers for a single 22514 request; this effectively ignores the headers 22515 in the spec for a single request. 22516 :type _headers: dict, optional 22517 :param _host_index: set to override the host_index for a single 22518 request; this effectively ignores the host_index 22519 in the spec for a single request. 22520 :type _host_index: int, optional 22521 :return: Returns the result object. 22522 """ # noqa: E501 22523 22524 _param = self._update_item_position_or_parent_serialize( 22525 board_id=board_id, 22526 item_id=item_id, 22527 generic_item_update=generic_item_update, 22528 _request_auth=_request_auth, 22529 _content_type=_content_type, 22530 _headers=_headers, 22531 _host_index=_host_index, 22532 ) 22533 22534 _response_types_map: Dict[str, Optional[str]] = { 22535 "200": "GenericItem", 22536 "400": None, 22537 "404": None, 22538 "429": None, 22539 } 22540 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22541 response_data.read() 22542 return self.api_client.response_deserialize( 22543 response_data=response_data, 22544 response_types_map=_response_types_map, 22545 ).data 22546 22547 def _update_item_position_or_parent_serialize( 22548 self, 22549 board_id, 22550 item_id, 22551 generic_item_update, 22552 _request_auth, 22553 _content_type, 22554 _headers, 22555 _host_index, 22556 ) -> RequestSerialized: 22557 22558 _host = None 22559 22560 _collection_formats: Dict[str, str] = {} 22561 22562 _path_params: Dict[str, str] = {} 22563 _query_params: List[Tuple[str, str]] = [] 22564 _header_params: Dict[str, Optional[str]] = _headers or {} 22565 _form_params: List[Tuple[str, str]] = [] 22566 _files: Dict[str, str] = {} 22567 _body_params: Optional[bytes] = None 22568 22569 # process the path parameters 22570 if board_id is not None: 22571 _path_params["board_id"] = board_id 22572 if item_id is not None: 22573 _path_params["item_id"] = item_id 22574 # process the query parameters 22575 # process the header parameters 22576 # process the form parameters 22577 # process the body parameter 22578 if generic_item_update is not None: 22579 _body_params = generic_item_update 22580 22581 # set the HTTP header `Accept` 22582 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22583 22584 # set the HTTP header `Content-Type` 22585 if _content_type: 22586 _header_params["Content-Type"] = _content_type 22587 else: 22588 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 22589 if _default_content_type is not None: 22590 _header_params["Content-Type"] = _default_content_type 22591 22592 # authentication setting 22593 _auth_settings: List[str] = [] 22594 22595 return self.api_client.param_serialize( 22596 method="PATCH", 22597 resource_path="/v2/boards/{board_id}/items/{item_id}", 22598 path_params=_path_params, 22599 query_params=_query_params, 22600 header_params=_header_params, 22601 body=_body_params, 22602 post_params=_form_params, 22603 files=_files, 22604 auth_settings=_auth_settings, 22605 collection_formats=_collection_formats, 22606 _host=_host, 22607 _request_auth=_request_auth, 22608 ) 22609 22610 @validate_call 22611 def create_shape_item( 22612 self, 22613 board_id: Annotated[ 22614 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 22615 ], 22616 shape_create_request: ShapeCreateRequest, 22617 _request_timeout: Union[ 22618 None, 22619 Annotated[StrictFloat, Field(gt=0)], 22620 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22621 ] = None, 22622 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22623 _content_type: Optional[StrictStr] = None, 22624 _headers: Optional[Dict[StrictStr, Any]] = None, 22625 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22626 ) -> ShapeItem: 22627 """Create shape item 22628 22629 Adds a shape item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22630 22631 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 22632 :type board_id: str 22633 :param shape_create_request: (required) 22634 :type shape_create_request: ShapeCreateRequest 22635 :param _request_timeout: timeout setting for this request. If one 22636 number provided, it will be total request 22637 timeout. It can also be a pair (tuple) of 22638 (connection, read) timeouts. 22639 :type _request_timeout: int, tuple(int, int), optional 22640 :param _request_auth: set to override the auth_settings for an a single 22641 request; this effectively ignores the 22642 authentication in the spec for a single request. 22643 :type _request_auth: dict, optional 22644 :param _content_type: force content-type for the request. 22645 :type _content_type: str, Optional 22646 :param _headers: set to override the headers for a single 22647 request; this effectively ignores the headers 22648 in the spec for a single request. 22649 :type _headers: dict, optional 22650 :param _host_index: set to override the host_index for a single 22651 request; this effectively ignores the host_index 22652 in the spec for a single request. 22653 :type _host_index: int, optional 22654 :return: Returns the result object. 22655 """ # noqa: E501 22656 22657 _param = self._create_shape_item_serialize( 22658 board_id=board_id, 22659 shape_create_request=shape_create_request, 22660 _request_auth=_request_auth, 22661 _content_type=_content_type, 22662 _headers=_headers, 22663 _host_index=_host_index, 22664 ) 22665 22666 _response_types_map: Dict[str, Optional[str]] = { 22667 "201": "ShapeItem", 22668 "400": None, 22669 "404": None, 22670 "429": None, 22671 } 22672 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22673 response_data.read() 22674 return self.api_client.response_deserialize( 22675 response_data=response_data, 22676 response_types_map=_response_types_map, 22677 ).data 22678 22679 def _create_shape_item_serialize( 22680 self, 22681 board_id, 22682 shape_create_request, 22683 _request_auth, 22684 _content_type, 22685 _headers, 22686 _host_index, 22687 ) -> RequestSerialized: 22688 22689 _host = None 22690 22691 _collection_formats: Dict[str, str] = {} 22692 22693 _path_params: Dict[str, str] = {} 22694 _query_params: List[Tuple[str, str]] = [] 22695 _header_params: Dict[str, Optional[str]] = _headers or {} 22696 _form_params: List[Tuple[str, str]] = [] 22697 _files: Dict[str, str] = {} 22698 _body_params: Optional[bytes] = None 22699 22700 # process the path parameters 22701 if board_id is not None: 22702 _path_params["board_id"] = board_id 22703 # process the query parameters 22704 # process the header parameters 22705 # process the form parameters 22706 # process the body parameter 22707 if shape_create_request is not None: 22708 _body_params = shape_create_request 22709 22710 # set the HTTP header `Accept` 22711 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22712 22713 # set the HTTP header `Content-Type` 22714 if _content_type: 22715 _header_params["Content-Type"] = _content_type 22716 else: 22717 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 22718 if _default_content_type is not None: 22719 _header_params["Content-Type"] = _default_content_type 22720 22721 # authentication setting 22722 _auth_settings: List[str] = [] 22723 22724 return self.api_client.param_serialize( 22725 method="POST", 22726 resource_path="/v2/boards/{board_id}/shapes", 22727 path_params=_path_params, 22728 query_params=_query_params, 22729 header_params=_header_params, 22730 body=_body_params, 22731 post_params=_form_params, 22732 files=_files, 22733 auth_settings=_auth_settings, 22734 collection_formats=_collection_formats, 22735 _host=_host, 22736 _request_auth=_request_auth, 22737 ) 22738 22739 @validate_call 22740 def delete_shape_item( 22741 self, 22742 board_id: Annotated[ 22743 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 22744 ], 22745 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 22746 _request_timeout: Union[ 22747 None, 22748 Annotated[StrictFloat, Field(gt=0)], 22749 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22750 ] = None, 22751 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22752 _content_type: Optional[StrictStr] = None, 22753 _headers: Optional[Dict[StrictStr, Any]] = None, 22754 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22755 ) -> object: 22756 """Delete shape item 22757 22758 Deletes a shape item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 22759 22760 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 22761 :type board_id: str 22762 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 22763 :type item_id: str 22764 :param _request_timeout: timeout setting for this request. If one 22765 number provided, it will be total request 22766 timeout. It can also be a pair (tuple) of 22767 (connection, read) timeouts. 22768 :type _request_timeout: int, tuple(int, int), optional 22769 :param _request_auth: set to override the auth_settings for an a single 22770 request; this effectively ignores the 22771 authentication in the spec for a single request. 22772 :type _request_auth: dict, optional 22773 :param _content_type: force content-type for the request. 22774 :type _content_type: str, Optional 22775 :param _headers: set to override the headers for a single 22776 request; this effectively ignores the headers 22777 in the spec for a single request. 22778 :type _headers: dict, optional 22779 :param _host_index: set to override the host_index for a single 22780 request; this effectively ignores the host_index 22781 in the spec for a single request. 22782 :type _host_index: int, optional 22783 :return: Returns the result object. 22784 """ # noqa: E501 22785 22786 _param = self._delete_shape_item_serialize( 22787 board_id=board_id, 22788 item_id=item_id, 22789 _request_auth=_request_auth, 22790 _content_type=_content_type, 22791 _headers=_headers, 22792 _host_index=_host_index, 22793 ) 22794 22795 _response_types_map: Dict[str, Optional[str]] = { 22796 "204": "object", 22797 "400": None, 22798 "404": None, 22799 "429": None, 22800 } 22801 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22802 response_data.read() 22803 return self.api_client.response_deserialize( 22804 response_data=response_data, 22805 response_types_map=_response_types_map, 22806 ).data 22807 22808 def _delete_shape_item_serialize( 22809 self, 22810 board_id, 22811 item_id, 22812 _request_auth, 22813 _content_type, 22814 _headers, 22815 _host_index, 22816 ) -> RequestSerialized: 22817 22818 _host = None 22819 22820 _collection_formats: Dict[str, str] = {} 22821 22822 _path_params: Dict[str, str] = {} 22823 _query_params: List[Tuple[str, str]] = [] 22824 _header_params: Dict[str, Optional[str]] = _headers or {} 22825 _form_params: List[Tuple[str, str]] = [] 22826 _files: Dict[str, str] = {} 22827 _body_params: Optional[bytes] = None 22828 22829 # process the path parameters 22830 if board_id is not None: 22831 _path_params["board_id"] = board_id 22832 if item_id is not None: 22833 _path_params["item_id"] = item_id 22834 # process the query parameters 22835 # process the header parameters 22836 # process the form parameters 22837 # process the body parameter 22838 22839 # set the HTTP header `Accept` 22840 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22841 22842 # authentication setting 22843 _auth_settings: List[str] = [] 22844 22845 return self.api_client.param_serialize( 22846 method="DELETE", 22847 resource_path="/v2/boards/{board_id}/shapes/{item_id}", 22848 path_params=_path_params, 22849 query_params=_query_params, 22850 header_params=_header_params, 22851 body=_body_params, 22852 post_params=_form_params, 22853 files=_files, 22854 auth_settings=_auth_settings, 22855 collection_formats=_collection_formats, 22856 _host=_host, 22857 _request_auth=_request_auth, 22858 ) 22859 22860 @validate_call 22861 def get_shape_item( 22862 self, 22863 board_id: Annotated[ 22864 StrictStr, 22865 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 22866 ], 22867 item_id: Annotated[ 22868 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 22869 ], 22870 _request_timeout: Union[ 22871 None, 22872 Annotated[StrictFloat, Field(gt=0)], 22873 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22874 ] = None, 22875 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22876 _content_type: Optional[StrictStr] = None, 22877 _headers: Optional[Dict[StrictStr, Any]] = None, 22878 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22879 ) -> ShapeItem: 22880 """Get shape item 22881 22882 Retrieves information for a specific shape item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 22883 22884 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 22885 :type board_id: str 22886 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 22887 :type item_id: str 22888 :param _request_timeout: timeout setting for this request. If one 22889 number provided, it will be total request 22890 timeout. It can also be a pair (tuple) of 22891 (connection, read) timeouts. 22892 :type _request_timeout: int, tuple(int, int), optional 22893 :param _request_auth: set to override the auth_settings for an a single 22894 request; this effectively ignores the 22895 authentication in the spec for a single request. 22896 :type _request_auth: dict, optional 22897 :param _content_type: force content-type for the request. 22898 :type _content_type: str, Optional 22899 :param _headers: set to override the headers for a single 22900 request; this effectively ignores the headers 22901 in the spec for a single request. 22902 :type _headers: dict, optional 22903 :param _host_index: set to override the host_index for a single 22904 request; this effectively ignores the host_index 22905 in the spec for a single request. 22906 :type _host_index: int, optional 22907 :return: Returns the result object. 22908 """ # noqa: E501 22909 22910 _param = self._get_shape_item_serialize( 22911 board_id=board_id, 22912 item_id=item_id, 22913 _request_auth=_request_auth, 22914 _content_type=_content_type, 22915 _headers=_headers, 22916 _host_index=_host_index, 22917 ) 22918 22919 _response_types_map: Dict[str, Optional[str]] = { 22920 "200": "ShapeItem", 22921 "400": None, 22922 "404": None, 22923 "429": None, 22924 } 22925 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22926 response_data.read() 22927 return self.api_client.response_deserialize( 22928 response_data=response_data, 22929 response_types_map=_response_types_map, 22930 ).data 22931 22932 def _get_shape_item_serialize( 22933 self, 22934 board_id, 22935 item_id, 22936 _request_auth, 22937 _content_type, 22938 _headers, 22939 _host_index, 22940 ) -> RequestSerialized: 22941 22942 _host = None 22943 22944 _collection_formats: Dict[str, str] = {} 22945 22946 _path_params: Dict[str, str] = {} 22947 _query_params: List[Tuple[str, str]] = [] 22948 _header_params: Dict[str, Optional[str]] = _headers or {} 22949 _form_params: List[Tuple[str, str]] = [] 22950 _files: Dict[str, str] = {} 22951 _body_params: Optional[bytes] = None 22952 22953 # process the path parameters 22954 if board_id is not None: 22955 _path_params["board_id"] = board_id 22956 if item_id is not None: 22957 _path_params["item_id"] = item_id 22958 # process the query parameters 22959 # process the header parameters 22960 # process the form parameters 22961 # process the body parameter 22962 22963 # set the HTTP header `Accept` 22964 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 22965 22966 # authentication setting 22967 _auth_settings: List[str] = [] 22968 22969 return self.api_client.param_serialize( 22970 method="GET", 22971 resource_path="/v2/boards/{board_id}/shapes/{item_id}", 22972 path_params=_path_params, 22973 query_params=_query_params, 22974 header_params=_header_params, 22975 body=_body_params, 22976 post_params=_form_params, 22977 files=_files, 22978 auth_settings=_auth_settings, 22979 collection_formats=_collection_formats, 22980 _host=_host, 22981 _request_auth=_request_auth, 22982 ) 22983 22984 @validate_call 22985 def update_shape_item( 22986 self, 22987 board_id: Annotated[ 22988 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 22989 ], 22990 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 22991 shape_update_request: ShapeUpdateRequest, 22992 _request_timeout: Union[ 22993 None, 22994 Annotated[StrictFloat, Field(gt=0)], 22995 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22996 ] = None, 22997 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22998 _content_type: Optional[StrictStr] = None, 22999 _headers: Optional[Dict[StrictStr, Any]] = None, 23000 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23001 ) -> ShapeItem: 23002 """Update shape item 23003 23004 Updates a shape item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23005 23006 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 23007 :type board_id: str 23008 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 23009 :type item_id: str 23010 :param shape_update_request: (required) 23011 :type shape_update_request: ShapeUpdateRequest 23012 :param _request_timeout: timeout setting for this request. If one 23013 number provided, it will be total request 23014 timeout. It can also be a pair (tuple) of 23015 (connection, read) timeouts. 23016 :type _request_timeout: int, tuple(int, int), optional 23017 :param _request_auth: set to override the auth_settings for an a single 23018 request; this effectively ignores the 23019 authentication in the spec for a single request. 23020 :type _request_auth: dict, optional 23021 :param _content_type: force content-type for the request. 23022 :type _content_type: str, Optional 23023 :param _headers: set to override the headers for a single 23024 request; this effectively ignores the headers 23025 in the spec for a single request. 23026 :type _headers: dict, optional 23027 :param _host_index: set to override the host_index for a single 23028 request; this effectively ignores the host_index 23029 in the spec for a single request. 23030 :type _host_index: int, optional 23031 :return: Returns the result object. 23032 """ # noqa: E501 23033 23034 _param = self._update_shape_item_serialize( 23035 board_id=board_id, 23036 item_id=item_id, 23037 shape_update_request=shape_update_request, 23038 _request_auth=_request_auth, 23039 _content_type=_content_type, 23040 _headers=_headers, 23041 _host_index=_host_index, 23042 ) 23043 23044 _response_types_map: Dict[str, Optional[str]] = { 23045 "200": "ShapeItem", 23046 "400": None, 23047 "404": None, 23048 "409": None, 23049 "429": None, 23050 } 23051 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23052 response_data.read() 23053 return self.api_client.response_deserialize( 23054 response_data=response_data, 23055 response_types_map=_response_types_map, 23056 ).data 23057 23058 def _update_shape_item_serialize( 23059 self, 23060 board_id, 23061 item_id, 23062 shape_update_request, 23063 _request_auth, 23064 _content_type, 23065 _headers, 23066 _host_index, 23067 ) -> RequestSerialized: 23068 23069 _host = None 23070 23071 _collection_formats: Dict[str, str] = {} 23072 23073 _path_params: Dict[str, str] = {} 23074 _query_params: List[Tuple[str, str]] = [] 23075 _header_params: Dict[str, Optional[str]] = _headers or {} 23076 _form_params: List[Tuple[str, str]] = [] 23077 _files: Dict[str, str] = {} 23078 _body_params: Optional[bytes] = None 23079 23080 # process the path parameters 23081 if board_id is not None: 23082 _path_params["board_id"] = board_id 23083 if item_id is not None: 23084 _path_params["item_id"] = item_id 23085 # process the query parameters 23086 # process the header parameters 23087 # process the form parameters 23088 # process the body parameter 23089 if shape_update_request is not None: 23090 _body_params = shape_update_request 23091 23092 # set the HTTP header `Accept` 23093 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23094 23095 # set the HTTP header `Content-Type` 23096 if _content_type: 23097 _header_params["Content-Type"] = _content_type 23098 else: 23099 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23100 if _default_content_type is not None: 23101 _header_params["Content-Type"] = _default_content_type 23102 23103 # authentication setting 23104 _auth_settings: List[str] = [] 23105 23106 return self.api_client.param_serialize( 23107 method="PATCH", 23108 resource_path="/v2/boards/{board_id}/shapes/{item_id}", 23109 path_params=_path_params, 23110 query_params=_query_params, 23111 header_params=_header_params, 23112 body=_body_params, 23113 post_params=_form_params, 23114 files=_files, 23115 auth_settings=_auth_settings, 23116 collection_formats=_collection_formats, 23117 _host=_host, 23118 _request_auth=_request_auth, 23119 ) 23120 23121 @validate_call 23122 def create_sticky_note_item( 23123 self, 23124 board_id: Annotated[ 23125 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 23126 ], 23127 sticky_note_create_request: StickyNoteCreateRequest, 23128 _request_timeout: Union[ 23129 None, 23130 Annotated[StrictFloat, Field(gt=0)], 23131 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23132 ] = None, 23133 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23134 _content_type: Optional[StrictStr] = None, 23135 _headers: Optional[Dict[StrictStr, Any]] = None, 23136 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23137 ) -> StickyNoteItem: 23138 """Create sticky note item 23139 23140 Adds a sticky note item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23141 23142 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 23143 :type board_id: str 23144 :param sticky_note_create_request: (required) 23145 :type sticky_note_create_request: StickyNoteCreateRequest 23146 :param _request_timeout: timeout setting for this request. If one 23147 number provided, it will be total request 23148 timeout. It can also be a pair (tuple) of 23149 (connection, read) timeouts. 23150 :type _request_timeout: int, tuple(int, int), optional 23151 :param _request_auth: set to override the auth_settings for an a single 23152 request; this effectively ignores the 23153 authentication in the spec for a single request. 23154 :type _request_auth: dict, optional 23155 :param _content_type: force content-type for the request. 23156 :type _content_type: str, Optional 23157 :param _headers: set to override the headers for a single 23158 request; this effectively ignores the headers 23159 in the spec for a single request. 23160 :type _headers: dict, optional 23161 :param _host_index: set to override the host_index for a single 23162 request; this effectively ignores the host_index 23163 in the spec for a single request. 23164 :type _host_index: int, optional 23165 :return: Returns the result object. 23166 """ # noqa: E501 23167 23168 _param = self._create_sticky_note_item_serialize( 23169 board_id=board_id, 23170 sticky_note_create_request=sticky_note_create_request, 23171 _request_auth=_request_auth, 23172 _content_type=_content_type, 23173 _headers=_headers, 23174 _host_index=_host_index, 23175 ) 23176 23177 _response_types_map: Dict[str, Optional[str]] = { 23178 "201": "StickyNoteItem", 23179 "400": None, 23180 "404": None, 23181 "429": None, 23182 } 23183 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23184 response_data.read() 23185 return self.api_client.response_deserialize( 23186 response_data=response_data, 23187 response_types_map=_response_types_map, 23188 ).data 23189 23190 def _create_sticky_note_item_serialize( 23191 self, 23192 board_id, 23193 sticky_note_create_request, 23194 _request_auth, 23195 _content_type, 23196 _headers, 23197 _host_index, 23198 ) -> RequestSerialized: 23199 23200 _host = None 23201 23202 _collection_formats: Dict[str, str] = {} 23203 23204 _path_params: Dict[str, str] = {} 23205 _query_params: List[Tuple[str, str]] = [] 23206 _header_params: Dict[str, Optional[str]] = _headers or {} 23207 _form_params: List[Tuple[str, str]] = [] 23208 _files: Dict[str, str] = {} 23209 _body_params: Optional[bytes] = None 23210 23211 # process the path parameters 23212 if board_id is not None: 23213 _path_params["board_id"] = board_id 23214 # process the query parameters 23215 # process the header parameters 23216 # process the form parameters 23217 # process the body parameter 23218 if sticky_note_create_request is not None: 23219 _body_params = sticky_note_create_request 23220 23221 # set the HTTP header `Accept` 23222 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23223 23224 # set the HTTP header `Content-Type` 23225 if _content_type: 23226 _header_params["Content-Type"] = _content_type 23227 else: 23228 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23229 if _default_content_type is not None: 23230 _header_params["Content-Type"] = _default_content_type 23231 23232 # authentication setting 23233 _auth_settings: List[str] = [] 23234 23235 return self.api_client.param_serialize( 23236 method="POST", 23237 resource_path="/v2/boards/{board_id}/sticky_notes", 23238 path_params=_path_params, 23239 query_params=_query_params, 23240 header_params=_header_params, 23241 body=_body_params, 23242 post_params=_form_params, 23243 files=_files, 23244 auth_settings=_auth_settings, 23245 collection_formats=_collection_formats, 23246 _host=_host, 23247 _request_auth=_request_auth, 23248 ) 23249 23250 @validate_call 23251 def delete_sticky_note_item( 23252 self, 23253 board_id: Annotated[ 23254 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 23255 ], 23256 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 23257 _request_timeout: Union[ 23258 None, 23259 Annotated[StrictFloat, Field(gt=0)], 23260 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23261 ] = None, 23262 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23263 _content_type: Optional[StrictStr] = None, 23264 _headers: Optional[Dict[StrictStr, Any]] = None, 23265 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23266 ) -> object: 23267 """Delete sticky note item 23268 23269 Deletes a sticky note item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 23270 23271 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 23272 :type board_id: str 23273 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 23274 :type item_id: str 23275 :param _request_timeout: timeout setting for this request. If one 23276 number provided, it will be total request 23277 timeout. It can also be a pair (tuple) of 23278 (connection, read) timeouts. 23279 :type _request_timeout: int, tuple(int, int), optional 23280 :param _request_auth: set to override the auth_settings for an a single 23281 request; this effectively ignores the 23282 authentication in the spec for a single request. 23283 :type _request_auth: dict, optional 23284 :param _content_type: force content-type for the request. 23285 :type _content_type: str, Optional 23286 :param _headers: set to override the headers for a single 23287 request; this effectively ignores the headers 23288 in the spec for a single request. 23289 :type _headers: dict, optional 23290 :param _host_index: set to override the host_index for a single 23291 request; this effectively ignores the host_index 23292 in the spec for a single request. 23293 :type _host_index: int, optional 23294 :return: Returns the result object. 23295 """ # noqa: E501 23296 23297 _param = self._delete_sticky_note_item_serialize( 23298 board_id=board_id, 23299 item_id=item_id, 23300 _request_auth=_request_auth, 23301 _content_type=_content_type, 23302 _headers=_headers, 23303 _host_index=_host_index, 23304 ) 23305 23306 _response_types_map: Dict[str, Optional[str]] = { 23307 "204": "object", 23308 "400": None, 23309 "404": None, 23310 "429": None, 23311 } 23312 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23313 response_data.read() 23314 return self.api_client.response_deserialize( 23315 response_data=response_data, 23316 response_types_map=_response_types_map, 23317 ).data 23318 23319 def _delete_sticky_note_item_serialize( 23320 self, 23321 board_id, 23322 item_id, 23323 _request_auth, 23324 _content_type, 23325 _headers, 23326 _host_index, 23327 ) -> RequestSerialized: 23328 23329 _host = None 23330 23331 _collection_formats: Dict[str, str] = {} 23332 23333 _path_params: Dict[str, str] = {} 23334 _query_params: List[Tuple[str, str]] = [] 23335 _header_params: Dict[str, Optional[str]] = _headers or {} 23336 _form_params: List[Tuple[str, str]] = [] 23337 _files: Dict[str, str] = {} 23338 _body_params: Optional[bytes] = None 23339 23340 # process the path parameters 23341 if board_id is not None: 23342 _path_params["board_id"] = board_id 23343 if item_id is not None: 23344 _path_params["item_id"] = item_id 23345 # process the query parameters 23346 # process the header parameters 23347 # process the form parameters 23348 # process the body parameter 23349 23350 # set the HTTP header `Accept` 23351 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23352 23353 # authentication setting 23354 _auth_settings: List[str] = [] 23355 23356 return self.api_client.param_serialize( 23357 method="DELETE", 23358 resource_path="/v2/boards/{board_id}/sticky_notes/{item_id}", 23359 path_params=_path_params, 23360 query_params=_query_params, 23361 header_params=_header_params, 23362 body=_body_params, 23363 post_params=_form_params, 23364 files=_files, 23365 auth_settings=_auth_settings, 23366 collection_formats=_collection_formats, 23367 _host=_host, 23368 _request_auth=_request_auth, 23369 ) 23370 23371 @validate_call 23372 def get_sticky_note_item( 23373 self, 23374 board_id: Annotated[ 23375 StrictStr, 23376 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 23377 ], 23378 item_id: Annotated[ 23379 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 23380 ], 23381 _request_timeout: Union[ 23382 None, 23383 Annotated[StrictFloat, Field(gt=0)], 23384 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23385 ] = None, 23386 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23387 _content_type: Optional[StrictStr] = None, 23388 _headers: Optional[Dict[StrictStr, Any]] = None, 23389 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23390 ) -> StickyNoteItem: 23391 """Get sticky note item 23392 23393 Retrieves information for a specific sticky note item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23394 23395 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 23396 :type board_id: str 23397 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 23398 :type item_id: str 23399 :param _request_timeout: timeout setting for this request. If one 23400 number provided, it will be total request 23401 timeout. It can also be a pair (tuple) of 23402 (connection, read) timeouts. 23403 :type _request_timeout: int, tuple(int, int), optional 23404 :param _request_auth: set to override the auth_settings for an a single 23405 request; this effectively ignores the 23406 authentication in the spec for a single request. 23407 :type _request_auth: dict, optional 23408 :param _content_type: force content-type for the request. 23409 :type _content_type: str, Optional 23410 :param _headers: set to override the headers for a single 23411 request; this effectively ignores the headers 23412 in the spec for a single request. 23413 :type _headers: dict, optional 23414 :param _host_index: set to override the host_index for a single 23415 request; this effectively ignores the host_index 23416 in the spec for a single request. 23417 :type _host_index: int, optional 23418 :return: Returns the result object. 23419 """ # noqa: E501 23420 23421 _param = self._get_sticky_note_item_serialize( 23422 board_id=board_id, 23423 item_id=item_id, 23424 _request_auth=_request_auth, 23425 _content_type=_content_type, 23426 _headers=_headers, 23427 _host_index=_host_index, 23428 ) 23429 23430 _response_types_map: Dict[str, Optional[str]] = { 23431 "200": "StickyNoteItem", 23432 "400": None, 23433 "404": None, 23434 "429": None, 23435 } 23436 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23437 response_data.read() 23438 return self.api_client.response_deserialize( 23439 response_data=response_data, 23440 response_types_map=_response_types_map, 23441 ).data 23442 23443 def _get_sticky_note_item_serialize( 23444 self, 23445 board_id, 23446 item_id, 23447 _request_auth, 23448 _content_type, 23449 _headers, 23450 _host_index, 23451 ) -> RequestSerialized: 23452 23453 _host = None 23454 23455 _collection_formats: Dict[str, str] = {} 23456 23457 _path_params: Dict[str, str] = {} 23458 _query_params: List[Tuple[str, str]] = [] 23459 _header_params: Dict[str, Optional[str]] = _headers or {} 23460 _form_params: List[Tuple[str, str]] = [] 23461 _files: Dict[str, str] = {} 23462 _body_params: Optional[bytes] = None 23463 23464 # process the path parameters 23465 if board_id is not None: 23466 _path_params["board_id"] = board_id 23467 if item_id is not None: 23468 _path_params["item_id"] = item_id 23469 # process the query parameters 23470 # process the header parameters 23471 # process the form parameters 23472 # process the body parameter 23473 23474 # set the HTTP header `Accept` 23475 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23476 23477 # authentication setting 23478 _auth_settings: List[str] = [] 23479 23480 return self.api_client.param_serialize( 23481 method="GET", 23482 resource_path="/v2/boards/{board_id}/sticky_notes/{item_id}", 23483 path_params=_path_params, 23484 query_params=_query_params, 23485 header_params=_header_params, 23486 body=_body_params, 23487 post_params=_form_params, 23488 files=_files, 23489 auth_settings=_auth_settings, 23490 collection_formats=_collection_formats, 23491 _host=_host, 23492 _request_auth=_request_auth, 23493 ) 23494 23495 @validate_call 23496 def update_sticky_note_item( 23497 self, 23498 board_id: Annotated[ 23499 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 23500 ], 23501 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 23502 sticky_note_update_request: StickyNoteUpdateRequest, 23503 _request_timeout: Union[ 23504 None, 23505 Annotated[StrictFloat, Field(gt=0)], 23506 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23507 ] = None, 23508 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23509 _content_type: Optional[StrictStr] = None, 23510 _headers: Optional[Dict[StrictStr, Any]] = None, 23511 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23512 ) -> StickyNoteItem: 23513 """Update sticky note item 23514 23515 Updates a sticky note item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23516 23517 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 23518 :type board_id: str 23519 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 23520 :type item_id: str 23521 :param sticky_note_update_request: (required) 23522 :type sticky_note_update_request: StickyNoteUpdateRequest 23523 :param _request_timeout: timeout setting for this request. If one 23524 number provided, it will be total request 23525 timeout. It can also be a pair (tuple) of 23526 (connection, read) timeouts. 23527 :type _request_timeout: int, tuple(int, int), optional 23528 :param _request_auth: set to override the auth_settings for an a single 23529 request; this effectively ignores the 23530 authentication in the spec for a single request. 23531 :type _request_auth: dict, optional 23532 :param _content_type: force content-type for the request. 23533 :type _content_type: str, Optional 23534 :param _headers: set to override the headers for a single 23535 request; this effectively ignores the headers 23536 in the spec for a single request. 23537 :type _headers: dict, optional 23538 :param _host_index: set to override the host_index for a single 23539 request; this effectively ignores the host_index 23540 in the spec for a single request. 23541 :type _host_index: int, optional 23542 :return: Returns the result object. 23543 """ # noqa: E501 23544 23545 _param = self._update_sticky_note_item_serialize( 23546 board_id=board_id, 23547 item_id=item_id, 23548 sticky_note_update_request=sticky_note_update_request, 23549 _request_auth=_request_auth, 23550 _content_type=_content_type, 23551 _headers=_headers, 23552 _host_index=_host_index, 23553 ) 23554 23555 _response_types_map: Dict[str, Optional[str]] = { 23556 "200": "StickyNoteItem", 23557 "400": None, 23558 "404": None, 23559 "409": None, 23560 "429": None, 23561 } 23562 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23563 response_data.read() 23564 return self.api_client.response_deserialize( 23565 response_data=response_data, 23566 response_types_map=_response_types_map, 23567 ).data 23568 23569 def _update_sticky_note_item_serialize( 23570 self, 23571 board_id, 23572 item_id, 23573 sticky_note_update_request, 23574 _request_auth, 23575 _content_type, 23576 _headers, 23577 _host_index, 23578 ) -> RequestSerialized: 23579 23580 _host = None 23581 23582 _collection_formats: Dict[str, str] = {} 23583 23584 _path_params: Dict[str, str] = {} 23585 _query_params: List[Tuple[str, str]] = [] 23586 _header_params: Dict[str, Optional[str]] = _headers or {} 23587 _form_params: List[Tuple[str, str]] = [] 23588 _files: Dict[str, str] = {} 23589 _body_params: Optional[bytes] = None 23590 23591 # process the path parameters 23592 if board_id is not None: 23593 _path_params["board_id"] = board_id 23594 if item_id is not None: 23595 _path_params["item_id"] = item_id 23596 # process the query parameters 23597 # process the header parameters 23598 # process the form parameters 23599 # process the body parameter 23600 if sticky_note_update_request is not None: 23601 _body_params = sticky_note_update_request 23602 23603 # set the HTTP header `Accept` 23604 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23605 23606 # set the HTTP header `Content-Type` 23607 if _content_type: 23608 _header_params["Content-Type"] = _content_type 23609 else: 23610 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23611 if _default_content_type is not None: 23612 _header_params["Content-Type"] = _default_content_type 23613 23614 # authentication setting 23615 _auth_settings: List[str] = [] 23616 23617 return self.api_client.param_serialize( 23618 method="PATCH", 23619 resource_path="/v2/boards/{board_id}/sticky_notes/{item_id}", 23620 path_params=_path_params, 23621 query_params=_query_params, 23622 header_params=_header_params, 23623 body=_body_params, 23624 post_params=_form_params, 23625 files=_files, 23626 auth_settings=_auth_settings, 23627 collection_formats=_collection_formats, 23628 _host=_host, 23629 _request_auth=_request_auth, 23630 ) 23631 23632 @validate_call 23633 def attach_tag_to_item( 23634 self, 23635 board_id_platform_tags: Annotated[ 23636 StrictStr, 23637 Field(description="Unique identifier (ID) of the board with the item that you want to add a tag to."), 23638 ], 23639 item_id: Annotated[ 23640 StrictStr, Field(description="Unique identifier (ID) of the item to which you want to add a tag.") 23641 ], 23642 tag_id: Annotated[ 23643 StrictStr, Field(description="Unique identifier (ID) of the tag you want to add to the item.") 23644 ], 23645 _request_timeout: Union[ 23646 None, 23647 Annotated[StrictFloat, Field(gt=0)], 23648 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23649 ] = None, 23650 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23651 _content_type: Optional[StrictStr] = None, 23652 _headers: Optional[Dict[StrictStr, Any]] = None, 23653 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23654 ) -> object: 23655 """Attach tag to item 23656 23657 Attach an existing tag to the specified item. Card and sticky note items can have up to 8 tags. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Update tag](https://developers.miro.com/reference/update-tag), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23658 23659 :param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to add a tag to. (required) 23660 :type board_id_platform_tags: str 23661 :param item_id: Unique identifier (ID) of the item to which you want to add a tag. (required) 23662 :type item_id: str 23663 :param tag_id: Unique identifier (ID) of the tag you want to add to the item. (required) 23664 :type tag_id: str 23665 :param _request_timeout: timeout setting for this request. If one 23666 number provided, it will be total request 23667 timeout. It can also be a pair (tuple) of 23668 (connection, read) timeouts. 23669 :type _request_timeout: int, tuple(int, int), optional 23670 :param _request_auth: set to override the auth_settings for an a single 23671 request; this effectively ignores the 23672 authentication in the spec for a single request. 23673 :type _request_auth: dict, optional 23674 :param _content_type: force content-type for the request. 23675 :type _content_type: str, Optional 23676 :param _headers: set to override the headers for a single 23677 request; this effectively ignores the headers 23678 in the spec for a single request. 23679 :type _headers: dict, optional 23680 :param _host_index: set to override the host_index for a single 23681 request; this effectively ignores the host_index 23682 in the spec for a single request. 23683 :type _host_index: int, optional 23684 :return: Returns the result object. 23685 """ # noqa: E501 23686 23687 _param = self._attach_tag_to_item_serialize( 23688 board_id_platform_tags=board_id_platform_tags, 23689 item_id=item_id, 23690 tag_id=tag_id, 23691 _request_auth=_request_auth, 23692 _content_type=_content_type, 23693 _headers=_headers, 23694 _host_index=_host_index, 23695 ) 23696 23697 _response_types_map: Dict[str, Optional[str]] = { 23698 "204": "object", 23699 "400": "GetTagsFromItem400Response", 23700 "404": "GetTagsFromItem400Response", 23701 "429": "GetTagsFromItem400Response", 23702 } 23703 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23704 response_data.read() 23705 return self.api_client.response_deserialize( 23706 response_data=response_data, 23707 response_types_map=_response_types_map, 23708 ).data 23709 23710 def _attach_tag_to_item_serialize( 23711 self, 23712 board_id_platform_tags, 23713 item_id, 23714 tag_id, 23715 _request_auth, 23716 _content_type, 23717 _headers, 23718 _host_index, 23719 ) -> RequestSerialized: 23720 23721 _host = None 23722 23723 _collection_formats: Dict[str, str] = {} 23724 23725 _path_params: Dict[str, str] = {} 23726 _query_params: List[Tuple[str, str]] = [] 23727 _header_params: Dict[str, Optional[str]] = _headers or {} 23728 _form_params: List[Tuple[str, str]] = [] 23729 _files: Dict[str, str] = {} 23730 _body_params: Optional[bytes] = None 23731 23732 # process the path parameters 23733 if board_id_platform_tags is not None: 23734 _path_params["board_id_PlatformTags"] = board_id_platform_tags 23735 if item_id is not None: 23736 _path_params["item_id"] = item_id 23737 # process the query parameters 23738 if tag_id is not None: 23739 23740 _query_params.append(("tag_id", tag_id)) 23741 23742 # process the header parameters 23743 # process the form parameters 23744 # process the body parameter 23745 23746 # set the HTTP header `Accept` 23747 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23748 23749 # authentication setting 23750 _auth_settings: List[str] = [] 23751 23752 return self.api_client.param_serialize( 23753 method="POST", 23754 resource_path="/v2/boards/{board_id_PlatformTags}/items/{item_id}", 23755 path_params=_path_params, 23756 query_params=_query_params, 23757 header_params=_header_params, 23758 body=_body_params, 23759 post_params=_form_params, 23760 files=_files, 23761 auth_settings=_auth_settings, 23762 collection_formats=_collection_formats, 23763 _host=_host, 23764 _request_auth=_request_auth, 23765 ) 23766 23767 @validate_call 23768 def create_tag( 23769 self, 23770 board_id: Annotated[ 23771 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the tag.") 23772 ], 23773 tag_create_request: TagCreateRequest, 23774 _request_timeout: Union[ 23775 None, 23776 Annotated[StrictFloat, Field(gt=0)], 23777 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23778 ] = None, 23779 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23780 _content_type: Optional[StrictStr] = None, 23781 _headers: Optional[Dict[StrictStr, Any]] = None, 23782 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23783 ) -> TagWithLinks: 23784 """Create tag 23785 23786 Creates a tag on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23787 23788 :param board_id: Unique identifier (ID) of the board where you want to create the tag. (required) 23789 :type board_id: str 23790 :param tag_create_request: (required) 23791 :type tag_create_request: TagCreateRequest 23792 :param _request_timeout: timeout setting for this request. If one 23793 number provided, it will be total request 23794 timeout. It can also be a pair (tuple) of 23795 (connection, read) timeouts. 23796 :type _request_timeout: int, tuple(int, int), optional 23797 :param _request_auth: set to override the auth_settings for an a single 23798 request; this effectively ignores the 23799 authentication in the spec for a single request. 23800 :type _request_auth: dict, optional 23801 :param _content_type: force content-type for the request. 23802 :type _content_type: str, Optional 23803 :param _headers: set to override the headers for a single 23804 request; this effectively ignores the headers 23805 in the spec for a single request. 23806 :type _headers: dict, optional 23807 :param _host_index: set to override the host_index for a single 23808 request; this effectively ignores the host_index 23809 in the spec for a single request. 23810 :type _host_index: int, optional 23811 :return: Returns the result object. 23812 """ # noqa: E501 23813 23814 _param = self._create_tag_serialize( 23815 board_id=board_id, 23816 tag_create_request=tag_create_request, 23817 _request_auth=_request_auth, 23818 _content_type=_content_type, 23819 _headers=_headers, 23820 _host_index=_host_index, 23821 ) 23822 23823 _response_types_map: Dict[str, Optional[str]] = { 23824 "201": "TagWithLinks", 23825 "400": "GetTagsFromItem400Response", 23826 "404": "GetTagsFromItem400Response", 23827 "429": "GetTagsFromItem400Response", 23828 } 23829 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23830 response_data.read() 23831 return self.api_client.response_deserialize( 23832 response_data=response_data, 23833 response_types_map=_response_types_map, 23834 ).data 23835 23836 def _create_tag_serialize( 23837 self, 23838 board_id, 23839 tag_create_request, 23840 _request_auth, 23841 _content_type, 23842 _headers, 23843 _host_index, 23844 ) -> RequestSerialized: 23845 23846 _host = None 23847 23848 _collection_formats: Dict[str, str] = {} 23849 23850 _path_params: Dict[str, str] = {} 23851 _query_params: List[Tuple[str, str]] = [] 23852 _header_params: Dict[str, Optional[str]] = _headers or {} 23853 _form_params: List[Tuple[str, str]] = [] 23854 _files: Dict[str, str] = {} 23855 _body_params: Optional[bytes] = None 23856 23857 # process the path parameters 23858 if board_id is not None: 23859 _path_params["board_id"] = board_id 23860 # process the query parameters 23861 # process the header parameters 23862 # process the form parameters 23863 # process the body parameter 23864 if tag_create_request is not None: 23865 _body_params = tag_create_request 23866 23867 # set the HTTP header `Accept` 23868 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23869 23870 # set the HTTP header `Content-Type` 23871 if _content_type: 23872 _header_params["Content-Type"] = _content_type 23873 else: 23874 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 23875 if _default_content_type is not None: 23876 _header_params["Content-Type"] = _default_content_type 23877 23878 # authentication setting 23879 _auth_settings: List[str] = [] 23880 23881 return self.api_client.param_serialize( 23882 method="POST", 23883 resource_path="/v2/boards/{board_id}/tags", 23884 path_params=_path_params, 23885 query_params=_query_params, 23886 header_params=_header_params, 23887 body=_body_params, 23888 post_params=_form_params, 23889 files=_files, 23890 auth_settings=_auth_settings, 23891 collection_formats=_collection_formats, 23892 _host=_host, 23893 _request_auth=_request_auth, 23894 ) 23895 23896 @validate_call 23897 def delete_tag( 23898 self, 23899 board_id: Annotated[ 23900 StrictStr, Field(description="Unique identifier (ID) of the board where you want to delete a specific tag.") 23901 ], 23902 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to delete.")], 23903 _request_timeout: Union[ 23904 None, 23905 Annotated[StrictFloat, Field(gt=0)], 23906 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23907 ] = None, 23908 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23909 _content_type: Optional[StrictStr] = None, 23910 _headers: Optional[Dict[StrictStr, Any]] = None, 23911 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23912 ) -> object: 23913 """Delete tag 23914 23915 Deletes the specified tag from the board. The tag is also removed from all cards and sticky notes on the board. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Update tag](https://developers.miro.com/reference/update-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23916 23917 :param board_id: Unique identifier (ID) of the board where you want to delete a specific tag. (required) 23918 :type board_id: str 23919 :param tag_id: Unique identifier (ID) of the tag that you want to delete. (required) 23920 :type tag_id: str 23921 :param _request_timeout: timeout setting for this request. If one 23922 number provided, it will be total request 23923 timeout. It can also be a pair (tuple) of 23924 (connection, read) timeouts. 23925 :type _request_timeout: int, tuple(int, int), optional 23926 :param _request_auth: set to override the auth_settings for an a single 23927 request; this effectively ignores the 23928 authentication in the spec for a single request. 23929 :type _request_auth: dict, optional 23930 :param _content_type: force content-type for the request. 23931 :type _content_type: str, Optional 23932 :param _headers: set to override the headers for a single 23933 request; this effectively ignores the headers 23934 in the spec for a single request. 23935 :type _headers: dict, optional 23936 :param _host_index: set to override the host_index for a single 23937 request; this effectively ignores the host_index 23938 in the spec for a single request. 23939 :type _host_index: int, optional 23940 :return: Returns the result object. 23941 """ # noqa: E501 23942 23943 _param = self._delete_tag_serialize( 23944 board_id=board_id, 23945 tag_id=tag_id, 23946 _request_auth=_request_auth, 23947 _content_type=_content_type, 23948 _headers=_headers, 23949 _host_index=_host_index, 23950 ) 23951 23952 _response_types_map: Dict[str, Optional[str]] = { 23953 "204": "object", 23954 "400": "GetTagsFromItem400Response", 23955 "404": "GetTagsFromItem400Response", 23956 "429": "GetTagsFromItem400Response", 23957 } 23958 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23959 response_data.read() 23960 return self.api_client.response_deserialize( 23961 response_data=response_data, 23962 response_types_map=_response_types_map, 23963 ).data 23964 23965 def _delete_tag_serialize( 23966 self, 23967 board_id, 23968 tag_id, 23969 _request_auth, 23970 _content_type, 23971 _headers, 23972 _host_index, 23973 ) -> RequestSerialized: 23974 23975 _host = None 23976 23977 _collection_formats: Dict[str, str] = {} 23978 23979 _path_params: Dict[str, str] = {} 23980 _query_params: List[Tuple[str, str]] = [] 23981 _header_params: Dict[str, Optional[str]] = _headers or {} 23982 _form_params: List[Tuple[str, str]] = [] 23983 _files: Dict[str, str] = {} 23984 _body_params: Optional[bytes] = None 23985 23986 # process the path parameters 23987 if board_id is not None: 23988 _path_params["board_id"] = board_id 23989 if tag_id is not None: 23990 _path_params["tag_id"] = tag_id 23991 # process the query parameters 23992 # process the header parameters 23993 # process the form parameters 23994 # process the body parameter 23995 23996 # set the HTTP header `Accept` 23997 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 23998 23999 # authentication setting 24000 _auth_settings: List[str] = [] 24001 24002 return self.api_client.param_serialize( 24003 method="DELETE", 24004 resource_path="/v2/boards/{board_id}/tags/{tag_id}", 24005 path_params=_path_params, 24006 query_params=_query_params, 24007 header_params=_header_params, 24008 body=_body_params, 24009 post_params=_form_params, 24010 files=_files, 24011 auth_settings=_auth_settings, 24012 collection_formats=_collection_formats, 24013 _host=_host, 24014 _request_auth=_request_auth, 24015 ) 24016 24017 @validate_call 24018 def get_items_by_tag( 24019 self, 24020 board_id_platform_tags: Annotated[ 24021 StrictStr, 24022 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 24023 ], 24024 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to retrieve.")], 24025 limit: Optional[Annotated[str, Field(strict=True)]] = None, 24026 offset: Optional[StrictStr] = None, 24027 _request_timeout: Union[ 24028 None, 24029 Annotated[StrictFloat, Field(gt=0)], 24030 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24031 ] = None, 24032 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24033 _content_type: Optional[StrictStr] = None, 24034 _headers: Optional[Dict[StrictStr, Any]] = None, 24035 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24036 ) -> ItemPagedResponse: 24037 """Get items by tag 24038 24039 Retrieves all the items that have the specified tag.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24040 24041 :param board_id_platform_tags: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) 24042 :type board_id_platform_tags: str 24043 :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) 24044 :type tag_id: str 24045 :param limit: 24046 :type limit: str 24047 :param offset: 24048 :type offset: str 24049 :param _request_timeout: timeout setting for this request. If one 24050 number provided, it will be total request 24051 timeout. It can also be a pair (tuple) of 24052 (connection, read) timeouts. 24053 :type _request_timeout: int, tuple(int, int), optional 24054 :param _request_auth: set to override the auth_settings for an a single 24055 request; this effectively ignores the 24056 authentication in the spec for a single request. 24057 :type _request_auth: dict, optional 24058 :param _content_type: force content-type for the request. 24059 :type _content_type: str, Optional 24060 :param _headers: set to override the headers for a single 24061 request; this effectively ignores the headers 24062 in the spec for a single request. 24063 :type _headers: dict, optional 24064 :param _host_index: set to override the host_index for a single 24065 request; this effectively ignores the host_index 24066 in the spec for a single request. 24067 :type _host_index: int, optional 24068 :return: Returns the result object. 24069 """ # noqa: E501 24070 24071 _param = self._get_items_by_tag_serialize( 24072 board_id_platform_tags=board_id_platform_tags, 24073 tag_id=tag_id, 24074 limit=limit, 24075 offset=offset, 24076 _request_auth=_request_auth, 24077 _content_type=_content_type, 24078 _headers=_headers, 24079 _host_index=_host_index, 24080 ) 24081 24082 _response_types_map: Dict[str, Optional[str]] = { 24083 "200": "ItemPagedResponse", 24084 "400": "GetTagsFromItem400Response", 24085 "404": "GetTagsFromItem400Response", 24086 "429": "GetTagsFromItem400Response", 24087 } 24088 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24089 response_data.read() 24090 return self.api_client.response_deserialize( 24091 response_data=response_data, 24092 response_types_map=_response_types_map, 24093 ).data 24094 24095 def _get_items_by_tag_serialize( 24096 self, 24097 board_id_platform_tags, 24098 tag_id, 24099 limit, 24100 offset, 24101 _request_auth, 24102 _content_type, 24103 _headers, 24104 _host_index, 24105 ) -> RequestSerialized: 24106 24107 _host = None 24108 24109 _collection_formats: Dict[str, str] = {} 24110 24111 _path_params: Dict[str, str] = {} 24112 _query_params: List[Tuple[str, str]] = [] 24113 _header_params: Dict[str, Optional[str]] = _headers or {} 24114 _form_params: List[Tuple[str, str]] = [] 24115 _files: Dict[str, str] = {} 24116 _body_params: Optional[bytes] = None 24117 24118 # process the path parameters 24119 if board_id_platform_tags is not None: 24120 _path_params["board_id_PlatformTags"] = board_id_platform_tags 24121 # process the query parameters 24122 if limit is not None: 24123 24124 _query_params.append(("limit", limit)) 24125 24126 if offset is not None: 24127 24128 _query_params.append(("offset", offset)) 24129 24130 if tag_id is not None: 24131 24132 _query_params.append(("tag_id", tag_id)) 24133 24134 # process the header parameters 24135 # process the form parameters 24136 # process the body parameter 24137 24138 # set the HTTP header `Accept` 24139 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24140 24141 # authentication setting 24142 _auth_settings: List[str] = [] 24143 24144 return self.api_client.param_serialize( 24145 method="GET", 24146 resource_path="/v2/boards/{board_id_PlatformTags}/items", 24147 path_params=_path_params, 24148 query_params=_query_params, 24149 header_params=_header_params, 24150 body=_body_params, 24151 post_params=_form_params, 24152 files=_files, 24153 auth_settings=_auth_settings, 24154 collection_formats=_collection_formats, 24155 _host=_host, 24156 _request_auth=_request_auth, 24157 ) 24158 24159 @validate_call 24160 def get_tag( 24161 self, 24162 board_id: Annotated[ 24163 StrictStr, 24164 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 24165 ], 24166 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to retrieve.")], 24167 _request_timeout: Union[ 24168 None, 24169 Annotated[StrictFloat, Field(gt=0)], 24170 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24171 ] = None, 24172 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24173 _content_type: Optional[StrictStr] = None, 24174 _headers: Optional[Dict[StrictStr, Any]] = None, 24175 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24176 ) -> TagWithLinks: 24177 """Get tag 24178 24179 Retrieves information for a specific tag.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24180 24181 :param board_id: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) 24182 :type board_id: str 24183 :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) 24184 :type tag_id: str 24185 :param _request_timeout: timeout setting for this request. If one 24186 number provided, it will be total request 24187 timeout. It can also be a pair (tuple) of 24188 (connection, read) timeouts. 24189 :type _request_timeout: int, tuple(int, int), optional 24190 :param _request_auth: set to override the auth_settings for an a single 24191 request; this effectively ignores the 24192 authentication in the spec for a single request. 24193 :type _request_auth: dict, optional 24194 :param _content_type: force content-type for the request. 24195 :type _content_type: str, Optional 24196 :param _headers: set to override the headers for a single 24197 request; this effectively ignores the headers 24198 in the spec for a single request. 24199 :type _headers: dict, optional 24200 :param _host_index: set to override the host_index for a single 24201 request; this effectively ignores the host_index 24202 in the spec for a single request. 24203 :type _host_index: int, optional 24204 :return: Returns the result object. 24205 """ # noqa: E501 24206 24207 _param = self._get_tag_serialize( 24208 board_id=board_id, 24209 tag_id=tag_id, 24210 _request_auth=_request_auth, 24211 _content_type=_content_type, 24212 _headers=_headers, 24213 _host_index=_host_index, 24214 ) 24215 24216 _response_types_map: Dict[str, Optional[str]] = { 24217 "200": "TagWithLinks", 24218 "400": "GetTagsFromItem400Response", 24219 "404": "GetTagsFromItem400Response", 24220 "429": "GetTagsFromItem400Response", 24221 } 24222 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24223 response_data.read() 24224 return self.api_client.response_deserialize( 24225 response_data=response_data, 24226 response_types_map=_response_types_map, 24227 ).data 24228 24229 def _get_tag_serialize( 24230 self, 24231 board_id, 24232 tag_id, 24233 _request_auth, 24234 _content_type, 24235 _headers, 24236 _host_index, 24237 ) -> RequestSerialized: 24238 24239 _host = None 24240 24241 _collection_formats: Dict[str, str] = {} 24242 24243 _path_params: Dict[str, str] = {} 24244 _query_params: List[Tuple[str, str]] = [] 24245 _header_params: Dict[str, Optional[str]] = _headers or {} 24246 _form_params: List[Tuple[str, str]] = [] 24247 _files: Dict[str, str] = {} 24248 _body_params: Optional[bytes] = None 24249 24250 # process the path parameters 24251 if board_id is not None: 24252 _path_params["board_id"] = board_id 24253 if tag_id is not None: 24254 _path_params["tag_id"] = tag_id 24255 # process the query parameters 24256 # process the header parameters 24257 # process the form parameters 24258 # process the body parameter 24259 24260 # set the HTTP header `Accept` 24261 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24262 24263 # authentication setting 24264 _auth_settings: List[str] = [] 24265 24266 return self.api_client.param_serialize( 24267 method="GET", 24268 resource_path="/v2/boards/{board_id}/tags/{tag_id}", 24269 path_params=_path_params, 24270 query_params=_query_params, 24271 header_params=_header_params, 24272 body=_body_params, 24273 post_params=_form_params, 24274 files=_files, 24275 auth_settings=_auth_settings, 24276 collection_formats=_collection_formats, 24277 _host=_host, 24278 _request_auth=_request_auth, 24279 ) 24280 24281 @validate_call 24282 def get_tags_from_board( 24283 self, 24284 board_id: Annotated[ 24285 StrictStr, Field(description="Unique identifier (ID) of the board whose tags you want to retrieve.") 24286 ], 24287 limit: Optional[Annotated[str, Field(strict=True)]] = None, 24288 offset: Optional[StrictStr] = None, 24289 _request_timeout: Union[ 24290 None, 24291 Annotated[StrictFloat, Field(gt=0)], 24292 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24293 ] = None, 24294 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24295 _content_type: Optional[StrictStr] = None, 24296 _headers: Optional[Dict[StrictStr, Any]] = None, 24297 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24298 ) -> TagsPagedResponse: 24299 """Get tags from board 24300 24301 Retrieves all the tags from the specified board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24302 24303 :param board_id: Unique identifier (ID) of the board whose tags you want to retrieve. (required) 24304 :type board_id: str 24305 :param limit: 24306 :type limit: str 24307 :param offset: 24308 :type offset: str 24309 :param _request_timeout: timeout setting for this request. If one 24310 number provided, it will be total request 24311 timeout. It can also be a pair (tuple) of 24312 (connection, read) timeouts. 24313 :type _request_timeout: int, tuple(int, int), optional 24314 :param _request_auth: set to override the auth_settings for an a single 24315 request; this effectively ignores the 24316 authentication in the spec for a single request. 24317 :type _request_auth: dict, optional 24318 :param _content_type: force content-type for the request. 24319 :type _content_type: str, Optional 24320 :param _headers: set to override the headers for a single 24321 request; this effectively ignores the headers 24322 in the spec for a single request. 24323 :type _headers: dict, optional 24324 :param _host_index: set to override the host_index for a single 24325 request; this effectively ignores the host_index 24326 in the spec for a single request. 24327 :type _host_index: int, optional 24328 :return: Returns the result object. 24329 """ # noqa: E501 24330 24331 _param = self._get_tags_from_board_serialize( 24332 board_id=board_id, 24333 limit=limit, 24334 offset=offset, 24335 _request_auth=_request_auth, 24336 _content_type=_content_type, 24337 _headers=_headers, 24338 _host_index=_host_index, 24339 ) 24340 24341 _response_types_map: Dict[str, Optional[str]] = { 24342 "200": "TagsPagedResponse", 24343 "400": "GetTagsFromItem400Response", 24344 "404": "GetTagsFromItem400Response", 24345 "429": "GetTagsFromItem400Response", 24346 } 24347 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24348 response_data.read() 24349 return self.api_client.response_deserialize( 24350 response_data=response_data, 24351 response_types_map=_response_types_map, 24352 ).data 24353 24354 def _get_tags_from_board_serialize( 24355 self, 24356 board_id, 24357 limit, 24358 offset, 24359 _request_auth, 24360 _content_type, 24361 _headers, 24362 _host_index, 24363 ) -> RequestSerialized: 24364 24365 _host = None 24366 24367 _collection_formats: Dict[str, str] = {} 24368 24369 _path_params: Dict[str, str] = {} 24370 _query_params: List[Tuple[str, str]] = [] 24371 _header_params: Dict[str, Optional[str]] = _headers or {} 24372 _form_params: List[Tuple[str, str]] = [] 24373 _files: Dict[str, str] = {} 24374 _body_params: Optional[bytes] = None 24375 24376 # process the path parameters 24377 if board_id is not None: 24378 _path_params["board_id"] = board_id 24379 # process the query parameters 24380 if limit is not None: 24381 24382 _query_params.append(("limit", limit)) 24383 24384 if offset is not None: 24385 24386 _query_params.append(("offset", offset)) 24387 24388 # process the header parameters 24389 # process the form parameters 24390 # process the body parameter 24391 24392 # set the HTTP header `Accept` 24393 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24394 24395 # authentication setting 24396 _auth_settings: List[str] = [] 24397 24398 return self.api_client.param_serialize( 24399 method="GET", 24400 resource_path="/v2/boards/{board_id}/tags", 24401 path_params=_path_params, 24402 query_params=_query_params, 24403 header_params=_header_params, 24404 body=_body_params, 24405 post_params=_form_params, 24406 files=_files, 24407 auth_settings=_auth_settings, 24408 collection_formats=_collection_formats, 24409 _host=_host, 24410 _request_auth=_request_auth, 24411 ) 24412 24413 @validate_call 24414 def get_tags_from_item( 24415 self, 24416 board_id: Annotated[ 24417 StrictStr, 24418 Field(description="Unique identifier (ID) of the board with the item whose tags you want to retrieve."), 24419 ], 24420 item_id: Annotated[ 24421 StrictStr, Field(description="Unique identifier (ID) of the item whose tags you want to retrieve.") 24422 ], 24423 _request_timeout: Union[ 24424 None, 24425 Annotated[StrictFloat, Field(gt=0)], 24426 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24427 ] = None, 24428 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24429 _content_type: Optional[StrictStr] = None, 24430 _headers: Optional[Dict[StrictStr, Any]] = None, 24431 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24432 ) -> GetTagsResponse: 24433 """Get tags from item 24434 24435 Retrieves all the tags from the specified item.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24436 24437 :param board_id: Unique identifier (ID) of the board with the item whose tags you want to retrieve. (required) 24438 :type board_id: str 24439 :param item_id: Unique identifier (ID) of the item whose tags you want to retrieve. (required) 24440 :type item_id: str 24441 :param _request_timeout: timeout setting for this request. If one 24442 number provided, it will be total request 24443 timeout. It can also be a pair (tuple) of 24444 (connection, read) timeouts. 24445 :type _request_timeout: int, tuple(int, int), optional 24446 :param _request_auth: set to override the auth_settings for an a single 24447 request; this effectively ignores the 24448 authentication in the spec for a single request. 24449 :type _request_auth: dict, optional 24450 :param _content_type: force content-type for the request. 24451 :type _content_type: str, Optional 24452 :param _headers: set to override the headers for a single 24453 request; this effectively ignores the headers 24454 in the spec for a single request. 24455 :type _headers: dict, optional 24456 :param _host_index: set to override the host_index for a single 24457 request; this effectively ignores the host_index 24458 in the spec for a single request. 24459 :type _host_index: int, optional 24460 :return: Returns the result object. 24461 """ # noqa: E501 24462 24463 _param = self._get_tags_from_item_serialize( 24464 board_id=board_id, 24465 item_id=item_id, 24466 _request_auth=_request_auth, 24467 _content_type=_content_type, 24468 _headers=_headers, 24469 _host_index=_host_index, 24470 ) 24471 24472 _response_types_map: Dict[str, Optional[str]] = { 24473 "200": "GetTagsResponse", 24474 "400": "GetTagsFromItem400Response", 24475 "404": "GetTagsFromItem400Response", 24476 "429": "GetTagsFromItem400Response", 24477 } 24478 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24479 response_data.read() 24480 return self.api_client.response_deserialize( 24481 response_data=response_data, 24482 response_types_map=_response_types_map, 24483 ).data 24484 24485 def _get_tags_from_item_serialize( 24486 self, 24487 board_id, 24488 item_id, 24489 _request_auth, 24490 _content_type, 24491 _headers, 24492 _host_index, 24493 ) -> RequestSerialized: 24494 24495 _host = None 24496 24497 _collection_formats: Dict[str, str] = {} 24498 24499 _path_params: Dict[str, str] = {} 24500 _query_params: List[Tuple[str, str]] = [] 24501 _header_params: Dict[str, Optional[str]] = _headers or {} 24502 _form_params: List[Tuple[str, str]] = [] 24503 _files: Dict[str, str] = {} 24504 _body_params: Optional[bytes] = None 24505 24506 # process the path parameters 24507 if board_id is not None: 24508 _path_params["board_id"] = board_id 24509 if item_id is not None: 24510 _path_params["item_id"] = item_id 24511 # process the query parameters 24512 # process the header parameters 24513 # process the form parameters 24514 # process the body parameter 24515 24516 # set the HTTP header `Accept` 24517 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24518 24519 # authentication setting 24520 _auth_settings: List[str] = [] 24521 24522 return self.api_client.param_serialize( 24523 method="GET", 24524 resource_path="/v2/boards/{board_id}/items/{item_id}/tags", 24525 path_params=_path_params, 24526 query_params=_query_params, 24527 header_params=_header_params, 24528 body=_body_params, 24529 post_params=_form_params, 24530 files=_files, 24531 auth_settings=_auth_settings, 24532 collection_formats=_collection_formats, 24533 _host=_host, 24534 _request_auth=_request_auth, 24535 ) 24536 24537 @validate_call 24538 def remove_tag_from_item( 24539 self, 24540 board_id_platform_tags: Annotated[ 24541 StrictStr, 24542 Field(description="Unique identifier (ID) of the board with the item that you want to remove a tag from."), 24543 ], 24544 item_id: Annotated[ 24545 StrictStr, Field(description="Unique identifier (ID) of the item that you want to remove the tag from.") 24546 ], 24547 tag_id: Annotated[ 24548 StrictStr, Field(description="Unique identifier (ID) of the tag that you want to remove from the item.") 24549 ], 24550 _request_timeout: Union[ 24551 None, 24552 Annotated[StrictFloat, Field(gt=0)], 24553 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24554 ] = None, 24555 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24556 _content_type: Optional[StrictStr] = None, 24557 _headers: Optional[Dict[StrictStr, Any]] = None, 24558 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24559 ) -> object: 24560 """Remove tag from item 24561 24562 Removes the specified tag from the specified item. The tag still exists on the board. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Update tag](https://developers.miro.com/reference/update-tag), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24563 24564 :param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to remove a tag from. (required) 24565 :type board_id_platform_tags: str 24566 :param item_id: Unique identifier (ID) of the item that you want to remove the tag from. (required) 24567 :type item_id: str 24568 :param tag_id: Unique identifier (ID) of the tag that you want to remove from the item. (required) 24569 :type tag_id: str 24570 :param _request_timeout: timeout setting for this request. If one 24571 number provided, it will be total request 24572 timeout. It can also be a pair (tuple) of 24573 (connection, read) timeouts. 24574 :type _request_timeout: int, tuple(int, int), optional 24575 :param _request_auth: set to override the auth_settings for an a single 24576 request; this effectively ignores the 24577 authentication in the spec for a single request. 24578 :type _request_auth: dict, optional 24579 :param _content_type: force content-type for the request. 24580 :type _content_type: str, Optional 24581 :param _headers: set to override the headers for a single 24582 request; this effectively ignores the headers 24583 in the spec for a single request. 24584 :type _headers: dict, optional 24585 :param _host_index: set to override the host_index for a single 24586 request; this effectively ignores the host_index 24587 in the spec for a single request. 24588 :type _host_index: int, optional 24589 :return: Returns the result object. 24590 """ # noqa: E501 24591 24592 _param = self._remove_tag_from_item_serialize( 24593 board_id_platform_tags=board_id_platform_tags, 24594 item_id=item_id, 24595 tag_id=tag_id, 24596 _request_auth=_request_auth, 24597 _content_type=_content_type, 24598 _headers=_headers, 24599 _host_index=_host_index, 24600 ) 24601 24602 _response_types_map: Dict[str, Optional[str]] = { 24603 "204": "object", 24604 "400": "GetTagsFromItem400Response", 24605 "404": "GetTagsFromItem400Response", 24606 "429": "GetTagsFromItem400Response", 24607 } 24608 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24609 response_data.read() 24610 return self.api_client.response_deserialize( 24611 response_data=response_data, 24612 response_types_map=_response_types_map, 24613 ).data 24614 24615 def _remove_tag_from_item_serialize( 24616 self, 24617 board_id_platform_tags, 24618 item_id, 24619 tag_id, 24620 _request_auth, 24621 _content_type, 24622 _headers, 24623 _host_index, 24624 ) -> RequestSerialized: 24625 24626 _host = None 24627 24628 _collection_formats: Dict[str, str] = {} 24629 24630 _path_params: Dict[str, str] = {} 24631 _query_params: List[Tuple[str, str]] = [] 24632 _header_params: Dict[str, Optional[str]] = _headers or {} 24633 _form_params: List[Tuple[str, str]] = [] 24634 _files: Dict[str, str] = {} 24635 _body_params: Optional[bytes] = None 24636 24637 # process the path parameters 24638 if board_id_platform_tags is not None: 24639 _path_params["board_id_PlatformTags"] = board_id_platform_tags 24640 if item_id is not None: 24641 _path_params["item_id"] = item_id 24642 # process the query parameters 24643 if tag_id is not None: 24644 24645 _query_params.append(("tag_id", tag_id)) 24646 24647 # process the header parameters 24648 # process the form parameters 24649 # process the body parameter 24650 24651 # set the HTTP header `Accept` 24652 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24653 24654 # authentication setting 24655 _auth_settings: List[str] = [] 24656 24657 return self.api_client.param_serialize( 24658 method="DELETE", 24659 resource_path="/v2/boards/{board_id_PlatformTags}/items/{item_id}", 24660 path_params=_path_params, 24661 query_params=_query_params, 24662 header_params=_header_params, 24663 body=_body_params, 24664 post_params=_form_params, 24665 files=_files, 24666 auth_settings=_auth_settings, 24667 collection_formats=_collection_formats, 24668 _host=_host, 24669 _request_auth=_request_auth, 24670 ) 24671 24672 @validate_call 24673 def update_tag( 24674 self, 24675 board_id: Annotated[ 24676 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update a specific tag.") 24677 ], 24678 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to update.")], 24679 tag_update_request: TagUpdateRequest, 24680 _request_timeout: Union[ 24681 None, 24682 Annotated[StrictFloat, Field(gt=0)], 24683 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24684 ] = None, 24685 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24686 _content_type: Optional[StrictStr] = None, 24687 _headers: Optional[Dict[StrictStr, Any]] = None, 24688 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24689 ) -> TagWithLinks: 24690 """Update tag 24691 24692 Updates a tag based on the data properties provided in the request body. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24693 24694 :param board_id: Unique identifier (ID) of the board where you want to update a specific tag. (required) 24695 :type board_id: str 24696 :param tag_id: Unique identifier (ID) of the tag that you want to update. (required) 24697 :type tag_id: str 24698 :param tag_update_request: (required) 24699 :type tag_update_request: TagUpdateRequest 24700 :param _request_timeout: timeout setting for this request. If one 24701 number provided, it will be total request 24702 timeout. It can also be a pair (tuple) of 24703 (connection, read) timeouts. 24704 :type _request_timeout: int, tuple(int, int), optional 24705 :param _request_auth: set to override the auth_settings for an a single 24706 request; this effectively ignores the 24707 authentication in the spec for a single request. 24708 :type _request_auth: dict, optional 24709 :param _content_type: force content-type for the request. 24710 :type _content_type: str, Optional 24711 :param _headers: set to override the headers for a single 24712 request; this effectively ignores the headers 24713 in the spec for a single request. 24714 :type _headers: dict, optional 24715 :param _host_index: set to override the host_index for a single 24716 request; this effectively ignores the host_index 24717 in the spec for a single request. 24718 :type _host_index: int, optional 24719 :return: Returns the result object. 24720 """ # noqa: E501 24721 24722 _param = self._update_tag_serialize( 24723 board_id=board_id, 24724 tag_id=tag_id, 24725 tag_update_request=tag_update_request, 24726 _request_auth=_request_auth, 24727 _content_type=_content_type, 24728 _headers=_headers, 24729 _host_index=_host_index, 24730 ) 24731 24732 _response_types_map: Dict[str, Optional[str]] = { 24733 "200": "TagWithLinks", 24734 "400": "GetTagsFromItem400Response", 24735 "404": "GetTagsFromItem400Response", 24736 "429": "GetTagsFromItem400Response", 24737 } 24738 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24739 response_data.read() 24740 return self.api_client.response_deserialize( 24741 response_data=response_data, 24742 response_types_map=_response_types_map, 24743 ).data 24744 24745 def _update_tag_serialize( 24746 self, 24747 board_id, 24748 tag_id, 24749 tag_update_request, 24750 _request_auth, 24751 _content_type, 24752 _headers, 24753 _host_index, 24754 ) -> RequestSerialized: 24755 24756 _host = None 24757 24758 _collection_formats: Dict[str, str] = {} 24759 24760 _path_params: Dict[str, str] = {} 24761 _query_params: List[Tuple[str, str]] = [] 24762 _header_params: Dict[str, Optional[str]] = _headers or {} 24763 _form_params: List[Tuple[str, str]] = [] 24764 _files: Dict[str, str] = {} 24765 _body_params: Optional[bytes] = None 24766 24767 # process the path parameters 24768 if board_id is not None: 24769 _path_params["board_id"] = board_id 24770 if tag_id is not None: 24771 _path_params["tag_id"] = tag_id 24772 # process the query parameters 24773 # process the header parameters 24774 # process the form parameters 24775 # process the body parameter 24776 if tag_update_request is not None: 24777 _body_params = tag_update_request 24778 24779 # set the HTTP header `Accept` 24780 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24781 24782 # set the HTTP header `Content-Type` 24783 if _content_type: 24784 _header_params["Content-Type"] = _content_type 24785 else: 24786 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 24787 if _default_content_type is not None: 24788 _header_params["Content-Type"] = _default_content_type 24789 24790 # authentication setting 24791 _auth_settings: List[str] = [] 24792 24793 return self.api_client.param_serialize( 24794 method="PATCH", 24795 resource_path="/v2/boards/{board_id}/tags/{tag_id}", 24796 path_params=_path_params, 24797 query_params=_query_params, 24798 header_params=_header_params, 24799 body=_body_params, 24800 post_params=_form_params, 24801 files=_files, 24802 auth_settings=_auth_settings, 24803 collection_formats=_collection_formats, 24804 _host=_host, 24805 _request_auth=_request_auth, 24806 ) 24807 24808 @validate_call 24809 def create_text_item( 24810 self, 24811 board_id: Annotated[ 24812 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 24813 ], 24814 text_create_request: TextCreateRequest, 24815 _request_timeout: Union[ 24816 None, 24817 Annotated[StrictFloat, Field(gt=0)], 24818 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24819 ] = None, 24820 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24821 _content_type: Optional[StrictStr] = None, 24822 _headers: Optional[Dict[StrictStr, Any]] = None, 24823 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24824 ) -> TextItem: 24825 """Create text item 24826 24827 Adds a text item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 24828 24829 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 24830 :type board_id: str 24831 :param text_create_request: (required) 24832 :type text_create_request: TextCreateRequest 24833 :param _request_timeout: timeout setting for this request. If one 24834 number provided, it will be total request 24835 timeout. It can also be a pair (tuple) of 24836 (connection, read) timeouts. 24837 :type _request_timeout: int, tuple(int, int), optional 24838 :param _request_auth: set to override the auth_settings for an a single 24839 request; this effectively ignores the 24840 authentication in the spec for a single request. 24841 :type _request_auth: dict, optional 24842 :param _content_type: force content-type for the request. 24843 :type _content_type: str, Optional 24844 :param _headers: set to override the headers for a single 24845 request; this effectively ignores the headers 24846 in the spec for a single request. 24847 :type _headers: dict, optional 24848 :param _host_index: set to override the host_index for a single 24849 request; this effectively ignores the host_index 24850 in the spec for a single request. 24851 :type _host_index: int, optional 24852 :return: Returns the result object. 24853 """ # noqa: E501 24854 24855 _param = self._create_text_item_serialize( 24856 board_id=board_id, 24857 text_create_request=text_create_request, 24858 _request_auth=_request_auth, 24859 _content_type=_content_type, 24860 _headers=_headers, 24861 _host_index=_host_index, 24862 ) 24863 24864 _response_types_map: Dict[str, Optional[str]] = { 24865 "201": "TextItem", 24866 "400": None, 24867 "404": None, 24868 "429": None, 24869 } 24870 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24871 response_data.read() 24872 return self.api_client.response_deserialize( 24873 response_data=response_data, 24874 response_types_map=_response_types_map, 24875 ).data 24876 24877 def _create_text_item_serialize( 24878 self, 24879 board_id, 24880 text_create_request, 24881 _request_auth, 24882 _content_type, 24883 _headers, 24884 _host_index, 24885 ) -> RequestSerialized: 24886 24887 _host = None 24888 24889 _collection_formats: Dict[str, str] = {} 24890 24891 _path_params: Dict[str, str] = {} 24892 _query_params: List[Tuple[str, str]] = [] 24893 _header_params: Dict[str, Optional[str]] = _headers or {} 24894 _form_params: List[Tuple[str, str]] = [] 24895 _files: Dict[str, str] = {} 24896 _body_params: Optional[bytes] = None 24897 24898 # process the path parameters 24899 if board_id is not None: 24900 _path_params["board_id"] = board_id 24901 # process the query parameters 24902 # process the header parameters 24903 # process the form parameters 24904 # process the body parameter 24905 if text_create_request is not None: 24906 _body_params = text_create_request 24907 24908 # set the HTTP header `Accept` 24909 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 24910 24911 # set the HTTP header `Content-Type` 24912 if _content_type: 24913 _header_params["Content-Type"] = _content_type 24914 else: 24915 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 24916 if _default_content_type is not None: 24917 _header_params["Content-Type"] = _default_content_type 24918 24919 # authentication setting 24920 _auth_settings: List[str] = [] 24921 24922 return self.api_client.param_serialize( 24923 method="POST", 24924 resource_path="/v2/boards/{board_id}/texts", 24925 path_params=_path_params, 24926 query_params=_query_params, 24927 header_params=_header_params, 24928 body=_body_params, 24929 post_params=_form_params, 24930 files=_files, 24931 auth_settings=_auth_settings, 24932 collection_formats=_collection_formats, 24933 _host=_host, 24934 _request_auth=_request_auth, 24935 ) 24936 24937 @validate_call 24938 def delete_text_item( 24939 self, 24940 board_id: Annotated[ 24941 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 24942 ], 24943 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 24944 _request_timeout: Union[ 24945 None, 24946 Annotated[StrictFloat, Field(gt=0)], 24947 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24948 ] = None, 24949 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24950 _content_type: Optional[StrictStr] = None, 24951 _headers: Optional[Dict[StrictStr, Any]] = None, 24952 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24953 ) -> object: 24954 """Delete text item 24955 24956 Deletes a text item from the board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 24957 24958 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 24959 :type board_id: str 24960 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 24961 :type item_id: str 24962 :param _request_timeout: timeout setting for this request. If one 24963 number provided, it will be total request 24964 timeout. It can also be a pair (tuple) of 24965 (connection, read) timeouts. 24966 :type _request_timeout: int, tuple(int, int), optional 24967 :param _request_auth: set to override the auth_settings for an a single 24968 request; this effectively ignores the 24969 authentication in the spec for a single request. 24970 :type _request_auth: dict, optional 24971 :param _content_type: force content-type for the request. 24972 :type _content_type: str, Optional 24973 :param _headers: set to override the headers for a single 24974 request; this effectively ignores the headers 24975 in the spec for a single request. 24976 :type _headers: dict, optional 24977 :param _host_index: set to override the host_index for a single 24978 request; this effectively ignores the host_index 24979 in the spec for a single request. 24980 :type _host_index: int, optional 24981 :return: Returns the result object. 24982 """ # noqa: E501 24983 24984 _param = self._delete_text_item_serialize( 24985 board_id=board_id, 24986 item_id=item_id, 24987 _request_auth=_request_auth, 24988 _content_type=_content_type, 24989 _headers=_headers, 24990 _host_index=_host_index, 24991 ) 24992 24993 _response_types_map: Dict[str, Optional[str]] = { 24994 "204": "object", 24995 "400": None, 24996 "404": None, 24997 "429": None, 24998 } 24999 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25000 response_data.read() 25001 return self.api_client.response_deserialize( 25002 response_data=response_data, 25003 response_types_map=_response_types_map, 25004 ).data 25005 25006 def _delete_text_item_serialize( 25007 self, 25008 board_id, 25009 item_id, 25010 _request_auth, 25011 _content_type, 25012 _headers, 25013 _host_index, 25014 ) -> RequestSerialized: 25015 25016 _host = None 25017 25018 _collection_formats: Dict[str, str] = {} 25019 25020 _path_params: Dict[str, str] = {} 25021 _query_params: List[Tuple[str, str]] = [] 25022 _header_params: Dict[str, Optional[str]] = _headers or {} 25023 _form_params: List[Tuple[str, str]] = [] 25024 _files: Dict[str, str] = {} 25025 _body_params: Optional[bytes] = None 25026 25027 # process the path parameters 25028 if board_id is not None: 25029 _path_params["board_id"] = board_id 25030 if item_id is not None: 25031 _path_params["item_id"] = item_id 25032 # process the query parameters 25033 # process the header parameters 25034 # process the form parameters 25035 # process the body parameter 25036 25037 # set the HTTP header `Accept` 25038 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25039 25040 # authentication setting 25041 _auth_settings: List[str] = [] 25042 25043 return self.api_client.param_serialize( 25044 method="DELETE", 25045 resource_path="/v2/boards/{board_id}/texts/{item_id}", 25046 path_params=_path_params, 25047 query_params=_query_params, 25048 header_params=_header_params, 25049 body=_body_params, 25050 post_params=_form_params, 25051 files=_files, 25052 auth_settings=_auth_settings, 25053 collection_formats=_collection_formats, 25054 _host=_host, 25055 _request_auth=_request_auth, 25056 ) 25057 25058 @validate_call 25059 def get_text_item( 25060 self, 25061 board_id: Annotated[ 25062 StrictStr, 25063 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 25064 ], 25065 item_id: Annotated[ 25066 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 25067 ], 25068 _request_timeout: Union[ 25069 None, 25070 Annotated[StrictFloat, Field(gt=0)], 25071 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25072 ] = None, 25073 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25074 _content_type: Optional[StrictStr] = None, 25075 _headers: Optional[Dict[StrictStr, Any]] = None, 25076 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25077 ) -> TextItem: 25078 """Get text item 25079 25080 Retrieves information for a specific text item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 25081 25082 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 25083 :type board_id: str 25084 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 25085 :type item_id: str 25086 :param _request_timeout: timeout setting for this request. If one 25087 number provided, it will be total request 25088 timeout. It can also be a pair (tuple) of 25089 (connection, read) timeouts. 25090 :type _request_timeout: int, tuple(int, int), optional 25091 :param _request_auth: set to override the auth_settings for an a single 25092 request; this effectively ignores the 25093 authentication in the spec for a single request. 25094 :type _request_auth: dict, optional 25095 :param _content_type: force content-type for the request. 25096 :type _content_type: str, Optional 25097 :param _headers: set to override the headers for a single 25098 request; this effectively ignores the headers 25099 in the spec for a single request. 25100 :type _headers: dict, optional 25101 :param _host_index: set to override the host_index for a single 25102 request; this effectively ignores the host_index 25103 in the spec for a single request. 25104 :type _host_index: int, optional 25105 :return: Returns the result object. 25106 """ # noqa: E501 25107 25108 _param = self._get_text_item_serialize( 25109 board_id=board_id, 25110 item_id=item_id, 25111 _request_auth=_request_auth, 25112 _content_type=_content_type, 25113 _headers=_headers, 25114 _host_index=_host_index, 25115 ) 25116 25117 _response_types_map: Dict[str, Optional[str]] = { 25118 "200": "TextItem", 25119 "400": None, 25120 "404": None, 25121 "429": None, 25122 } 25123 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25124 response_data.read() 25125 return self.api_client.response_deserialize( 25126 response_data=response_data, 25127 response_types_map=_response_types_map, 25128 ).data 25129 25130 def _get_text_item_serialize( 25131 self, 25132 board_id, 25133 item_id, 25134 _request_auth, 25135 _content_type, 25136 _headers, 25137 _host_index, 25138 ) -> RequestSerialized: 25139 25140 _host = None 25141 25142 _collection_formats: Dict[str, str] = {} 25143 25144 _path_params: Dict[str, str] = {} 25145 _query_params: List[Tuple[str, str]] = [] 25146 _header_params: Dict[str, Optional[str]] = _headers or {} 25147 _form_params: List[Tuple[str, str]] = [] 25148 _files: Dict[str, str] = {} 25149 _body_params: Optional[bytes] = None 25150 25151 # process the path parameters 25152 if board_id is not None: 25153 _path_params["board_id"] = board_id 25154 if item_id is not None: 25155 _path_params["item_id"] = item_id 25156 # process the query parameters 25157 # process the header parameters 25158 # process the form parameters 25159 # process the body parameter 25160 25161 # set the HTTP header `Accept` 25162 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25163 25164 # authentication setting 25165 _auth_settings: List[str] = [] 25166 25167 return self.api_client.param_serialize( 25168 method="GET", 25169 resource_path="/v2/boards/{board_id}/texts/{item_id}", 25170 path_params=_path_params, 25171 query_params=_query_params, 25172 header_params=_header_params, 25173 body=_body_params, 25174 post_params=_form_params, 25175 files=_files, 25176 auth_settings=_auth_settings, 25177 collection_formats=_collection_formats, 25178 _host=_host, 25179 _request_auth=_request_auth, 25180 ) 25181 25182 @validate_call 25183 def update_text_item( 25184 self, 25185 board_id: Annotated[ 25186 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 25187 ], 25188 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 25189 text_update_request: TextUpdateRequest, 25190 _request_timeout: Union[ 25191 None, 25192 Annotated[StrictFloat, Field(gt=0)], 25193 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25194 ] = None, 25195 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25196 _content_type: Optional[StrictStr] = None, 25197 _headers: Optional[Dict[StrictStr, Any]] = None, 25198 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25199 ) -> TextItem: 25200 """Update text item 25201 25202 Updates a text item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 25203 25204 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 25205 :type board_id: str 25206 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 25207 :type item_id: str 25208 :param text_update_request: (required) 25209 :type text_update_request: TextUpdateRequest 25210 :param _request_timeout: timeout setting for this request. If one 25211 number provided, it will be total request 25212 timeout. It can also be a pair (tuple) of 25213 (connection, read) timeouts. 25214 :type _request_timeout: int, tuple(int, int), optional 25215 :param _request_auth: set to override the auth_settings for an a single 25216 request; this effectively ignores the 25217 authentication in the spec for a single request. 25218 :type _request_auth: dict, optional 25219 :param _content_type: force content-type for the request. 25220 :type _content_type: str, Optional 25221 :param _headers: set to override the headers for a single 25222 request; this effectively ignores the headers 25223 in the spec for a single request. 25224 :type _headers: dict, optional 25225 :param _host_index: set to override the host_index for a single 25226 request; this effectively ignores the host_index 25227 in the spec for a single request. 25228 :type _host_index: int, optional 25229 :return: Returns the result object. 25230 """ # noqa: E501 25231 25232 _param = self._update_text_item_serialize( 25233 board_id=board_id, 25234 item_id=item_id, 25235 text_update_request=text_update_request, 25236 _request_auth=_request_auth, 25237 _content_type=_content_type, 25238 _headers=_headers, 25239 _host_index=_host_index, 25240 ) 25241 25242 _response_types_map: Dict[str, Optional[str]] = { 25243 "200": "TextItem", 25244 "400": None, 25245 "404": None, 25246 "409": None, 25247 "429": None, 25248 } 25249 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25250 response_data.read() 25251 return self.api_client.response_deserialize( 25252 response_data=response_data, 25253 response_types_map=_response_types_map, 25254 ).data 25255 25256 def _update_text_item_serialize( 25257 self, 25258 board_id, 25259 item_id, 25260 text_update_request, 25261 _request_auth, 25262 _content_type, 25263 _headers, 25264 _host_index, 25265 ) -> RequestSerialized: 25266 25267 _host = None 25268 25269 _collection_formats: Dict[str, str] = {} 25270 25271 _path_params: Dict[str, str] = {} 25272 _query_params: List[Tuple[str, str]] = [] 25273 _header_params: Dict[str, Optional[str]] = _headers or {} 25274 _form_params: List[Tuple[str, str]] = [] 25275 _files: Dict[str, str] = {} 25276 _body_params: Optional[bytes] = None 25277 25278 # process the path parameters 25279 if board_id is not None: 25280 _path_params["board_id"] = board_id 25281 if item_id is not None: 25282 _path_params["item_id"] = item_id 25283 # process the query parameters 25284 # process the header parameters 25285 # process the form parameters 25286 # process the body parameter 25287 if text_update_request is not None: 25288 _body_params = text_update_request 25289 25290 # set the HTTP header `Accept` 25291 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25292 25293 # set the HTTP header `Content-Type` 25294 if _content_type: 25295 _header_params["Content-Type"] = _content_type 25296 else: 25297 _default_content_type = self.api_client.select_header_content_type(["application/json"]) 25298 if _default_content_type is not None: 25299 _header_params["Content-Type"] = _default_content_type 25300 25301 # authentication setting 25302 _auth_settings: List[str] = [] 25303 25304 return self.api_client.param_serialize( 25305 method="PATCH", 25306 resource_path="/v2/boards/{board_id}/texts/{item_id}", 25307 path_params=_path_params, 25308 query_params=_query_params, 25309 header_params=_header_params, 25310 body=_body_params, 25311 post_params=_form_params, 25312 files=_files, 25313 auth_settings=_auth_settings, 25314 collection_formats=_collection_formats, 25315 _host=_host, 25316 _request_auth=_request_auth, 25317 ) 25318 25319 @validate_call 25320 def revoke_token( 25321 self, 25322 access_token: Annotated[StrictStr, Field(description="Access token that you want to revoke")], 25323 _request_timeout: Union[ 25324 None, 25325 Annotated[StrictFloat, Field(gt=0)], 25326 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25327 ] = None, 25328 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25329 _content_type: Optional[StrictStr] = None, 25330 _headers: Optional[Dict[StrictStr, Any]] = None, 25331 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25332 ) -> None: 25333 """(Deprecated) Revoke token (v1) 25334 25335 <p><b>Please use the new revoke endpoint <code>/v2/oauth/revoke</code>. This endpoint is considered vulnerable and deprecated due to access token passed publicly in the URL.</b></p> Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user. 25336 25337 :param access_token: Access token that you want to revoke (required) 25338 :type access_token: str 25339 :param _request_timeout: timeout setting for this request. If one 25340 number provided, it will be total request 25341 timeout. It can also be a pair (tuple) of 25342 (connection, read) timeouts. 25343 :type _request_timeout: int, tuple(int, int), optional 25344 :param _request_auth: set to override the auth_settings for an a single 25345 request; this effectively ignores the 25346 authentication in the spec for a single request. 25347 :type _request_auth: dict, optional 25348 :param _content_type: force content-type for the request. 25349 :type _content_type: str, Optional 25350 :param _headers: set to override the headers for a single 25351 request; this effectively ignores the headers 25352 in the spec for a single request. 25353 :type _headers: dict, optional 25354 :param _host_index: set to override the host_index for a single 25355 request; this effectively ignores the host_index 25356 in the spec for a single request. 25357 :type _host_index: int, optional 25358 :return: Returns the result object. 25359 """ # noqa: E501 25360 warnings.warn("POST /v1/oauth/revoke is deprecated.", DeprecationWarning) 25361 25362 _param = self._revoke_token_serialize( 25363 access_token=access_token, 25364 _request_auth=_request_auth, 25365 _content_type=_content_type, 25366 _headers=_headers, 25367 _host_index=_host_index, 25368 ) 25369 25370 _response_types_map: Dict[str, Optional[str]] = { 25371 "204": None, 25372 "400": None, 25373 } 25374 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25375 response_data.read() 25376 return self.api_client.response_deserialize( 25377 response_data=response_data, 25378 response_types_map=_response_types_map, 25379 ).data 25380 25381 def _revoke_token_serialize( 25382 self, 25383 access_token, 25384 _request_auth, 25385 _content_type, 25386 _headers, 25387 _host_index, 25388 ) -> RequestSerialized: 25389 25390 _host = None 25391 25392 _collection_formats: Dict[str, str] = {} 25393 25394 _path_params: Dict[str, str] = {} 25395 _query_params: List[Tuple[str, str]] = [] 25396 _header_params: Dict[str, Optional[str]] = _headers or {} 25397 _form_params: List[Tuple[str, str]] = [] 25398 _files: Dict[str, str] = {} 25399 _body_params: Optional[bytes] = None 25400 25401 # process the path parameters 25402 # process the query parameters 25403 if access_token is not None: 25404 25405 _query_params.append(("access_token", access_token)) 25406 25407 # process the header parameters 25408 # process the form parameters 25409 # process the body parameter 25410 25411 # authentication setting 25412 _auth_settings: List[str] = [] 25413 25414 return self.api_client.param_serialize( 25415 method="POST", 25416 resource_path="/v1/oauth/revoke", 25417 path_params=_path_params, 25418 query_params=_query_params, 25419 header_params=_header_params, 25420 body=_body_params, 25421 post_params=_form_params, 25422 files=_files, 25423 auth_settings=_auth_settings, 25424 collection_formats=_collection_formats, 25425 _host=_host, 25426 _request_auth=_request_auth, 25427 ) 25428 25429 @validate_call 25430 def token_info( 25431 self, 25432 _request_timeout: Union[ 25433 None, 25434 Annotated[StrictFloat, Field(gt=0)], 25435 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25436 ] = None, 25437 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25438 _content_type: Optional[StrictStr] = None, 25439 _headers: Optional[Dict[StrictStr, Any]] = None, 25440 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25441 ) -> TokenInformation: 25442 """Get access token information 25443 25444 Get information about an access token, such as the token type, scopes, team, user, token creation date and time, and the user who created the token. 25445 25446 :param _request_timeout: timeout setting for this request. If one 25447 number provided, it will be total request 25448 timeout. It can also be a pair (tuple) of 25449 (connection, read) timeouts. 25450 :type _request_timeout: int, tuple(int, int), optional 25451 :param _request_auth: set to override the auth_settings for an a single 25452 request; this effectively ignores the 25453 authentication in the spec for a single request. 25454 :type _request_auth: dict, optional 25455 :param _content_type: force content-type for the request. 25456 :type _content_type: str, Optional 25457 :param _headers: set to override the headers for a single 25458 request; this effectively ignores the headers 25459 in the spec for a single request. 25460 :type _headers: dict, optional 25461 :param _host_index: set to override the host_index for a single 25462 request; this effectively ignores the host_index 25463 in the spec for a single request. 25464 :type _host_index: int, optional 25465 :return: Returns the result object. 25466 """ # noqa: E501 25467 25468 _param = self._token_info_serialize( 25469 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 25470 ) 25471 25472 _response_types_map: Dict[str, Optional[str]] = { 25473 "200": "TokenInformation", 25474 "400": None, 25475 } 25476 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25477 response_data.read() 25478 return self.api_client.response_deserialize( 25479 response_data=response_data, 25480 response_types_map=_response_types_map, 25481 ).data 25482 25483 def _token_info_serialize( 25484 self, 25485 _request_auth, 25486 _content_type, 25487 _headers, 25488 _host_index, 25489 ) -> RequestSerialized: 25490 25491 _host = None 25492 25493 _collection_formats: Dict[str, str] = {} 25494 25495 _path_params: Dict[str, str] = {} 25496 _query_params: List[Tuple[str, str]] = [] 25497 _header_params: Dict[str, Optional[str]] = _headers or {} 25498 _form_params: List[Tuple[str, str]] = [] 25499 _files: Dict[str, str] = {} 25500 _body_params: Optional[bytes] = None 25501 25502 # process the path parameters 25503 # process the query parameters 25504 # process the header parameters 25505 # process the form parameters 25506 # process the body parameter 25507 25508 # set the HTTP header `Accept` 25509 _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) 25510 25511 # authentication setting 25512 _auth_settings: List[str] = [] 25513 25514 return self.api_client.param_serialize( 25515 method="GET", 25516 resource_path="/v1/oauth-token", 25517 path_params=_path_params, 25518 query_params=_query_params, 25519 header_params=_header_params, 25520 body=_body_params, 25521 post_params=_form_params, 25522 files=_files, 25523 auth_settings=_auth_settings, 25524 collection_formats=_collection_formats, 25525 _host=_host, 25526 _request_auth=_request_auth, 25527 )
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
247 @validate_call 248 def get_metrics( 249 self, 250 app_id: Annotated[StrictStr, Field(description="ID of the app to get metrics for.")], 251 start_date: Annotated[ 252 date, Field(description="Start date of the period in UTC format. For example, 2024-12-31.") 253 ], 254 end_date: Annotated[date, Field(description="End date of the period in UTC format. For example, 2024-12-31.")], 255 period: Annotated[Optional[StrictStr], Field(description="Group data by this time period.")] = None, 256 _request_timeout: Union[ 257 None, 258 Annotated[StrictFloat, Field(gt=0)], 259 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 260 ] = None, 261 _request_auth: Optional[Dict[StrictStr, Any]] = None, 262 _content_type: Optional[StrictStr] = None, 263 _headers: Optional[Dict[StrictStr, Any]] = None, 264 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 265 ) -> List[GetMetrics200ResponseInner]: 266 """Get app metrics 267 268 Returns a list of usage metrics for a specific app for a given time range, grouped by requested time period. This endpoint requires an app management API token. It can be generated in the <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">Your Apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 269 270 :param app_id: ID of the app to get metrics for. (required) 271 :type app_id: str 272 :param start_date: Start date of the period in UTC format. For example, 2024-12-31. (required) 273 :type start_date: date 274 :param end_date: End date of the period in UTC format. For example, 2024-12-31. (required) 275 :type end_date: date 276 :param period: Group data by this time period. 277 :type period: str 278 :param _request_timeout: timeout setting for this request. If one 279 number provided, it will be total request 280 timeout. It can also be a pair (tuple) of 281 (connection, read) timeouts. 282 :type _request_timeout: int, tuple(int, int), optional 283 :param _request_auth: set to override the auth_settings for an a single 284 request; this effectively ignores the 285 authentication in the spec for a single request. 286 :type _request_auth: dict, optional 287 :param _content_type: force content-type for the request. 288 :type _content_type: str, Optional 289 :param _headers: set to override the headers for a single 290 request; this effectively ignores the headers 291 in the spec for a single request. 292 :type _headers: dict, optional 293 :param _host_index: set to override the host_index for a single 294 request; this effectively ignores the host_index 295 in the spec for a single request. 296 :type _host_index: int, optional 297 :return: Returns the result object. 298 """ # noqa: E501 299 300 _param = self._get_metrics_serialize( 301 app_id=app_id, 302 start_date=start_date, 303 end_date=end_date, 304 period=period, 305 _request_auth=_request_auth, 306 _content_type=_content_type, 307 _headers=_headers, 308 _host_index=_host_index, 309 ) 310 311 _response_types_map: Dict[str, Optional[str]] = { 312 "200": "List[GetMetrics200ResponseInner]", 313 "404": "GetMetrics404Response", 314 } 315 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 316 response_data.read() 317 return self.api_client.response_deserialize( 318 response_data=response_data, 319 response_types_map=_response_types_map, 320 ).data
Get app metrics
Returns a list of usage metrics for a specific app for a given time range, grouped by requested time period. This endpoint requires an app management API token. It can be generated in the Your Apps section of Developer Hub.
Required scope
boards:readRate limiting
Level 1:param app_id: ID of the app to get metrics for. (required) :type app_id: str :param start_date: Start date of the period in UTC format. For example, 2024-12-31. (required) :type start_date: date :param end_date: End date of the period in UTC format. For example, 2024-12-31. (required) :type end_date: date :param period: Group data by this time period. :type period: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
390 @validate_call 391 def get_metrics_total( 392 self, 393 app_id: Annotated[StrictStr, Field(description="ID of the app to get total metrics for.")], 394 _request_timeout: Union[ 395 None, 396 Annotated[StrictFloat, Field(gt=0)], 397 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 398 ] = None, 399 _request_auth: Optional[Dict[StrictStr, Any]] = None, 400 _content_type: Optional[StrictStr] = None, 401 _headers: Optional[Dict[StrictStr, Any]] = None, 402 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 403 ) -> GetMetricsTotal200Response: 404 """Get total app metrics 405 406 Returns total usage metrics for a specific app since the app was created. This endpoint requires an app management API token. It can be generated in <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">your apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 407 408 :param app_id: ID of the app to get total metrics for. (required) 409 :type app_id: str 410 :param _request_timeout: timeout setting for this request. If one 411 number provided, it will be total request 412 timeout. It can also be a pair (tuple) of 413 (connection, read) timeouts. 414 :type _request_timeout: int, tuple(int, int), optional 415 :param _request_auth: set to override the auth_settings for an a single 416 request; this effectively ignores the 417 authentication in the spec for a single request. 418 :type _request_auth: dict, optional 419 :param _content_type: force content-type for the request. 420 :type _content_type: str, Optional 421 :param _headers: set to override the headers for a single 422 request; this effectively ignores the headers 423 in the spec for a single request. 424 :type _headers: dict, optional 425 :param _host_index: set to override the host_index for a single 426 request; this effectively ignores the host_index 427 in the spec for a single request. 428 :type _host_index: int, optional 429 :return: Returns the result object. 430 """ # noqa: E501 431 432 _param = self._get_metrics_total_serialize( 433 app_id=app_id, 434 _request_auth=_request_auth, 435 _content_type=_content_type, 436 _headers=_headers, 437 _host_index=_host_index, 438 ) 439 440 _response_types_map: Dict[str, Optional[str]] = { 441 "200": "GetMetricsTotal200Response", 442 "404": "GetMetricsTotal404Response", 443 } 444 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 445 response_data.read() 446 return self.api_client.response_deserialize( 447 response_data=response_data, 448 response_types_map=_response_types_map, 449 ).data
Get total app metrics
Returns total usage metrics for a specific app since the app was created. This endpoint requires an app management API token. It can be generated in your apps section of Developer Hub.
Required scope
boards:readRate limiting
Level 1:param app_id: ID of the app to get total metrics for. (required) :type app_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
500 @validate_call 501 def enterprise_get_audit_logs( 502 self, 503 created_after: Annotated[ 504 StrictStr, 505 Field( 506 description='Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-03-30T17:26:50.000Z` as the value for the `createdAfter` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC))." ' 507 ), 508 ], 509 created_before: Annotated[ 510 StrictStr, 511 Field( 512 description="Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-04-30T17:26:50.000Z` as the value for the `createdBefore` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 513 ), 514 ], 515 cursor: Annotated[ 516 Optional[StrictStr], 517 Field( 518 description="A cursor-paginated method returns a portion of the total set of results based on the `limit` specified and a `cursor` that points to the next portion of the results. To retrieve the next set of results of the collection, set the `cursor` parameter in your next request to the appropriate cursor value returned in the response." 519 ), 520 ] = None, 521 limit: Annotated[ 522 Optional[StrictInt], 523 Field( 524 description="Maximum number of results returned based on the `limit` specified in the request. For example, if there are `30` results, the request has no `cursor` value, and the `limit` is set to `20`,the `size` of the results will be `20`. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the `cursor` parameter value that you obtained from the response.<br>Default: `100` " 525 ), 526 ] = None, 527 sorting: Annotated[ 528 Optional[StrictStr], 529 Field( 530 description="Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log `createdAt` parameter).<br>Default: `ASC` " 531 ), 532 ] = None, 533 _request_timeout: Union[ 534 None, 535 Annotated[StrictFloat, Field(gt=0)], 536 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 537 ] = None, 538 _request_auth: Optional[Dict[StrictStr, Any]] = None, 539 _content_type: Optional[StrictStr] = None, 540 _headers: Optional[Dict[StrictStr, Any]] = None, 541 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 542 ) -> AuditPage: 543 """Get audit logs 544 545 Retrieves a page of audit events from the last 90 days. If you want to retrieve data that is older than 90 days, you can use the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/360017571434-Audit-logs#h_01J7EY4E0F67EFTRQ7BT688HW0\">CSV export feature</a>.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>auditlogs:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> 546 547 :param created_after: Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-03-30T17:26:50.000Z` as the value for the `createdAfter` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).\" (required) 548 :type created_after: str 549 :param created_before: Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between `2023-03-30T17:26:50.000Z` and `2023-04-30T17:26:50.000Z`, provide `2023-04-30T17:26:50.000Z` as the value for the `createdBefore` parameter.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 550 :type created_before: str 551 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the `limit` specified and a `cursor` that points to the next portion of the results. To retrieve the next set of results of the collection, set the `cursor` parameter in your next request to the appropriate cursor value returned in the response. 552 :type cursor: str 553 :param limit: Maximum number of results returned based on the `limit` specified in the request. For example, if there are `30` results, the request has no `cursor` value, and the `limit` is set to `20`,the `size` of the results will be `20`. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the `cursor` parameter value that you obtained from the response.<br>Default: `100` 554 :type limit: int 555 :param sorting: Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log `createdAt` parameter).<br>Default: `ASC` 556 :type sorting: str 557 :param _request_timeout: timeout setting for this request. If one 558 number provided, it will be total request 559 timeout. It can also be a pair (tuple) of 560 (connection, read) timeouts. 561 :type _request_timeout: int, tuple(int, int), optional 562 :param _request_auth: set to override the auth_settings for an a single 563 request; this effectively ignores the 564 authentication in the spec for a single request. 565 :type _request_auth: dict, optional 566 :param _content_type: force content-type for the request. 567 :type _content_type: str, Optional 568 :param _headers: set to override the headers for a single 569 request; this effectively ignores the headers 570 in the spec for a single request. 571 :type _headers: dict, optional 572 :param _host_index: set to override the host_index for a single 573 request; this effectively ignores the host_index 574 in the spec for a single request. 575 :type _host_index: int, optional 576 :return: Returns the result object. 577 """ # noqa: E501 578 579 _param = self._enterprise_get_audit_logs_serialize( 580 created_after=created_after, 581 created_before=created_before, 582 cursor=cursor, 583 limit=limit, 584 sorting=sorting, 585 _request_auth=_request_auth, 586 _content_type=_content_type, 587 _headers=_headers, 588 _host_index=_host_index, 589 ) 590 591 _response_types_map: Dict[str, Optional[str]] = { 592 "200": "AuditPage", 593 "400": None, 594 "401": None, 595 "403": None, 596 "404": None, 597 "409": None, 598 "429": None, 599 } 600 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 601 response_data.read() 602 return self.api_client.response_deserialize( 603 response_data=response_data, 604 response_types_map=_response_types_map, 605 ).data
Get audit logs
Retrieves a page of audit events from the last 90 days. If you want to retrieve data that is older than 90 days, you can use the CSV export feature.
Required scope
auditlogs:readRate limiting
Level 2:param created_after: Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between 2023-03-30T17:26:50.000Z and 2023-04-30T17:26:50.000Z, provide 2023-03-30T17:26:50.000Z as the value for the createdAfter parameter.
Format: UTC, adheres to ISO 8601, including milliseconds and a trailing Z offset." (required)
:type created_after: str
:param created_before: Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between 2023-03-30T17:26:50.000Z and 2023-04-30T17:26:50.000Z, provide 2023-04-30T17:26:50.000Z as the value for the createdBefore parameter.
Format: UTC, adheres to ISO 8601, including milliseconds and a trailing Z offset. (required)
:type created_before: str
:param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next set of results of the collection, set the cursor parameter in your next request to the appropriate cursor value returned in the response.
:type cursor: str
:param limit: Maximum number of results returned based on the limit specified in the request. For example, if there are 30 results, the request has no cursor value, and the limit is set to 20,the size of the results will be 20. The rest of the results will not be returned. To retrieve the rest of the results, you must make another request and set the appropriate value for the cursor parameter value that you obtained from the response.
Default: 100
:type limit: int
:param sorting: Sort order in which you want to view the result set. Based on the value you provide, the results are sorted in an ascending or descending order of the audit log creation date (audit log createdAt parameter).
Default: ASC
:type sorting: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
678 @validate_call 679 def enterprise_board_content_item_logs_fetch( 680 self, 681 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 682 var_from: Annotated[ 683 datetime, 684 Field( 685 description="Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 686 ), 687 ], 688 to: Annotated[ 689 datetime, 690 Field( 691 description="Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). " 692 ), 693 ], 694 board_ids: Annotated[ 695 Optional[Annotated[List[StrictStr], Field(max_length=15)]], 696 Field(description="List of board IDs for which you want to retrieve the content logs."), 697 ] = None, 698 emails: Annotated[ 699 Optional[Annotated[List[StrictStr], Field(max_length=15)]], 700 Field( 701 description="Filter content logs based on the list of emails of users who created, modified, or deleted the board item." 702 ), 703 ] = None, 704 cursor: Annotated[ 705 Optional[StrictStr], 706 Field( 707 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 708 ), 709 ] = None, 710 limit: Annotated[ 711 Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], 712 Field( 713 description="The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 714 ), 715 ] = None, 716 sorting: Annotated[ 717 Optional[StrictStr], 718 Field( 719 description="Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify `asc`. To sort by a descending modified date, specify `desc`. " 720 ), 721 ] = None, 722 _request_timeout: Union[ 723 None, 724 Annotated[StrictFloat, Field(gt=0)], 725 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 726 ] = None, 727 _request_auth: Optional[Dict[StrictStr, Any]] = None, 728 _content_type: Optional[StrictStr] = None, 729 _headers: Optional[Dict[StrictStr, Any]] = None, 730 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 731 ) -> GetBoardItemContentLogsResponse: 732 """Retrieve content change logs of board items 733 734 Retrieves content changes for board items within your organization. Content changes are actions that users can perform on board items, such as updating a sticky note's text. You can retrieve results for a specific time period. You can also filter results based on the board IDs and the emails of users who created, modified, or deleted a board item. Additionally, results can be paginated for easier viewing and processing. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>contentlogs:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin.</p> 735 736 :param org_id: Unique identifier of the organization. (required) 737 :type org_id: str 738 :param var_from: Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 739 :type var_from: datetime 740 :param to: Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). (required) 741 :type to: datetime 742 :param board_ids: List of board IDs for which you want to retrieve the content logs. 743 :type board_ids: List[str] 744 :param emails: Filter content logs based on the list of emails of users who created, modified, or deleted the board item. 745 :type emails: List[str] 746 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 747 :type cursor: str 748 :param limit: The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value. 749 :type limit: int 750 :param sorting: Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify `asc`. To sort by a descending modified date, specify `desc`. 751 :type sorting: str 752 :param _request_timeout: timeout setting for this request. If one 753 number provided, it will be total request 754 timeout. It can also be a pair (tuple) of 755 (connection, read) timeouts. 756 :type _request_timeout: int, tuple(int, int), optional 757 :param _request_auth: set to override the auth_settings for an a single 758 request; this effectively ignores the 759 authentication in the spec for a single request. 760 :type _request_auth: dict, optional 761 :param _content_type: force content-type for the request. 762 :type _content_type: str, Optional 763 :param _headers: set to override the headers for a single 764 request; this effectively ignores the headers 765 in the spec for a single request. 766 :type _headers: dict, optional 767 :param _host_index: set to override the host_index for a single 768 request; this effectively ignores the host_index 769 in the spec for a single request. 770 :type _host_index: int, optional 771 :return: Returns the result object. 772 """ # noqa: E501 773 774 _param = self._enterprise_board_content_item_logs_fetch_serialize( 775 org_id=org_id, 776 var_from=var_from, 777 to=to, 778 board_ids=board_ids, 779 emails=emails, 780 cursor=cursor, 781 limit=limit, 782 sorting=sorting, 783 _request_auth=_request_auth, 784 _content_type=_content_type, 785 _headers=_headers, 786 _host_index=_host_index, 787 ) 788 789 _response_types_map: Dict[str, Optional[str]] = { 790 "200": "GetBoardItemContentLogsResponse", 791 "400": None, 792 "401": None, 793 "403": None, 794 "404": None, 795 "429": None, 796 } 797 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 798 response_data.read() 799 return self.api_client.response_deserialize( 800 response_data=response_data, 801 response_types_map=_response_types_map, 802 ).data
Retrieve content change logs of board items
Retrieves content changes for board items within your organization. Content changes are actions that users can perform on board items, such as updating a sticky note's text. You can retrieve results for a specific time period. You can also filter results based on the board IDs and the emails of users who created, modified, or deleted a board item. Additionally, results can be paginated for easier viewing and processing.
Required scope
contentlogs:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin.
:param org_id: Unique identifier of the organization. (required)
:type org_id: str
:param var_from: Filter content logs based on the date and time when the board item was last modified. This is the start date and time for the modified date duration. Format: UTC, adheres to ISO 8601, includes a trailing Z offset. (required)
:type var_from: datetime
:param to: Filter content logs based on the date and time when the board item was last modified. This is the end date and time for the modified date duration. Format: UTC, adheres to ISO 8601, includes a trailing Z offset. (required)
:type to: datetime
:param board_ids: List of board IDs for which you want to retrieve the content logs.
:type board_ids: List[str]
:param emails: Filter content logs based on the list of emails of users who created, modified, or deleted the board item.
:type emails: List[str]
:param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request.
:type cursor: str
:param limit: The maximum number of results to return per call. If the number of logs in the response is greater than the limit specified, the response returns the cursor parameter with a value.
:type limit: int
:param sorting: Sort order in which you want to view the result set based on the modified date. To sort by an ascending modified date, specify asc. To sort by a descending modified date, specify desc.
:type sorting: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
895 @validate_call 896 def enterprise_board_export_job_results( 897 self, 898 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 899 job_id: Annotated[StrictStr, Field(description="Unique identifier of the job.")], 900 _request_timeout: Union[ 901 None, 902 Annotated[StrictFloat, Field(gt=0)], 903 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 904 ] = None, 905 _request_auth: Optional[Dict[StrictStr, Any]] = None, 906 _content_type: Optional[StrictStr] = None, 907 _headers: Optional[Dict[StrictStr, Any]] = None, 908 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 909 ) -> BoardExportResult: 910 """Get results for board export job 911 912 Retrieves the result of the board export job. The response provides more information about the board export job, such as the S3 link to the files created.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 913 914 :param org_id: Unique identifier of the organization. (required) 915 :type org_id: str 916 :param job_id: Unique identifier of the job. (required) 917 :type job_id: str 918 :param _request_timeout: timeout setting for this request. If one 919 number provided, it will be total request 920 timeout. It can also be a pair (tuple) of 921 (connection, read) timeouts. 922 :type _request_timeout: int, tuple(int, int), optional 923 :param _request_auth: set to override the auth_settings for an a single 924 request; this effectively ignores the 925 authentication in the spec for a single request. 926 :type _request_auth: dict, optional 927 :param _content_type: force content-type for the request. 928 :type _content_type: str, Optional 929 :param _headers: set to override the headers for a single 930 request; this effectively ignores the headers 931 in the spec for a single request. 932 :type _headers: dict, optional 933 :param _host_index: set to override the host_index for a single 934 request; this effectively ignores the host_index 935 in the spec for a single request. 936 :type _host_index: int, optional 937 :return: Returns the result object. 938 """ # noqa: E501 939 940 _param = self._enterprise_board_export_job_results_serialize( 941 org_id=org_id, 942 job_id=job_id, 943 _request_auth=_request_auth, 944 _content_type=_content_type, 945 _headers=_headers, 946 _host_index=_host_index, 947 ) 948 949 _response_types_map: Dict[str, Optional[str]] = { 950 "200": "BoardExportResult", 951 "400": None, 952 "401": None, 953 "403": None, 954 "404": None, 955 "429": None, 956 } 957 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 958 response_data.read() 959 return self.api_client.response_deserialize( 960 response_data=response_data, 961 response_types_map=_response_types_map, 962 ).data
Get results for board export job
Retrieves the result of the board export job. The response provides more information about the board export job, such as the S3 link to the files created.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param job_id: Unique identifier of the job. (required) :type job_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1016 @validate_call 1017 def enterprise_board_export_job_status( 1018 self, 1019 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1020 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1021 _request_timeout: Union[ 1022 None, 1023 Annotated[StrictFloat, Field(gt=0)], 1024 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1025 ] = None, 1026 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1027 _content_type: Optional[StrictStr] = None, 1028 _headers: Optional[Dict[StrictStr, Any]] = None, 1029 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1030 ) -> BoardExportJobStatus: 1031 """Get board export job status 1032 1033 Retrieves the status of the board export job.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1034 1035 :param org_id: Unique identifier of the organization. (required) 1036 :type org_id: str 1037 :param job_id: Unique identifier of the board export job. (required) 1038 :type job_id: str 1039 :param _request_timeout: timeout setting for this request. If one 1040 number provided, it will be total request 1041 timeout. It can also be a pair (tuple) of 1042 (connection, read) timeouts. 1043 :type _request_timeout: int, tuple(int, int), optional 1044 :param _request_auth: set to override the auth_settings for an a single 1045 request; this effectively ignores the 1046 authentication in the spec for a single request. 1047 :type _request_auth: dict, optional 1048 :param _content_type: force content-type for the request. 1049 :type _content_type: str, Optional 1050 :param _headers: set to override the headers for a single 1051 request; this effectively ignores the headers 1052 in the spec for a single request. 1053 :type _headers: dict, optional 1054 :param _host_index: set to override the host_index for a single 1055 request; this effectively ignores the host_index 1056 in the spec for a single request. 1057 :type _host_index: int, optional 1058 :return: Returns the result object. 1059 """ # noqa: E501 1060 1061 _param = self._enterprise_board_export_job_status_serialize( 1062 org_id=org_id, 1063 job_id=job_id, 1064 _request_auth=_request_auth, 1065 _content_type=_content_type, 1066 _headers=_headers, 1067 _host_index=_host_index, 1068 ) 1069 1070 _response_types_map: Dict[str, Optional[str]] = { 1071 "200": "BoardExportJobStatus", 1072 "400": None, 1073 "401": None, 1074 "403": None, 1075 "404": None, 1076 "429": None, 1077 } 1078 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1079 response_data.read() 1080 return self.api_client.response_deserialize( 1081 response_data=response_data, 1082 response_types_map=_response_types_map, 1083 ).data
Get board export job status
Retrieves the status of the board export job.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param job_id: Unique identifier of the board export job. (required) :type job_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1137 @validate_call 1138 def enterprise_board_export_job_tasks( 1139 self, 1140 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1141 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1142 status: Annotated[ 1143 Optional[List[StrictStr]], 1144 Field( 1145 description="Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR." 1146 ), 1147 ] = None, 1148 cursor: Annotated[ 1149 Optional[StrictStr], 1150 Field( 1151 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 1152 ), 1153 ] = None, 1154 limit: Annotated[ 1155 Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], 1156 Field( 1157 description="The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 1158 ), 1159 ] = None, 1160 _request_timeout: Union[ 1161 None, 1162 Annotated[StrictFloat, Field(gt=0)], 1163 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1164 ] = None, 1165 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1166 _content_type: Optional[StrictStr] = None, 1167 _headers: Optional[Dict[StrictStr, Any]] = None, 1168 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1169 ) -> BoardExportJobTasksList: 1170 """Get board export job tasks list 1171 1172 Retrieves the list of tasks for the board export job.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1173 1174 :param org_id: Unique identifier of the organization. (required) 1175 :type org_id: str 1176 :param job_id: Unique identifier of the board export job. (required) 1177 :type job_id: str 1178 :param status: Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR. 1179 :type status: List[str] 1180 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 1181 :type cursor: str 1182 :param limit: The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. 1183 :type limit: int 1184 :param _request_timeout: timeout setting for this request. If one 1185 number provided, it will be total request 1186 timeout. It can also be a pair (tuple) of 1187 (connection, read) timeouts. 1188 :type _request_timeout: int, tuple(int, int), optional 1189 :param _request_auth: set to override the auth_settings for an a single 1190 request; this effectively ignores the 1191 authentication in the spec for a single request. 1192 :type _request_auth: dict, optional 1193 :param _content_type: force content-type for the request. 1194 :type _content_type: str, Optional 1195 :param _headers: set to override the headers for a single 1196 request; this effectively ignores the headers 1197 in the spec for a single request. 1198 :type _headers: dict, optional 1199 :param _host_index: set to override the host_index for a single 1200 request; this effectively ignores the host_index 1201 in the spec for a single request. 1202 :type _host_index: int, optional 1203 :return: Returns the result object. 1204 """ # noqa: E501 1205 1206 _param = self._enterprise_board_export_job_tasks_serialize( 1207 org_id=org_id, 1208 job_id=job_id, 1209 status=status, 1210 cursor=cursor, 1211 limit=limit, 1212 _request_auth=_request_auth, 1213 _content_type=_content_type, 1214 _headers=_headers, 1215 _host_index=_host_index, 1216 ) 1217 1218 _response_types_map: Dict[str, Optional[str]] = { 1219 "200": "BoardExportJobTasksList", 1220 "400": None, 1221 "401": None, 1222 "403": None, 1223 "404": None, 1224 "429": None, 1225 } 1226 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1227 response_data.read() 1228 return self.api_client.response_deserialize( 1229 response_data=response_data, 1230 response_types_map=_response_types_map, 1231 ).data
Get board export job tasks list
Retrieves the list of tasks for the board export job.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param job_id: Unique identifier of the board export job. (required) :type job_id: str :param status: Filters the list of board export tasks by their status. Accepts an array of statuses such as TASK_STATUS_CREATED, TASK_STATUS_CANCELLED, TASK_STATUS_SCHEDULED, TASK_STATUS_SUCCESS or TASK_STATUS_ERROR. :type status: List[str] :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. :type cursor: str :param limit: The maximum number of results to return per call. If the number of tasks in the response is greater than the limit specified, the response returns the cursor parameter with a value. :type limit: int :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1302 @validate_call 1303 def enterprise_board_export_jobs( 1304 self, 1305 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1306 status: Annotated[ 1307 Optional[List[StrictStr]], 1308 Field( 1309 description="Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED." 1310 ), 1311 ] = None, 1312 creator_id: Annotated[ 1313 Optional[List[StrictInt]], Field(description="Unique identifier of the board export job creator.") 1314 ] = None, 1315 cursor: Annotated[ 1316 Optional[StrictStr], 1317 Field( 1318 description="A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. " 1319 ), 1320 ] = None, 1321 limit: Annotated[ 1322 Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], 1323 Field( 1324 description="The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. " 1325 ), 1326 ] = None, 1327 _request_timeout: Union[ 1328 None, 1329 Annotated[StrictFloat, Field(gt=0)], 1330 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1331 ] = None, 1332 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1333 _content_type: Optional[StrictStr] = None, 1334 _headers: Optional[Dict[StrictStr, Any]] = None, 1335 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1336 ) -> BoardExportJobsList: 1337 """Get board export jobs list 1338 1339 Retrieves the list of board export jobs based on the filters provided in the request.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1340 1341 :param org_id: Unique identifier of the organization. (required) 1342 :type org_id: str 1343 :param status: Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED. 1344 :type status: List[str] 1345 :param creator_id: Unique identifier of the board export job creator. 1346 :type creator_id: List[int] 1347 :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. 1348 :type cursor: str 1349 :param limit: The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. 1350 :type limit: int 1351 :param _request_timeout: timeout setting for this request. If one 1352 number provided, it will be total request 1353 timeout. It can also be a pair (tuple) of 1354 (connection, read) timeouts. 1355 :type _request_timeout: int, tuple(int, int), optional 1356 :param _request_auth: set to override the auth_settings for an a single 1357 request; this effectively ignores the 1358 authentication in the spec for a single request. 1359 :type _request_auth: dict, optional 1360 :param _content_type: force content-type for the request. 1361 :type _content_type: str, Optional 1362 :param _headers: set to override the headers for a single 1363 request; this effectively ignores the headers 1364 in the spec for a single request. 1365 :type _headers: dict, optional 1366 :param _host_index: set to override the host_index for a single 1367 request; this effectively ignores the host_index 1368 in the spec for a single request. 1369 :type _host_index: int, optional 1370 :return: Returns the result object. 1371 """ # noqa: E501 1372 1373 _param = self._enterprise_board_export_jobs_serialize( 1374 org_id=org_id, 1375 status=status, 1376 creator_id=creator_id, 1377 cursor=cursor, 1378 limit=limit, 1379 _request_auth=_request_auth, 1380 _content_type=_content_type, 1381 _headers=_headers, 1382 _host_index=_host_index, 1383 ) 1384 1385 _response_types_map: Dict[str, Optional[str]] = { 1386 "200": "BoardExportJobsList", 1387 "400": None, 1388 "401": None, 1389 "403": None, 1390 "404": None, 1391 "429": None, 1392 } 1393 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1394 response_data.read() 1395 return self.api_client.response_deserialize( 1396 response_data=response_data, 1397 response_types_map=_response_types_map, 1398 ).data
Get board export jobs list
Retrieves the list of board export jobs based on the filters provided in the request.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param status: Status of the board export jobs that you want to retrieve, such as JOB_STATUS_CREATED, JOB_STATUS_IN_PROGRESS, JOB_STATUS_CANCELLED or JOB_STATUS_FINISHED. :type status: List[str] :param creator_id: Unique identifier of the board export job creator. :type creator_id: List[int] :param cursor: A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, set the cursor parameter equal to the cursor value you received in the response of the previous request. :type cursor: str :param limit: The maximum number of results to return per call. If the number of jobs in the response is greater than the limit specified, the response returns the cursor parameter with a value. :type limit: int :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1472 @validate_call 1473 def enterprise_create_board_export( 1474 self, 1475 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1476 request_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1477 create_board_export_request: CreateBoardExportRequest, 1478 _request_timeout: Union[ 1479 None, 1480 Annotated[StrictFloat, Field(gt=0)], 1481 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1482 ] = None, 1483 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1484 _content_type: Optional[StrictStr] = None, 1485 _headers: Optional[Dict[StrictStr, Any]] = None, 1486 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1487 ) -> BoardExportJobId: 1488 """Create board export job 1489 1490 Creates an export job for one or more boards.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1491 1492 :param org_id: Unique identifier of the organization. (required) 1493 :type org_id: str 1494 :param request_id: Unique identifier of the board export job. (required) 1495 :type request_id: str 1496 :param create_board_export_request: (required) 1497 :type create_board_export_request: CreateBoardExportRequest 1498 :param _request_timeout: timeout setting for this request. If one 1499 number provided, it will be total request 1500 timeout. It can also be a pair (tuple) of 1501 (connection, read) timeouts. 1502 :type _request_timeout: int, tuple(int, int), optional 1503 :param _request_auth: set to override the auth_settings for an a single 1504 request; this effectively ignores the 1505 authentication in the spec for a single request. 1506 :type _request_auth: dict, optional 1507 :param _content_type: force content-type for the request. 1508 :type _content_type: str, Optional 1509 :param _headers: set to override the headers for a single 1510 request; this effectively ignores the headers 1511 in the spec for a single request. 1512 :type _headers: dict, optional 1513 :param _host_index: set to override the host_index for a single 1514 request; this effectively ignores the host_index 1515 in the spec for a single request. 1516 :type _host_index: int, optional 1517 :return: Returns the result object. 1518 """ # noqa: E501 1519 1520 _param = self._enterprise_create_board_export_serialize( 1521 org_id=org_id, 1522 request_id=request_id, 1523 create_board_export_request=create_board_export_request, 1524 _request_auth=_request_auth, 1525 _content_type=_content_type, 1526 _headers=_headers, 1527 _host_index=_host_index, 1528 ) 1529 1530 _response_types_map: Dict[str, Optional[str]] = { 1531 "200": "BoardExportJobId", 1532 "400": None, 1533 "401": None, 1534 "403": None, 1535 "404": None, 1536 "425": None, 1537 "429": None, 1538 } 1539 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1540 response_data.read() 1541 return self.api_client.response_deserialize( 1542 response_data=response_data, 1543 response_types_map=_response_types_map, 1544 ).data
Create board export job
Creates an export job for one or more boards.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param request_id: Unique identifier of the board export job. (required) :type request_id: str :param create_board_export_request: (required) :type create_board_export_request: CreateBoardExportRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1611 @validate_call 1612 def enterprise_create_board_export_task_export_link( 1613 self, 1614 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1615 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1616 task_id: Annotated[StrictStr, Field(description="Unique identifier of the board export task.")], 1617 _request_timeout: Union[ 1618 None, 1619 Annotated[StrictFloat, Field(gt=0)], 1620 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1621 ] = None, 1622 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1623 _content_type: Optional[StrictStr] = None, 1624 _headers: Optional[Dict[StrictStr, Any]] = None, 1625 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1626 ) -> BoardExportTaskExportLink: 1627 """Create task export link 1628 1629 Creates a link to download the results of a board export task.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1630 1631 :param org_id: Unique identifier of the organization. (required) 1632 :type org_id: str 1633 :param job_id: Unique identifier of the board export job. (required) 1634 :type job_id: str 1635 :param task_id: Unique identifier of the board export task. (required) 1636 :type task_id: str 1637 :param _request_timeout: timeout setting for this request. If one 1638 number provided, it will be total request 1639 timeout. It can also be a pair (tuple) of 1640 (connection, read) timeouts. 1641 :type _request_timeout: int, tuple(int, int), optional 1642 :param _request_auth: set to override the auth_settings for an a single 1643 request; this effectively ignores the 1644 authentication in the spec for a single request. 1645 :type _request_auth: dict, optional 1646 :param _content_type: force content-type for the request. 1647 :type _content_type: str, Optional 1648 :param _headers: set to override the headers for a single 1649 request; this effectively ignores the headers 1650 in the spec for a single request. 1651 :type _headers: dict, optional 1652 :param _host_index: set to override the host_index for a single 1653 request; this effectively ignores the host_index 1654 in the spec for a single request. 1655 :type _host_index: int, optional 1656 :return: Returns the result object. 1657 """ # noqa: E501 1658 1659 _param = self._enterprise_create_board_export_task_export_link_serialize( 1660 org_id=org_id, 1661 job_id=job_id, 1662 task_id=task_id, 1663 _request_auth=_request_auth, 1664 _content_type=_content_type, 1665 _headers=_headers, 1666 _host_index=_host_index, 1667 ) 1668 1669 _response_types_map: Dict[str, Optional[str]] = { 1670 "200": "BoardExportTaskExportLink", 1671 "400": None, 1672 "401": None, 1673 "403": None, 1674 "404": None, 1675 "425": None, 1676 "429": None, 1677 } 1678 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1679 response_data.read() 1680 return self.api_client.response_deserialize( 1681 response_data=response_data, 1682 response_types_map=_response_types_map, 1683 ).data
Create task export link
Creates a link to download the results of a board export task.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param job_id: Unique identifier of the board export job. (required) :type job_id: str :param task_id: Unique identifier of the board export task. (required) :type task_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1740 @validate_call 1741 def enterprise_update_board_export_job( 1742 self, 1743 org_id: Annotated[StrictStr, Field(description="Unique identifier of the organization.")], 1744 job_id: Annotated[StrictStr, Field(description="Unique identifier of the board export job.")], 1745 enterprise_update_board_export_job_request: Optional[EnterpriseUpdateBoardExportJobRequest] = None, 1746 _request_timeout: Union[ 1747 None, 1748 Annotated[StrictFloat, Field(gt=0)], 1749 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1750 ] = None, 1751 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1752 _content_type: Optional[StrictStr] = None, 1753 _headers: Optional[Dict[StrictStr, Any]] = None, 1754 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1755 ) -> EnterpriseUpdateBoardExportJob200Response: 1756 """Update board export job status 1757 1758 Updates the status of the board export job.<br/>Currently, only the cancellation of an ongoing export job is supported.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:export</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1759 1760 :param org_id: Unique identifier of the organization. (required) 1761 :type org_id: str 1762 :param job_id: Unique identifier of the board export job. (required) 1763 :type job_id: str 1764 :param enterprise_update_board_export_job_request: 1765 :type enterprise_update_board_export_job_request: EnterpriseUpdateBoardExportJobRequest 1766 :param _request_timeout: timeout setting for this request. If one 1767 number provided, it will be total request 1768 timeout. It can also be a pair (tuple) of 1769 (connection, read) timeouts. 1770 :type _request_timeout: int, tuple(int, int), optional 1771 :param _request_auth: set to override the auth_settings for an a single 1772 request; this effectively ignores the 1773 authentication in the spec for a single request. 1774 :type _request_auth: dict, optional 1775 :param _content_type: force content-type for the request. 1776 :type _content_type: str, Optional 1777 :param _headers: set to override the headers for a single 1778 request; this effectively ignores the headers 1779 in the spec for a single request. 1780 :type _headers: dict, optional 1781 :param _host_index: set to override the host_index for a single 1782 request; this effectively ignores the host_index 1783 in the spec for a single request. 1784 :type _host_index: int, optional 1785 :return: Returns the result object. 1786 """ # noqa: E501 1787 1788 _param = self._enterprise_update_board_export_job_serialize( 1789 org_id=org_id, 1790 job_id=job_id, 1791 enterprise_update_board_export_job_request=enterprise_update_board_export_job_request, 1792 _request_auth=_request_auth, 1793 _content_type=_content_type, 1794 _headers=_headers, 1795 _host_index=_host_index, 1796 ) 1797 1798 _response_types_map: Dict[str, Optional[str]] = { 1799 "200": "EnterpriseUpdateBoardExportJob200Response", 1800 "400": None, 1801 "401": None, 1802 "403": None, 1803 "404": None, 1804 "429": None, 1805 } 1806 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1807 response_data.read() 1808 return self.api_client.response_deserialize( 1809 response_data=response_data, 1810 response_types_map=_response_types_map, 1811 ).data
Update board export job status
Updates the status of the board export job.
Currently, only the cancellation of an ongoing export job is supported.
Required scope
boards:exportRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin and eDiscovery is enabled in the Settings. You can request temporary access to Enterprise APIs using this form.
:param org_id: Unique identifier of the organization. (required) :type org_id: str :param job_id: Unique identifier of the board export job. (required) :type job_id: str :param enterprise_update_board_export_job_request: :type enterprise_update_board_export_job_request: EnterpriseUpdateBoardExportJobRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
1876 @validate_call 1877 def enterprise_dataclassification_board_get( 1878 self, 1879 org_id: Annotated[StrictStr, Field(description="id of the organization")], 1880 team_id: Annotated[StrictStr, Field(description="id of the team")], 1881 board_id: Annotated[StrictStr, Field(description="Unique identifier of the board that you want to retrieve.")], 1882 _request_timeout: Union[ 1883 None, 1884 Annotated[StrictFloat, Field(gt=0)], 1885 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 1886 ] = None, 1887 _request_auth: Optional[Dict[StrictStr, Any]] = None, 1888 _content_type: Optional[StrictStr] = None, 1889 _headers: Optional[Dict[StrictStr, Any]] = None, 1890 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 1891 ) -> BoardDataClassificationLabel: 1892 """Get board classification 1893 1894 Retrieves board classification for a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 1895 1896 :param org_id: id of the organization (required) 1897 :type org_id: str 1898 :param team_id: id of the team (required) 1899 :type team_id: str 1900 :param board_id: Unique identifier of the board that you want to retrieve. (required) 1901 :type board_id: str 1902 :param _request_timeout: timeout setting for this request. If one 1903 number provided, it will be total request 1904 timeout. It can also be a pair (tuple) of 1905 (connection, read) timeouts. 1906 :type _request_timeout: int, tuple(int, int), optional 1907 :param _request_auth: set to override the auth_settings for an a single 1908 request; this effectively ignores the 1909 authentication in the spec for a single request. 1910 :type _request_auth: dict, optional 1911 :param _content_type: force content-type for the request. 1912 :type _content_type: str, Optional 1913 :param _headers: set to override the headers for a single 1914 request; this effectively ignores the headers 1915 in the spec for a single request. 1916 :type _headers: dict, optional 1917 :param _host_index: set to override the host_index for a single 1918 request; this effectively ignores the host_index 1919 in the spec for a single request. 1920 :type _host_index: int, optional 1921 :return: Returns the result object. 1922 """ # noqa: E501 1923 1924 _param = self._enterprise_dataclassification_board_get_serialize( 1925 org_id=org_id, 1926 team_id=team_id, 1927 board_id=board_id, 1928 _request_auth=_request_auth, 1929 _content_type=_content_type, 1930 _headers=_headers, 1931 _host_index=_host_index, 1932 ) 1933 1934 _response_types_map: Dict[str, Optional[str]] = { 1935 "200": "BoardDataClassificationLabel", 1936 "400": None, 1937 "401": None, 1938 "403": None, 1939 "404": None, 1940 "429": None, 1941 } 1942 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 1943 response_data.read() 1944 return self.api_client.response_deserialize( 1945 response_data=response_data, 1946 response_types_map=_response_types_map, 1947 ).data
Get board classification
Retrieves board classification for a board.
Required scope
boards:readRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param team_id: id of the team (required) :type team_id: str :param board_id: Unique identifier of the board that you want to retrieve. (required) :type board_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2004 @validate_call 2005 def enterprise_dataclassification_board_set( 2006 self, 2007 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2008 team_id: Annotated[StrictStr, Field(description="id of the team")], 2009 board_id: Annotated[StrictStr, Field(description="Unique identifier of the board that you want to update.")], 2010 data_classification_label_id: DataClassificationLabelId, 2011 _request_timeout: Union[ 2012 None, 2013 Annotated[StrictFloat, Field(gt=0)], 2014 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2015 ] = None, 2016 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2017 _content_type: Optional[StrictStr] = None, 2018 _headers: Optional[Dict[StrictStr, Any]] = None, 2019 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2020 ) -> BoardDataClassificationLabel: 2021 """Update board classification 2022 2023 Updates board classification for an existing board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2024 2025 :param org_id: id of the organization (required) 2026 :type org_id: str 2027 :param team_id: id of the team (required) 2028 :type team_id: str 2029 :param board_id: Unique identifier of the board that you want to update. (required) 2030 :type board_id: str 2031 :param data_classification_label_id: (required) 2032 :type data_classification_label_id: DataClassificationLabelId 2033 :param _request_timeout: timeout setting for this request. If one 2034 number provided, it will be total request 2035 timeout. It can also be a pair (tuple) of 2036 (connection, read) timeouts. 2037 :type _request_timeout: int, tuple(int, int), optional 2038 :param _request_auth: set to override the auth_settings for an a single 2039 request; this effectively ignores the 2040 authentication in the spec for a single request. 2041 :type _request_auth: dict, optional 2042 :param _content_type: force content-type for the request. 2043 :type _content_type: str, Optional 2044 :param _headers: set to override the headers for a single 2045 request; this effectively ignores the headers 2046 in the spec for a single request. 2047 :type _headers: dict, optional 2048 :param _host_index: set to override the host_index for a single 2049 request; this effectively ignores the host_index 2050 in the spec for a single request. 2051 :type _host_index: int, optional 2052 :return: Returns the result object. 2053 """ # noqa: E501 2054 2055 _param = self._enterprise_dataclassification_board_set_serialize( 2056 org_id=org_id, 2057 team_id=team_id, 2058 board_id=board_id, 2059 data_classification_label_id=data_classification_label_id, 2060 _request_auth=_request_auth, 2061 _content_type=_content_type, 2062 _headers=_headers, 2063 _host_index=_host_index, 2064 ) 2065 2066 _response_types_map: Dict[str, Optional[str]] = { 2067 "200": "BoardDataClassificationLabel", 2068 "400": None, 2069 "401": None, 2070 "403": None, 2071 "404": None, 2072 "429": None, 2073 } 2074 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2075 response_data.read() 2076 return self.api_client.response_deserialize( 2077 response_data=response_data, 2078 response_types_map=_response_types_map, 2079 ).data
Update board classification
Updates board classification for an existing board.
Required scope
boards:writeRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param team_id: id of the team (required) :type team_id: str :param board_id: Unique identifier of the board that you want to update. (required) :type board_id: str :param data_classification_label_id: (required) :type data_classification_label_id: DataClassificationLabelId :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2147 @validate_call 2148 def enterprise_dataclassification_organization_settings_get( 2149 self, 2150 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2151 _request_timeout: Union[ 2152 None, 2153 Annotated[StrictFloat, Field(gt=0)], 2154 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2155 ] = None, 2156 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2157 _content_type: Optional[StrictStr] = None, 2158 _headers: Optional[Dict[StrictStr, Any]] = None, 2159 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2160 ) -> DataClassificationOrganizationSettings: 2161 """Get organization settings 2162 2163 Retrieves board classification settings for an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2164 2165 :param org_id: id of the organization (required) 2166 :type org_id: str 2167 :param _request_timeout: timeout setting for this request. If one 2168 number provided, it will be total request 2169 timeout. It can also be a pair (tuple) of 2170 (connection, read) timeouts. 2171 :type _request_timeout: int, tuple(int, int), optional 2172 :param _request_auth: set to override the auth_settings for an a single 2173 request; this effectively ignores the 2174 authentication in the spec for a single request. 2175 :type _request_auth: dict, optional 2176 :param _content_type: force content-type for the request. 2177 :type _content_type: str, Optional 2178 :param _headers: set to override the headers for a single 2179 request; this effectively ignores the headers 2180 in the spec for a single request. 2181 :type _headers: dict, optional 2182 :param _host_index: set to override the host_index for a single 2183 request; this effectively ignores the host_index 2184 in the spec for a single request. 2185 :type _host_index: int, optional 2186 :return: Returns the result object. 2187 """ # noqa: E501 2188 2189 _param = self._enterprise_dataclassification_organization_settings_get_serialize( 2190 org_id=org_id, 2191 _request_auth=_request_auth, 2192 _content_type=_content_type, 2193 _headers=_headers, 2194 _host_index=_host_index, 2195 ) 2196 2197 _response_types_map: Dict[str, Optional[str]] = { 2198 "200": "DataClassificationOrganizationSettings", 2199 "400": None, 2200 "401": None, 2201 "403": None, 2202 "404": None, 2203 "429": None, 2204 } 2205 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2206 response_data.read() 2207 return self.api_client.response_deserialize( 2208 response_data=response_data, 2209 response_types_map=_response_types_map, 2210 ).data
Get organization settings
Retrieves board classification settings for an existing organization.
Required scope
organizations:readRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2261 @validate_call 2262 def enterprise_dataclassification_team_boards_bulk( 2263 self, 2264 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2265 team_id: Annotated[StrictStr, Field(description="id of the team")], 2266 update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest, 2267 _request_timeout: Union[ 2268 None, 2269 Annotated[StrictFloat, Field(gt=0)], 2270 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2271 ] = None, 2272 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2273 _content_type: Optional[StrictStr] = None, 2274 _headers: Optional[Dict[StrictStr, Any]] = None, 2275 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2276 ) -> UpdateBoardsDataClassificationLabel: 2277 """Bulk update boards classification 2278 2279 Updates board classification for not-classified only or all boards in an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2280 2281 :param org_id: id of the organization (required) 2282 :type org_id: str 2283 :param team_id: id of the team (required) 2284 :type team_id: str 2285 :param update_boards_data_classification_label_request: (required) 2286 :type update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest 2287 :param _request_timeout: timeout setting for this request. If one 2288 number provided, it will be total request 2289 timeout. It can also be a pair (tuple) of 2290 (connection, read) timeouts. 2291 :type _request_timeout: int, tuple(int, int), optional 2292 :param _request_auth: set to override the auth_settings for an a single 2293 request; this effectively ignores the 2294 authentication in the spec for a single request. 2295 :type _request_auth: dict, optional 2296 :param _content_type: force content-type for the request. 2297 :type _content_type: str, Optional 2298 :param _headers: set to override the headers for a single 2299 request; this effectively ignores the headers 2300 in the spec for a single request. 2301 :type _headers: dict, optional 2302 :param _host_index: set to override the host_index for a single 2303 request; this effectively ignores the host_index 2304 in the spec for a single request. 2305 :type _host_index: int, optional 2306 :return: Returns the result object. 2307 """ # noqa: E501 2308 2309 _param = self._enterprise_dataclassification_team_boards_bulk_serialize( 2310 org_id=org_id, 2311 team_id=team_id, 2312 update_boards_data_classification_label_request=update_boards_data_classification_label_request, 2313 _request_auth=_request_auth, 2314 _content_type=_content_type, 2315 _headers=_headers, 2316 _host_index=_host_index, 2317 ) 2318 2319 _response_types_map: Dict[str, Optional[str]] = { 2320 "200": "UpdateBoardsDataClassificationLabel", 2321 "400": None, 2322 "401": None, 2323 "403": None, 2324 "404": None, 2325 "429": None, 2326 } 2327 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2328 response_data.read() 2329 return self.api_client.response_deserialize( 2330 response_data=response_data, 2331 response_types_map=_response_types_map, 2332 ).data
Bulk update boards classification
Updates board classification for not-classified only or all boards in an existing team.
Required scope
boards:writeRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param team_id: id of the team (required) :type team_id: str :param update_boards_data_classification_label_request: (required) :type update_boards_data_classification_label_request: UpdateBoardsDataClassificationLabelRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2397 @validate_call 2398 def enterprise_dataclassification_team_settings_get( 2399 self, 2400 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2401 team_id: Annotated[StrictStr, Field(description="id of the team")], 2402 _request_timeout: Union[ 2403 None, 2404 Annotated[StrictFloat, Field(gt=0)], 2405 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2406 ] = None, 2407 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2408 _content_type: Optional[StrictStr] = None, 2409 _headers: Optional[Dict[StrictStr, Any]] = None, 2410 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2411 ) -> DataClassificationTeamSettings: 2412 """Get team settings 2413 2414 Retrieves board classification settings for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2415 2416 :param org_id: id of the organization (required) 2417 :type org_id: str 2418 :param team_id: id of the team (required) 2419 :type team_id: str 2420 :param _request_timeout: timeout setting for this request. If one 2421 number provided, it will be total request 2422 timeout. It can also be a pair (tuple) of 2423 (connection, read) timeouts. 2424 :type _request_timeout: int, tuple(int, int), optional 2425 :param _request_auth: set to override the auth_settings for an a single 2426 request; this effectively ignores the 2427 authentication in the spec for a single request. 2428 :type _request_auth: dict, optional 2429 :param _content_type: force content-type for the request. 2430 :type _content_type: str, Optional 2431 :param _headers: set to override the headers for a single 2432 request; this effectively ignores the headers 2433 in the spec for a single request. 2434 :type _headers: dict, optional 2435 :param _host_index: set to override the host_index for a single 2436 request; this effectively ignores the host_index 2437 in the spec for a single request. 2438 :type _host_index: int, optional 2439 :return: Returns the result object. 2440 """ # noqa: E501 2441 2442 _param = self._enterprise_dataclassification_team_settings_get_serialize( 2443 org_id=org_id, 2444 team_id=team_id, 2445 _request_auth=_request_auth, 2446 _content_type=_content_type, 2447 _headers=_headers, 2448 _host_index=_host_index, 2449 ) 2450 2451 _response_types_map: Dict[str, Optional[str]] = { 2452 "200": "DataClassificationTeamSettings", 2453 "400": None, 2454 "401": None, 2455 "403": None, 2456 "404": None, 2457 "429": None, 2458 } 2459 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2460 response_data.read() 2461 return self.api_client.response_deserialize( 2462 response_data=response_data, 2463 response_types_map=_response_types_map, 2464 ).data
Get team settings
Retrieves board classification settings for an existing team.
Required scope
organizations:teams:readRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param team_id: id of the team (required) :type team_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2518 @validate_call 2519 def enterprise_dataclassification_team_settings_set( 2520 self, 2521 org_id: Annotated[StrictStr, Field(description="id of the organization")], 2522 team_id: Annotated[StrictStr, Field(description="id of the team")], 2523 update_team_settings_request: UpdateTeamSettingsRequest, 2524 _request_timeout: Union[ 2525 None, 2526 Annotated[StrictFloat, Field(gt=0)], 2527 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2528 ] = None, 2529 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2530 _content_type: Optional[StrictStr] = None, 2531 _headers: Optional[Dict[StrictStr, Any]] = None, 2532 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2533 ) -> DataClassificationTeamSettings: 2534 """Update team settings 2535 2536 Updates board classification settings for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 2537 2538 :param org_id: id of the organization (required) 2539 :type org_id: str 2540 :param team_id: id of the team (required) 2541 :type team_id: str 2542 :param update_team_settings_request: (required) 2543 :type update_team_settings_request: UpdateTeamSettingsRequest 2544 :param _request_timeout: timeout setting for this request. If one 2545 number provided, it will be total request 2546 timeout. It can also be a pair (tuple) of 2547 (connection, read) timeouts. 2548 :type _request_timeout: int, tuple(int, int), optional 2549 :param _request_auth: set to override the auth_settings for an a single 2550 request; this effectively ignores the 2551 authentication in the spec for a single request. 2552 :type _request_auth: dict, optional 2553 :param _content_type: force content-type for the request. 2554 :type _content_type: str, Optional 2555 :param _headers: set to override the headers for a single 2556 request; this effectively ignores the headers 2557 in the spec for a single request. 2558 :type _headers: dict, optional 2559 :param _host_index: set to override the host_index for a single 2560 request; this effectively ignores the host_index 2561 in the spec for a single request. 2562 :type _host_index: int, optional 2563 :return: Returns the result object. 2564 """ # noqa: E501 2565 2566 _param = self._enterprise_dataclassification_team_settings_set_serialize( 2567 org_id=org_id, 2568 team_id=team_id, 2569 update_team_settings_request=update_team_settings_request, 2570 _request_auth=_request_auth, 2571 _content_type=_content_type, 2572 _headers=_headers, 2573 _host_index=_host_index, 2574 ) 2575 2576 _response_types_map: Dict[str, Optional[str]] = { 2577 "200": "DataClassificationTeamSettings", 2578 "400": None, 2579 "401": None, 2580 "403": None, 2581 "404": None, 2582 "429": None, 2583 } 2584 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2585 response_data.read() 2586 return self.api_client.response_deserialize( 2587 response_data=response_data, 2588 response_types_map=_response_types_map, 2589 ).data
Update team settings
Updates board classification settings for an existing team.
Required scope
organizations:teams:writeRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param team_id: id of the team (required) :type team_id: str :param update_team_settings_request: (required) :type update_team_settings_request: UpdateTeamSettingsRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2654 @validate_call 2655 def create_items( 2656 self, 2657 board_id: Annotated[ 2658 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 2659 ], 2660 item_create: Annotated[List[ItemCreate], Field(min_length=1, max_length=20)], 2661 _request_timeout: Union[ 2662 None, 2663 Annotated[StrictFloat, Field(gt=0)], 2664 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2665 ] = None, 2666 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2667 _content_type: Optional[StrictStr] = None, 2668 _headers: Optional[Dict[StrictStr, Any]] = None, 2669 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2670 ) -> Items: 2671 """Create items in bulk 2672 2673 Adds different types of items to a board. You can add up to 20 items of the same or different type per create call. For example, you can create 3 shape items, 4 card items, and 5 sticky notes in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. <br/><br>To try out this API in our documentation:<br/><br>1. In the **BODY PARAMS** section, scroll down until you see **ADD OBJECT** (Figure 1).<br><br><img alt=“add src=\"https://files.readme.io/570dac1-small-add_object.png\"><br>Figure 1. Add object user interface in readme<br><br>2. Click **ADD OBJECT**, and then select or enter the appropriate values for parameters of the item that you want to add.<br><br>3. Repeat steps 1 and 2 for each item that you want to add.<br> <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item. For example, if you want to create one sticky note, one card, and one shape item in one call, the rate limiting applicable will be 300 credits. This is because create item calls take Level 2 rate limiting of 100 credits each, 100 for sticky note, 100 for card, and 100 for shape item. 2674 2675 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 2676 :type board_id: str 2677 :param item_create: (required) 2678 :type item_create: List[ItemCreate] 2679 :param _request_timeout: timeout setting for this request. If one 2680 number provided, it will be total request 2681 timeout. It can also be a pair (tuple) of 2682 (connection, read) timeouts. 2683 :type _request_timeout: int, tuple(int, int), optional 2684 :param _request_auth: set to override the auth_settings for an a single 2685 request; this effectively ignores the 2686 authentication in the spec for a single request. 2687 :type _request_auth: dict, optional 2688 :param _content_type: force content-type for the request. 2689 :type _content_type: str, Optional 2690 :param _headers: set to override the headers for a single 2691 request; this effectively ignores the headers 2692 in the spec for a single request. 2693 :type _headers: dict, optional 2694 :param _host_index: set to override the host_index for a single 2695 request; this effectively ignores the host_index 2696 in the spec for a single request. 2697 :type _host_index: int, optional 2698 :return: Returns the result object. 2699 """ # noqa: E501 2700 2701 _param = self._create_items_serialize( 2702 board_id=board_id, 2703 item_create=item_create, 2704 _request_auth=_request_auth, 2705 _content_type=_content_type, 2706 _headers=_headers, 2707 _host_index=_host_index, 2708 ) 2709 2710 _response_types_map: Dict[str, Optional[str]] = { 2711 "201": "Items", 2712 "400": "BulkOperationError", 2713 "429": "Error", 2714 } 2715 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2716 response_data.read() 2717 return self.api_client.response_deserialize( 2718 response_data=response_data, 2719 response_types_map=_response_types_map, 2720 ).data
Create items in bulk
Adds different types of items to a board. You can add up to 20 items of the same or different type per create call. For example, you can create 3 shape items, 4 card items, and 5 sticky notes in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created.
To try out this API in our documentation:
1. In the BODY PARAMS section, scroll down until you see ADD OBJECT (Figure 1).
Figure 1. Add object user interface in readme
2. Click ADD OBJECT, and then select or enter the appropriate values for parameters of the item that you want to add.
3. Repeat steps 1 and 2 for each item that you want to add.
Required scope
boards:writeRate limiting
Level 2 per item. For example, if you want to create one sticky note, one card, and one shape item in one call, the rate limiting applicable will be 300 credits. This is because create item calls take Level 2 rate limiting of 100 credits each, 100 for sticky note, 100 for card, and 100 for shape item.:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param item_create: (required) :type item_create: List[ItemCreate] :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2784 @validate_call 2785 def create_items_in_bulk_using_file_from_device( 2786 self, 2787 board_id: Annotated[ 2788 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 2789 ], 2790 data: Annotated[ 2791 Union[StrictBytes, StrictStr], 2792 Field( 2793 description="JSON file containing bulk data, where each object represents an item to be created. For details, see [JSON file example](https://developers.miro.com/reference/json-data-example)." 2794 ), 2795 ], 2796 resources: Annotated[ 2797 List[Union[StrictBytes, StrictStr]], 2798 Field(description="Array of items to create (PDFs, images, etc.). Maximum of 20 items."), 2799 ], 2800 _request_timeout: Union[ 2801 None, 2802 Annotated[StrictFloat, Field(gt=0)], 2803 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2804 ] = None, 2805 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2806 _content_type: Optional[StrictStr] = None, 2807 _headers: Optional[Dict[StrictStr, Any]] = None, 2808 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2809 ) -> Items: 2810 """Create items in bulk using file from device 2811 2812 Adds different types of items to a board using files from a device. You can add up to 20 items of the same or different type per create call. For example, you can create 5 document items and 5 images in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. To try out this API in our documentation: 1. In the **BODY PARAMS** section, select **ADD FILE**, and then upload a local file. Repeat for each item that you want to add. 2. Upload a JSON file that contains the bulk data for the items you want to create. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item<br/> 2813 2814 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 2815 :type board_id: str 2816 :param data: JSON file containing bulk data, where each object represents an item to be created. For details, see [JSON file example](https://developers.miro.com/reference/json-data-example). (required) 2817 :type data: bytearray 2818 :param resources: Array of items to create (PDFs, images, etc.). Maximum of 20 items. (required) 2819 :type resources: List[bytearray] 2820 :param _request_timeout: timeout setting for this request. If one 2821 number provided, it will be total request 2822 timeout. It can also be a pair (tuple) of 2823 (connection, read) timeouts. 2824 :type _request_timeout: int, tuple(int, int), optional 2825 :param _request_auth: set to override the auth_settings for an a single 2826 request; this effectively ignores the 2827 authentication in the spec for a single request. 2828 :type _request_auth: dict, optional 2829 :param _content_type: force content-type for the request. 2830 :type _content_type: str, Optional 2831 :param _headers: set to override the headers for a single 2832 request; this effectively ignores the headers 2833 in the spec for a single request. 2834 :type _headers: dict, optional 2835 :param _host_index: set to override the host_index for a single 2836 request; this effectively ignores the host_index 2837 in the spec for a single request. 2838 :type _host_index: int, optional 2839 :return: Returns the result object. 2840 """ # noqa: E501 2841 2842 _param = self._create_items_in_bulk_using_file_from_device_serialize( 2843 board_id=board_id, 2844 data=data, 2845 resources=resources, 2846 _request_auth=_request_auth, 2847 _content_type=_content_type, 2848 _headers=_headers, 2849 _host_index=_host_index, 2850 ) 2851 2852 _response_types_map: Dict[str, Optional[str]] = { 2853 "201": "Items", 2854 } 2855 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2856 response_data.read() 2857 return self.api_client.response_deserialize( 2858 response_data=response_data, 2859 response_types_map=_response_types_map, 2860 ).data
Create items in bulk using file from device
Adds different types of items to a board using files from a device. You can add up to 20 items of the same or different type per create call. For example, you can create 5 document items and 5 images in one create call. The bulk create operation is transactional. If any item's create operation fails, the create operation for all the remaining items also fails, and none of the items will be created. To try out this API in our documentation: 1. In the BODY PARAMS section, select ADD FILE, and then upload a local file. Repeat for each item that you want to add. 2. Upload a JSON file that contains the bulk data for the items you want to create.
Required scope
boards:writeRate limiting
Level 2 per item:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param data: JSON file containing bulk data, where each object represents an item to be created. For details, see JSON file example. (required) :type data: bytearray :param resources: Array of items to create (PDFs, images, etc.). Maximum of 20 items. (required) :type resources: List[bytearray] :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
2927 @validate_call 2928 def get_resource_type( 2929 self, 2930 resource: StrictStr, 2931 _request_timeout: Union[ 2932 None, 2933 Annotated[StrictFloat, Field(gt=0)], 2934 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 2935 ] = None, 2936 _request_auth: Optional[Dict[StrictStr, Any]] = None, 2937 _content_type: Optional[StrictStr] = None, 2938 _headers: Optional[Dict[StrictStr, Any]] = None, 2939 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 2940 ) -> ResourceType: 2941 """Get resource type 2942 2943 Retrieve metadata for the available resource types (User and Group) that are supported. 2944 2945 :param resource: (required) 2946 :type resource: str 2947 :param _request_timeout: timeout setting for this request. If one 2948 number provided, it will be total request 2949 timeout. It can also be a pair (tuple) of 2950 (connection, read) timeouts. 2951 :type _request_timeout: int, tuple(int, int), optional 2952 :param _request_auth: set to override the auth_settings for an a single 2953 request; this effectively ignores the 2954 authentication in the spec for a single request. 2955 :type _request_auth: dict, optional 2956 :param _content_type: force content-type for the request. 2957 :type _content_type: str, Optional 2958 :param _headers: set to override the headers for a single 2959 request; this effectively ignores the headers 2960 in the spec for a single request. 2961 :type _headers: dict, optional 2962 :param _host_index: set to override the host_index for a single 2963 request; this effectively ignores the host_index 2964 in the spec for a single request. 2965 :type _host_index: int, optional 2966 :return: Returns the result object. 2967 """ # noqa: E501 2968 2969 _param = self._get_resource_type_serialize( 2970 resource=resource, 2971 _request_auth=_request_auth, 2972 _content_type=_content_type, 2973 _headers=_headers, 2974 _host_index=_host_index, 2975 ) 2976 2977 _response_types_map: Dict[str, Optional[str]] = { 2978 "200": "ResourceType", 2979 "400": None, 2980 "401": None, 2981 "403": None, 2982 "404": None, 2983 "500": None, 2984 } 2985 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 2986 response_data.read() 2987 return self.api_client.response_deserialize( 2988 response_data=response_data, 2989 response_types_map=_response_types_map, 2990 ).data
Get resource type
Retrieve metadata for the available resource types (User and Group) that are supported.
:param resource: (required) :type resource: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3041 @validate_call 3042 def get_schema( 3043 self, 3044 uri: Annotated[StrictStr, Field(description="Schema URI of a particular resource type.")], 3045 _request_timeout: Union[ 3046 None, 3047 Annotated[StrictFloat, Field(gt=0)], 3048 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3049 ] = None, 3050 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3051 _content_type: Optional[StrictStr] = None, 3052 _headers: Optional[Dict[StrictStr, Any]] = None, 3053 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3054 ) -> SchemaResource: 3055 """Get schema 3056 3057 Retrieve information about how users, groups, and enterprise-user attributes URIs that are formatted. 3058 3059 :param uri: Schema URI of a particular resource type. (required) 3060 :type uri: str 3061 :param _request_timeout: timeout setting for this request. If one 3062 number provided, it will be total request 3063 timeout. It can also be a pair (tuple) of 3064 (connection, read) timeouts. 3065 :type _request_timeout: int, tuple(int, int), optional 3066 :param _request_auth: set to override the auth_settings for an a single 3067 request; this effectively ignores the 3068 authentication in the spec for a single request. 3069 :type _request_auth: dict, optional 3070 :param _content_type: force content-type for the request. 3071 :type _content_type: str, Optional 3072 :param _headers: set to override the headers for a single 3073 request; this effectively ignores the headers 3074 in the spec for a single request. 3075 :type _headers: dict, optional 3076 :param _host_index: set to override the host_index for a single 3077 request; this effectively ignores the host_index 3078 in the spec for a single request. 3079 :type _host_index: int, optional 3080 :return: Returns the result object. 3081 """ # noqa: E501 3082 3083 _param = self._get_schema_serialize( 3084 uri=uri, 3085 _request_auth=_request_auth, 3086 _content_type=_content_type, 3087 _headers=_headers, 3088 _host_index=_host_index, 3089 ) 3090 3091 _response_types_map: Dict[str, Optional[str]] = { 3092 "200": "SchemaResource", 3093 "400": None, 3094 "401": None, 3095 "403": None, 3096 "404": None, 3097 "500": None, 3098 } 3099 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3100 response_data.read() 3101 return self.api_client.response_deserialize( 3102 response_data=response_data, 3103 response_types_map=_response_types_map, 3104 ).data
Get schema
Retrieve information about how users, groups, and enterprise-user attributes URIs that are formatted.
:param uri: Schema URI of a particular resource type. (required) :type uri: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3155 @validate_call 3156 def list_resource_types( 3157 self, 3158 _request_timeout: Union[ 3159 None, 3160 Annotated[StrictFloat, Field(gt=0)], 3161 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3162 ] = None, 3163 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3164 _content_type: Optional[StrictStr] = None, 3165 _headers: Optional[Dict[StrictStr, Any]] = None, 3166 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3167 ) -> ResourceTypeListResponse: 3168 """List resource types 3169 3170 Retrieve information about which SCIM resources are supported. <br><br> Currently, Miro supports Users and Groups as Resource Types. 3171 3172 :param _request_timeout: timeout setting for this request. If one 3173 number provided, it will be total request 3174 timeout. It can also be a pair (tuple) of 3175 (connection, read) timeouts. 3176 :type _request_timeout: int, tuple(int, int), optional 3177 :param _request_auth: set to override the auth_settings for an a single 3178 request; this effectively ignores the 3179 authentication in the spec for a single request. 3180 :type _request_auth: dict, optional 3181 :param _content_type: force content-type for the request. 3182 :type _content_type: str, Optional 3183 :param _headers: set to override the headers for a single 3184 request; this effectively ignores the headers 3185 in the spec for a single request. 3186 :type _headers: dict, optional 3187 :param _host_index: set to override the host_index for a single 3188 request; this effectively ignores the host_index 3189 in the spec for a single request. 3190 :type _host_index: int, optional 3191 :return: Returns the result object. 3192 """ # noqa: E501 3193 3194 _param = self._list_resource_types_serialize( 3195 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3196 ) 3197 3198 _response_types_map: Dict[str, Optional[str]] = { 3199 "200": "ResourceTypeListResponse", 3200 "400": None, 3201 "401": None, 3202 "403": None, 3203 "404": None, 3204 "500": None, 3205 } 3206 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3207 response_data.read() 3208 return self.api_client.response_deserialize( 3209 response_data=response_data, 3210 response_types_map=_response_types_map, 3211 ).data
List resource types
Retrieve information about which SCIM resources are supported.
Currently, Miro supports Users and Groups as Resource Types.
:param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3259 @validate_call 3260 def list_schemas( 3261 self, 3262 _request_timeout: Union[ 3263 None, 3264 Annotated[StrictFloat, Field(gt=0)], 3265 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3266 ] = None, 3267 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3268 _content_type: Optional[StrictStr] = None, 3269 _headers: Optional[Dict[StrictStr, Any]] = None, 3270 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3271 ) -> SchemaListResponse: 3272 """List schemas 3273 3274 Retrieve metadata about Users, Groups, and extension attributes that are currently supported. 3275 3276 :param _request_timeout: timeout setting for this request. If one 3277 number provided, it will be total request 3278 timeout. It can also be a pair (tuple) of 3279 (connection, read) timeouts. 3280 :type _request_timeout: int, tuple(int, int), optional 3281 :param _request_auth: set to override the auth_settings for an a single 3282 request; this effectively ignores the 3283 authentication in the spec for a single request. 3284 :type _request_auth: dict, optional 3285 :param _content_type: force content-type for the request. 3286 :type _content_type: str, Optional 3287 :param _headers: set to override the headers for a single 3288 request; this effectively ignores the headers 3289 in the spec for a single request. 3290 :type _headers: dict, optional 3291 :param _host_index: set to override the host_index for a single 3292 request; this effectively ignores the host_index 3293 in the spec for a single request. 3294 :type _host_index: int, optional 3295 :return: Returns the result object. 3296 """ # noqa: E501 3297 3298 _param = self._list_schemas_serialize( 3299 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3300 ) 3301 3302 _response_types_map: Dict[str, Optional[str]] = { 3303 "200": "SchemaListResponse", 3304 "400": None, 3305 "401": None, 3306 "403": None, 3307 "404": None, 3308 "500": None, 3309 } 3310 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3311 response_data.read() 3312 return self.api_client.response_deserialize( 3313 response_data=response_data, 3314 response_types_map=_response_types_map, 3315 ).data
List schemas
Retrieve metadata about Users, Groups, and extension attributes that are currently supported.
:param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3363 @validate_call 3364 def list_service_provider_configs( 3365 self, 3366 _request_timeout: Union[ 3367 None, 3368 Annotated[StrictFloat, Field(gt=0)], 3369 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3370 ] = None, 3371 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3372 _content_type: Optional[StrictStr] = None, 3373 _headers: Optional[Dict[StrictStr, Any]] = None, 3374 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3375 ) -> ServiceProviderConfigResponse: 3376 """Get Service Provider Config 3377 3378 Retrieve supported operations and SCIM API basic configuration. 3379 3380 :param _request_timeout: timeout setting for this request. If one 3381 number provided, it will be total request 3382 timeout. It can also be a pair (tuple) of 3383 (connection, read) timeouts. 3384 :type _request_timeout: int, tuple(int, int), optional 3385 :param _request_auth: set to override the auth_settings for an a single 3386 request; this effectively ignores the 3387 authentication in the spec for a single request. 3388 :type _request_auth: dict, optional 3389 :param _content_type: force content-type for the request. 3390 :type _content_type: str, Optional 3391 :param _headers: set to override the headers for a single 3392 request; this effectively ignores the headers 3393 in the spec for a single request. 3394 :type _headers: dict, optional 3395 :param _host_index: set to override the host_index for a single 3396 request; this effectively ignores the host_index 3397 in the spec for a single request. 3398 :type _host_index: int, optional 3399 :return: Returns the result object. 3400 """ # noqa: E501 3401 3402 _param = self._list_service_provider_configs_serialize( 3403 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 3404 ) 3405 3406 _response_types_map: Dict[str, Optional[str]] = { 3407 "200": "ServiceProviderConfigResponse", 3408 "400": None, 3409 "401": None, 3410 "403": None, 3411 "404": None, 3412 "500": None, 3413 } 3414 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3415 response_data.read() 3416 return self.api_client.response_deserialize( 3417 response_data=response_data, 3418 response_types_map=_response_types_map, 3419 ).data
Get Service Provider Config
Retrieve supported operations and SCIM API basic configuration.
:param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3467 @validate_call 3468 def create_shape_item_flowchart( 3469 self, 3470 board_id: Annotated[ 3471 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 3472 ], 3473 shape_create_request: ShapeCreateRequest, 3474 _request_timeout: Union[ 3475 None, 3476 Annotated[StrictFloat, Field(gt=0)], 3477 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3478 ] = None, 3479 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3480 _content_type: Optional[StrictStr] = None, 3481 _headers: Optional[Dict[StrictStr, Any]] = None, 3482 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3483 ) -> ShapeItem: 3484 """Create shape item 3485 3486 Adds a flowchart shape item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 3487 3488 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 3489 :type board_id: str 3490 :param shape_create_request: (required) 3491 :type shape_create_request: ShapeCreateRequest 3492 :param _request_timeout: timeout setting for this request. If one 3493 number provided, it will be total request 3494 timeout. It can also be a pair (tuple) of 3495 (connection, read) timeouts. 3496 :type _request_timeout: int, tuple(int, int), optional 3497 :param _request_auth: set to override the auth_settings for an a single 3498 request; this effectively ignores the 3499 authentication in the spec for a single request. 3500 :type _request_auth: dict, optional 3501 :param _content_type: force content-type for the request. 3502 :type _content_type: str, Optional 3503 :param _headers: set to override the headers for a single 3504 request; this effectively ignores the headers 3505 in the spec for a single request. 3506 :type _headers: dict, optional 3507 :param _host_index: set to override the host_index for a single 3508 request; this effectively ignores the host_index 3509 in the spec for a single request. 3510 :type _host_index: int, optional 3511 :return: Returns the result object. 3512 """ # noqa: E501 3513 3514 _param = self._create_shape_item_flowchart_serialize( 3515 board_id=board_id, 3516 shape_create_request=shape_create_request, 3517 _request_auth=_request_auth, 3518 _content_type=_content_type, 3519 _headers=_headers, 3520 _host_index=_host_index, 3521 ) 3522 3523 _response_types_map: Dict[str, Optional[str]] = { 3524 "201": "ShapeItem", 3525 "400": "CreateFrameItem400Response", 3526 "404": "CreateFrameItem400Response", 3527 "429": "CreateFrameItem400Response", 3528 } 3529 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3530 response_data.read() 3531 return self.api_client.response_deserialize( 3532 response_data=response_data, 3533 response_types_map=_response_types_map, 3534 ).data
Create shape item
Adds a flowchart shape item to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param shape_create_request: (required) :type shape_create_request: ShapeCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3596 @validate_call 3597 def delete_shape_item_flowchart( 3598 self, 3599 board_id: Annotated[ 3600 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 3601 ], 3602 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 3603 _request_timeout: Union[ 3604 None, 3605 Annotated[StrictFloat, Field(gt=0)], 3606 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3607 ] = None, 3608 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3609 _content_type: Optional[StrictStr] = None, 3610 _headers: Optional[Dict[StrictStr, Any]] = None, 3611 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3612 ) -> object: 3613 """Delete shape item 3614 3615 Deletes a flowchart shape item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 3616 3617 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 3618 :type board_id: str 3619 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 3620 :type item_id: str 3621 :param _request_timeout: timeout setting for this request. If one 3622 number provided, it will be total request 3623 timeout. It can also be a pair (tuple) of 3624 (connection, read) timeouts. 3625 :type _request_timeout: int, tuple(int, int), optional 3626 :param _request_auth: set to override the auth_settings for an a single 3627 request; this effectively ignores the 3628 authentication in the spec for a single request. 3629 :type _request_auth: dict, optional 3630 :param _content_type: force content-type for the request. 3631 :type _content_type: str, Optional 3632 :param _headers: set to override the headers for a single 3633 request; this effectively ignores the headers 3634 in the spec for a single request. 3635 :type _headers: dict, optional 3636 :param _host_index: set to override the host_index for a single 3637 request; this effectively ignores the host_index 3638 in the spec for a single request. 3639 :type _host_index: int, optional 3640 :return: Returns the result object. 3641 """ # noqa: E501 3642 3643 _param = self._delete_shape_item_flowchart_serialize( 3644 board_id=board_id, 3645 item_id=item_id, 3646 _request_auth=_request_auth, 3647 _content_type=_content_type, 3648 _headers=_headers, 3649 _host_index=_host_index, 3650 ) 3651 3652 _response_types_map: Dict[str, Optional[str]] = { 3653 "204": "object", 3654 "400": "CreateFrameItem400Response", 3655 "404": "CreateFrameItem400Response", 3656 "429": "CreateFrameItem400Response", 3657 } 3658 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3659 response_data.read() 3660 return self.api_client.response_deserialize( 3661 response_data=response_data, 3662 response_types_map=_response_types_map, 3663 ).data
Delete shape item
Deletes a flowchart shape item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3717 @validate_call 3718 def get_items_experimental( 3719 self, 3720 board_id: Annotated[ 3721 StrictStr, 3722 Field( 3723 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 3724 ), 3725 ], 3726 limit: Optional[Annotated[str, Field(strict=True)]] = None, 3727 type: Optional[StrictStr] = None, 3728 cursor: Optional[StrictStr] = None, 3729 _request_timeout: Union[ 3730 None, 3731 Annotated[StrictFloat, Field(gt=0)], 3732 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3733 ] = None, 3734 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3735 _content_type: Optional[StrictStr] = None, 3736 _headers: Optional[Dict[StrictStr, Any]] = None, 3737 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3738 ) -> GenericItemCursorPaged: 3739 """Get items on board 3740 3741 Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 3742 3743 :param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) 3744 :type board_id: str 3745 :param limit: 3746 :type limit: str 3747 :param type: 3748 :type type: str 3749 :param cursor: 3750 :type cursor: str 3751 :param _request_timeout: timeout setting for this request. If one 3752 number provided, it will be total request 3753 timeout. It can also be a pair (tuple) of 3754 (connection, read) timeouts. 3755 :type _request_timeout: int, tuple(int, int), optional 3756 :param _request_auth: set to override the auth_settings for an a single 3757 request; this effectively ignores the 3758 authentication in the spec for a single request. 3759 :type _request_auth: dict, optional 3760 :param _content_type: force content-type for the request. 3761 :type _content_type: str, Optional 3762 :param _headers: set to override the headers for a single 3763 request; this effectively ignores the headers 3764 in the spec for a single request. 3765 :type _headers: dict, optional 3766 :param _host_index: set to override the host_index for a single 3767 request; this effectively ignores the host_index 3768 in the spec for a single request. 3769 :type _host_index: int, optional 3770 :return: Returns the result object. 3771 """ # noqa: E501 3772 3773 _param = self._get_items_experimental_serialize( 3774 board_id=board_id, 3775 limit=limit, 3776 type=type, 3777 cursor=cursor, 3778 _request_auth=_request_auth, 3779 _content_type=_content_type, 3780 _headers=_headers, 3781 _host_index=_host_index, 3782 ) 3783 3784 _response_types_map: Dict[str, Optional[str]] = { 3785 "200": "GenericItemCursorPaged", 3786 "400": "CreateFrameItem400Response", 3787 "404": "CreateFrameItem400Response", 3788 "429": "CreateFrameItem400Response", 3789 } 3790 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3791 response_data.read() 3792 return self.api_client.response_deserialize( 3793 response_data=response_data, 3794 response_types_map=_response_types_map, 3795 ).data
Get items on board
Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request. For example, if you set the limit query parameter to 10 and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) :type board_id: str :param limit: :type limit: str :param type: :type type: str :param cursor: :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3861 @validate_call 3862 def get_shape_item_flowchart( 3863 self, 3864 board_id: Annotated[ 3865 StrictStr, 3866 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 3867 ], 3868 item_id: Annotated[ 3869 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 3870 ], 3871 _request_timeout: Union[ 3872 None, 3873 Annotated[StrictFloat, Field(gt=0)], 3874 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3875 ] = None, 3876 _request_auth: Optional[Dict[StrictStr, Any]] = None, 3877 _content_type: Optional[StrictStr] = None, 3878 _headers: Optional[Dict[StrictStr, Any]] = None, 3879 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 3880 ) -> ShapeItem: 3881 """Get shape item 3882 3883 Retrieves information for a specific shape item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 3884 3885 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 3886 :type board_id: str 3887 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 3888 :type item_id: str 3889 :param _request_timeout: timeout setting for this request. If one 3890 number provided, it will be total request 3891 timeout. It can also be a pair (tuple) of 3892 (connection, read) timeouts. 3893 :type _request_timeout: int, tuple(int, int), optional 3894 :param _request_auth: set to override the auth_settings for an a single 3895 request; this effectively ignores the 3896 authentication in the spec for a single request. 3897 :type _request_auth: dict, optional 3898 :param _content_type: force content-type for the request. 3899 :type _content_type: str, Optional 3900 :param _headers: set to override the headers for a single 3901 request; this effectively ignores the headers 3902 in the spec for a single request. 3903 :type _headers: dict, optional 3904 :param _host_index: set to override the host_index for a single 3905 request; this effectively ignores the host_index 3906 in the spec for a single request. 3907 :type _host_index: int, optional 3908 :return: Returns the result object. 3909 """ # noqa: E501 3910 3911 _param = self._get_shape_item_flowchart_serialize( 3912 board_id=board_id, 3913 item_id=item_id, 3914 _request_auth=_request_auth, 3915 _content_type=_content_type, 3916 _headers=_headers, 3917 _host_index=_host_index, 3918 ) 3919 3920 _response_types_map: Dict[str, Optional[str]] = { 3921 "200": "ShapeItem", 3922 "400": "CreateFrameItem400Response", 3923 "404": "CreateFrameItem400Response", 3924 "429": "CreateFrameItem400Response", 3925 } 3926 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 3927 response_data.read() 3928 return self.api_client.response_deserialize( 3929 response_data=response_data, 3930 response_types_map=_response_types_map, 3931 ).data
Get shape item
Retrieves information for a specific shape item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
3985 @validate_call 3986 def get_specific_item_experimental( 3987 self, 3988 board_id: Annotated[ 3989 StrictStr, 3990 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 3991 ], 3992 item_id: Annotated[ 3993 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 3994 ], 3995 _request_timeout: Union[ 3996 None, 3997 Annotated[StrictFloat, Field(gt=0)], 3998 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 3999 ] = None, 4000 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4001 _content_type: Optional[StrictStr] = None, 4002 _headers: Optional[Dict[StrictStr, Any]] = None, 4003 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4004 ) -> GenericItem: 4005 """Get specific item on board 4006 4007 Retrieves information for a specific item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 4008 4009 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 4010 :type board_id: str 4011 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 4012 :type item_id: str 4013 :param _request_timeout: timeout setting for this request. If one 4014 number provided, it will be total request 4015 timeout. It can also be a pair (tuple) of 4016 (connection, read) timeouts. 4017 :type _request_timeout: int, tuple(int, int), optional 4018 :param _request_auth: set to override the auth_settings for an a single 4019 request; this effectively ignores the 4020 authentication in the spec for a single request. 4021 :type _request_auth: dict, optional 4022 :param _content_type: force content-type for the request. 4023 :type _content_type: str, Optional 4024 :param _headers: set to override the headers for a single 4025 request; this effectively ignores the headers 4026 in the spec for a single request. 4027 :type _headers: dict, optional 4028 :param _host_index: set to override the host_index for a single 4029 request; this effectively ignores the host_index 4030 in the spec for a single request. 4031 :type _host_index: int, optional 4032 :return: Returns the result object. 4033 """ # noqa: E501 4034 4035 _param = self._get_specific_item_experimental_serialize( 4036 board_id=board_id, 4037 item_id=item_id, 4038 _request_auth=_request_auth, 4039 _content_type=_content_type, 4040 _headers=_headers, 4041 _host_index=_host_index, 4042 ) 4043 4044 _response_types_map: Dict[str, Optional[str]] = { 4045 "200": "GenericItem", 4046 "400": "CreateFrameItem400Response", 4047 "404": "CreateFrameItem400Response", 4048 "429": "CreateFrameItem400Response", 4049 } 4050 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4051 response_data.read() 4052 return self.api_client.response_deserialize( 4053 response_data=response_data, 4054 response_types_map=_response_types_map, 4055 ).data
Get specific item on board
Retrieves information for a specific item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
4109 @validate_call 4110 def update_shape_item_flowchart( 4111 self, 4112 board_id: Annotated[ 4113 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 4114 ], 4115 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 4116 shape_update_request: ShapeUpdateRequest, 4117 _request_timeout: Union[ 4118 None, 4119 Annotated[StrictFloat, Field(gt=0)], 4120 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4121 ] = None, 4122 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4123 _content_type: Optional[StrictStr] = None, 4124 _headers: Optional[Dict[StrictStr, Any]] = None, 4125 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4126 ) -> ShapeItem: 4127 """Update shape item 4128 4129 Updates a flowchart shape item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 4130 4131 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 4132 :type board_id: str 4133 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 4134 :type item_id: str 4135 :param shape_update_request: (required) 4136 :type shape_update_request: ShapeUpdateRequest 4137 :param _request_timeout: timeout setting for this request. If one 4138 number provided, it will be total request 4139 timeout. It can also be a pair (tuple) of 4140 (connection, read) timeouts. 4141 :type _request_timeout: int, tuple(int, int), optional 4142 :param _request_auth: set to override the auth_settings for an a single 4143 request; this effectively ignores the 4144 authentication in the spec for a single request. 4145 :type _request_auth: dict, optional 4146 :param _content_type: force content-type for the request. 4147 :type _content_type: str, Optional 4148 :param _headers: set to override the headers for a single 4149 request; this effectively ignores the headers 4150 in the spec for a single request. 4151 :type _headers: dict, optional 4152 :param _host_index: set to override the host_index for a single 4153 request; this effectively ignores the host_index 4154 in the spec for a single request. 4155 :type _host_index: int, optional 4156 :return: Returns the result object. 4157 """ # noqa: E501 4158 4159 _param = self._update_shape_item_flowchart_serialize( 4160 board_id=board_id, 4161 item_id=item_id, 4162 shape_update_request=shape_update_request, 4163 _request_auth=_request_auth, 4164 _content_type=_content_type, 4165 _headers=_headers, 4166 _host_index=_host_index, 4167 ) 4168 4169 _response_types_map: Dict[str, Optional[str]] = { 4170 "200": "ShapeItem", 4171 "400": "CreateFrameItem400Response", 4172 "404": "CreateFrameItem400Response", 4173 "429": "CreateFrameItem400Response", 4174 } 4175 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4176 response_data.read() 4177 return self.api_client.response_deserialize( 4178 response_data=response_data, 4179 response_types_map=_response_types_map, 4180 ).data
Update shape item
Updates a flowchart shape item on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param shape_update_request: (required) :type shape_update_request: ShapeUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
4245 @validate_call 4246 def get_group( 4247 self, 4248 id: Annotated[StrictStr, Field(description="A server-assigned, unique identifier for this Group (team).")], 4249 attributes: Annotated[ 4250 Optional[StrictStr], 4251 Field( 4252 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to retrieve attributes within complex attributes. For example: members.display" 4253 ), 4254 ] = None, 4255 _request_timeout: Union[ 4256 None, 4257 Annotated[StrictFloat, Field(gt=0)], 4258 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4259 ] = None, 4260 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4261 _content_type: Optional[StrictStr] = None, 4262 _headers: Optional[Dict[StrictStr, Any]] = None, 4263 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4264 ) -> GroupResource: 4265 """Get group 4266 4267 Retrieves a single Group resource.<br><b> Note</b>: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched. 4268 4269 :param id: A server-assigned, unique identifier for this Group (team). (required) 4270 :type id: str 4271 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to retrieve attributes within complex attributes. For example: members.display 4272 :type attributes: str 4273 :param _request_timeout: timeout setting for this request. If one 4274 number provided, it will be total request 4275 timeout. It can also be a pair (tuple) of 4276 (connection, read) timeouts. 4277 :type _request_timeout: int, tuple(int, int), optional 4278 :param _request_auth: set to override the auth_settings for an a single 4279 request; this effectively ignores the 4280 authentication in the spec for a single request. 4281 :type _request_auth: dict, optional 4282 :param _content_type: force content-type for the request. 4283 :type _content_type: str, Optional 4284 :param _headers: set to override the headers for a single 4285 request; this effectively ignores the headers 4286 in the spec for a single request. 4287 :type _headers: dict, optional 4288 :param _host_index: set to override the host_index for a single 4289 request; this effectively ignores the host_index 4290 in the spec for a single request. 4291 :type _host_index: int, optional 4292 :return: Returns the result object. 4293 """ # noqa: E501 4294 4295 _param = self._get_group_serialize( 4296 id=id, 4297 attributes=attributes, 4298 _request_auth=_request_auth, 4299 _content_type=_content_type, 4300 _headers=_headers, 4301 _host_index=_host_index, 4302 ) 4303 4304 _response_types_map: Dict[str, Optional[str]] = { 4305 "200": "GroupResource", 4306 "400": None, 4307 "401": None, 4308 "403": None, 4309 "404": None, 4310 "409": None, 4311 "413": None, 4312 "429": None, 4313 "500": None, 4314 } 4315 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4316 response_data.read() 4317 return self.api_client.response_deserialize( 4318 response_data=response_data, 4319 response_types_map=_response_types_map, 4320 ).data
Get group
Retrieves a single Group resource.
Note: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched.
:param id: A server-assigned, unique identifier for this Group (team). (required)
:type id: str
:param attributes: A comma-separated list of attribute names to return in the response.
Example attributes: id,displayName
Note: It is also possible to retrieve attributes within complex attributes. For example: members.display
:type attributes: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
4376 @validate_call 4377 def list_groups( 4378 self, 4379 attributes: Annotated[ 4380 Optional[StrictStr], 4381 Field( 4382 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to fetch attributes within complex attributes, for Example: members.display." 4383 ), 4384 ] = None, 4385 filter: Annotated[ 4386 Optional[StrictStr], 4387 Field( 4388 description='You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical "and"<br> or = Logical "or"<br> not = "Not" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br>For Example: displayName eq "Product Team" will fetch information related to team matching the display name "Product Team". <br>Note</b>: Filtering on complex attributes is not supported' 4389 ), 4390 ] = None, 4391 start_index: Annotated[ 4392 Optional[StrictInt], 4393 Field( 4394 description="Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1" 4395 ), 4396 ] = None, 4397 count: Annotated[ 4398 Optional[StrictInt], 4399 Field( 4400 description="Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12" 4401 ), 4402 ] = None, 4403 sort_by: Annotated[ 4404 Optional[StrictStr], 4405 Field( 4406 description="Specifies the attribute whose value will be used to order the response. Example sortBy=displayName" 4407 ), 4408 ] = None, 4409 sort_order: Annotated[ 4410 Optional[StrictStr], 4411 Field( 4412 description="Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending" 4413 ), 4414 ] = None, 4415 _request_timeout: Union[ 4416 None, 4417 Annotated[StrictFloat, Field(gt=0)], 4418 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4419 ] = None, 4420 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4421 _content_type: Optional[StrictStr] = None, 4422 _headers: Optional[Dict[StrictStr, Any]] = None, 4423 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4424 ) -> GroupListResponse: 4425 """List groups 4426 4427 Retrieves the list of groups (teams) in the organization.<br><br> Note: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched. 4428 4429 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> Note</b>: It is also possible to fetch attributes within complex attributes, for Example: members.display. 4430 :type attributes: str 4431 :param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical \"and\"<br> or = Logical \"or\"<br> not = \"Not\" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br>For Example: displayName eq \"Product Team\" will fetch information related to team matching the display name \"Product Team\". <br>Note</b>: Filtering on complex attributes is not supported 4432 :type filter: str 4433 :param start_index: Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1 4434 :type start_index: int 4435 :param count: Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12 4436 :type count: int 4437 :param sort_by: Specifies the attribute whose value will be used to order the response. Example sortBy=displayName 4438 :type sort_by: str 4439 :param sort_order: Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending 4440 :type sort_order: str 4441 :param _request_timeout: timeout setting for this request. If one 4442 number provided, it will be total request 4443 timeout. It can also be a pair (tuple) of 4444 (connection, read) timeouts. 4445 :type _request_timeout: int, tuple(int, int), optional 4446 :param _request_auth: set to override the auth_settings for an a single 4447 request; this effectively ignores the 4448 authentication in the spec for a single request. 4449 :type _request_auth: dict, optional 4450 :param _content_type: force content-type for the request. 4451 :type _content_type: str, Optional 4452 :param _headers: set to override the headers for a single 4453 request; this effectively ignores the headers 4454 in the spec for a single request. 4455 :type _headers: dict, optional 4456 :param _host_index: set to override the host_index for a single 4457 request; this effectively ignores the host_index 4458 in the spec for a single request. 4459 :type _host_index: int, optional 4460 :return: Returns the result object. 4461 """ # noqa: E501 4462 4463 _param = self._list_groups_serialize( 4464 attributes=attributes, 4465 filter=filter, 4466 start_index=start_index, 4467 count=count, 4468 sort_by=sort_by, 4469 sort_order=sort_order, 4470 _request_auth=_request_auth, 4471 _content_type=_content_type, 4472 _headers=_headers, 4473 _host_index=_host_index, 4474 ) 4475 4476 _response_types_map: Dict[str, Optional[str]] = { 4477 "200": "GroupListResponse", 4478 "400": None, 4479 "401": None, 4480 "403": None, 4481 "404": None, 4482 "429": None, 4483 "500": None, 4484 } 4485 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4486 response_data.read() 4487 return self.api_client.response_deserialize( 4488 response_data=response_data, 4489 response_types_map=_response_types_map, 4490 ).data
List groups
Retrieves the list of groups (teams) in the organization.
Note: Along with groups (teams), the users that are part of those groups (teams) are also retrieved. Only users that have member role in the organization are fetched.
:param attributes: A comma-separated list of attribute names to return in the response.
Example attributes: id,displayName
Note: It is also possible to fetch attributes within complex attributes, for Example: members.display.
:type attributes: str
:param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value.
eq = equal
ne = not equal
co = contains
sw = starts with
ew = ends with
pr = preset (has value)
gt = greater than
ge = greater than or equal to
lt = less than
le = less than or equal to
and = Logical "and"
or = Logical "or"
not = "Not" function
() = Precedence grouping
The value must be passed within parenthesis.
For Example: displayName eq "Product Team" will fetch information related to team matching the display name "Product Team".
Note: Filtering on complex attributes is not supported
:type filter: str
:param start_index: Use startIndex in combination with count query parameters to receive paginated results.
start index is 1-based.
Example: startIndex=1
:type start_index: int
:param count: Specifies the maximum number of query results per page.
Use count in combination with startIndex query parameters to receive paginated results.
The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000.
Example: count=12
:type count: int
:param sort_by: Specifies the attribute whose value will be used to order the response. Example sortBy=displayName
:type sort_by: str
:param sort_order: Defines the order in which the 'sortBy' parameter is applied. Example: sortOrder=ascending
:type sort_order: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
4568 @validate_call 4569 def patch_group( 4570 self, 4571 id: Annotated[ 4572 StrictStr, Field(description="Group (Team) ID. A server-assigned, unique identifier for this Group (team).") 4573 ], 4574 patch_group_resource: Annotated[ 4575 PatchGroupResource, 4576 Field( 4577 description="Payload to add, replace, remove members in the specified group (team). <br><br> The body of a PATCH request must contain the attribute `Operations` and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one `op` member. " 4578 ), 4579 ], 4580 attributes: Annotated[ 4581 Optional[StrictStr], 4582 Field( 4583 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> It is also possible to fetch attributes within complex attributes, for Example: members.display" 4584 ), 4585 ] = None, 4586 _request_timeout: Union[ 4587 None, 4588 Annotated[StrictFloat, Field(gt=0)], 4589 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4590 ] = None, 4591 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4592 _content_type: Optional[StrictStr] = None, 4593 _headers: Optional[Dict[StrictStr, Any]] = None, 4594 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4595 ) -> GroupResource: 4596 """Patch group 4597 4598 Updates an existing group resource, i.e. a team, overwriting values for specified attributes. Patch operation for group can be used to add, remove, or replace team members and to update the display name of the group (team). <br><br> To add a user to the group (team), use add operation. <br> To remove a user from a group (team), use remove operation. <br> To update a user resource, use the replace operation. <br> The last team admin cannot be removed from the team. <br><br> Note: Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided. <br><br> Team members removal specifics: <br> For remove or replace operations, the team member is removed from the team and from all team boards. The ownership of boards that belong to the removed team member is transferred to the oldest team member who currently has an admin role. After you remove a team member, adding the team member again to the team does not automatically restore their previous ownership of the boards. If the user is not registered fully in Miro and is not assigned to any other team, the user is also removed from the organization. <br><br> Add team members specifics: <br> All added team members are reactivated or recreated if they were deactivated or deleted earlier. <br><br> External users specifics: <br> When adding existing users with the role ORGANIZATION_EXTERNAL_USER or ORGANIZATION_TEAM_GUEST_USER to a team, we set FULL license and ORGANIZATION_INTERNAL_USER roles. 4599 4600 :param id: Group (Team) ID. A server-assigned, unique identifier for this Group (team). (required) 4601 :type id: str 4602 :param patch_group_resource: Payload to add, replace, remove members in the specified group (team). <br><br> The body of a PATCH request must contain the attribute `Operations` and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one `op` member. (required) 4603 :type patch_group_resource: PatchGroupResource 4604 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id,displayName <br> It is also possible to fetch attributes within complex attributes, for Example: members.display 4605 :type attributes: str 4606 :param _request_timeout: timeout setting for this request. If one 4607 number provided, it will be total request 4608 timeout. It can also be a pair (tuple) of 4609 (connection, read) timeouts. 4610 :type _request_timeout: int, tuple(int, int), optional 4611 :param _request_auth: set to override the auth_settings for an a single 4612 request; this effectively ignores the 4613 authentication in the spec for a single request. 4614 :type _request_auth: dict, optional 4615 :param _content_type: force content-type for the request. 4616 :type _content_type: str, Optional 4617 :param _headers: set to override the headers for a single 4618 request; this effectively ignores the headers 4619 in the spec for a single request. 4620 :type _headers: dict, optional 4621 :param _host_index: set to override the host_index for a single 4622 request; this effectively ignores the host_index 4623 in the spec for a single request. 4624 :type _host_index: int, optional 4625 :return: Returns the result object. 4626 """ # noqa: E501 4627 4628 _param = self._patch_group_serialize( 4629 id=id, 4630 patch_group_resource=patch_group_resource, 4631 attributes=attributes, 4632 _request_auth=_request_auth, 4633 _content_type=_content_type, 4634 _headers=_headers, 4635 _host_index=_host_index, 4636 ) 4637 4638 _response_types_map: Dict[str, Optional[str]] = { 4639 "200": "GroupResource", 4640 "400": None, 4641 "401": None, 4642 "403": None, 4643 "404": None, 4644 "409": None, 4645 "413": None, 4646 "429": None, 4647 "500": None, 4648 } 4649 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4650 response_data.read() 4651 return self.api_client.response_deserialize( 4652 response_data=response_data, 4653 response_types_map=_response_types_map, 4654 ).data
Patch group
Updates an existing group resource, i.e. a team, overwriting values for specified attributes. Patch operation for group can be used to add, remove, or replace team members and to update the display name of the group (team).
To add a user to the group (team), use add operation.
To remove a user from a group (team), use remove operation.
To update a user resource, use the replace operation.
The last team admin cannot be removed from the team.
Note: Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided.
Team members removal specifics:
For remove or replace operations, the team member is removed from the team and from all team boards. The ownership of boards that belong to the removed team member is transferred to the oldest team member who currently has an admin role. After you remove a team member, adding the team member again to the team does not automatically restore their previous ownership of the boards. If the user is not registered fully in Miro and is not assigned to any other team, the user is also removed from the organization.
Add team members specifics:
All added team members are reactivated or recreated if they were deactivated or deleted earlier.
External users specifics:
When adding existing users with the role ORGANIZATION_EXTERNAL_USER or ORGANIZATION_TEAM_GUEST_USER to a team, we set FULL license and ORGANIZATION_INTERNAL_USER roles.
:param id: Group (Team) ID. A server-assigned, unique identifier for this Group (team). (required)
:type id: str
:param patch_group_resource: Payload to add, replace, remove members in the specified group (team).
The body of a PATCH request must contain the attribute Operations and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one op member. (required)
:type patch_group_resource: PatchGroupResource
:param attributes: A comma-separated list of attribute names to return in the response.
Example attributes: id,displayName
It is also possible to fetch attributes within complex attributes, for Example: members.display
:type attributes: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
4723 @validate_call 4724 def create_case( 4725 self, 4726 org_id: Annotated[ 4727 str, Field(strict=True, description="The ID of the organization in which you want to create a new case.") 4728 ], 4729 case_request: CaseRequest, 4730 _request_timeout: Union[ 4731 None, 4732 Annotated[StrictFloat, Field(gt=0)], 4733 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4734 ] = None, 4735 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4736 _content_type: Optional[StrictStr] = None, 4737 _headers: Optional[Dict[StrictStr, Any]] = None, 4738 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4739 ) -> CaseResponse: 4740 """Create case 4741 4742 Creating a case for legal hold is the first critical step in the eDiscovery process when litigation or an investigation is anticipated. One of the purposes of creating a case is that it acts as a container that allows admins to group multiple legal holds under one case. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120022370962-Create-a-case\" target=_blank>Help Center page on creating a case</a>. <br><br>This API creates a new case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 4743 4744 :param org_id: The ID of the organization in which you want to create a new case. (required) 4745 :type org_id: str 4746 :param case_request: (required) 4747 :type case_request: CaseRequest 4748 :param _request_timeout: timeout setting for this request. If one 4749 number provided, it will be total request 4750 timeout. It can also be a pair (tuple) of 4751 (connection, read) timeouts. 4752 :type _request_timeout: int, tuple(int, int), optional 4753 :param _request_auth: set to override the auth_settings for an a single 4754 request; this effectively ignores the 4755 authentication in the spec for a single request. 4756 :type _request_auth: dict, optional 4757 :param _content_type: force content-type for the request. 4758 :type _content_type: str, Optional 4759 :param _headers: set to override the headers for a single 4760 request; this effectively ignores the headers 4761 in the spec for a single request. 4762 :type _headers: dict, optional 4763 :param _host_index: set to override the host_index for a single 4764 request; this effectively ignores the host_index 4765 in the spec for a single request. 4766 :type _host_index: int, optional 4767 :return: Returns the result object. 4768 """ # noqa: E501 4769 4770 _param = self._create_case_serialize( 4771 org_id=org_id, 4772 case_request=case_request, 4773 _request_auth=_request_auth, 4774 _content_type=_content_type, 4775 _headers=_headers, 4776 _host_index=_host_index, 4777 ) 4778 4779 _response_types_map: Dict[str, Optional[str]] = { 4780 "200": "CaseResponse", 4781 "400": None, 4782 "401": None, 4783 "403": None, 4784 "404": None, 4785 "429": None, 4786 } 4787 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4788 response_data.read() 4789 return self.api_client.response_deserialize( 4790 response_data=response_data, 4791 response_types_map=_response_types_map, 4792 ).data
Create case
Creating a case for legal hold is the first critical step in the eDiscovery process when litigation or an investigation is anticipated. One of the purposes of creating a case is that it acts as a container that allows admins to group multiple legal holds under one case. For more information, see our Help Center page on creating a case.
This API creates a new case in an organization.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization in which you want to create a new case. (required) :type org_id: str :param case_request: (required) :type case_request: CaseRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
4854 @validate_call 4855 def create_legal_hold( 4856 self, 4857 org_id: Annotated[ 4858 str, 4859 Field(strict=True, description="The ID of the organization in which you want to create a new legal hold."), 4860 ], 4861 case_id: Annotated[ 4862 str, Field(strict=True, description="The ID of the case in which you want to create a new legal hold.") 4863 ], 4864 legal_hold_request: LegalHoldRequest, 4865 _request_timeout: Union[ 4866 None, 4867 Annotated[StrictFloat, Field(gt=0)], 4868 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 4869 ] = None, 4870 _request_auth: Optional[Dict[StrictStr, Any]] = None, 4871 _content_type: Optional[StrictStr] = None, 4872 _headers: Optional[Dict[StrictStr, Any]] = None, 4873 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 4874 ) -> LegalHoldResponse: 4875 """Create legal hold 4876 4877 After creating a case it is possible to add one or multiple legal holds to the case. Creating a legal hold involves identifying the relevant users associated with a case and applying the hold to prevent permanent deletion of content that those users own, co-own, create, edit or access. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120471564946-Add-a-legal-hold-to-a-case\" target=_blank>Help Center page on adding a legal hold to a case</a>. <br><br>This API creates a new legal hold in a case for an organization. Newly created legal holds could take up to 24 hours to be processed.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 4878 4879 :param org_id: The ID of the organization in which you want to create a new legal hold. (required) 4880 :type org_id: str 4881 :param case_id: The ID of the case in which you want to create a new legal hold. (required) 4882 :type case_id: str 4883 :param legal_hold_request: (required) 4884 :type legal_hold_request: LegalHoldRequest 4885 :param _request_timeout: timeout setting for this request. If one 4886 number provided, it will be total request 4887 timeout. It can also be a pair (tuple) of 4888 (connection, read) timeouts. 4889 :type _request_timeout: int, tuple(int, int), optional 4890 :param _request_auth: set to override the auth_settings for an a single 4891 request; this effectively ignores the 4892 authentication in the spec for a single request. 4893 :type _request_auth: dict, optional 4894 :param _content_type: force content-type for the request. 4895 :type _content_type: str, Optional 4896 :param _headers: set to override the headers for a single 4897 request; this effectively ignores the headers 4898 in the spec for a single request. 4899 :type _headers: dict, optional 4900 :param _host_index: set to override the host_index for a single 4901 request; this effectively ignores the host_index 4902 in the spec for a single request. 4903 :type _host_index: int, optional 4904 :return: Returns the result object. 4905 """ # noqa: E501 4906 4907 _param = self._create_legal_hold_serialize( 4908 org_id=org_id, 4909 case_id=case_id, 4910 legal_hold_request=legal_hold_request, 4911 _request_auth=_request_auth, 4912 _content_type=_content_type, 4913 _headers=_headers, 4914 _host_index=_host_index, 4915 ) 4916 4917 _response_types_map: Dict[str, Optional[str]] = { 4918 "200": "LegalHoldResponse", 4919 "400": None, 4920 "401": None, 4921 "403": None, 4922 "404": None, 4923 "429": None, 4924 } 4925 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 4926 response_data.read() 4927 return self.api_client.response_deserialize( 4928 response_data=response_data, 4929 response_types_map=_response_types_map, 4930 ).data
Create legal hold
After creating a case it is possible to add one or multiple legal holds to the case. Creating a legal hold involves identifying the relevant users associated with a case and applying the hold to prevent permanent deletion of content that those users own, co-own, create, edit or access. For more information, see our Help Center page on adding a legal hold to a case.
This API creates a new legal hold in a case for an organization. Newly created legal holds could take up to 24 hours to be processed.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization in which you want to create a new legal hold. (required) :type org_id: str :param case_id: The ID of the case in which you want to create a new legal hold. (required) :type case_id: str :param legal_hold_request: (required) :type legal_hold_request: LegalHoldRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
4995 @validate_call 4996 def delete_case( 4997 self, 4998 org_id: Annotated[ 4999 str, Field(strict=True, description="The ID of the organization in which you want to close a case.") 5000 ], 5001 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to close.")], 5002 _request_timeout: Union[ 5003 None, 5004 Annotated[StrictFloat, Field(gt=0)], 5005 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5006 ] = None, 5007 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5008 _content_type: Optional[StrictStr] = None, 5009 _headers: Optional[Dict[StrictStr, Any]] = None, 5010 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5011 ) -> None: 5012 """Close case 5013 5014 Closing a case is the final stage in the eDiscovery process, marking the conclusion of a legal matter or investigation. You must ensure that all associated legal holds within the case are closed before closing the case. Closing a case will permanently delete it. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22138936297746-Close-a-case\" target=_blank>Help Center page on closing a case</a>. <br><br>This API closes a case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5015 5016 :param org_id: The ID of the organization in which you want to close a case. (required) 5017 :type org_id: str 5018 :param case_id: The ID of the case you want to close. (required) 5019 :type case_id: str 5020 :param _request_timeout: timeout setting for this request. If one 5021 number provided, it will be total request 5022 timeout. It can also be a pair (tuple) of 5023 (connection, read) timeouts. 5024 :type _request_timeout: int, tuple(int, int), optional 5025 :param _request_auth: set to override the auth_settings for an a single 5026 request; this effectively ignores the 5027 authentication in the spec for a single request. 5028 :type _request_auth: dict, optional 5029 :param _content_type: force content-type for the request. 5030 :type _content_type: str, Optional 5031 :param _headers: set to override the headers for a single 5032 request; this effectively ignores the headers 5033 in the spec for a single request. 5034 :type _headers: dict, optional 5035 :param _host_index: set to override the host_index for a single 5036 request; this effectively ignores the host_index 5037 in the spec for a single request. 5038 :type _host_index: int, optional 5039 :return: Returns the result object. 5040 """ # noqa: E501 5041 5042 _param = self._delete_case_serialize( 5043 org_id=org_id, 5044 case_id=case_id, 5045 _request_auth=_request_auth, 5046 _content_type=_content_type, 5047 _headers=_headers, 5048 _host_index=_host_index, 5049 ) 5050 5051 _response_types_map: Dict[str, Optional[str]] = { 5052 "204": None, 5053 "400": None, 5054 "401": None, 5055 "403": None, 5056 "404": None, 5057 "429": None, 5058 } 5059 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5060 response_data.read() 5061 return self.api_client.response_deserialize( 5062 response_data=response_data, 5063 response_types_map=_response_types_map, 5064 ).data
Close case
Closing a case is the final stage in the eDiscovery process, marking the conclusion of a legal matter or investigation. You must ensure that all associated legal holds within the case are closed before closing the case. Closing a case will permanently delete it. For more information, see our Help Center page on closing a case.
This API closes a case in an organization.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization in which you want to close a case. (required) :type org_id: str :param case_id: The ID of the case you want to close. (required) :type case_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5115 @validate_call 5116 def delete_legal_hold( 5117 self, 5118 org_id: Annotated[ 5119 str, Field(strict=True, description="The ID of the organization in which you want to close a legal hold.") 5120 ], 5121 case_id: Annotated[ 5122 str, Field(strict=True, description="The ID of the case in which you want to close a legal hold.") 5123 ], 5124 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to close.")], 5125 _request_timeout: Union[ 5126 None, 5127 Annotated[StrictFloat, Field(gt=0)], 5128 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5129 ] = None, 5130 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5131 _content_type: Optional[StrictStr] = None, 5132 _headers: Optional[Dict[StrictStr, Any]] = None, 5133 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5134 ) -> None: 5135 """Close legal hold 5136 5137 Closing a legal hold is one of the final steps in the eDiscovery process once the litigation or investigation has concluded. This process involves releasing the Miro boards and custodians that were under legal hold, allowing the preserved boards to return to normal operations. Closing a legal hold will permanently delete it. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/21922521629330-Close-a-legal-hold\" target=_blank>Help Center page on closing a legal hold</a>. <br><br>This API closes a legal hold in a case for an organization. Once a legal hold is closed, it can take up to 24 hours to release the content items from the legal hold. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5138 5139 :param org_id: The ID of the organization in which you want to close a legal hold. (required) 5140 :type org_id: str 5141 :param case_id: The ID of the case in which you want to close a legal hold. (required) 5142 :type case_id: str 5143 :param legal_hold_id: The ID of the legal hold you want to close. (required) 5144 :type legal_hold_id: str 5145 :param _request_timeout: timeout setting for this request. If one 5146 number provided, it will be total request 5147 timeout. It can also be a pair (tuple) of 5148 (connection, read) timeouts. 5149 :type _request_timeout: int, tuple(int, int), optional 5150 :param _request_auth: set to override the auth_settings for an a single 5151 request; this effectively ignores the 5152 authentication in the spec for a single request. 5153 :type _request_auth: dict, optional 5154 :param _content_type: force content-type for the request. 5155 :type _content_type: str, Optional 5156 :param _headers: set to override the headers for a single 5157 request; this effectively ignores the headers 5158 in the spec for a single request. 5159 :type _headers: dict, optional 5160 :param _host_index: set to override the host_index for a single 5161 request; this effectively ignores the host_index 5162 in the spec for a single request. 5163 :type _host_index: int, optional 5164 :return: Returns the result object. 5165 """ # noqa: E501 5166 5167 _param = self._delete_legal_hold_serialize( 5168 org_id=org_id, 5169 case_id=case_id, 5170 legal_hold_id=legal_hold_id, 5171 _request_auth=_request_auth, 5172 _content_type=_content_type, 5173 _headers=_headers, 5174 _host_index=_host_index, 5175 ) 5176 5177 _response_types_map: Dict[str, Optional[str]] = { 5178 "204": None, 5179 "400": None, 5180 "401": None, 5181 "403": None, 5182 "404": None, 5183 "429": None, 5184 } 5185 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5186 response_data.read() 5187 return self.api_client.response_deserialize( 5188 response_data=response_data, 5189 response_types_map=_response_types_map, 5190 ).data
Close legal hold
Closing a legal hold is one of the final steps in the eDiscovery process once the litigation or investigation has concluded. This process involves releasing the Miro boards and custodians that were under legal hold, allowing the preserved boards to return to normal operations. Closing a legal hold will permanently delete it. For more information, see our Help Center page on closing a legal hold.
This API closes a legal hold in a case for an organization. Once a legal hold is closed, it can take up to 24 hours to release the content items from the legal hold.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization in which you want to close a legal hold. (required) :type org_id: str :param case_id: The ID of the case in which you want to close a legal hold. (required) :type case_id: str :param legal_hold_id: The ID of the legal hold you want to close. (required) :type legal_hold_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5244 @validate_call 5245 def edit_case( 5246 self, 5247 org_id: Annotated[ 5248 str, 5249 Field( 5250 strict=True, description="The ID of the organization for which you want to edit the case information." 5251 ), 5252 ], 5253 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to edit.")], 5254 case_request: CaseRequest, 5255 _request_timeout: Union[ 5256 None, 5257 Annotated[StrictFloat, Field(gt=0)], 5258 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5259 ] = None, 5260 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5261 _content_type: Optional[StrictStr] = None, 5262 _headers: Optional[Dict[StrictStr, Any]] = None, 5263 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5264 ) -> CaseResponse: 5265 """Edit case 5266 5267 Editing a case allows eDiscovery Admins to keep case details accurate and aligned with the evolving scope of a legal matter. As investigations progress, it may be necessary to update the case name or description to reflect changes in focus, terminology, or internal documentation standards. Since a case serves as the central container for one or more legal holds, keeping its information up to date helps ensure clarity, consistency, and easier navigation for all stakeholders involved in the legal process.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5268 5269 :param org_id: The ID of the organization for which you want to edit the case information. (required) 5270 :type org_id: str 5271 :param case_id: The ID of the case you want to edit. (required) 5272 :type case_id: str 5273 :param case_request: (required) 5274 :type case_request: CaseRequest 5275 :param _request_timeout: timeout setting for this request. If one 5276 number provided, it will be total request 5277 timeout. It can also be a pair (tuple) of 5278 (connection, read) timeouts. 5279 :type _request_timeout: int, tuple(int, int), optional 5280 :param _request_auth: set to override the auth_settings for an a single 5281 request; this effectively ignores the 5282 authentication in the spec for a single request. 5283 :type _request_auth: dict, optional 5284 :param _content_type: force content-type for the request. 5285 :type _content_type: str, Optional 5286 :param _headers: set to override the headers for a single 5287 request; this effectively ignores the headers 5288 in the spec for a single request. 5289 :type _headers: dict, optional 5290 :param _host_index: set to override the host_index for a single 5291 request; this effectively ignores the host_index 5292 in the spec for a single request. 5293 :type _host_index: int, optional 5294 :return: Returns the result object. 5295 """ # noqa: E501 5296 5297 _param = self._edit_case_serialize( 5298 org_id=org_id, 5299 case_id=case_id, 5300 case_request=case_request, 5301 _request_auth=_request_auth, 5302 _content_type=_content_type, 5303 _headers=_headers, 5304 _host_index=_host_index, 5305 ) 5306 5307 _response_types_map: Dict[str, Optional[str]] = { 5308 "200": "CaseResponse", 5309 "400": None, 5310 "401": None, 5311 "403": None, 5312 "404": None, 5313 "429": None, 5314 } 5315 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5316 response_data.read() 5317 return self.api_client.response_deserialize( 5318 response_data=response_data, 5319 response_types_map=_response_types_map, 5320 ).data
Edit case
Editing a case allows eDiscovery Admins to keep case details accurate and aligned with the evolving scope of a legal matter. As investigations progress, it may be necessary to update the case name or description to reflect changes in focus, terminology, or internal documentation standards. Since a case serves as the central container for one or more legal holds, keeping its information up to date helps ensure clarity, consistency, and easier navigation for all stakeholders involved in the legal process.
Required scope
organization:cases:managementRate limiting
Level 3Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to edit the case information. (required) :type org_id: str :param case_id: The ID of the case you want to edit. (required) :type case_id: str :param case_request: (required) :type case_request: CaseRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5385 @validate_call 5386 def edit_legal_hold( 5387 self, 5388 org_id: Annotated[ 5389 str, 5390 Field( 5391 strict=True, 5392 description="The ID of the organization for which you want to edit the legal hold information.", 5393 ), 5394 ], 5395 case_id: Annotated[ 5396 str, 5397 Field(strict=True, description="The ID of the case for which you want to edit the legal hold information."), 5398 ], 5399 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to edit.")], 5400 legal_hold_request: LegalHoldRequest, 5401 _request_timeout: Union[ 5402 None, 5403 Annotated[StrictFloat, Field(gt=0)], 5404 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5405 ] = None, 5406 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5407 _content_type: Optional[StrictStr] = None, 5408 _headers: Optional[Dict[StrictStr, Any]] = None, 5409 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5410 ) -> LegalHoldResponse: 5411 """Edit legal hold 5412 5413 Editing a legal hold allows eDiscovery Admins to adjust and refine ongoing legal preservation efforts as case requirements evolve. Whether new custodians are identified, additional Miro boards become relevant, or existing boards or users are no longer in scope, editing a legal hold ensures that the correct data remains preserved and defensible throughout the legal process. Admins can update the legal hold’s name or description and add or remove users and boards as needed. This flexibility supports dynamic legal workflows and ensures that preservation stays precise, up to date, and aligned with the scope of the legal matter—maintaining compliance while avoiding unnecessary data retention.<br/><br/>When a legal hold is edited, boards newly added to the hold will begin having their versions preserved from that point forward, boards or users removed from the hold will stop being preserved, and their versions will no longer be preserved as part of that legal hold, boards that remain under hold will continue to have all versions preserved, including any deletions that occur after the hold was applied. This approach ensures organizations can respond to legal demands with accuracy and accountability as a case evolves.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5414 5415 :param org_id: The ID of the organization for which you want to edit the legal hold information. (required) 5416 :type org_id: str 5417 :param case_id: The ID of the case for which you want to edit the legal hold information. (required) 5418 :type case_id: str 5419 :param legal_hold_id: The ID of the legal hold you want to edit. (required) 5420 :type legal_hold_id: str 5421 :param legal_hold_request: (required) 5422 :type legal_hold_request: LegalHoldRequest 5423 :param _request_timeout: timeout setting for this request. If one 5424 number provided, it will be total request 5425 timeout. It can also be a pair (tuple) of 5426 (connection, read) timeouts. 5427 :type _request_timeout: int, tuple(int, int), optional 5428 :param _request_auth: set to override the auth_settings for an a single 5429 request; this effectively ignores the 5430 authentication in the spec for a single request. 5431 :type _request_auth: dict, optional 5432 :param _content_type: force content-type for the request. 5433 :type _content_type: str, Optional 5434 :param _headers: set to override the headers for a single 5435 request; this effectively ignores the headers 5436 in the spec for a single request. 5437 :type _headers: dict, optional 5438 :param _host_index: set to override the host_index for a single 5439 request; this effectively ignores the host_index 5440 in the spec for a single request. 5441 :type _host_index: int, optional 5442 :return: Returns the result object. 5443 """ # noqa: E501 5444 5445 _param = self._edit_legal_hold_serialize( 5446 org_id=org_id, 5447 case_id=case_id, 5448 legal_hold_id=legal_hold_id, 5449 legal_hold_request=legal_hold_request, 5450 _request_auth=_request_auth, 5451 _content_type=_content_type, 5452 _headers=_headers, 5453 _host_index=_host_index, 5454 ) 5455 5456 _response_types_map: Dict[str, Optional[str]] = { 5457 "200": "LegalHoldResponse", 5458 "400": None, 5459 "401": None, 5460 "403": None, 5461 "404": None, 5462 "429": None, 5463 } 5464 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5465 response_data.read() 5466 return self.api_client.response_deserialize( 5467 response_data=response_data, 5468 response_types_map=_response_types_map, 5469 ).data
Edit legal hold
Editing a legal hold allows eDiscovery Admins to adjust and refine ongoing legal preservation efforts as case requirements evolve. Whether new custodians are identified, additional Miro boards become relevant, or existing boards or users are no longer in scope, editing a legal hold ensures that the correct data remains preserved and defensible throughout the legal process. Admins can update the legal hold’s name or description and add or remove users and boards as needed. This flexibility supports dynamic legal workflows and ensures that preservation stays precise, up to date, and aligned with the scope of the legal matter—maintaining compliance while avoiding unnecessary data retention.
When a legal hold is edited, boards newly added to the hold will begin having their versions preserved from that point forward, boards or users removed from the hold will stop being preserved, and their versions will no longer be preserved as part of that legal hold, boards that remain under hold will continue to have all versions preserved, including any deletions that occur after the hold was applied. This approach ensures organizations can respond to legal demands with accuracy and accountability as a case evolves.
Required scope
organization:cases:managementRate limiting
Level 3Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to edit the legal hold information. (required) :type org_id: str :param case_id: The ID of the case for which you want to edit the legal hold information. (required) :type case_id: str :param legal_hold_id: The ID of the legal hold you want to edit. (required) :type legal_hold_id: str :param legal_hold_request: (required) :type legal_hold_request: LegalHoldRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5537 @validate_call 5538 def get_all_cases( 5539 self, 5540 org_id: Annotated[ 5541 str, 5542 Field( 5543 strict=True, description="The ID of the organization for which you want to retrieve the list of cases." 5544 ), 5545 ], 5546 limit: Annotated[ 5547 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 5548 Field(description="The maximum number of items in the result list."), 5549 ] = None, 5550 cursor: Annotated[ 5551 Optional[StrictStr], 5552 Field( 5553 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 5554 ), 5555 ] = None, 5556 _request_timeout: Union[ 5557 None, 5558 Annotated[StrictFloat, Field(gt=0)], 5559 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5560 ] = None, 5561 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5562 _content_type: Optional[StrictStr] = None, 5563 _headers: Optional[Dict[StrictStr, Any]] = None, 5564 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5565 ) -> PaginatedCaseResponse: 5566 """Get all cases 5567 5568 Retrieves the list of eDiscovery cases in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5569 5570 :param org_id: The ID of the organization for which you want to retrieve the list of cases. (required) 5571 :type org_id: str 5572 :param limit: The maximum number of items in the result list. 5573 :type limit: int 5574 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 5575 :type cursor: str 5576 :param _request_timeout: timeout setting for this request. If one 5577 number provided, it will be total request 5578 timeout. It can also be a pair (tuple) of 5579 (connection, read) timeouts. 5580 :type _request_timeout: int, tuple(int, int), optional 5581 :param _request_auth: set to override the auth_settings for an a single 5582 request; this effectively ignores the 5583 authentication in the spec for a single request. 5584 :type _request_auth: dict, optional 5585 :param _content_type: force content-type for the request. 5586 :type _content_type: str, Optional 5587 :param _headers: set to override the headers for a single 5588 request; this effectively ignores the headers 5589 in the spec for a single request. 5590 :type _headers: dict, optional 5591 :param _host_index: set to override the host_index for a single 5592 request; this effectively ignores the host_index 5593 in the spec for a single request. 5594 :type _host_index: int, optional 5595 :return: Returns the result object. 5596 """ # noqa: E501 5597 5598 _param = self._get_all_cases_serialize( 5599 org_id=org_id, 5600 limit=limit, 5601 cursor=cursor, 5602 _request_auth=_request_auth, 5603 _content_type=_content_type, 5604 _headers=_headers, 5605 _host_index=_host_index, 5606 ) 5607 5608 _response_types_map: Dict[str, Optional[str]] = { 5609 "200": "PaginatedCaseResponse", 5610 "400": None, 5611 "401": None, 5612 "403": None, 5613 "404": None, 5614 "429": None, 5615 } 5616 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5617 response_data.read() 5618 return self.api_client.response_deserialize( 5619 response_data=response_data, 5620 response_types_map=_response_types_map, 5621 ).data
Get all cases
Retrieves the list of eDiscovery cases in an organization.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to retrieve the list of cases. (required) :type org_id: str :param limit: The maximum number of items in the result list. :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5682 @validate_call 5683 def get_all_legal_holds( 5684 self, 5685 org_id: Annotated[ 5686 str, 5687 Field( 5688 strict=True, 5689 description="The ID of the organization for which you want to retrieve the list of legal holds within a case.", 5690 ), 5691 ], 5692 case_id: Annotated[ 5693 str, 5694 Field( 5695 strict=True, description="The ID of the case for which you want to retrieve the list of legal holds." 5696 ), 5697 ], 5698 limit: Annotated[ 5699 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 5700 Field(description="The maximum number of items in the result list."), 5701 ] = None, 5702 cursor: Annotated[ 5703 Optional[StrictStr], 5704 Field( 5705 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 5706 ), 5707 ] = None, 5708 _request_timeout: Union[ 5709 None, 5710 Annotated[StrictFloat, Field(gt=0)], 5711 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5712 ] = None, 5713 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5714 _content_type: Optional[StrictStr] = None, 5715 _headers: Optional[Dict[StrictStr, Any]] = None, 5716 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5717 ) -> PaginatedLegalHoldResponse: 5718 """Get all legal holds within a case 5719 5720 Retrieves the list of all legal holds within a case for an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5721 5722 :param org_id: The ID of the organization for which you want to retrieve the list of legal holds within a case. (required) 5723 :type org_id: str 5724 :param case_id: The ID of the case for which you want to retrieve the list of legal holds. (required) 5725 :type case_id: str 5726 :param limit: The maximum number of items in the result list. 5727 :type limit: int 5728 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 5729 :type cursor: str 5730 :param _request_timeout: timeout setting for this request. If one 5731 number provided, it will be total request 5732 timeout. It can also be a pair (tuple) of 5733 (connection, read) timeouts. 5734 :type _request_timeout: int, tuple(int, int), optional 5735 :param _request_auth: set to override the auth_settings for an a single 5736 request; this effectively ignores the 5737 authentication in the spec for a single request. 5738 :type _request_auth: dict, optional 5739 :param _content_type: force content-type for the request. 5740 :type _content_type: str, Optional 5741 :param _headers: set to override the headers for a single 5742 request; this effectively ignores the headers 5743 in the spec for a single request. 5744 :type _headers: dict, optional 5745 :param _host_index: set to override the host_index for a single 5746 request; this effectively ignores the host_index 5747 in the spec for a single request. 5748 :type _host_index: int, optional 5749 :return: Returns the result object. 5750 """ # noqa: E501 5751 5752 _param = self._get_all_legal_holds_serialize( 5753 org_id=org_id, 5754 case_id=case_id, 5755 limit=limit, 5756 cursor=cursor, 5757 _request_auth=_request_auth, 5758 _content_type=_content_type, 5759 _headers=_headers, 5760 _host_index=_host_index, 5761 ) 5762 5763 _response_types_map: Dict[str, Optional[str]] = { 5764 "200": "PaginatedLegalHoldResponse", 5765 "400": None, 5766 "401": None, 5767 "403": None, 5768 "404": None, 5769 "429": None, 5770 } 5771 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5772 response_data.read() 5773 return self.api_client.response_deserialize( 5774 response_data=response_data, 5775 response_types_map=_response_types_map, 5776 ).data
Get all legal holds within a case
Retrieves the list of all legal holds within a case for an organization.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to retrieve the list of legal holds within a case. (required) :type org_id: str :param case_id: The ID of the case for which you want to retrieve the list of legal holds. (required) :type case_id: str :param limit: The maximum number of items in the result list. :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5840 @validate_call 5841 def get_case( 5842 self, 5843 org_id: Annotated[ 5844 str, 5845 Field( 5846 strict=True, 5847 description="The ID of the organization for which you want to retrieve the case information.", 5848 ), 5849 ], 5850 case_id: Annotated[str, Field(strict=True, description="The ID of the case you want to retrieve.")], 5851 _request_timeout: Union[ 5852 None, 5853 Annotated[StrictFloat, Field(gt=0)], 5854 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5855 ] = None, 5856 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5857 _content_type: Optional[StrictStr] = None, 5858 _headers: Optional[Dict[StrictStr, Any]] = None, 5859 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5860 ) -> CaseResponse: 5861 """Get case 5862 5863 Retrieves information about a case in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5864 5865 :param org_id: The ID of the organization for which you want to retrieve the case information. (required) 5866 :type org_id: str 5867 :param case_id: The ID of the case you want to retrieve. (required) 5868 :type case_id: str 5869 :param _request_timeout: timeout setting for this request. If one 5870 number provided, it will be total request 5871 timeout. It can also be a pair (tuple) of 5872 (connection, read) timeouts. 5873 :type _request_timeout: int, tuple(int, int), optional 5874 :param _request_auth: set to override the auth_settings for an a single 5875 request; this effectively ignores the 5876 authentication in the spec for a single request. 5877 :type _request_auth: dict, optional 5878 :param _content_type: force content-type for the request. 5879 :type _content_type: str, Optional 5880 :param _headers: set to override the headers for a single 5881 request; this effectively ignores the headers 5882 in the spec for a single request. 5883 :type _headers: dict, optional 5884 :param _host_index: set to override the host_index for a single 5885 request; this effectively ignores the host_index 5886 in the spec for a single request. 5887 :type _host_index: int, optional 5888 :return: Returns the result object. 5889 """ # noqa: E501 5890 5891 _param = self._get_case_serialize( 5892 org_id=org_id, 5893 case_id=case_id, 5894 _request_auth=_request_auth, 5895 _content_type=_content_type, 5896 _headers=_headers, 5897 _host_index=_host_index, 5898 ) 5899 5900 _response_types_map: Dict[str, Optional[str]] = { 5901 "200": "CaseResponse", 5902 "400": None, 5903 "401": None, 5904 "403": None, 5905 "404": None, 5906 "429": None, 5907 } 5908 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 5909 response_data.read() 5910 return self.api_client.response_deserialize( 5911 response_data=response_data, 5912 response_types_map=_response_types_map, 5913 ).data
Get case
Retrieves information about a case in an organization.
Required scope
organization:cases:managementRate limiting
Level 3Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to retrieve the case information. (required) :type org_id: str :param case_id: The ID of the case you want to retrieve. (required) :type case_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
5967 @validate_call 5968 def get_legal_hold( 5969 self, 5970 org_id: Annotated[ 5971 str, 5972 Field( 5973 strict=True, 5974 description="The ID of the organization for which you want to retrieve the legal hold information.", 5975 ), 5976 ], 5977 case_id: Annotated[ 5978 str, 5979 Field( 5980 strict=True, description="The ID of the case for which you want to retrieve the legal hold information." 5981 ), 5982 ], 5983 legal_hold_id: Annotated[str, Field(strict=True, description="The ID of the legal hold you want to retrieve.")], 5984 _request_timeout: Union[ 5985 None, 5986 Annotated[StrictFloat, Field(gt=0)], 5987 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 5988 ] = None, 5989 _request_auth: Optional[Dict[StrictStr, Any]] = None, 5990 _content_type: Optional[StrictStr] = None, 5991 _headers: Optional[Dict[StrictStr, Any]] = None, 5992 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 5993 ) -> LegalHoldResponse: 5994 """Get legal hold information 5995 5996 Retrieves information about a legal hold within a case for an organization. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 5997 5998 :param org_id: The ID of the organization for which you want to retrieve the legal hold information. (required) 5999 :type org_id: str 6000 :param case_id: The ID of the case for which you want to retrieve the legal hold information. (required) 6001 :type case_id: str 6002 :param legal_hold_id: The ID of the legal hold you want to retrieve. (required) 6003 :type legal_hold_id: str 6004 :param _request_timeout: timeout setting for this request. If one 6005 number provided, it will be total request 6006 timeout. It can also be a pair (tuple) of 6007 (connection, read) timeouts. 6008 :type _request_timeout: int, tuple(int, int), optional 6009 :param _request_auth: set to override the auth_settings for an a single 6010 request; this effectively ignores the 6011 authentication in the spec for a single request. 6012 :type _request_auth: dict, optional 6013 :param _content_type: force content-type for the request. 6014 :type _content_type: str, Optional 6015 :param _headers: set to override the headers for a single 6016 request; this effectively ignores the headers 6017 in the spec for a single request. 6018 :type _headers: dict, optional 6019 :param _host_index: set to override the host_index for a single 6020 request; this effectively ignores the host_index 6021 in the spec for a single request. 6022 :type _host_index: int, optional 6023 :return: Returns the result object. 6024 """ # noqa: E501 6025 6026 _param = self._get_legal_hold_serialize( 6027 org_id=org_id, 6028 case_id=case_id, 6029 legal_hold_id=legal_hold_id, 6030 _request_auth=_request_auth, 6031 _content_type=_content_type, 6032 _headers=_headers, 6033 _host_index=_host_index, 6034 ) 6035 6036 _response_types_map: Dict[str, Optional[str]] = { 6037 "200": "LegalHoldResponse", 6038 "400": None, 6039 "401": None, 6040 "403": None, 6041 "404": None, 6042 "429": None, 6043 } 6044 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6045 response_data.read() 6046 return self.api_client.response_deserialize( 6047 response_data=response_data, 6048 response_types_map=_response_types_map, 6049 ).data
Get legal hold information
Retrieves information about a legal hold within a case for an organization.
Required scope
organization:cases:managementRate limiting
Level 3Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to retrieve the legal hold information. (required) :type org_id: str :param case_id: The ID of the case for which you want to retrieve the legal hold information. (required) :type case_id: str :param legal_hold_id: The ID of the legal hold you want to retrieve. (required) :type legal_hold_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6106 @validate_call 6107 def get_legal_hold_content_items( 6108 self, 6109 org_id: Annotated[ 6110 str, 6111 Field( 6112 strict=True, 6113 description="The ID of the organization for which you want to retrieve the list of content items under hold.", 6114 ), 6115 ], 6116 case_id: Annotated[ 6117 str, 6118 Field( 6119 strict=True, 6120 description="The ID of the case for which you want to retrieve the list of content items under hold.", 6121 ), 6122 ], 6123 legal_hold_id: Annotated[ 6124 str, 6125 Field( 6126 strict=True, 6127 description="The ID of the legal hold for which you want to retrieve the list of content items under hold.", 6128 ), 6129 ], 6130 limit: Annotated[ 6131 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 6132 Field(description="The maximum number of items in the result list."), 6133 ] = None, 6134 cursor: Annotated[ 6135 Optional[StrictStr], 6136 Field( 6137 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 6138 ), 6139 ] = None, 6140 _request_timeout: Union[ 6141 None, 6142 Annotated[StrictFloat, Field(gt=0)], 6143 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6144 ] = None, 6145 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6146 _content_type: Optional[StrictStr] = None, 6147 _headers: Optional[Dict[StrictStr, Any]] = None, 6148 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6149 ) -> PaginatedLegalHoldContentItemsResponse: 6150 """Get content items under legal hold 6151 6152 Once a legal hold is in place you can review or explore the preserved Miro boards to ensure that all relevant data is intact and ready for legal proceedings or investigations. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/22120628583570-Review-boards-under-legal-hold\" target=_blank>Help Center page on reviewing boards under legal hold</a>. <br><br>This API lists all content items under a specific legal hold in a case for an organization. Please verify that the legal hold is in 'ACTIVE' state to guarantee that the legal hold has finished processing the full list of content items under hold. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 6153 6154 :param org_id: The ID of the organization for which you want to retrieve the list of content items under hold. (required) 6155 :type org_id: str 6156 :param case_id: The ID of the case for which you want to retrieve the list of content items under hold. (required) 6157 :type case_id: str 6158 :param legal_hold_id: The ID of the legal hold for which you want to retrieve the list of content items under hold. (required) 6159 :type legal_hold_id: str 6160 :param limit: The maximum number of items in the result list. 6161 :type limit: int 6162 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 6163 :type cursor: str 6164 :param _request_timeout: timeout setting for this request. If one 6165 number provided, it will be total request 6166 timeout. It can also be a pair (tuple) of 6167 (connection, read) timeouts. 6168 :type _request_timeout: int, tuple(int, int), optional 6169 :param _request_auth: set to override the auth_settings for an a single 6170 request; this effectively ignores the 6171 authentication in the spec for a single request. 6172 :type _request_auth: dict, optional 6173 :param _content_type: force content-type for the request. 6174 :type _content_type: str, Optional 6175 :param _headers: set to override the headers for a single 6176 request; this effectively ignores the headers 6177 in the spec for a single request. 6178 :type _headers: dict, optional 6179 :param _host_index: set to override the host_index for a single 6180 request; this effectively ignores the host_index 6181 in the spec for a single request. 6182 :type _host_index: int, optional 6183 :return: Returns the result object. 6184 """ # noqa: E501 6185 6186 _param = self._get_legal_hold_content_items_serialize( 6187 org_id=org_id, 6188 case_id=case_id, 6189 legal_hold_id=legal_hold_id, 6190 limit=limit, 6191 cursor=cursor, 6192 _request_auth=_request_auth, 6193 _content_type=_content_type, 6194 _headers=_headers, 6195 _host_index=_host_index, 6196 ) 6197 6198 _response_types_map: Dict[str, Optional[str]] = { 6199 "200": "PaginatedLegalHoldContentItemsResponse", 6200 "400": None, 6201 "401": None, 6202 "403": None, 6203 "404": None, 6204 "429": None, 6205 } 6206 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6207 response_data.read() 6208 return self.api_client.response_deserialize( 6209 response_data=response_data, 6210 response_types_map=_response_types_map, 6211 ).data
Get content items under legal hold
Once a legal hold is in place you can review or explore the preserved Miro boards to ensure that all relevant data is intact and ready for legal proceedings or investigations. For more information, see our Help Center page on reviewing boards under legal hold.
This API lists all content items under a specific legal hold in a case for an organization. Please verify that the legal hold is in 'ACTIVE' state to guarantee that the legal hold has finished processing the full list of content items under hold.
Required scope
organization:cases:managementRate limiting
Level 3Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to retrieve the list of content items under hold. (required) :type org_id: str :param case_id: The ID of the case for which you want to retrieve the list of content items under hold. (required) :type case_id: str :param legal_hold_id: The ID of the legal hold for which you want to retrieve the list of content items under hold. (required) :type legal_hold_id: str :param limit: The maximum number of items in the result list. :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6278 @validate_call 6279 def get_legal_hold_export_jobs( 6280 self, 6281 org_id: Annotated[ 6282 str, 6283 Field( 6284 strict=True, 6285 description="The ID of the organization for which you want to retrieve the list of export jobs within a case.", 6286 ), 6287 ], 6288 case_id: Annotated[ 6289 str, 6290 Field( 6291 strict=True, description="The ID of the case for which you want to retrieve the list of export jobs." 6292 ), 6293 ], 6294 limit: Annotated[ 6295 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 6296 Field(description="The maximum number of items in the result list."), 6297 ] = None, 6298 cursor: Annotated[ 6299 Optional[StrictStr], 6300 Field( 6301 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. " 6302 ), 6303 ] = None, 6304 _request_timeout: Union[ 6305 None, 6306 Annotated[StrictFloat, Field(gt=0)], 6307 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6308 ] = None, 6309 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6310 _content_type: Optional[StrictStr] = None, 6311 _headers: Optional[Dict[StrictStr, Any]] = None, 6312 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6313 ) -> PaginatedCaseExportJobsResponse: 6314 """Get board export jobs of a case 6315 6316 Retrieves board export jobs for a case.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organization:cases:management</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise Guard only</h3> <p>This API is available only for Enterprise plan users with the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15699815402514-Enterprise-Guard-overview\">Enterprise Guard add-on</a>. You can only use this endpoint if you have both the Company Admin and <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/15695755655954-Understand-admin-roles-and-their-privileges#01JARF6KM8ATNT6YDMGD7GMYJN\">eDiscovery Admin</a> roles. 6317 6318 :param org_id: The ID of the organization for which you want to retrieve the list of export jobs within a case. (required) 6319 :type org_id: str 6320 :param case_id: The ID of the case for which you want to retrieve the list of export jobs. (required) 6321 :type case_id: str 6322 :param limit: The maximum number of items in the result list. 6323 :type limit: int 6324 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 6325 :type cursor: str 6326 :param _request_timeout: timeout setting for this request. If one 6327 number provided, it will be total request 6328 timeout. It can also be a pair (tuple) of 6329 (connection, read) timeouts. 6330 :type _request_timeout: int, tuple(int, int), optional 6331 :param _request_auth: set to override the auth_settings for an a single 6332 request; this effectively ignores the 6333 authentication in the spec for a single request. 6334 :type _request_auth: dict, optional 6335 :param _content_type: force content-type for the request. 6336 :type _content_type: str, Optional 6337 :param _headers: set to override the headers for a single 6338 request; this effectively ignores the headers 6339 in the spec for a single request. 6340 :type _headers: dict, optional 6341 :param _host_index: set to override the host_index for a single 6342 request; this effectively ignores the host_index 6343 in the spec for a single request. 6344 :type _host_index: int, optional 6345 :return: Returns the result object. 6346 """ # noqa: E501 6347 6348 _param = self._get_legal_hold_export_jobs_serialize( 6349 org_id=org_id, 6350 case_id=case_id, 6351 limit=limit, 6352 cursor=cursor, 6353 _request_auth=_request_auth, 6354 _content_type=_content_type, 6355 _headers=_headers, 6356 _host_index=_host_index, 6357 ) 6358 6359 _response_types_map: Dict[str, Optional[str]] = { 6360 "200": "PaginatedCaseExportJobsResponse", 6361 "400": None, 6362 "401": None, 6363 "403": None, 6364 "404": None, 6365 "429": None, 6366 } 6367 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6368 response_data.read() 6369 return self.api_client.response_deserialize( 6370 response_data=response_data, 6371 response_types_map=_response_types_map, 6372 ).data
Get board export jobs of a case
Retrieves board export jobs for a case.
Required scope
organization:cases:managementRate limiting
Level 4Enterprise Guard only
This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
:param org_id: The ID of the organization for which you want to retrieve the list of export jobs within a case. (required) :type org_id: str :param case_id: The ID of the case for which you want to retrieve the list of export jobs. (required) :type case_id: str :param limit: The maximum number of items in the result list. :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6436 @validate_call 6437 def create_mindmap_nodes_experimental( 6438 self, 6439 board_id: Annotated[ 6440 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 6441 ], 6442 mindmap_create_request: MindmapCreateRequest, 6443 _request_timeout: Union[ 6444 None, 6445 Annotated[StrictFloat, Field(gt=0)], 6446 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6447 ] = None, 6448 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6449 _content_type: Optional[StrictStr] = None, 6450 _headers: Optional[Dict[StrictStr, Any]] = None, 6451 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6452 ) -> MindmapItem: 6453 """Create mind map node 6454 6455 Adds a mind map node to a board. A root node is the starting point of a mind map. A node that is created under a root node is a child node. For information on mind maps, use cases, mind map structure, and more, see the <a href=\"https://developers.miro.com/docs/mind-maps\" target=_blank>Mind Map Overview</a> page. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/><br/> <b>Known limitations on node placement: </b> Currently, the create API supports explicit positions for nodes. This means that users can only place nodes based on the x, y coordinates provided in the position parameters. If the position is not provided in the request, nodes default to coordinates x=0, y=0, effectively placing them at the center of the board. <br /><br /><b>Upcoming changes:</b> We understand the importance of flexibility in node placement. We are actively working on implementing changes to support positioning nodes relative to their parent node as well. This enhancement offers a more dynamic and intuitive mind mapping experience. <br /><br />Additionally, we are actively working on providing the update API, further enhancing the functionality of mind map APIs. 6456 6457 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 6458 :type board_id: str 6459 :param mindmap_create_request: (required) 6460 :type mindmap_create_request: MindmapCreateRequest 6461 :param _request_timeout: timeout setting for this request. If one 6462 number provided, it will be total request 6463 timeout. It can also be a pair (tuple) of 6464 (connection, read) timeouts. 6465 :type _request_timeout: int, tuple(int, int), optional 6466 :param _request_auth: set to override the auth_settings for an a single 6467 request; this effectively ignores the 6468 authentication in the spec for a single request. 6469 :type _request_auth: dict, optional 6470 :param _content_type: force content-type for the request. 6471 :type _content_type: str, Optional 6472 :param _headers: set to override the headers for a single 6473 request; this effectively ignores the headers 6474 in the spec for a single request. 6475 :type _headers: dict, optional 6476 :param _host_index: set to override the host_index for a single 6477 request; this effectively ignores the host_index 6478 in the spec for a single request. 6479 :type _host_index: int, optional 6480 :return: Returns the result object. 6481 """ # noqa: E501 6482 6483 _param = self._create_mindmap_nodes_experimental_serialize( 6484 board_id=board_id, 6485 mindmap_create_request=mindmap_create_request, 6486 _request_auth=_request_auth, 6487 _content_type=_content_type, 6488 _headers=_headers, 6489 _host_index=_host_index, 6490 ) 6491 6492 _response_types_map: Dict[str, Optional[str]] = { 6493 "201": "MindmapItem", 6494 "400": "CreateFrameItem400Response", 6495 "404": "CreateFrameItem400Response", 6496 "429": "CreateFrameItem400Response", 6497 } 6498 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6499 response_data.read() 6500 return self.api_client.response_deserialize( 6501 response_data=response_data, 6502 response_types_map=_response_types_map, 6503 ).data
Create mind map node
Adds a mind map node to a board. A root node is the starting point of a mind map. A node that is created under a root node is a child node. For information on mind maps, use cases, mind map structure, and more, see the Mind Map Overview page.
Required scope
boards:writeRate limiting
Level 2Known limitations on node placement: Currently, the create API supports explicit positions for nodes. This means that users can only place nodes based on the x, y coordinates provided in the position parameters. If the position is not provided in the request, nodes default to coordinates x=0, y=0, effectively placing them at the center of the board.
Upcoming changes: We understand the importance of flexibility in node placement. We are actively working on implementing changes to support positioning nodes relative to their parent node as well. This enhancement offers a more dynamic and intuitive mind mapping experience.
Additionally, we are actively working on providing the update API, further enhancing the functionality of mind map APIs.
:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param mindmap_create_request: (required) :type mindmap_create_request: MindmapCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6565 @validate_call 6566 def delete_mindmap_node_experimental( 6567 self, 6568 board_id: Annotated[ 6569 StrictStr, 6570 Field(description="Unique identifier (ID) of the board from which you want to delete the mind map node."), 6571 ], 6572 item_id: Annotated[ 6573 StrictStr, Field(description="Unique identifier (ID) of the mind map node that you want to delete.") 6574 ], 6575 _request_timeout: Union[ 6576 None, 6577 Annotated[StrictFloat, Field(gt=0)], 6578 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6579 ] = None, 6580 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6581 _content_type: Optional[StrictStr] = None, 6582 _headers: Optional[Dict[StrictStr, Any]] = None, 6583 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6584 ) -> object: 6585 """Delete mind map node 6586 6587 Deletes a mind map node item and its child nodes from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 6588 6589 :param board_id: Unique identifier (ID) of the board from which you want to delete the mind map node. (required) 6590 :type board_id: str 6591 :param item_id: Unique identifier (ID) of the mind map node that you want to delete. (required) 6592 :type item_id: str 6593 :param _request_timeout: timeout setting for this request. If one 6594 number provided, it will be total request 6595 timeout. It can also be a pair (tuple) of 6596 (connection, read) timeouts. 6597 :type _request_timeout: int, tuple(int, int), optional 6598 :param _request_auth: set to override the auth_settings for an a single 6599 request; this effectively ignores the 6600 authentication in the spec for a single request. 6601 :type _request_auth: dict, optional 6602 :param _content_type: force content-type for the request. 6603 :type _content_type: str, Optional 6604 :param _headers: set to override the headers for a single 6605 request; this effectively ignores the headers 6606 in the spec for a single request. 6607 :type _headers: dict, optional 6608 :param _host_index: set to override the host_index for a single 6609 request; this effectively ignores the host_index 6610 in the spec for a single request. 6611 :type _host_index: int, optional 6612 :return: Returns the result object. 6613 """ # noqa: E501 6614 6615 _param = self._delete_mindmap_node_experimental_serialize( 6616 board_id=board_id, 6617 item_id=item_id, 6618 _request_auth=_request_auth, 6619 _content_type=_content_type, 6620 _headers=_headers, 6621 _host_index=_host_index, 6622 ) 6623 6624 _response_types_map: Dict[str, Optional[str]] = { 6625 "204": "object", 6626 "400": "CreateFrameItem400Response", 6627 "404": "CreateFrameItem400Response", 6628 "429": "CreateFrameItem400Response", 6629 } 6630 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6631 response_data.read() 6632 return self.api_client.response_deserialize( 6633 response_data=response_data, 6634 response_types_map=_response_types_map, 6635 ).data
Delete mind map node
Deletes a mind map node item and its child nodes from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the mind map node. (required) :type board_id: str :param item_id: Unique identifier (ID) of the mind map node that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6689 @validate_call 6690 def get_mindmap_node_experimental( 6691 self, 6692 board_id: Annotated[ 6693 StrictStr, 6694 Field(description="Unique identifier (ID) of the board from which you want to retrieve a mind map node."), 6695 ], 6696 item_id: Annotated[ 6697 StrictStr, Field(description="Unique identifier (ID) of the mind map node that you want to retrieve.") 6698 ], 6699 _request_timeout: Union[ 6700 None, 6701 Annotated[StrictFloat, Field(gt=0)], 6702 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6703 ] = None, 6704 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6705 _content_type: Optional[StrictStr] = None, 6706 _headers: Optional[Dict[StrictStr, Any]] = None, 6707 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6708 ) -> MindmapItem: 6709 """Get specific mind map node 6710 6711 Retrieves information for a specific mind map node on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 6712 6713 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a mind map node. (required) 6714 :type board_id: str 6715 :param item_id: Unique identifier (ID) of the mind map node that you want to retrieve. (required) 6716 :type item_id: str 6717 :param _request_timeout: timeout setting for this request. If one 6718 number provided, it will be total request 6719 timeout. It can also be a pair (tuple) of 6720 (connection, read) timeouts. 6721 :type _request_timeout: int, tuple(int, int), optional 6722 :param _request_auth: set to override the auth_settings for an a single 6723 request; this effectively ignores the 6724 authentication in the spec for a single request. 6725 :type _request_auth: dict, optional 6726 :param _content_type: force content-type for the request. 6727 :type _content_type: str, Optional 6728 :param _headers: set to override the headers for a single 6729 request; this effectively ignores the headers 6730 in the spec for a single request. 6731 :type _headers: dict, optional 6732 :param _host_index: set to override the host_index for a single 6733 request; this effectively ignores the host_index 6734 in the spec for a single request. 6735 :type _host_index: int, optional 6736 :return: Returns the result object. 6737 """ # noqa: E501 6738 6739 _param = self._get_mindmap_node_experimental_serialize( 6740 board_id=board_id, 6741 item_id=item_id, 6742 _request_auth=_request_auth, 6743 _content_type=_content_type, 6744 _headers=_headers, 6745 _host_index=_host_index, 6746 ) 6747 6748 _response_types_map: Dict[str, Optional[str]] = { 6749 "200": "MindmapItem", 6750 } 6751 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6752 response_data.read() 6753 return self.api_client.response_deserialize( 6754 response_data=response_data, 6755 response_types_map=_response_types_map, 6756 ).data
Get specific mind map node
Retrieves information for a specific mind map node on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a mind map node. (required) :type board_id: str :param item_id: Unique identifier (ID) of the mind map node that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6810 @validate_call 6811 def get_mindmap_nodes_experimental( 6812 self, 6813 board_id: Annotated[ 6814 StrictStr, 6815 Field(description="Unique identifier (ID) of the board from which you want to retrieve mind map nodes."), 6816 ], 6817 limit: Annotated[Optional[StrictStr], Field(description="Maximum number of results returned")] = None, 6818 cursor: Annotated[ 6819 Optional[StrictStr], Field(description="Points to the next portion of the results set") 6820 ] = None, 6821 _request_timeout: Union[ 6822 None, 6823 Annotated[StrictFloat, Field(gt=0)], 6824 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6825 ] = None, 6826 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6827 _content_type: Optional[StrictStr] = None, 6828 _headers: Optional[Dict[StrictStr, Any]] = None, 6829 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6830 ) -> MindmapCursorPaged: 6831 """Get mind map nodes 6832 6833 Retrieves a list of mind map nodes for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 6834 6835 :param board_id: Unique identifier (ID) of the board from which you want to retrieve mind map nodes. (required) 6836 :type board_id: str 6837 :param limit: Maximum number of results returned 6838 :type limit: str 6839 :param cursor: Points to the next portion of the results set 6840 :type cursor: str 6841 :param _request_timeout: timeout setting for this request. If one 6842 number provided, it will be total request 6843 timeout. It can also be a pair (tuple) of 6844 (connection, read) timeouts. 6845 :type _request_timeout: int, tuple(int, int), optional 6846 :param _request_auth: set to override the auth_settings for an a single 6847 request; this effectively ignores the 6848 authentication in the spec for a single request. 6849 :type _request_auth: dict, optional 6850 :param _content_type: force content-type for the request. 6851 :type _content_type: str, Optional 6852 :param _headers: set to override the headers for a single 6853 request; this effectively ignores the headers 6854 in the spec for a single request. 6855 :type _headers: dict, optional 6856 :param _host_index: set to override the host_index for a single 6857 request; this effectively ignores the host_index 6858 in the spec for a single request. 6859 :type _host_index: int, optional 6860 :return: Returns the result object. 6861 """ # noqa: E501 6862 6863 _param = self._get_mindmap_nodes_experimental_serialize( 6864 board_id=board_id, 6865 limit=limit, 6866 cursor=cursor, 6867 _request_auth=_request_auth, 6868 _content_type=_content_type, 6869 _headers=_headers, 6870 _host_index=_host_index, 6871 ) 6872 6873 _response_types_map: Dict[str, Optional[str]] = { 6874 "200": "MindmapCursorPaged", 6875 } 6876 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6877 response_data.read() 6878 return self.api_client.response_deserialize( 6879 response_data=response_data, 6880 response_types_map=_response_types_map, 6881 ).data
Get mind map nodes
Retrieves a list of mind map nodes for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request. For example, if you set the limit query parameter to 10 and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id: Unique identifier (ID) of the board from which you want to retrieve mind map nodes. (required) :type board_id: str :param limit: Maximum number of results returned :type limit: str :param cursor: Points to the next portion of the results set :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
6942 @validate_call 6943 def revoke_token_v2( 6944 self, 6945 revoke_token_request: RevokeTokenRequest, 6946 _request_timeout: Union[ 6947 None, 6948 Annotated[StrictFloat, Field(gt=0)], 6949 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 6950 ] = None, 6951 _request_auth: Optional[Dict[StrictStr, Any]] = None, 6952 _content_type: Optional[StrictStr] = None, 6953 _headers: Optional[Dict[StrictStr, Any]] = None, 6954 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 6955 ) -> None: 6956 """Revoke token (v2) 6957 6958 Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user. 6959 6960 :param revoke_token_request: (required) 6961 :type revoke_token_request: RevokeTokenRequest 6962 :param _request_timeout: timeout setting for this request. If one 6963 number provided, it will be total request 6964 timeout. It can also be a pair (tuple) of 6965 (connection, read) timeouts. 6966 :type _request_timeout: int, tuple(int, int), optional 6967 :param _request_auth: set to override the auth_settings for an a single 6968 request; this effectively ignores the 6969 authentication in the spec for a single request. 6970 :type _request_auth: dict, optional 6971 :param _content_type: force content-type for the request. 6972 :type _content_type: str, Optional 6973 :param _headers: set to override the headers for a single 6974 request; this effectively ignores the headers 6975 in the spec for a single request. 6976 :type _headers: dict, optional 6977 :param _host_index: set to override the host_index for a single 6978 request; this effectively ignores the host_index 6979 in the spec for a single request. 6980 :type _host_index: int, optional 6981 :return: Returns the result object. 6982 """ # noqa: E501 6983 6984 _param = self._revoke_token_v2_serialize( 6985 revoke_token_request=revoke_token_request, 6986 _request_auth=_request_auth, 6987 _content_type=_content_type, 6988 _headers=_headers, 6989 _host_index=_host_index, 6990 ) 6991 6992 _response_types_map: Dict[str, Optional[str]] = { 6993 "204": None, 6994 "404": "ErrorResponse", 6995 } 6996 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 6997 response_data.read() 6998 return self.api_client.response_deserialize( 6999 response_data=response_data, 7000 response_types_map=_response_types_map, 7001 ).data
Revoke token (v2)
Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user.
:param revoke_token_request: (required) :type revoke_token_request: RevokeTokenRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7060 @validate_call 7061 def enterprise_get_organization_member( 7062 self, 7063 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7064 member_id: Annotated[StrictStr, Field(description="id of the organization member")], 7065 _request_timeout: Union[ 7066 None, 7067 Annotated[StrictFloat, Field(gt=0)], 7068 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7069 ] = None, 7070 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7071 _content_type: Optional[StrictStr] = None, 7072 _headers: Optional[Dict[StrictStr, Any]] = None, 7073 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7074 ) -> OrganizationMember: 7075 """Get organization member 7076 7077 Retrieves organization member information for an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7078 7079 :param org_id: id of the organization (required) 7080 :type org_id: str 7081 :param member_id: id of the organization member (required) 7082 :type member_id: str 7083 :param _request_timeout: timeout setting for this request. If one 7084 number provided, it will be total request 7085 timeout. It can also be a pair (tuple) of 7086 (connection, read) timeouts. 7087 :type _request_timeout: int, tuple(int, int), optional 7088 :param _request_auth: set to override the auth_settings for an a single 7089 request; this effectively ignores the 7090 authentication in the spec for a single request. 7091 :type _request_auth: dict, optional 7092 :param _content_type: force content-type for the request. 7093 :type _content_type: str, Optional 7094 :param _headers: set to override the headers for a single 7095 request; this effectively ignores the headers 7096 in the spec for a single request. 7097 :type _headers: dict, optional 7098 :param _host_index: set to override the host_index for a single 7099 request; this effectively ignores the host_index 7100 in the spec for a single request. 7101 :type _host_index: int, optional 7102 :return: Returns the result object. 7103 """ # noqa: E501 7104 7105 _param = self._enterprise_get_organization_member_serialize( 7106 org_id=org_id, 7107 member_id=member_id, 7108 _request_auth=_request_auth, 7109 _content_type=_content_type, 7110 _headers=_headers, 7111 _host_index=_host_index, 7112 ) 7113 7114 _response_types_map: Dict[str, Optional[str]] = { 7115 "200": "OrganizationMember", 7116 "400": None, 7117 "401": None, 7118 "403": None, 7119 "404": None, 7120 "409": None, 7121 "429": None, 7122 } 7123 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7124 response_data.read() 7125 return self.api_client.response_deserialize( 7126 response_data=response_data, 7127 response_types_map=_response_types_map, 7128 ).data
Get organization member
Retrieves organization member information for an existing organization.
Required scope
organizations:readRate limiting
Level 3Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param member_id: id of the organization member (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7182 @validate_call 7183 def enterprise_get_organization_members( 7184 self, 7185 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7186 emails: Optional[StrictStr] = None, 7187 role: Optional[StrictStr] = None, 7188 license: Optional[StrictStr] = None, 7189 active: Optional[StrictBool] = None, 7190 cursor: Optional[StrictStr] = None, 7191 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 7192 _request_timeout: Union[ 7193 None, 7194 Annotated[StrictFloat, Field(gt=0)], 7195 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7196 ] = None, 7197 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7198 _content_type: Optional[StrictStr] = None, 7199 _headers: Optional[Dict[StrictStr, Any]] = None, 7200 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7201 ) -> EnterpriseGetOrganizationMembers200Response: 7202 """Get organization members 7203 7204 Retrieves organization members based on the organization ID and the cursor, or based on the user emails provided in the request.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7205 7206 :param org_id: id of the organization (required) 7207 :type org_id: str 7208 :param emails: 7209 :type emails: str 7210 :param role: 7211 :type role: str 7212 :param license: 7213 :type license: str 7214 :param active: 7215 :type active: bool 7216 :param cursor: 7217 :type cursor: str 7218 :param limit: 7219 :type limit: int 7220 :param _request_timeout: timeout setting for this request. If one 7221 number provided, it will be total request 7222 timeout. It can also be a pair (tuple) of 7223 (connection, read) timeouts. 7224 :type _request_timeout: int, tuple(int, int), optional 7225 :param _request_auth: set to override the auth_settings for an a single 7226 request; this effectively ignores the 7227 authentication in the spec for a single request. 7228 :type _request_auth: dict, optional 7229 :param _content_type: force content-type for the request. 7230 :type _content_type: str, Optional 7231 :param _headers: set to override the headers for a single 7232 request; this effectively ignores the headers 7233 in the spec for a single request. 7234 :type _headers: dict, optional 7235 :param _host_index: set to override the host_index for a single 7236 request; this effectively ignores the host_index 7237 in the spec for a single request. 7238 :type _host_index: int, optional 7239 :return: Returns the result object. 7240 """ # noqa: E501 7241 7242 _param = self._enterprise_get_organization_members_serialize( 7243 org_id=org_id, 7244 emails=emails, 7245 role=role, 7246 license=license, 7247 active=active, 7248 cursor=cursor, 7249 limit=limit, 7250 _request_auth=_request_auth, 7251 _content_type=_content_type, 7252 _headers=_headers, 7253 _host_index=_host_index, 7254 ) 7255 7256 _response_types_map: Dict[str, Optional[str]] = { 7257 "200": "EnterpriseGetOrganizationMembers200Response", 7258 "400": None, 7259 "401": None, 7260 "403": None, 7261 "404": None, 7262 "409": None, 7263 "429": None, 7264 } 7265 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7266 response_data.read() 7267 return self.api_client.response_deserialize( 7268 response_data=response_data, 7269 response_types_map=_response_types_map, 7270 ).data
Get organization members
Retrieves organization members based on the organization ID and the cursor, or based on the user emails provided in the request.
Required scope
organizations:readRate limiting
Level 3Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param emails: :type emails: str :param role: :type role: str :param license: :type license: str :param active: :type active: bool :param cursor: :type cursor: str :param limit: :type limit: int :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7351 @validate_call 7352 def enterprise_get_organization( 7353 self, 7354 org_id: Annotated[StrictStr, Field(description="id of the organization")], 7355 _request_timeout: Union[ 7356 None, 7357 Annotated[StrictFloat, Field(gt=0)], 7358 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7359 ] = None, 7360 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7361 _content_type: Optional[StrictStr] = None, 7362 _headers: Optional[Dict[StrictStr, Any]] = None, 7363 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7364 ) -> Organization: 7365 """Get organization info 7366 7367 Retrieves organization information.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7368 7369 :param org_id: id of the organization (required) 7370 :type org_id: str 7371 :param _request_timeout: timeout setting for this request. If one 7372 number provided, it will be total request 7373 timeout. It can also be a pair (tuple) of 7374 (connection, read) timeouts. 7375 :type _request_timeout: int, tuple(int, int), optional 7376 :param _request_auth: set to override the auth_settings for an a single 7377 request; this effectively ignores the 7378 authentication in the spec for a single request. 7379 :type _request_auth: dict, optional 7380 :param _content_type: force content-type for the request. 7381 :type _content_type: str, Optional 7382 :param _headers: set to override the headers for a single 7383 request; this effectively ignores the headers 7384 in the spec for a single request. 7385 :type _headers: dict, optional 7386 :param _host_index: set to override the host_index for a single 7387 request; this effectively ignores the host_index 7388 in the spec for a single request. 7389 :type _host_index: int, optional 7390 :return: Returns the result object. 7391 """ # noqa: E501 7392 7393 _param = self._enterprise_get_organization_serialize( 7394 org_id=org_id, 7395 _request_auth=_request_auth, 7396 _content_type=_content_type, 7397 _headers=_headers, 7398 _host_index=_host_index, 7399 ) 7400 7401 _response_types_map: Dict[str, Optional[str]] = { 7402 "200": "Organization", 7403 "400": None, 7404 "401": None, 7405 "403": None, 7406 "404": None, 7407 "409": None, 7408 "429": None, 7409 } 7410 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7411 response_data.read() 7412 return self.api_client.response_deserialize( 7413 response_data=response_data, 7414 response_types_map=_response_types_map, 7415 ).data
Get organization info
Retrieves organization information.
Required scope
organizations:readRate limiting
Level 3Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: id of the organization (required) :type org_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7466 @validate_call 7467 def enterprise_add_project_member( 7468 self, 7469 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7470 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7471 project_id: Annotated[StrictStr, Field(description="The ID of the project to which you want to add a user.")], 7472 add_project_member_request: AddProjectMemberRequest, 7473 _request_timeout: Union[ 7474 None, 7475 Annotated[StrictFloat, Field(gt=0)], 7476 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7477 ] = None, 7478 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7479 _content_type: Optional[StrictStr] = None, 7480 _headers: Optional[Dict[StrictStr, Any]] = None, 7481 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7482 ) -> ProjectMember: 7483 """Add member in a project 7484 7485 Add a Miro user to a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7486 7487 :param org_id: The ID of the organization to which the project belongs. (required) 7488 :type org_id: str 7489 :param team_id: The ID of the team to which the project belongs. (required) 7490 :type team_id: str 7491 :param project_id: The ID of the project to which you want to add a user. (required) 7492 :type project_id: str 7493 :param add_project_member_request: (required) 7494 :type add_project_member_request: AddProjectMemberRequest 7495 :param _request_timeout: timeout setting for this request. If one 7496 number provided, it will be total request 7497 timeout. It can also be a pair (tuple) of 7498 (connection, read) timeouts. 7499 :type _request_timeout: int, tuple(int, int), optional 7500 :param _request_auth: set to override the auth_settings for an a single 7501 request; this effectively ignores the 7502 authentication in the spec for a single request. 7503 :type _request_auth: dict, optional 7504 :param _content_type: force content-type for the request. 7505 :type _content_type: str, Optional 7506 :param _headers: set to override the headers for a single 7507 request; this effectively ignores the headers 7508 in the spec for a single request. 7509 :type _headers: dict, optional 7510 :param _host_index: set to override the host_index for a single 7511 request; this effectively ignores the host_index 7512 in the spec for a single request. 7513 :type _host_index: int, optional 7514 :return: Returns the result object. 7515 """ # noqa: E501 7516 7517 _param = self._enterprise_add_project_member_serialize( 7518 org_id=org_id, 7519 team_id=team_id, 7520 project_id=project_id, 7521 add_project_member_request=add_project_member_request, 7522 _request_auth=_request_auth, 7523 _content_type=_content_type, 7524 _headers=_headers, 7525 _host_index=_host_index, 7526 ) 7527 7528 _response_types_map: Dict[str, Optional[str]] = { 7529 "201": "ProjectMember", 7530 "400": "Error400", 7531 "401": "Error401", 7532 "403": "Error403", 7533 "404": "Error404", 7534 "409": "Error409", 7535 "429": "Error429", 7536 } 7537 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7538 response_data.read() 7539 return self.api_client.response_deserialize( 7540 response_data=response_data, 7541 response_types_map=_response_types_map, 7542 ).data
Add member in a project
Add a Miro user to a project.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project belongs. (required) :type team_id: str :param project_id: The ID of the project to which you want to add a user. (required) :type project_id: str :param add_project_member_request: (required) :type add_project_member_request: AddProjectMemberRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7610 @validate_call 7611 def enterprise_delete_project_member( 7612 self, 7613 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7614 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7615 project_id: Annotated[ 7616 StrictStr, Field(description="The ID of the project from which you want to remove a member.") 7617 ], 7618 member_id: Annotated[ 7619 StrictStr, Field(description="The ID of the member that you want to remove from a project.") 7620 ], 7621 _request_timeout: Union[ 7622 None, 7623 Annotated[StrictFloat, Field(gt=0)], 7624 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7625 ] = None, 7626 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7627 _content_type: Optional[StrictStr] = None, 7628 _headers: Optional[Dict[StrictStr, Any]] = None, 7629 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7630 ) -> None: 7631 """Remove project member 7632 7633 Remove a member from a project. The user remains in the team even after the member is removed from a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7634 7635 :param org_id: The ID of the organization to which the project belongs. (required) 7636 :type org_id: str 7637 :param team_id: The ID of the team to which the project belongs. (required) 7638 :type team_id: str 7639 :param project_id: The ID of the project from which you want to remove a member. (required) 7640 :type project_id: str 7641 :param member_id: The ID of the member that you want to remove from a project. (required) 7642 :type member_id: str 7643 :param _request_timeout: timeout setting for this request. If one 7644 number provided, it will be total request 7645 timeout. It can also be a pair (tuple) of 7646 (connection, read) timeouts. 7647 :type _request_timeout: int, tuple(int, int), optional 7648 :param _request_auth: set to override the auth_settings for an a single 7649 request; this effectively ignores the 7650 authentication in the spec for a single request. 7651 :type _request_auth: dict, optional 7652 :param _content_type: force content-type for the request. 7653 :type _content_type: str, Optional 7654 :param _headers: set to override the headers for a single 7655 request; this effectively ignores the headers 7656 in the spec for a single request. 7657 :type _headers: dict, optional 7658 :param _host_index: set to override the host_index for a single 7659 request; this effectively ignores the host_index 7660 in the spec for a single request. 7661 :type _host_index: int, optional 7662 :return: Returns the result object. 7663 """ # noqa: E501 7664 7665 _param = self._enterprise_delete_project_member_serialize( 7666 org_id=org_id, 7667 team_id=team_id, 7668 project_id=project_id, 7669 member_id=member_id, 7670 _request_auth=_request_auth, 7671 _content_type=_content_type, 7672 _headers=_headers, 7673 _host_index=_host_index, 7674 ) 7675 7676 _response_types_map: Dict[str, Optional[str]] = { 7677 "204": None, 7678 "400": "Error400", 7679 "401": "Error401", 7680 "403": "Error403", 7681 "404": "Error404", 7682 "409": "Error409", 7683 "429": "Error429", 7684 } 7685 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7686 response_data.read() 7687 return self.api_client.response_deserialize( 7688 response_data=response_data, 7689 response_types_map=_response_types_map, 7690 ).data
Remove project member
Remove a member from a project. The user remains in the team even after the member is removed from a project.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project belongs. (required) :type team_id: str :param project_id: The ID of the project from which you want to remove a member. (required) :type project_id: str :param member_id: The ID of the member that you want to remove from a project. (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7750 @validate_call 7751 def enterprise_get_project_member( 7752 self, 7753 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7754 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7755 project_id: Annotated[ 7756 StrictStr, 7757 Field(description="The ID of the project from which you want to retrieve specific member information."), 7758 ], 7759 member_id: Annotated[ 7760 StrictStr, Field(description="The ID of the member for which you want to retrieve information.") 7761 ], 7762 _request_timeout: Union[ 7763 None, 7764 Annotated[StrictFloat, Field(gt=0)], 7765 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7766 ] = None, 7767 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7768 _content_type: Optional[StrictStr] = None, 7769 _headers: Optional[Dict[StrictStr, Any]] = None, 7770 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7771 ) -> ProjectMember: 7772 """Get project member 7773 7774 Retrieves information for a specific project member.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7775 7776 :param org_id: The ID of the organization to which the project belongs. (required) 7777 :type org_id: str 7778 :param team_id: The ID of the team to which the project belongs. (required) 7779 :type team_id: str 7780 :param project_id: The ID of the project from which you want to retrieve specific member information. (required) 7781 :type project_id: str 7782 :param member_id: The ID of the member for which you want to retrieve information. (required) 7783 :type member_id: str 7784 :param _request_timeout: timeout setting for this request. If one 7785 number provided, it will be total request 7786 timeout. It can also be a pair (tuple) of 7787 (connection, read) timeouts. 7788 :type _request_timeout: int, tuple(int, int), optional 7789 :param _request_auth: set to override the auth_settings for an a single 7790 request; this effectively ignores the 7791 authentication in the spec for a single request. 7792 :type _request_auth: dict, optional 7793 :param _content_type: force content-type for the request. 7794 :type _content_type: str, Optional 7795 :param _headers: set to override the headers for a single 7796 request; this effectively ignores the headers 7797 in the spec for a single request. 7798 :type _headers: dict, optional 7799 :param _host_index: set to override the host_index for a single 7800 request; this effectively ignores the host_index 7801 in the spec for a single request. 7802 :type _host_index: int, optional 7803 :return: Returns the result object. 7804 """ # noqa: E501 7805 7806 _param = self._enterprise_get_project_member_serialize( 7807 org_id=org_id, 7808 team_id=team_id, 7809 project_id=project_id, 7810 member_id=member_id, 7811 _request_auth=_request_auth, 7812 _content_type=_content_type, 7813 _headers=_headers, 7814 _host_index=_host_index, 7815 ) 7816 7817 _response_types_map: Dict[str, Optional[str]] = { 7818 "200": "ProjectMember", 7819 "400": "Error400", 7820 "401": "Error401", 7821 "403": "Error403", 7822 "404": "Error404", 7823 "409": "Error409", 7824 "429": "Error429", 7825 } 7826 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7827 response_data.read() 7828 return self.api_client.response_deserialize( 7829 response_data=response_data, 7830 response_types_map=_response_types_map, 7831 ).data
Get project member
Retrieves information for a specific project member.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project belongs. (required) :type team_id: str :param project_id: The ID of the project from which you want to retrieve specific member information. (required) :type project_id: str :param member_id: The ID of the member for which you want to retrieve information. (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
7891 @validate_call 7892 def enterprise_get_project_members( 7893 self, 7894 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 7895 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 7896 project_id: Annotated[ 7897 StrictStr, Field(description="The ID of the project for which you want to retrieve the list of members.") 7898 ], 7899 limit: Annotated[ 7900 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 7901 Field( 7902 description="The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value." 7903 ), 7904 ] = None, 7905 cursor: Annotated[ 7906 Optional[StrictStr], 7907 Field( 7908 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 7909 ), 7910 ] = None, 7911 _request_timeout: Union[ 7912 None, 7913 Annotated[StrictFloat, Field(gt=0)], 7914 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 7915 ] = None, 7916 _request_auth: Optional[Dict[StrictStr, Any]] = None, 7917 _content_type: Optional[StrictStr] = None, 7918 _headers: Optional[Dict[StrictStr, Any]] = None, 7919 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 7920 ) -> ProjectMemberPage: 7921 """List of project members 7922 7923 Retrieves the list of members for a specific project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 7924 7925 :param org_id: The ID of the organization to which the project belongs. (required) 7926 :type org_id: str 7927 :param team_id: The ID of the team to which the project belongs. (required) 7928 :type team_id: str 7929 :param project_id: The ID of the project for which you want to retrieve the list of members. (required) 7930 :type project_id: str 7931 :param limit: The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value. 7932 :type limit: int 7933 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 7934 :type cursor: str 7935 :param _request_timeout: timeout setting for this request. If one 7936 number provided, it will be total request 7937 timeout. It can also be a pair (tuple) of 7938 (connection, read) timeouts. 7939 :type _request_timeout: int, tuple(int, int), optional 7940 :param _request_auth: set to override the auth_settings for an a single 7941 request; this effectively ignores the 7942 authentication in the spec for a single request. 7943 :type _request_auth: dict, optional 7944 :param _content_type: force content-type for the request. 7945 :type _content_type: str, Optional 7946 :param _headers: set to override the headers for a single 7947 request; this effectively ignores the headers 7948 in the spec for a single request. 7949 :type _headers: dict, optional 7950 :param _host_index: set to override the host_index for a single 7951 request; this effectively ignores the host_index 7952 in the spec for a single request. 7953 :type _host_index: int, optional 7954 :return: Returns the result object. 7955 """ # noqa: E501 7956 7957 _param = self._enterprise_get_project_members_serialize( 7958 org_id=org_id, 7959 team_id=team_id, 7960 project_id=project_id, 7961 limit=limit, 7962 cursor=cursor, 7963 _request_auth=_request_auth, 7964 _content_type=_content_type, 7965 _headers=_headers, 7966 _host_index=_host_index, 7967 ) 7968 7969 _response_types_map: Dict[str, Optional[str]] = { 7970 "200": "ProjectMemberPage", 7971 "400": "Error400", 7972 "401": "Error401", 7973 "403": "Error403", 7974 "404": "Error404", 7975 "409": "Error409", 7976 "429": "Error429", 7977 } 7978 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 7979 response_data.read() 7980 return self.api_client.response_deserialize( 7981 response_data=response_data, 7982 response_types_map=_response_types_map, 7983 ).data
List of project members
Retrieves the list of members for a specific project.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project belongs. (required) :type team_id: str :param project_id: The ID of the project for which you want to retrieve the list of members. (required) :type project_id: str :param limit: The maximum number of results to return per call. If the number of project members in the response is greater than the limit specified, the response returns the cursor parameter with a value. :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8050 @validate_call 8051 def enterprise_update_project_member( 8052 self, 8053 org_id: Annotated[ 8054 StrictStr, Field(description="The ID of the organization to which the project member belongs.") 8055 ], 8056 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project member belongs.")], 8057 project_id: Annotated[StrictStr, Field(description="The ID of a Project.")], 8058 member_id: Annotated[StrictStr, Field(description="The ID of the member whose details you want to update.")], 8059 update_project_member_request: UpdateProjectMemberRequest, 8060 _request_timeout: Union[ 8061 None, 8062 Annotated[StrictFloat, Field(gt=0)], 8063 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8064 ] = None, 8065 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8066 _content_type: Optional[StrictStr] = None, 8067 _headers: Optional[Dict[StrictStr, Any]] = None, 8068 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8069 ) -> ProjectMember: 8070 """Update project member 8071 8072 Updates details of a project member, such as the member's role.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8073 8074 :param org_id: The ID of the organization to which the project member belongs. (required) 8075 :type org_id: str 8076 :param team_id: The ID of the team to which the project member belongs. (required) 8077 :type team_id: str 8078 :param project_id: The ID of a Project. (required) 8079 :type project_id: str 8080 :param member_id: The ID of the member whose details you want to update. (required) 8081 :type member_id: str 8082 :param update_project_member_request: (required) 8083 :type update_project_member_request: UpdateProjectMemberRequest 8084 :param _request_timeout: timeout setting for this request. If one 8085 number provided, it will be total request 8086 timeout. It can also be a pair (tuple) of 8087 (connection, read) timeouts. 8088 :type _request_timeout: int, tuple(int, int), optional 8089 :param _request_auth: set to override the auth_settings for an a single 8090 request; this effectively ignores the 8091 authentication in the spec for a single request. 8092 :type _request_auth: dict, optional 8093 :param _content_type: force content-type for the request. 8094 :type _content_type: str, Optional 8095 :param _headers: set to override the headers for a single 8096 request; this effectively ignores the headers 8097 in the spec for a single request. 8098 :type _headers: dict, optional 8099 :param _host_index: set to override the host_index for a single 8100 request; this effectively ignores the host_index 8101 in the spec for a single request. 8102 :type _host_index: int, optional 8103 :return: Returns the result object. 8104 """ # noqa: E501 8105 8106 _param = self._enterprise_update_project_member_serialize( 8107 org_id=org_id, 8108 team_id=team_id, 8109 project_id=project_id, 8110 member_id=member_id, 8111 update_project_member_request=update_project_member_request, 8112 _request_auth=_request_auth, 8113 _content_type=_content_type, 8114 _headers=_headers, 8115 _host_index=_host_index, 8116 ) 8117 8118 _response_types_map: Dict[str, Optional[str]] = { 8119 "200": "ProjectMember", 8120 "400": "Error400", 8121 "401": "Error401", 8122 "403": "Error403", 8123 "404": "Error404", 8124 "409": "Error409", 8125 "429": "Error429", 8126 } 8127 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8128 response_data.read() 8129 return self.api_client.response_deserialize( 8130 response_data=response_data, 8131 response_types_map=_response_types_map, 8132 ).data
Update project member
Updates details of a project member, such as the member's role.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project member belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project member belongs. (required) :type team_id: str :param project_id: The ID of a Project. (required) :type project_id: str :param member_id: The ID of the member whose details you want to update. (required) :type member_id: str :param update_project_member_request: (required) :type update_project_member_request: UpdateProjectMemberRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8203 @validate_call 8204 def enterprise_get_project_settings( 8205 self, 8206 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 8207 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 8208 project_id: Annotated[ 8209 StrictStr, Field(description="The ID of the project for which you want to retrieve the project settings.") 8210 ], 8211 _request_timeout: Union[ 8212 None, 8213 Annotated[StrictFloat, Field(gt=0)], 8214 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8215 ] = None, 8216 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8217 _content_type: Optional[StrictStr] = None, 8218 _headers: Optional[Dict[StrictStr, Any]] = None, 8219 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8220 ) -> ProjectSettings: 8221 """Get project settings 8222 8223 Retrieves the project settings.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8224 8225 :param org_id: The ID of the organization to which the project belongs. (required) 8226 :type org_id: str 8227 :param team_id: The ID of the team to which the project belongs. (required) 8228 :type team_id: str 8229 :param project_id: The ID of the project for which you want to retrieve the project settings. (required) 8230 :type project_id: str 8231 :param _request_timeout: timeout setting for this request. If one 8232 number provided, it will be total request 8233 timeout. It can also be a pair (tuple) of 8234 (connection, read) timeouts. 8235 :type _request_timeout: int, tuple(int, int), optional 8236 :param _request_auth: set to override the auth_settings for an a single 8237 request; this effectively ignores the 8238 authentication in the spec for a single request. 8239 :type _request_auth: dict, optional 8240 :param _content_type: force content-type for the request. 8241 :type _content_type: str, Optional 8242 :param _headers: set to override the headers for a single 8243 request; this effectively ignores the headers 8244 in the spec for a single request. 8245 :type _headers: dict, optional 8246 :param _host_index: set to override the host_index for a single 8247 request; this effectively ignores the host_index 8248 in the spec for a single request. 8249 :type _host_index: int, optional 8250 :return: Returns the result object. 8251 """ # noqa: E501 8252 8253 _param = self._enterprise_get_project_settings_serialize( 8254 org_id=org_id, 8255 team_id=team_id, 8256 project_id=project_id, 8257 _request_auth=_request_auth, 8258 _content_type=_content_type, 8259 _headers=_headers, 8260 _host_index=_host_index, 8261 ) 8262 8263 _response_types_map: Dict[str, Optional[str]] = { 8264 "200": "ProjectSettings", 8265 "400": "Error400", 8266 "401": "Error401", 8267 "403": "Error403", 8268 "404": "Error404", 8269 "429": "Error429", 8270 } 8271 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8272 response_data.read() 8273 return self.api_client.response_deserialize( 8274 response_data=response_data, 8275 response_types_map=_response_types_map, 8276 ).data
Get project settings
Retrieves the project settings.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project belongs. (required) :type team_id: str :param project_id: The ID of the project for which you want to retrieve the project settings. (required) :type project_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8333 @validate_call 8334 def enterprise_update_project_settings( 8335 self, 8336 org_id: Annotated[StrictStr, Field(description="The ID of the organization to which the project belongs.")], 8337 team_id: Annotated[StrictStr, Field(description="The ID of the team to which the project belongs.")], 8338 project_id: Annotated[StrictStr, Field(description="The ID of the project whose settings you want to update.")], 8339 update_project_settings_request: UpdateProjectSettingsRequest, 8340 _request_timeout: Union[ 8341 None, 8342 Annotated[StrictFloat, Field(gt=0)], 8343 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8344 ] = None, 8345 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8346 _content_type: Optional[StrictStr] = None, 8347 _headers: Optional[Dict[StrictStr, Any]] = None, 8348 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8349 ) -> ProjectSettings: 8350 """Update project settings 8351 8352 Updates the settings of a project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8353 8354 :param org_id: The ID of the organization to which the project belongs. (required) 8355 :type org_id: str 8356 :param team_id: The ID of the team to which the project belongs. (required) 8357 :type team_id: str 8358 :param project_id: The ID of the project whose settings you want to update. (required) 8359 :type project_id: str 8360 :param update_project_settings_request: (required) 8361 :type update_project_settings_request: UpdateProjectSettingsRequest 8362 :param _request_timeout: timeout setting for this request. If one 8363 number provided, it will be total request 8364 timeout. It can also be a pair (tuple) of 8365 (connection, read) timeouts. 8366 :type _request_timeout: int, tuple(int, int), optional 8367 :param _request_auth: set to override the auth_settings for an a single 8368 request; this effectively ignores the 8369 authentication in the spec for a single request. 8370 :type _request_auth: dict, optional 8371 :param _content_type: force content-type for the request. 8372 :type _content_type: str, Optional 8373 :param _headers: set to override the headers for a single 8374 request; this effectively ignores the headers 8375 in the spec for a single request. 8376 :type _headers: dict, optional 8377 :param _host_index: set to override the host_index for a single 8378 request; this effectively ignores the host_index 8379 in the spec for a single request. 8380 :type _host_index: int, optional 8381 :return: Returns the result object. 8382 """ # noqa: E501 8383 8384 _param = self._enterprise_update_project_settings_serialize( 8385 org_id=org_id, 8386 team_id=team_id, 8387 project_id=project_id, 8388 update_project_settings_request=update_project_settings_request, 8389 _request_auth=_request_auth, 8390 _content_type=_content_type, 8391 _headers=_headers, 8392 _host_index=_host_index, 8393 ) 8394 8395 _response_types_map: Dict[str, Optional[str]] = { 8396 "200": "ProjectSettings", 8397 "400": "Error400", 8398 "401": "Error401", 8399 "403": "Error403", 8400 "404": "Error404", 8401 "409": "Error409", 8402 "429": "Error429", 8403 } 8404 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8405 response_data.read() 8406 return self.api_client.response_deserialize( 8407 response_data=response_data, 8408 response_types_map=_response_types_map, 8409 ).data
Update project settings
Updates the settings of a project.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization to which the project belongs. (required) :type org_id: str :param team_id: The ID of the team to which the project belongs. (required) :type team_id: str :param project_id: The ID of the project whose settings you want to update. (required) :type project_id: str :param update_project_settings_request: (required) :type update_project_settings_request: UpdateProjectSettingsRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8477 @validate_call 8478 def enterprise_create_project( 8479 self, 8480 org_id: Annotated[ 8481 StrictStr, Field(description="The ID of the organization within which you you want to create a project.") 8482 ], 8483 team_id: Annotated[ 8484 StrictStr, Field(description="The ID of the team within which you you want to create a project.") 8485 ], 8486 create_project_request: CreateProjectRequest, 8487 _request_timeout: Union[ 8488 None, 8489 Annotated[StrictFloat, Field(gt=0)], 8490 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8491 ] = None, 8492 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8493 _content_type: Optional[StrictStr] = None, 8494 _headers: Optional[Dict[StrictStr, Any]] = None, 8495 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8496 ) -> Project: 8497 """Create project 8498 8499 Projects are essentially folders of boards with the option to manage user access for a smaller group of people within a team. Projects are here to help you organize your boards and make them easier to find and share. In other words, a project is a group of boards that you can share with your teammates all at once. For more information, see our <a href=\"https://help.miro.com/hc/en-us/articles/360018262033-Projects\" target=_blank>Help Center page on Projects</a>. <br><br>This API creates a new project in an existing team of an organization.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8500 8501 :param org_id: The ID of the organization within which you you want to create a project. (required) 8502 :type org_id: str 8503 :param team_id: The ID of the team within which you you want to create a project. (required) 8504 :type team_id: str 8505 :param create_project_request: (required) 8506 :type create_project_request: CreateProjectRequest 8507 :param _request_timeout: timeout setting for this request. If one 8508 number provided, it will be total request 8509 timeout. It can also be a pair (tuple) of 8510 (connection, read) timeouts. 8511 :type _request_timeout: int, tuple(int, int), optional 8512 :param _request_auth: set to override the auth_settings for an a single 8513 request; this effectively ignores the 8514 authentication in the spec for a single request. 8515 :type _request_auth: dict, optional 8516 :param _content_type: force content-type for the request. 8517 :type _content_type: str, Optional 8518 :param _headers: set to override the headers for a single 8519 request; this effectively ignores the headers 8520 in the spec for a single request. 8521 :type _headers: dict, optional 8522 :param _host_index: set to override the host_index for a single 8523 request; this effectively ignores the host_index 8524 in the spec for a single request. 8525 :type _host_index: int, optional 8526 :return: Returns the result object. 8527 """ # noqa: E501 8528 8529 _param = self._enterprise_create_project_serialize( 8530 org_id=org_id, 8531 team_id=team_id, 8532 create_project_request=create_project_request, 8533 _request_auth=_request_auth, 8534 _content_type=_content_type, 8535 _headers=_headers, 8536 _host_index=_host_index, 8537 ) 8538 8539 _response_types_map: Dict[str, Optional[str]] = { 8540 "201": "Project", 8541 "400": "Error400", 8542 "401": "Error401", 8543 "403": "Error403", 8544 "404": "Error404", 8545 "409": "Error409", 8546 "429": "Error429", 8547 } 8548 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8549 response_data.read() 8550 return self.api_client.response_deserialize( 8551 response_data=response_data, 8552 response_types_map=_response_types_map, 8553 ).data
Create project
Projects are essentially folders of boards with the option to manage user access for a smaller group of people within a team. Projects are here to help you organize your boards and make them easier to find and share. In other words, a project is a group of boards that you can share with your teammates all at once. For more information, see our Help Center page on Projects.
This API creates a new project in an existing team of an organization.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization within which you you want to create a project. (required) :type org_id: str :param team_id: The ID of the team within which you you want to create a project. (required) :type team_id: str :param create_project_request: (required) :type create_project_request: CreateProjectRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8618 @validate_call 8619 def enterprise_delete_project( 8620 self, 8621 org_id: Annotated[ 8622 StrictStr, Field(description="The ID of the organization from which you want to delete a project.") 8623 ], 8624 team_id: Annotated[StrictStr, Field(description="The ID of the team from which you want to delete a project.")], 8625 project_id: Annotated[StrictStr, Field(description="The ID of the project that you want to delete.")], 8626 _request_timeout: Union[ 8627 None, 8628 Annotated[StrictFloat, Field(gt=0)], 8629 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8630 ] = None, 8631 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8632 _content_type: Optional[StrictStr] = None, 8633 _headers: Optional[Dict[StrictStr, Any]] = None, 8634 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8635 ) -> None: 8636 """Delete project 8637 8638 Deletes a project. After a project is deleted, all boards and users that belong to the project remain in the team.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8639 8640 :param org_id: The ID of the organization from which you want to delete a project. (required) 8641 :type org_id: str 8642 :param team_id: The ID of the team from which you want to delete a project. (required) 8643 :type team_id: str 8644 :param project_id: The ID of the project that you want to delete. (required) 8645 :type project_id: str 8646 :param _request_timeout: timeout setting for this request. If one 8647 number provided, it will be total request 8648 timeout. It can also be a pair (tuple) of 8649 (connection, read) timeouts. 8650 :type _request_timeout: int, tuple(int, int), optional 8651 :param _request_auth: set to override the auth_settings for an a single 8652 request; this effectively ignores the 8653 authentication in the spec for a single request. 8654 :type _request_auth: dict, optional 8655 :param _content_type: force content-type for the request. 8656 :type _content_type: str, Optional 8657 :param _headers: set to override the headers for a single 8658 request; this effectively ignores the headers 8659 in the spec for a single request. 8660 :type _headers: dict, optional 8661 :param _host_index: set to override the host_index for a single 8662 request; this effectively ignores the host_index 8663 in the spec for a single request. 8664 :type _host_index: int, optional 8665 :return: Returns the result object. 8666 """ # noqa: E501 8667 8668 _param = self._enterprise_delete_project_serialize( 8669 org_id=org_id, 8670 team_id=team_id, 8671 project_id=project_id, 8672 _request_auth=_request_auth, 8673 _content_type=_content_type, 8674 _headers=_headers, 8675 _host_index=_host_index, 8676 ) 8677 8678 _response_types_map: Dict[str, Optional[str]] = { 8679 "204": None, 8680 "400": "Error400", 8681 "401": "Error401", 8682 "403": "Error403", 8683 "404": "Error404", 8684 "409": "Error409", 8685 "429": "Error429", 8686 } 8687 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8688 response_data.read() 8689 return self.api_client.response_deserialize( 8690 response_data=response_data, 8691 response_types_map=_response_types_map, 8692 ).data
Delete project
Deletes a project. After a project is deleted, all boards and users that belong to the project remain in the team.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization from which you want to delete a project. (required) :type org_id: str :param team_id: The ID of the team from which you want to delete a project. (required) :type team_id: str :param project_id: The ID of the project that you want to delete. (required) :type project_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8749 @validate_call 8750 def enterprise_get_project( 8751 self, 8752 org_id: Annotated[ 8753 StrictStr, 8754 Field(description="The ID of the organization from which you want to retrieve the project information."), 8755 ], 8756 team_id: Annotated[ 8757 StrictStr, Field(description="The ID of the team from which you want to retrieve the project information.") 8758 ], 8759 project_id: Annotated[ 8760 StrictStr, Field(description="The ID of the project for which you want to retrieve the information.") 8761 ], 8762 _request_timeout: Union[ 8763 None, 8764 Annotated[StrictFloat, Field(gt=0)], 8765 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8766 ] = None, 8767 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8768 _content_type: Optional[StrictStr] = None, 8769 _headers: Optional[Dict[StrictStr, Any]] = None, 8770 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8771 ) -> Project: 8772 """Get project 8773 8774 Retrieves project information, such as a name for an existing project.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8775 8776 :param org_id: The ID of the organization from which you want to retrieve the project information. (required) 8777 :type org_id: str 8778 :param team_id: The ID of the team from which you want to retrieve the project information. (required) 8779 :type team_id: str 8780 :param project_id: The ID of the project for which you want to retrieve the information. (required) 8781 :type project_id: str 8782 :param _request_timeout: timeout setting for this request. If one 8783 number provided, it will be total request 8784 timeout. It can also be a pair (tuple) of 8785 (connection, read) timeouts. 8786 :type _request_timeout: int, tuple(int, int), optional 8787 :param _request_auth: set to override the auth_settings for an a single 8788 request; this effectively ignores the 8789 authentication in the spec for a single request. 8790 :type _request_auth: dict, optional 8791 :param _content_type: force content-type for the request. 8792 :type _content_type: str, Optional 8793 :param _headers: set to override the headers for a single 8794 request; this effectively ignores the headers 8795 in the spec for a single request. 8796 :type _headers: dict, optional 8797 :param _host_index: set to override the host_index for a single 8798 request; this effectively ignores the host_index 8799 in the spec for a single request. 8800 :type _host_index: int, optional 8801 :return: Returns the result object. 8802 """ # noqa: E501 8803 8804 _param = self._enterprise_get_project_serialize( 8805 org_id=org_id, 8806 team_id=team_id, 8807 project_id=project_id, 8808 _request_auth=_request_auth, 8809 _content_type=_content_type, 8810 _headers=_headers, 8811 _host_index=_host_index, 8812 ) 8813 8814 _response_types_map: Dict[str, Optional[str]] = { 8815 "200": "Project", 8816 "400": "Error400", 8817 "401": "Error401", 8818 "403": "Error403", 8819 "404": "Error404", 8820 "429": "Error429", 8821 } 8822 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8823 response_data.read() 8824 return self.api_client.response_deserialize( 8825 response_data=response_data, 8826 response_types_map=_response_types_map, 8827 ).data
Get project
Retrieves project information, such as a name for an existing project.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization from which you want to retrieve the project information. (required) :type org_id: str :param team_id: The ID of the team from which you want to retrieve the project information. (required) :type team_id: str :param project_id: The ID of the project for which you want to retrieve the information. (required) :type project_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
8884 @validate_call 8885 def enterprise_get_projects( 8886 self, 8887 org_id: Annotated[ 8888 StrictStr, 8889 Field( 8890 description="The ID of the organization from which you want to retrieve the list of available projects." 8891 ), 8892 ], 8893 team_id: Annotated[ 8894 StrictStr, 8895 Field(description="The ID of the team from which you want to retrieve the list of available projects."), 8896 ], 8897 limit: Annotated[ 8898 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 8899 Field( 8900 description="The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value." 8901 ), 8902 ] = None, 8903 cursor: Annotated[ 8904 Optional[StrictStr], 8905 Field( 8906 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 8907 ), 8908 ] = None, 8909 _request_timeout: Union[ 8910 None, 8911 Annotated[StrictFloat, Field(gt=0)], 8912 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 8913 ] = None, 8914 _request_auth: Optional[Dict[StrictStr, Any]] = None, 8915 _content_type: Optional[StrictStr] = None, 8916 _headers: Optional[Dict[StrictStr, Any]] = None, 8917 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 8918 ) -> ProjectPage: 8919 """List of projects 8920 8921 Retrieves the list of projects in an existing team of an organization. You can retrieve all projects, including all private projects (projects that haven't been specifically shared with you) by enabling Content Admin permissions. To enable Content Admin permissions, see [Content Admin permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins).<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 8922 8923 :param org_id: The ID of the organization from which you want to retrieve the list of available projects. (required) 8924 :type org_id: str 8925 :param team_id: The ID of the team from which you want to retrieve the list of available projects. (required) 8926 :type team_id: str 8927 :param limit: The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value. 8928 :type limit: int 8929 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 8930 :type cursor: str 8931 :param _request_timeout: timeout setting for this request. If one 8932 number provided, it will be total request 8933 timeout. It can also be a pair (tuple) of 8934 (connection, read) timeouts. 8935 :type _request_timeout: int, tuple(int, int), optional 8936 :param _request_auth: set to override the auth_settings for an a single 8937 request; this effectively ignores the 8938 authentication in the spec for a single request. 8939 :type _request_auth: dict, optional 8940 :param _content_type: force content-type for the request. 8941 :type _content_type: str, Optional 8942 :param _headers: set to override the headers for a single 8943 request; this effectively ignores the headers 8944 in the spec for a single request. 8945 :type _headers: dict, optional 8946 :param _host_index: set to override the host_index for a single 8947 request; this effectively ignores the host_index 8948 in the spec for a single request. 8949 :type _host_index: int, optional 8950 :return: Returns the result object. 8951 """ # noqa: E501 8952 8953 _param = self._enterprise_get_projects_serialize( 8954 org_id=org_id, 8955 team_id=team_id, 8956 limit=limit, 8957 cursor=cursor, 8958 _request_auth=_request_auth, 8959 _content_type=_content_type, 8960 _headers=_headers, 8961 _host_index=_host_index, 8962 ) 8963 8964 _response_types_map: Dict[str, Optional[str]] = { 8965 "200": "ProjectPage", 8966 "400": "Error400", 8967 "401": "Error401", 8968 "403": "Error403", 8969 "404": "Error404", 8970 "429": "Error429", 8971 } 8972 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 8973 response_data.read() 8974 return self.api_client.response_deserialize( 8975 response_data=response_data, 8976 response_types_map=_response_types_map, 8977 ).data
List of projects
Retrieves the list of projects in an existing team of an organization. You can retrieve all projects, including all private projects (projects that haven't been specifically shared with you) by enabling Content Admin permissions. To enable Content Admin permissions, see Content Admin permissions for Company Admins.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of the organization from which you want to retrieve the list of available projects. (required) :type org_id: str :param team_id: The ID of the team from which you want to retrieve the list of available projects. (required) :type team_id: str :param limit: The maximum number of results to return per call. If the number of projects in the response is greater than the limit specified, the response returns the cursor parameter with a value. :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9041 @validate_call 9042 def enterprise_update_project( 9043 self, 9044 org_id: Annotated[StrictStr, Field(description="The ID of an Organization.")], 9045 team_id: Annotated[StrictStr, Field(description="The ID of a Team.")], 9046 project_id: Annotated[StrictStr, Field(description="The ID of a Project.")], 9047 update_project_request: UpdateProjectRequest, 9048 _request_timeout: Union[ 9049 None, 9050 Annotated[StrictFloat, Field(gt=0)], 9051 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9052 ] = None, 9053 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9054 _content_type: Optional[StrictStr] = None, 9055 _headers: Optional[Dict[StrictStr, Any]] = None, 9056 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9057 ) -> Project: 9058 """Update project 9059 9060 Update information about a project, such as the project name.<h4>Note</h4> <em>Projects</em> have been renamed to <em>Spaces</em>, and the terms can be used interchangeably.<h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9061 9062 :param org_id: The ID of an Organization. (required) 9063 :type org_id: str 9064 :param team_id: The ID of a Team. (required) 9065 :type team_id: str 9066 :param project_id: The ID of a Project. (required) 9067 :type project_id: str 9068 :param update_project_request: (required) 9069 :type update_project_request: UpdateProjectRequest 9070 :param _request_timeout: timeout setting for this request. If one 9071 number provided, it will be total request 9072 timeout. It can also be a pair (tuple) of 9073 (connection, read) timeouts. 9074 :type _request_timeout: int, tuple(int, int), optional 9075 :param _request_auth: set to override the auth_settings for an a single 9076 request; this effectively ignores the 9077 authentication in the spec for a single request. 9078 :type _request_auth: dict, optional 9079 :param _content_type: force content-type for the request. 9080 :type _content_type: str, Optional 9081 :param _headers: set to override the headers for a single 9082 request; this effectively ignores the headers 9083 in the spec for a single request. 9084 :type _headers: dict, optional 9085 :param _host_index: set to override the host_index for a single 9086 request; this effectively ignores the host_index 9087 in the spec for a single request. 9088 :type _host_index: int, optional 9089 :return: Returns the result object. 9090 """ # noqa: E501 9091 9092 _param = self._enterprise_update_project_serialize( 9093 org_id=org_id, 9094 team_id=team_id, 9095 project_id=project_id, 9096 update_project_request=update_project_request, 9097 _request_auth=_request_auth, 9098 _content_type=_content_type, 9099 _headers=_headers, 9100 _host_index=_host_index, 9101 ) 9102 9103 _response_types_map: Dict[str, Optional[str]] = { 9104 "200": "Project", 9105 "400": "Error400", 9106 "401": "Error401", 9107 "403": "Error403", 9108 "404": "Error404", 9109 "409": "Error409", 9110 "429": "Error429", 9111 } 9112 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9113 response_data.read() 9114 return self.api_client.response_deserialize( 9115 response_data=response_data, 9116 response_types_map=_response_types_map, 9117 ).data
Update project
Update information about a project, such as the project name.
Note
Projects have been renamed to Spaces, and the terms can be used interchangeably.Required scope
projects:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an Organization. (required) :type org_id: str :param team_id: The ID of a Team. (required) :type team_id: str :param project_id: The ID of a Project. (required) :type project_id: str :param update_project_request: (required) :type update_project_request: UpdateProjectRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9185 @validate_call 9186 def enterprise_post_user_sessions_reset( 9187 self, 9188 email: Annotated[ 9189 StrictStr, 9190 Field( 9191 description="Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices." 9192 ), 9193 ], 9194 _request_timeout: Union[ 9195 None, 9196 Annotated[StrictFloat, Field(gt=0)], 9197 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9198 ] = None, 9199 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9200 _content_type: Optional[StrictStr] = None, 9201 _headers: Optional[Dict[StrictStr, Any]] = None, 9202 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9203 ) -> None: 9204 """Reset all sessions of a user 9205 9206 Reset all sessions of a user. Admins can now take immediate action to restrict user access to company data in case of security concerns. Calling this API ends all active Miro sessions across devices for a particular user, requiring the user to sign in again. This is useful in situations where a user leaves the company, their credentials are compromised, or there's suspicious activity on their account.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>sessions:delete</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9207 9208 :param email: Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices. (required) 9209 :type email: str 9210 :param _request_timeout: timeout setting for this request. If one 9211 number provided, it will be total request 9212 timeout. It can also be a pair (tuple) of 9213 (connection, read) timeouts. 9214 :type _request_timeout: int, tuple(int, int), optional 9215 :param _request_auth: set to override the auth_settings for an a single 9216 request; this effectively ignores the 9217 authentication in the spec for a single request. 9218 :type _request_auth: dict, optional 9219 :param _content_type: force content-type for the request. 9220 :type _content_type: str, Optional 9221 :param _headers: set to override the headers for a single 9222 request; this effectively ignores the headers 9223 in the spec for a single request. 9224 :type _headers: dict, optional 9225 :param _host_index: set to override the host_index for a single 9226 request; this effectively ignores the host_index 9227 in the spec for a single request. 9228 :type _host_index: int, optional 9229 :return: Returns the result object. 9230 """ # noqa: E501 9231 9232 _param = self._enterprise_post_user_sessions_reset_serialize( 9233 email=email, 9234 _request_auth=_request_auth, 9235 _content_type=_content_type, 9236 _headers=_headers, 9237 _host_index=_host_index, 9238 ) 9239 9240 _response_types_map: Dict[str, Optional[str]] = { 9241 "200": None, 9242 "400": None, 9243 "401": None, 9244 "403": None, 9245 "404": None, 9246 "429": None, 9247 } 9248 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9249 response_data.read() 9250 return self.api_client.response_deserialize( 9251 response_data=response_data, 9252 response_types_map=_response_types_map, 9253 ).data
Reset all sessions of a user
Reset all sessions of a user. Admins can now take immediate action to restrict user access to company data in case of security concerns. Calling this API ends all active Miro sessions across devices for a particular user, requiring the user to sign in again. This is useful in situations where a user leaves the company, their credentials are compromised, or there's suspicious activity on their account.
Required scope
sessions:deleteRate limiting
Level 3Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param email: Email ID of the user whose sessions you want to reset. Note that this user will be signed out from all devices. (required) :type email: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9303 @validate_call 9304 def enterprise_boards_create_group( 9305 self, 9306 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9307 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9308 create_board_user_groups_request: CreateBoardUserGroupsRequest, 9309 _request_timeout: Union[ 9310 None, 9311 Annotated[StrictFloat, Field(gt=0)], 9312 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9313 ] = None, 9314 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9315 _content_type: Optional[StrictStr] = None, 9316 _headers: Optional[Dict[StrictStr, Any]] = None, 9317 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9318 ) -> BoardUserGroup: 9319 """Create board user group assignments 9320 9321 Shares a board with user groups with a specified role. Updates the role if already shared.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9322 9323 :param org_id: The ID of an organization. (required) 9324 :type org_id: str 9325 :param board_id: The ID of the board. (required) 9326 :type board_id: str 9327 :param create_board_user_groups_request: (required) 9328 :type create_board_user_groups_request: CreateBoardUserGroupsRequest 9329 :param _request_timeout: timeout setting for this request. If one 9330 number provided, it will be total request 9331 timeout. It can also be a pair (tuple) of 9332 (connection, read) timeouts. 9333 :type _request_timeout: int, tuple(int, int), optional 9334 :param _request_auth: set to override the auth_settings for an a single 9335 request; this effectively ignores the 9336 authentication in the spec for a single request. 9337 :type _request_auth: dict, optional 9338 :param _content_type: force content-type for the request. 9339 :type _content_type: str, Optional 9340 :param _headers: set to override the headers for a single 9341 request; this effectively ignores the headers 9342 in the spec for a single request. 9343 :type _headers: dict, optional 9344 :param _host_index: set to override the host_index for a single 9345 request; this effectively ignores the host_index 9346 in the spec for a single request. 9347 :type _host_index: int, optional 9348 :return: Returns the result object. 9349 """ # noqa: E501 9350 9351 _param = self._enterprise_boards_create_group_serialize( 9352 org_id=org_id, 9353 board_id=board_id, 9354 create_board_user_groups_request=create_board_user_groups_request, 9355 _request_auth=_request_auth, 9356 _content_type=_content_type, 9357 _headers=_headers, 9358 _host_index=_host_index, 9359 ) 9360 9361 _response_types_map: Dict[str, Optional[str]] = { 9362 "200": "BoardUserGroup", 9363 "400": None, 9364 "401": None, 9365 "403": None, 9366 "409": None, 9367 "429": None, 9368 } 9369 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9370 response_data.read() 9371 return self.api_client.response_deserialize( 9372 response_data=response_data, 9373 response_types_map=_response_types_map, 9374 ).data
Create board user group assignments
Shares a board with user groups with a specified role. Updates the role if already shared.
Required scope
organizations:groups:readboards:write
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param board_id: The ID of the board. (required) :type board_id: str :param create_board_user_groups_request: (required) :type create_board_user_groups_request: CreateBoardUserGroupsRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9439 @validate_call 9440 def enterprise_boards_delete_groups( 9441 self, 9442 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9443 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9444 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 9445 _request_timeout: Union[ 9446 None, 9447 Annotated[StrictFloat, Field(gt=0)], 9448 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9449 ] = None, 9450 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9451 _content_type: Optional[StrictStr] = None, 9452 _headers: Optional[Dict[StrictStr, Any]] = None, 9453 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9454 ) -> None: 9455 """Delete board user group assignment 9456 9457 Removes a user group from the specified board.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9458 9459 :param org_id: The ID of an organization. (required) 9460 :type org_id: str 9461 :param board_id: The ID of the board. (required) 9462 :type board_id: str 9463 :param group_id: The ID of a user group. (required) 9464 :type group_id: str 9465 :param _request_timeout: timeout setting for this request. If one 9466 number provided, it will be total request 9467 timeout. It can also be a pair (tuple) of 9468 (connection, read) timeouts. 9469 :type _request_timeout: int, tuple(int, int), optional 9470 :param _request_auth: set to override the auth_settings for an a single 9471 request; this effectively ignores the 9472 authentication in the spec for a single request. 9473 :type _request_auth: dict, optional 9474 :param _content_type: force content-type for the request. 9475 :type _content_type: str, Optional 9476 :param _headers: set to override the headers for a single 9477 request; this effectively ignores the headers 9478 in the spec for a single request. 9479 :type _headers: dict, optional 9480 :param _host_index: set to override the host_index for a single 9481 request; this effectively ignores the host_index 9482 in the spec for a single request. 9483 :type _host_index: int, optional 9484 :return: Returns the result object. 9485 """ # noqa: E501 9486 9487 _param = self._enterprise_boards_delete_groups_serialize( 9488 org_id=org_id, 9489 board_id=board_id, 9490 group_id=group_id, 9491 _request_auth=_request_auth, 9492 _content_type=_content_type, 9493 _headers=_headers, 9494 _host_index=_host_index, 9495 ) 9496 9497 _response_types_map: Dict[str, Optional[str]] = { 9498 "204": None, 9499 "400": None, 9500 "401": None, 9501 "403": None, 9502 "404": None, 9503 "409": None, 9504 "429": None, 9505 } 9506 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9507 response_data.read() 9508 return self.api_client.response_deserialize( 9509 response_data=response_data, 9510 response_types_map=_response_types_map, 9511 ).data
Delete board user group assignment
Removes a user group from the specified board.
Required scope
organizations:groups:readboards:write
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param board_id: The ID of the board. (required) :type board_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9565 @validate_call 9566 def enterprise_boards_get_groups( 9567 self, 9568 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9569 board_id: Annotated[StrictStr, Field(description="The ID of the board.")], 9570 limit: Annotated[ 9571 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 9572 Field(description="The maximum number of user groups in the result list."), 9573 ] = None, 9574 cursor: Annotated[ 9575 Optional[StrictStr], 9576 Field( 9577 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 9578 ), 9579 ] = None, 9580 _request_timeout: Union[ 9581 None, 9582 Annotated[StrictFloat, Field(gt=0)], 9583 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9584 ] = None, 9585 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9586 _content_type: Optional[StrictStr] = None, 9587 _headers: Optional[Dict[StrictStr, Any]] = None, 9588 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9589 ) -> BoardUserGroupsPage: 9590 """Get board user group assignments 9591 9592 Retrieves information about user groups invited to the specified board.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9593 9594 :param org_id: The ID of an organization. (required) 9595 :type org_id: str 9596 :param board_id: The ID of the board. (required) 9597 :type board_id: str 9598 :param limit: The maximum number of user groups in the result list. 9599 :type limit: int 9600 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 9601 :type cursor: str 9602 :param _request_timeout: timeout setting for this request. If one 9603 number provided, it will be total request 9604 timeout. It can also be a pair (tuple) of 9605 (connection, read) timeouts. 9606 :type _request_timeout: int, tuple(int, int), optional 9607 :param _request_auth: set to override the auth_settings for an a single 9608 request; this effectively ignores the 9609 authentication in the spec for a single request. 9610 :type _request_auth: dict, optional 9611 :param _content_type: force content-type for the request. 9612 :type _content_type: str, Optional 9613 :param _headers: set to override the headers for a single 9614 request; this effectively ignores the headers 9615 in the spec for a single request. 9616 :type _headers: dict, optional 9617 :param _host_index: set to override the host_index for a single 9618 request; this effectively ignores the host_index 9619 in the spec for a single request. 9620 :type _host_index: int, optional 9621 :return: Returns the result object. 9622 """ # noqa: E501 9623 9624 _param = self._enterprise_boards_get_groups_serialize( 9625 org_id=org_id, 9626 board_id=board_id, 9627 limit=limit, 9628 cursor=cursor, 9629 _request_auth=_request_auth, 9630 _content_type=_content_type, 9631 _headers=_headers, 9632 _host_index=_host_index, 9633 ) 9634 9635 _response_types_map: Dict[str, Optional[str]] = { 9636 "200": "BoardUserGroupsPage", 9637 "400": None, 9638 "401": None, 9639 "403": None, 9640 "404": None, 9641 "429": None, 9642 } 9643 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9644 response_data.read() 9645 return self.api_client.response_deserialize( 9646 response_data=response_data, 9647 response_types_map=_response_types_map, 9648 ).data
Get board user group assignments
Retrieves information about user groups invited to the specified board.
Required scope
organizations:groups:readboards:read
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param board_id: The ID of the board. (required) :type board_id: str :param limit: The maximum number of user groups in the result list. :type limit: int :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9712 @validate_call 9713 def enterprise_project_create_group( 9714 self, 9715 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9716 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9717 create_project_user_groups_request: CreateProjectUserGroupsRequest, 9718 _request_timeout: Union[ 9719 None, 9720 Annotated[StrictFloat, Field(gt=0)], 9721 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9722 ] = None, 9723 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9724 _content_type: Optional[StrictStr] = None, 9725 _headers: Optional[Dict[StrictStr, Any]] = None, 9726 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9727 ) -> ProjectUserGroup: 9728 """Create project user group assignments 9729 9730 Shares a project with user groups with a specified role. Updates the role if already shared.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9731 9732 :param org_id: The ID of an organization. (required) 9733 :type org_id: str 9734 :param project_id: The ID of the project. (required) 9735 :type project_id: str 9736 :param create_project_user_groups_request: (required) 9737 :type create_project_user_groups_request: CreateProjectUserGroupsRequest 9738 :param _request_timeout: timeout setting for this request. If one 9739 number provided, it will be total request 9740 timeout. It can also be a pair (tuple) of 9741 (connection, read) timeouts. 9742 :type _request_timeout: int, tuple(int, int), optional 9743 :param _request_auth: set to override the auth_settings for an a single 9744 request; this effectively ignores the 9745 authentication in the spec for a single request. 9746 :type _request_auth: dict, optional 9747 :param _content_type: force content-type for the request. 9748 :type _content_type: str, Optional 9749 :param _headers: set to override the headers for a single 9750 request; this effectively ignores the headers 9751 in the spec for a single request. 9752 :type _headers: dict, optional 9753 :param _host_index: set to override the host_index for a single 9754 request; this effectively ignores the host_index 9755 in the spec for a single request. 9756 :type _host_index: int, optional 9757 :return: Returns the result object. 9758 """ # noqa: E501 9759 9760 _param = self._enterprise_project_create_group_serialize( 9761 org_id=org_id, 9762 project_id=project_id, 9763 create_project_user_groups_request=create_project_user_groups_request, 9764 _request_auth=_request_auth, 9765 _content_type=_content_type, 9766 _headers=_headers, 9767 _host_index=_host_index, 9768 ) 9769 9770 _response_types_map: Dict[str, Optional[str]] = { 9771 "200": "ProjectUserGroup", 9772 "400": None, 9773 "401": None, 9774 "403": None, 9775 "409": None, 9776 "429": None, 9777 } 9778 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9779 response_data.read() 9780 return self.api_client.response_deserialize( 9781 response_data=response_data, 9782 response_types_map=_response_types_map, 9783 ).data
Create project user group assignments
Shares a project with user groups with a specified role. Updates the role if already shared.
Required scope
organizations:groups:readprojects:write
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param project_id: The ID of the project. (required) :type project_id: str :param create_project_user_groups_request: (required) :type create_project_user_groups_request: CreateProjectUserGroupsRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9848 @validate_call 9849 def enterprise_project_delete_groups( 9850 self, 9851 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9852 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9853 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 9854 _request_timeout: Union[ 9855 None, 9856 Annotated[StrictFloat, Field(gt=0)], 9857 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9858 ] = None, 9859 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9860 _content_type: Optional[StrictStr] = None, 9861 _headers: Optional[Dict[StrictStr, Any]] = None, 9862 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9863 ) -> None: 9864 """Delete project user group assignment 9865 9866 Removes a user group from the specified project.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 9867 9868 :param org_id: The ID of an organization. (required) 9869 :type org_id: str 9870 :param project_id: The ID of the project. (required) 9871 :type project_id: str 9872 :param group_id: The ID of a user group. (required) 9873 :type group_id: str 9874 :param _request_timeout: timeout setting for this request. If one 9875 number provided, it will be total request 9876 timeout. It can also be a pair (tuple) of 9877 (connection, read) timeouts. 9878 :type _request_timeout: int, tuple(int, int), optional 9879 :param _request_auth: set to override the auth_settings for an a single 9880 request; this effectively ignores the 9881 authentication in the spec for a single request. 9882 :type _request_auth: dict, optional 9883 :param _content_type: force content-type for the request. 9884 :type _content_type: str, Optional 9885 :param _headers: set to override the headers for a single 9886 request; this effectively ignores the headers 9887 in the spec for a single request. 9888 :type _headers: dict, optional 9889 :param _host_index: set to override the host_index for a single 9890 request; this effectively ignores the host_index 9891 in the spec for a single request. 9892 :type _host_index: int, optional 9893 :return: Returns the result object. 9894 """ # noqa: E501 9895 9896 _param = self._enterprise_project_delete_groups_serialize( 9897 org_id=org_id, 9898 project_id=project_id, 9899 group_id=group_id, 9900 _request_auth=_request_auth, 9901 _content_type=_content_type, 9902 _headers=_headers, 9903 _host_index=_host_index, 9904 ) 9905 9906 _response_types_map: Dict[str, Optional[str]] = { 9907 "204": None, 9908 "400": None, 9909 "401": None, 9910 "403": None, 9911 "404": None, 9912 "409": None, 9913 "429": None, 9914 } 9915 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 9916 response_data.read() 9917 return self.api_client.response_deserialize( 9918 response_data=response_data, 9919 response_types_map=_response_types_map, 9920 ).data
Delete project user group assignment
Removes a user group from the specified project.
Required scope
organizations:groups:readprojects:write
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param project_id: The ID of the project. (required) :type project_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
9974 @validate_call 9975 def enterprise_projects_get_groups( 9976 self, 9977 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 9978 project_id: Annotated[StrictStr, Field(description="The ID of the project.")], 9979 limit: Annotated[ 9980 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 9981 Field(description="The maximum number of user groups in the result list."), 9982 ] = None, 9983 cursor: Annotated[ 9984 Optional[StrictStr], 9985 Field( 9986 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 9987 ), 9988 ] = None, 9989 _request_timeout: Union[ 9990 None, 9991 Annotated[StrictFloat, Field(gt=0)], 9992 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 9993 ] = None, 9994 _request_auth: Optional[Dict[StrictStr, Any]] = None, 9995 _content_type: Optional[StrictStr] = None, 9996 _headers: Optional[Dict[StrictStr, Any]] = None, 9997 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 9998 ) -> ProjectUserGroupsPage: 9999 """Get project user group assignments 10000 10001 Retrieves information about user groups invited to the specified project.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>projects:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10002 10003 :param org_id: The ID of an organization. (required) 10004 :type org_id: str 10005 :param project_id: The ID of the project. (required) 10006 :type project_id: str 10007 :param limit: The maximum number of user groups in the result list. 10008 :type limit: int 10009 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 10010 :type cursor: str 10011 :param _request_timeout: timeout setting for this request. If one 10012 number provided, it will be total request 10013 timeout. It can also be a pair (tuple) of 10014 (connection, read) timeouts. 10015 :type _request_timeout: int, tuple(int, int), optional 10016 :param _request_auth: set to override the auth_settings for an a single 10017 request; this effectively ignores the 10018 authentication in the spec for a single request. 10019 :type _request_auth: dict, optional 10020 :param _content_type: force content-type for the request. 10021 :type _content_type: str, Optional 10022 :param _headers: set to override the headers for a single 10023 request; this effectively ignores the headers 10024 in the spec for a single request. 10025 :type _headers: dict, optional 10026 :param _host_index: set to override the host_index for a single 10027 request; this effectively ignores the host_index 10028 in the spec for a single request. 10029 :type _host_index: int, optional 10030 :return: Returns the result object. 10031 """ # noqa: E501 10032 10033 _param = self._enterprise_projects_get_groups_serialize( 10034 org_id=org_id, 10035 project_id=project_id, 10036 limit=limit, 10037 cursor=cursor, 10038 _request_auth=_request_auth, 10039 _content_type=_content_type, 10040 _headers=_headers, 10041 _host_index=_host_index, 10042 ) 10043 10044 _response_types_map: Dict[str, Optional[str]] = { 10045 "200": "ProjectUserGroupsPage", 10046 "400": None, 10047 "401": None, 10048 "403": None, 10049 "404": None, 10050 "429": None, 10051 } 10052 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10053 response_data.read() 10054 return self.api_client.response_deserialize( 10055 response_data=response_data, 10056 response_types_map=_response_types_map, 10057 ).data
Get project user group assignments
Retrieves information about user groups invited to the specified project.
Required scope
organizations:groups:readprojects:read
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param project_id: The ID of the project. (required) :type project_id: str :param limit: The maximum number of user groups in the result list. :type limit: int :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10121 @validate_call 10122 def enterprise_delete_team_member( 10123 self, 10124 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10125 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10126 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10127 _request_timeout: Union[ 10128 None, 10129 Annotated[StrictFloat, Field(gt=0)], 10130 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10131 ] = None, 10132 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10133 _content_type: Optional[StrictStr] = None, 10134 _headers: Optional[Dict[StrictStr, Any]] = None, 10135 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10136 ) -> None: 10137 """Delete team member from team 10138 10139 Deletes team member from team by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10140 10141 :param org_id: The ID of an organization. (required) 10142 :type org_id: str 10143 :param team_id: The ID of a team. (required) 10144 :type team_id: str 10145 :param member_id: The id of the Team Member (required) 10146 :type member_id: str 10147 :param _request_timeout: timeout setting for this request. If one 10148 number provided, it will be total request 10149 timeout. It can also be a pair (tuple) of 10150 (connection, read) timeouts. 10151 :type _request_timeout: int, tuple(int, int), optional 10152 :param _request_auth: set to override the auth_settings for an a single 10153 request; this effectively ignores the 10154 authentication in the spec for a single request. 10155 :type _request_auth: dict, optional 10156 :param _content_type: force content-type for the request. 10157 :type _content_type: str, Optional 10158 :param _headers: set to override the headers for a single 10159 request; this effectively ignores the headers 10160 in the spec for a single request. 10161 :type _headers: dict, optional 10162 :param _host_index: set to override the host_index for a single 10163 request; this effectively ignores the host_index 10164 in the spec for a single request. 10165 :type _host_index: int, optional 10166 :return: Returns the result object. 10167 """ # noqa: E501 10168 10169 _param = self._enterprise_delete_team_member_serialize( 10170 org_id=org_id, 10171 team_id=team_id, 10172 member_id=member_id, 10173 _request_auth=_request_auth, 10174 _content_type=_content_type, 10175 _headers=_headers, 10176 _host_index=_host_index, 10177 ) 10178 10179 _response_types_map: Dict[str, Optional[str]] = { 10180 "204": None, 10181 "400": None, 10182 "401": None, 10183 "403": None, 10184 "404": None, 10185 "409": None, 10186 "429": None, 10187 } 10188 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10189 response_data.read() 10190 return self.api_client.response_deserialize( 10191 response_data=response_data, 10192 response_types_map=_response_types_map, 10193 ).data
Delete team member from team
Deletes team member from team by id.
Required scope
organizations:teams:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param member_id: The id of the Team Member (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10247 @validate_call 10248 def enterprise_get_team_member( 10249 self, 10250 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10251 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10252 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10253 _request_timeout: Union[ 10254 None, 10255 Annotated[StrictFloat, Field(gt=0)], 10256 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10257 ] = None, 10258 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10259 _content_type: Optional[StrictStr] = None, 10260 _headers: Optional[Dict[StrictStr, Any]] = None, 10261 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10262 ) -> TeamMember: 10263 """Get team member 10264 10265 Retrieves team member by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10266 10267 :param org_id: The ID of an organization. (required) 10268 :type org_id: str 10269 :param team_id: The ID of a team. (required) 10270 :type team_id: str 10271 :param member_id: The id of the Team Member (required) 10272 :type member_id: str 10273 :param _request_timeout: timeout setting for this request. If one 10274 number provided, it will be total request 10275 timeout. It can also be a pair (tuple) of 10276 (connection, read) timeouts. 10277 :type _request_timeout: int, tuple(int, int), optional 10278 :param _request_auth: set to override the auth_settings for an a single 10279 request; this effectively ignores the 10280 authentication in the spec for a single request. 10281 :type _request_auth: dict, optional 10282 :param _content_type: force content-type for the request. 10283 :type _content_type: str, Optional 10284 :param _headers: set to override the headers for a single 10285 request; this effectively ignores the headers 10286 in the spec for a single request. 10287 :type _headers: dict, optional 10288 :param _host_index: set to override the host_index for a single 10289 request; this effectively ignores the host_index 10290 in the spec for a single request. 10291 :type _host_index: int, optional 10292 :return: Returns the result object. 10293 """ # noqa: E501 10294 10295 _param = self._enterprise_get_team_member_serialize( 10296 org_id=org_id, 10297 team_id=team_id, 10298 member_id=member_id, 10299 _request_auth=_request_auth, 10300 _content_type=_content_type, 10301 _headers=_headers, 10302 _host_index=_host_index, 10303 ) 10304 10305 _response_types_map: Dict[str, Optional[str]] = { 10306 "200": "TeamMember", 10307 "400": None, 10308 "401": None, 10309 "403": None, 10310 "404": None, 10311 "429": None, 10312 } 10313 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10314 response_data.read() 10315 return self.api_client.response_deserialize( 10316 response_data=response_data, 10317 response_types_map=_response_types_map, 10318 ).data
Get team member
Retrieves team member by id.
Required scope
organizations:teams:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param member_id: The id of the Team Member (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10375 @validate_call 10376 def enterprise_get_team_members( 10377 self, 10378 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10379 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10380 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 10381 cursor: Annotated[ 10382 Optional[StrictStr], 10383 Field( 10384 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 10385 ), 10386 ] = None, 10387 role: Annotated[ 10388 Optional[StrictStr], 10389 Field( 10390 description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": (Deprecated) Team-guest user, user with access only to a team without access to organization. ' 10391 ), 10392 ] = None, 10393 _request_timeout: Union[ 10394 None, 10395 Annotated[StrictFloat, Field(gt=0)], 10396 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10397 ] = None, 10398 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10399 _content_type: Optional[StrictStr] = None, 10400 _headers: Optional[Dict[StrictStr, Any]] = None, 10401 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10402 ) -> TeamMembersPage: 10403 """List team members 10404 10405 Retrieves team members by cursor.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10406 10407 :param org_id: The ID of an organization. (required) 10408 :type org_id: str 10409 :param team_id: The ID of a team. (required) 10410 :type team_id: str 10411 :param limit: 10412 :type limit: int 10413 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 10414 :type cursor: str 10415 :param role: Role query. Filters members by role using full word match. Accepted values are: * \"member\": Team member with full member permissions. * \"admin\": Admin of a team. Team member with permission to manage team. * \"non_team\": External user, non-team user. * \"team_guest\": (Deprecated) Team-guest user, user with access only to a team without access to organization. 10416 :type role: str 10417 :param _request_timeout: timeout setting for this request. If one 10418 number provided, it will be total request 10419 timeout. It can also be a pair (tuple) of 10420 (connection, read) timeouts. 10421 :type _request_timeout: int, tuple(int, int), optional 10422 :param _request_auth: set to override the auth_settings for an a single 10423 request; this effectively ignores the 10424 authentication in the spec for a single request. 10425 :type _request_auth: dict, optional 10426 :param _content_type: force content-type for the request. 10427 :type _content_type: str, Optional 10428 :param _headers: set to override the headers for a single 10429 request; this effectively ignores the headers 10430 in the spec for a single request. 10431 :type _headers: dict, optional 10432 :param _host_index: set to override the host_index for a single 10433 request; this effectively ignores the host_index 10434 in the spec for a single request. 10435 :type _host_index: int, optional 10436 :return: Returns the result object. 10437 """ # noqa: E501 10438 10439 _param = self._enterprise_get_team_members_serialize( 10440 org_id=org_id, 10441 team_id=team_id, 10442 limit=limit, 10443 cursor=cursor, 10444 role=role, 10445 _request_auth=_request_auth, 10446 _content_type=_content_type, 10447 _headers=_headers, 10448 _host_index=_host_index, 10449 ) 10450 10451 _response_types_map: Dict[str, Optional[str]] = { 10452 "200": "TeamMembersPage", 10453 "400": None, 10454 "401": None, 10455 "403": None, 10456 "404": None, 10457 "429": None, 10458 } 10459 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10460 response_data.read() 10461 return self.api_client.response_deserialize( 10462 response_data=response_data, 10463 response_types_map=_response_types_map, 10464 ).data
List team members
Retrieves team members by cursor.
Required scope
organizations:teams:readRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param limit: :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param role: Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": (Deprecated) Team-guest user, user with access only to a team without access to organization. :type role: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10533 @validate_call 10534 def enterprise_invite_team_member( 10535 self, 10536 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10537 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10538 team_member_invite: TeamMemberInvite, 10539 _request_timeout: Union[ 10540 None, 10541 Annotated[StrictFloat, Field(gt=0)], 10542 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10543 ] = None, 10544 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10545 _content_type: Optional[StrictStr] = None, 10546 _headers: Optional[Dict[StrictStr, Any]] = None, 10547 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10548 ) -> TeamMember: 10549 """Invite team members 10550 10551 Invites a new Miro user to an existing team. The user must exist in your Miro organization. Users who do not exist in your Miro organization can be invited to the team via [SCIM](https://developers.miro.com/docs/scim) and an external identity provider, such as Okta or Azure Active Directory.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10552 10553 :param org_id: The ID of an organization. (required) 10554 :type org_id: str 10555 :param team_id: The ID of a team. (required) 10556 :type team_id: str 10557 :param team_member_invite: (required) 10558 :type team_member_invite: TeamMemberInvite 10559 :param _request_timeout: timeout setting for this request. If one 10560 number provided, it will be total request 10561 timeout. It can also be a pair (tuple) of 10562 (connection, read) timeouts. 10563 :type _request_timeout: int, tuple(int, int), optional 10564 :param _request_auth: set to override the auth_settings for an a single 10565 request; this effectively ignores the 10566 authentication in the spec for a single request. 10567 :type _request_auth: dict, optional 10568 :param _content_type: force content-type for the request. 10569 :type _content_type: str, Optional 10570 :param _headers: set to override the headers for a single 10571 request; this effectively ignores the headers 10572 in the spec for a single request. 10573 :type _headers: dict, optional 10574 :param _host_index: set to override the host_index for a single 10575 request; this effectively ignores the host_index 10576 in the spec for a single request. 10577 :type _host_index: int, optional 10578 :return: Returns the result object. 10579 """ # noqa: E501 10580 10581 _param = self._enterprise_invite_team_member_serialize( 10582 org_id=org_id, 10583 team_id=team_id, 10584 team_member_invite=team_member_invite, 10585 _request_auth=_request_auth, 10586 _content_type=_content_type, 10587 _headers=_headers, 10588 _host_index=_host_index, 10589 ) 10590 10591 _response_types_map: Dict[str, Optional[str]] = { 10592 "201": "TeamMember", 10593 "400": None, 10594 "401": None, 10595 "403": None, 10596 "404": None, 10597 "409": None, 10598 "429": None, 10599 } 10600 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10601 response_data.read() 10602 return self.api_client.response_deserialize( 10603 response_data=response_data, 10604 response_types_map=_response_types_map, 10605 ).data
Invite team members
Invites a new Miro user to an existing team. The user must exist in your Miro organization. Users who do not exist in your Miro organization can be invited to the team via SCIM and an external identity provider, such as Okta or Azure Active Directory.
Required scope
organizations:teams:writeRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param team_member_invite: (required) :type team_member_invite: TeamMemberInvite :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10670 @validate_call 10671 def enterprise_update_team_member( 10672 self, 10673 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10674 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10675 member_id: Annotated[StrictStr, Field(description="The id of the Team Member")], 10676 team_member_changes: TeamMemberChanges, 10677 _request_timeout: Union[ 10678 None, 10679 Annotated[StrictFloat, Field(gt=0)], 10680 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10681 ] = None, 10682 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10683 _content_type: Optional[StrictStr] = None, 10684 _headers: Optional[Dict[StrictStr, Any]] = None, 10685 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10686 ) -> TeamMember: 10687 """Update team member 10688 10689 Updates team member role in team by id.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10690 10691 :param org_id: The ID of an organization. (required) 10692 :type org_id: str 10693 :param team_id: The ID of a team. (required) 10694 :type team_id: str 10695 :param member_id: The id of the Team Member (required) 10696 :type member_id: str 10697 :param team_member_changes: (required) 10698 :type team_member_changes: TeamMemberChanges 10699 :param _request_timeout: timeout setting for this request. If one 10700 number provided, it will be total request 10701 timeout. It can also be a pair (tuple) of 10702 (connection, read) timeouts. 10703 :type _request_timeout: int, tuple(int, int), optional 10704 :param _request_auth: set to override the auth_settings for an a single 10705 request; this effectively ignores the 10706 authentication in the spec for a single request. 10707 :type _request_auth: dict, optional 10708 :param _content_type: force content-type for the request. 10709 :type _content_type: str, Optional 10710 :param _headers: set to override the headers for a single 10711 request; this effectively ignores the headers 10712 in the spec for a single request. 10713 :type _headers: dict, optional 10714 :param _host_index: set to override the host_index for a single 10715 request; this effectively ignores the host_index 10716 in the spec for a single request. 10717 :type _host_index: int, optional 10718 :return: Returns the result object. 10719 """ # noqa: E501 10720 10721 _param = self._enterprise_update_team_member_serialize( 10722 org_id=org_id, 10723 team_id=team_id, 10724 member_id=member_id, 10725 team_member_changes=team_member_changes, 10726 _request_auth=_request_auth, 10727 _content_type=_content_type, 10728 _headers=_headers, 10729 _host_index=_host_index, 10730 ) 10731 10732 _response_types_map: Dict[str, Optional[str]] = { 10733 "200": "TeamMember", 10734 "400": None, 10735 "401": None, 10736 "403": None, 10737 "404": None, 10738 "409": None, 10739 "429": None, 10740 } 10741 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10742 response_data.read() 10743 return self.api_client.response_deserialize( 10744 response_data=response_data, 10745 response_types_map=_response_types_map, 10746 ).data
Update team member
Updates team member role in team by id.
Required scope
organizations:teams:writeRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param member_id: The id of the Team Member (required) :type member_id: str :param team_member_changes: (required) :type team_member_changes: TeamMemberChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10814 @validate_call 10815 def enterprise_get_default_team_settings( 10816 self, 10817 org_id: Annotated[StrictStr, Field(description="The id of an Organization.")], 10818 _request_timeout: Union[ 10819 None, 10820 Annotated[StrictFloat, Field(gt=0)], 10821 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10822 ] = None, 10823 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10824 _content_type: Optional[StrictStr] = None, 10825 _headers: Optional[Dict[StrictStr, Any]] = None, 10826 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10827 ) -> TeamSettings: 10828 """Get default team settings 10829 10830 Retrieves default team settings of an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10831 10832 :param org_id: The id of an Organization. (required) 10833 :type org_id: str 10834 :param _request_timeout: timeout setting for this request. If one 10835 number provided, it will be total request 10836 timeout. It can also be a pair (tuple) of 10837 (connection, read) timeouts. 10838 :type _request_timeout: int, tuple(int, int), optional 10839 :param _request_auth: set to override the auth_settings for an a single 10840 request; this effectively ignores the 10841 authentication in the spec for a single request. 10842 :type _request_auth: dict, optional 10843 :param _content_type: force content-type for the request. 10844 :type _content_type: str, Optional 10845 :param _headers: set to override the headers for a single 10846 request; this effectively ignores the headers 10847 in the spec for a single request. 10848 :type _headers: dict, optional 10849 :param _host_index: set to override the host_index for a single 10850 request; this effectively ignores the host_index 10851 in the spec for a single request. 10852 :type _host_index: int, optional 10853 :return: Returns the result object. 10854 """ # noqa: E501 10855 10856 _param = self._enterprise_get_default_team_settings_serialize( 10857 org_id=org_id, 10858 _request_auth=_request_auth, 10859 _content_type=_content_type, 10860 _headers=_headers, 10861 _host_index=_host_index, 10862 ) 10863 10864 _response_types_map: Dict[str, Optional[str]] = { 10865 "200": "TeamSettings", 10866 "400": None, 10867 "401": None, 10868 "403": None, 10869 "404": None, 10870 "429": None, 10871 } 10872 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10873 response_data.read() 10874 return self.api_client.response_deserialize( 10875 response_data=response_data, 10876 response_types_map=_response_types_map, 10877 ).data
Get default team settings
Retrieves default team settings of an existing organization.
Required scope
organizations:teams:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The id of an Organization. (required) :type org_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
10928 @validate_call 10929 def enterprise_get_team_settings( 10930 self, 10931 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 10932 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 10933 _request_timeout: Union[ 10934 None, 10935 Annotated[StrictFloat, Field(gt=0)], 10936 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 10937 ] = None, 10938 _request_auth: Optional[Dict[StrictStr, Any]] = None, 10939 _content_type: Optional[StrictStr] = None, 10940 _headers: Optional[Dict[StrictStr, Any]] = None, 10941 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 10942 ) -> TeamSettings: 10943 """Get team settings 10944 10945 Retrieves team settings of an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 10946 10947 :param org_id: The ID of an organization. (required) 10948 :type org_id: str 10949 :param team_id: The ID of a team. (required) 10950 :type team_id: str 10951 :param _request_timeout: timeout setting for this request. If one 10952 number provided, it will be total request 10953 timeout. It can also be a pair (tuple) of 10954 (connection, read) timeouts. 10955 :type _request_timeout: int, tuple(int, int), optional 10956 :param _request_auth: set to override the auth_settings for an a single 10957 request; this effectively ignores the 10958 authentication in the spec for a single request. 10959 :type _request_auth: dict, optional 10960 :param _content_type: force content-type for the request. 10961 :type _content_type: str, Optional 10962 :param _headers: set to override the headers for a single 10963 request; this effectively ignores the headers 10964 in the spec for a single request. 10965 :type _headers: dict, optional 10966 :param _host_index: set to override the host_index for a single 10967 request; this effectively ignores the host_index 10968 in the spec for a single request. 10969 :type _host_index: int, optional 10970 :return: Returns the result object. 10971 """ # noqa: E501 10972 10973 _param = self._enterprise_get_team_settings_serialize( 10974 org_id=org_id, 10975 team_id=team_id, 10976 _request_auth=_request_auth, 10977 _content_type=_content_type, 10978 _headers=_headers, 10979 _host_index=_host_index, 10980 ) 10981 10982 _response_types_map: Dict[str, Optional[str]] = { 10983 "200": "TeamSettings", 10984 "400": None, 10985 "401": None, 10986 "403": None, 10987 "404": None, 10988 "429": None, 10989 } 10990 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 10991 response_data.read() 10992 return self.api_client.response_deserialize( 10993 response_data=response_data, 10994 response_types_map=_response_types_map, 10995 ).data
Get team settings
Retrieves team settings of an existing team.
Required scope
organizations:teams:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11049 @validate_call 11050 def enterprise_update_team_settings( 11051 self, 11052 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11053 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11054 team_settings_changes: TeamSettingsChanges, 11055 _request_timeout: Union[ 11056 None, 11057 Annotated[StrictFloat, Field(gt=0)], 11058 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11059 ] = None, 11060 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11061 _content_type: Optional[StrictStr] = None, 11062 _headers: Optional[Dict[StrictStr, Any]] = None, 11063 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11064 ) -> TeamSettings: 11065 """Update team settings 11066 11067 Updates team settings of an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11068 11069 :param org_id: The ID of an organization. (required) 11070 :type org_id: str 11071 :param team_id: The ID of a team. (required) 11072 :type team_id: str 11073 :param team_settings_changes: (required) 11074 :type team_settings_changes: TeamSettingsChanges 11075 :param _request_timeout: timeout setting for this request. If one 11076 number provided, it will be total request 11077 timeout. It can also be a pair (tuple) of 11078 (connection, read) timeouts. 11079 :type _request_timeout: int, tuple(int, int), optional 11080 :param _request_auth: set to override the auth_settings for an a single 11081 request; this effectively ignores the 11082 authentication in the spec for a single request. 11083 :type _request_auth: dict, optional 11084 :param _content_type: force content-type for the request. 11085 :type _content_type: str, Optional 11086 :param _headers: set to override the headers for a single 11087 request; this effectively ignores the headers 11088 in the spec for a single request. 11089 :type _headers: dict, optional 11090 :param _host_index: set to override the host_index for a single 11091 request; this effectively ignores the host_index 11092 in the spec for a single request. 11093 :type _host_index: int, optional 11094 :return: Returns the result object. 11095 """ # noqa: E501 11096 11097 _param = self._enterprise_update_team_settings_serialize( 11098 org_id=org_id, 11099 team_id=team_id, 11100 team_settings_changes=team_settings_changes, 11101 _request_auth=_request_auth, 11102 _content_type=_content_type, 11103 _headers=_headers, 11104 _host_index=_host_index, 11105 ) 11106 11107 _response_types_map: Dict[str, Optional[str]] = { 11108 "200": "TeamSettings", 11109 "400": None, 11110 "401": None, 11111 "403": None, 11112 "404": None, 11113 "409": None, 11114 "429": None, 11115 } 11116 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11117 response_data.read() 11118 return self.api_client.response_deserialize( 11119 response_data=response_data, 11120 response_types_map=_response_types_map, 11121 ).data
Update team settings
Updates team settings of an existing team.
Required scope
organizations:teams:writeRate limiting
Level 2Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param team_settings_changes: (required) :type team_settings_changes: TeamSettingsChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11186 @validate_call 11187 def enterprise_teams_create_group( 11188 self, 11189 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11190 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11191 create_team_group_request: CreateTeamGroupRequest, 11192 _request_timeout: Union[ 11193 None, 11194 Annotated[StrictFloat, Field(gt=0)], 11195 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11196 ] = None, 11197 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11198 _content_type: Optional[StrictStr] = None, 11199 _headers: Optional[Dict[StrictStr, Any]] = None, 11200 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11201 ) -> TeamGroup: 11202 """Create user group to team connection 11203 11204 Adds a user group to a team in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p>' 11205 11206 :param org_id: The ID of an organization. (required) 11207 :type org_id: str 11208 :param team_id: The ID of a team. (required) 11209 :type team_id: str 11210 :param create_team_group_request: (required) 11211 :type create_team_group_request: CreateTeamGroupRequest 11212 :param _request_timeout: timeout setting for this request. If one 11213 number provided, it will be total request 11214 timeout. It can also be a pair (tuple) of 11215 (connection, read) timeouts. 11216 :type _request_timeout: int, tuple(int, int), optional 11217 :param _request_auth: set to override the auth_settings for an a single 11218 request; this effectively ignores the 11219 authentication in the spec for a single request. 11220 :type _request_auth: dict, optional 11221 :param _content_type: force content-type for the request. 11222 :type _content_type: str, Optional 11223 :param _headers: set to override the headers for a single 11224 request; this effectively ignores the headers 11225 in the spec for a single request. 11226 :type _headers: dict, optional 11227 :param _host_index: set to override the host_index for a single 11228 request; this effectively ignores the host_index 11229 in the spec for a single request. 11230 :type _host_index: int, optional 11231 :return: Returns the result object. 11232 """ # noqa: E501 11233 11234 _param = self._enterprise_teams_create_group_serialize( 11235 org_id=org_id, 11236 team_id=team_id, 11237 create_team_group_request=create_team_group_request, 11238 _request_auth=_request_auth, 11239 _content_type=_content_type, 11240 _headers=_headers, 11241 _host_index=_host_index, 11242 ) 11243 11244 _response_types_map: Dict[str, Optional[str]] = { 11245 "201": "TeamGroup", 11246 "400": None, 11247 "401": None, 11248 "403": None, 11249 "409": None, 11250 "429": None, 11251 } 11252 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11253 response_data.read() 11254 return self.api_client.response_deserialize( 11255 response_data=response_data, 11256 response_types_map=_response_types_map, 11257 ).data
Create user group to team connection
Adds a user group to a team in an organization.
Required scope
organizations:groups:readorganizations:teams:write
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
':param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param create_team_group_request: (required) :type create_team_group_request: CreateTeamGroupRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11322 @validate_call 11323 def enterprise_teams_delete_group( 11324 self, 11325 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11326 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11327 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 11328 _request_timeout: Union[ 11329 None, 11330 Annotated[StrictFloat, Field(gt=0)], 11331 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11332 ] = None, 11333 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11334 _content_type: Optional[StrictStr] = None, 11335 _headers: Optional[Dict[StrictStr, Any]] = None, 11336 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11337 ) -> None: 11338 """Delete user group to team connection 11339 11340 Removes a user group from a team in an existing organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11341 11342 :param org_id: The ID of an organization. (required) 11343 :type org_id: str 11344 :param team_id: The ID of a team. (required) 11345 :type team_id: str 11346 :param group_id: The ID of a user group. (required) 11347 :type group_id: str 11348 :param _request_timeout: timeout setting for this request. If one 11349 number provided, it will be total request 11350 timeout. It can also be a pair (tuple) of 11351 (connection, read) timeouts. 11352 :type _request_timeout: int, tuple(int, int), optional 11353 :param _request_auth: set to override the auth_settings for an a single 11354 request; this effectively ignores the 11355 authentication in the spec for a single request. 11356 :type _request_auth: dict, optional 11357 :param _content_type: force content-type for the request. 11358 :type _content_type: str, Optional 11359 :param _headers: set to override the headers for a single 11360 request; this effectively ignores the headers 11361 in the spec for a single request. 11362 :type _headers: dict, optional 11363 :param _host_index: set to override the host_index for a single 11364 request; this effectively ignores the host_index 11365 in the spec for a single request. 11366 :type _host_index: int, optional 11367 :return: Returns the result object. 11368 """ # noqa: E501 11369 11370 _param = self._enterprise_teams_delete_group_serialize( 11371 org_id=org_id, 11372 team_id=team_id, 11373 group_id=group_id, 11374 _request_auth=_request_auth, 11375 _content_type=_content_type, 11376 _headers=_headers, 11377 _host_index=_host_index, 11378 ) 11379 11380 _response_types_map: Dict[str, Optional[str]] = { 11381 "204": None, 11382 "400": None, 11383 "401": None, 11384 "403": None, 11385 "404": None, 11386 "409": None, 11387 "429": None, 11388 } 11389 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11390 response_data.read() 11391 return self.api_client.response_deserialize( 11392 response_data=response_data, 11393 response_types_map=_response_types_map, 11394 ).data
Delete user group to team connection
Removes a user group from a team in an existing organization.
Required scope
organizations:groups:readorganizations:teams:write
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11448 @validate_call 11449 def enterprise_teams_get_group( 11450 self, 11451 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11452 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11453 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 11454 _request_timeout: Union[ 11455 None, 11456 Annotated[StrictFloat, Field(gt=0)], 11457 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11458 ] = None, 11459 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11460 _content_type: Optional[StrictStr] = None, 11461 _headers: Optional[Dict[StrictStr, Any]] = None, 11462 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11463 ) -> TeamGroup: 11464 """Get user group of a team 11465 11466 Retrieves information about a specific user group of a team.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11467 11468 :param org_id: The ID of an organization. (required) 11469 :type org_id: str 11470 :param team_id: The ID of a team. (required) 11471 :type team_id: str 11472 :param group_id: The ID of a user group. (required) 11473 :type group_id: str 11474 :param _request_timeout: timeout setting for this request. If one 11475 number provided, it will be total request 11476 timeout. It can also be a pair (tuple) of 11477 (connection, read) timeouts. 11478 :type _request_timeout: int, tuple(int, int), optional 11479 :param _request_auth: set to override the auth_settings for an a single 11480 request; this effectively ignores the 11481 authentication in the spec for a single request. 11482 :type _request_auth: dict, optional 11483 :param _content_type: force content-type for the request. 11484 :type _content_type: str, Optional 11485 :param _headers: set to override the headers for a single 11486 request; this effectively ignores the headers 11487 in the spec for a single request. 11488 :type _headers: dict, optional 11489 :param _host_index: set to override the host_index for a single 11490 request; this effectively ignores the host_index 11491 in the spec for a single request. 11492 :type _host_index: int, optional 11493 :return: Returns the result object. 11494 """ # noqa: E501 11495 11496 _param = self._enterprise_teams_get_group_serialize( 11497 org_id=org_id, 11498 team_id=team_id, 11499 group_id=group_id, 11500 _request_auth=_request_auth, 11501 _content_type=_content_type, 11502 _headers=_headers, 11503 _host_index=_host_index, 11504 ) 11505 11506 _response_types_map: Dict[str, Optional[str]] = { 11507 "200": "TeamGroup", 11508 "400": None, 11509 "401": None, 11510 "403": None, 11511 "404": None, 11512 "429": None, 11513 } 11514 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11515 response_data.read() 11516 return self.api_client.response_deserialize( 11517 response_data=response_data, 11518 response_types_map=_response_types_map, 11519 ).data
Get user group of a team
Retrieves information about a specific user group of a team.
Required scope
organizations:groups:readorganizations:teams:read
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11576 @validate_call 11577 def enterprise_teams_get_groups( 11578 self, 11579 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11580 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11581 limit: Annotated[ 11582 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 11583 Field(description="The maximum number of user groups in the result list."), 11584 ] = None, 11585 cursor: Annotated[ 11586 Optional[StrictStr], 11587 Field( 11588 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 11589 ), 11590 ] = None, 11591 _request_timeout: Union[ 11592 None, 11593 Annotated[StrictFloat, Field(gt=0)], 11594 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11595 ] = None, 11596 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11597 _content_type: Optional[StrictStr] = None, 11598 _headers: Optional[Dict[StrictStr, Any]] = None, 11599 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11600 ) -> TeamGroupsPage: 11601 """List of user group to team connections 11602 11603 Retrieves the list of user groups that are part of a team in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11604 11605 :param org_id: The ID of an organization. (required) 11606 :type org_id: str 11607 :param team_id: The ID of a team. (required) 11608 :type team_id: str 11609 :param limit: The maximum number of user groups in the result list. 11610 :type limit: int 11611 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 11612 :type cursor: str 11613 :param _request_timeout: timeout setting for this request. If one 11614 number provided, it will be total request 11615 timeout. It can also be a pair (tuple) of 11616 (connection, read) timeouts. 11617 :type _request_timeout: int, tuple(int, int), optional 11618 :param _request_auth: set to override the auth_settings for an a single 11619 request; this effectively ignores the 11620 authentication in the spec for a single request. 11621 :type _request_auth: dict, optional 11622 :param _content_type: force content-type for the request. 11623 :type _content_type: str, Optional 11624 :param _headers: set to override the headers for a single 11625 request; this effectively ignores the headers 11626 in the spec for a single request. 11627 :type _headers: dict, optional 11628 :param _host_index: set to override the host_index for a single 11629 request; this effectively ignores the host_index 11630 in the spec for a single request. 11631 :type _host_index: int, optional 11632 :return: Returns the result object. 11633 """ # noqa: E501 11634 11635 _param = self._enterprise_teams_get_groups_serialize( 11636 org_id=org_id, 11637 team_id=team_id, 11638 limit=limit, 11639 cursor=cursor, 11640 _request_auth=_request_auth, 11641 _content_type=_content_type, 11642 _headers=_headers, 11643 _host_index=_host_index, 11644 ) 11645 11646 _response_types_map: Dict[str, Optional[str]] = { 11647 "200": "TeamGroupsPage", 11648 "400": None, 11649 "401": None, 11650 "403": None, 11651 "429": None, 11652 } 11653 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11654 response_data.read() 11655 return self.api_client.response_deserialize( 11656 response_data=response_data, 11657 response_types_map=_response_types_map, 11658 ).data
List of user group to team connections
Retrieves the list of user groups that are part of a team in an organization.
Required scope
organizations:groups:readorganizations:teams:read
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param limit: The maximum number of user groups in the result list. :type limit: int :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11722 @validate_call 11723 def enterprise_create_team( 11724 self, 11725 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11726 create_team_request: CreateTeamRequest, 11727 _request_timeout: Union[ 11728 None, 11729 Annotated[StrictFloat, Field(gt=0)], 11730 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11731 ] = None, 11732 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11733 _content_type: Optional[StrictStr] = None, 11734 _headers: Optional[Dict[StrictStr, Any]] = None, 11735 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11736 ) -> Team: 11737 """Create team 11738 11739 Creates a new team in an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11740 11741 :param org_id: The ID of an organization. (required) 11742 :type org_id: str 11743 :param create_team_request: (required) 11744 :type create_team_request: CreateTeamRequest 11745 :param _request_timeout: timeout setting for this request. If one 11746 number provided, it will be total request 11747 timeout. It can also be a pair (tuple) of 11748 (connection, read) timeouts. 11749 :type _request_timeout: int, tuple(int, int), optional 11750 :param _request_auth: set to override the auth_settings for an a single 11751 request; this effectively ignores the 11752 authentication in the spec for a single request. 11753 :type _request_auth: dict, optional 11754 :param _content_type: force content-type for the request. 11755 :type _content_type: str, Optional 11756 :param _headers: set to override the headers for a single 11757 request; this effectively ignores the headers 11758 in the spec for a single request. 11759 :type _headers: dict, optional 11760 :param _host_index: set to override the host_index for a single 11761 request; this effectively ignores the host_index 11762 in the spec for a single request. 11763 :type _host_index: int, optional 11764 :return: Returns the result object. 11765 """ # noqa: E501 11766 11767 _param = self._enterprise_create_team_serialize( 11768 org_id=org_id, 11769 create_team_request=create_team_request, 11770 _request_auth=_request_auth, 11771 _content_type=_content_type, 11772 _headers=_headers, 11773 _host_index=_host_index, 11774 ) 11775 11776 _response_types_map: Dict[str, Optional[str]] = { 11777 "201": "Team", 11778 "400": None, 11779 "401": None, 11780 "403": None, 11781 "404": None, 11782 "429": None, 11783 } 11784 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11785 response_data.read() 11786 return self.api_client.response_deserialize( 11787 response_data=response_data, 11788 response_types_map=_response_types_map, 11789 ).data
Create team
Creates a new team in an existing organization.
Required scope
organizations:teams:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param create_team_request: (required) :type create_team_request: CreateTeamRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11851 @validate_call 11852 def enterprise_delete_team( 11853 self, 11854 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11855 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11856 _request_timeout: Union[ 11857 None, 11858 Annotated[StrictFloat, Field(gt=0)], 11859 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11860 ] = None, 11861 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11862 _content_type: Optional[StrictStr] = None, 11863 _headers: Optional[Dict[StrictStr, Any]] = None, 11864 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11865 ) -> None: 11866 """Delete team 11867 11868 Deletes an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11869 11870 :param org_id: The ID of an organization. (required) 11871 :type org_id: str 11872 :param team_id: The ID of a team. (required) 11873 :type team_id: str 11874 :param _request_timeout: timeout setting for this request. If one 11875 number provided, it will be total request 11876 timeout. It can also be a pair (tuple) of 11877 (connection, read) timeouts. 11878 :type _request_timeout: int, tuple(int, int), optional 11879 :param _request_auth: set to override the auth_settings for an a single 11880 request; this effectively ignores the 11881 authentication in the spec for a single request. 11882 :type _request_auth: dict, optional 11883 :param _content_type: force content-type for the request. 11884 :type _content_type: str, Optional 11885 :param _headers: set to override the headers for a single 11886 request; this effectively ignores the headers 11887 in the spec for a single request. 11888 :type _headers: dict, optional 11889 :param _host_index: set to override the host_index for a single 11890 request; this effectively ignores the host_index 11891 in the spec for a single request. 11892 :type _host_index: int, optional 11893 :return: Returns the result object. 11894 """ # noqa: E501 11895 11896 _param = self._enterprise_delete_team_serialize( 11897 org_id=org_id, 11898 team_id=team_id, 11899 _request_auth=_request_auth, 11900 _content_type=_content_type, 11901 _headers=_headers, 11902 _host_index=_host_index, 11903 ) 11904 11905 _response_types_map: Dict[str, Optional[str]] = { 11906 "204": None, 11907 "400": None, 11908 "401": None, 11909 "403": None, 11910 "404": None, 11911 "429": None, 11912 } 11913 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 11914 response_data.read() 11915 return self.api_client.response_deserialize( 11916 response_data=response_data, 11917 response_types_map=_response_types_map, 11918 ).data
Delete team
Deletes an existing team.
Required scope
organizations:teams:writeRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
11969 @validate_call 11970 def enterprise_get_team( 11971 self, 11972 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 11973 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 11974 _request_timeout: Union[ 11975 None, 11976 Annotated[StrictFloat, Field(gt=0)], 11977 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 11978 ] = None, 11979 _request_auth: Optional[Dict[StrictStr, Any]] = None, 11980 _content_type: Optional[StrictStr] = None, 11981 _headers: Optional[Dict[StrictStr, Any]] = None, 11982 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 11983 ) -> Team: 11984 """Get team 11985 11986 Retrieves team information for an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 11987 11988 :param org_id: The ID of an organization. (required) 11989 :type org_id: str 11990 :param team_id: The ID of a team. (required) 11991 :type team_id: str 11992 :param _request_timeout: timeout setting for this request. If one 11993 number provided, it will be total request 11994 timeout. It can also be a pair (tuple) of 11995 (connection, read) timeouts. 11996 :type _request_timeout: int, tuple(int, int), optional 11997 :param _request_auth: set to override the auth_settings for an a single 11998 request; this effectively ignores the 11999 authentication in the spec for a single request. 12000 :type _request_auth: dict, optional 12001 :param _content_type: force content-type for the request. 12002 :type _content_type: str, Optional 12003 :param _headers: set to override the headers for a single 12004 request; this effectively ignores the headers 12005 in the spec for a single request. 12006 :type _headers: dict, optional 12007 :param _host_index: set to override the host_index for a single 12008 request; this effectively ignores the host_index 12009 in the spec for a single request. 12010 :type _host_index: int, optional 12011 :return: Returns the result object. 12012 """ # noqa: E501 12013 12014 _param = self._enterprise_get_team_serialize( 12015 org_id=org_id, 12016 team_id=team_id, 12017 _request_auth=_request_auth, 12018 _content_type=_content_type, 12019 _headers=_headers, 12020 _host_index=_host_index, 12021 ) 12022 12023 _response_types_map: Dict[str, Optional[str]] = { 12024 "200": "Team", 12025 "400": None, 12026 "401": None, 12027 "403": None, 12028 "404": None, 12029 "429": None, 12030 } 12031 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12032 response_data.read() 12033 return self.api_client.response_deserialize( 12034 response_data=response_data, 12035 response_types_map=_response_types_map, 12036 ).data
Get team
Retrieves team information for an existing team.
Required scope
organizations:teams:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
12090 @validate_call 12091 def enterprise_get_teams( 12092 self, 12093 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 12094 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 12095 cursor: Annotated[ 12096 Optional[StrictStr], 12097 Field( 12098 description="An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request." 12099 ), 12100 ] = None, 12101 name: Annotated[ 12102 Optional[StrictStr], 12103 Field( 12104 description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".' 12105 ), 12106 ] = None, 12107 _request_timeout: Union[ 12108 None, 12109 Annotated[StrictFloat, Field(gt=0)], 12110 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12111 ] = None, 12112 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12113 _content_type: Optional[StrictStr] = None, 12114 _headers: Optional[Dict[StrictStr, Any]] = None, 12115 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12116 ) -> TeamsPage: 12117 """List teams 12118 12119 Retrieves list of teams in an existing organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 12120 12121 :param org_id: The ID of an organization. (required) 12122 :type org_id: str 12123 :param limit: 12124 :type limit: int 12125 :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. 12126 :type cursor: str 12127 :param name: Name query. Filters teams by name using case insensitive partial match. A value \"dev\" will return both \"Developer's team\" and \"Team for developers\". 12128 :type name: str 12129 :param _request_timeout: timeout setting for this request. If one 12130 number provided, it will be total request 12131 timeout. It can also be a pair (tuple) of 12132 (connection, read) timeouts. 12133 :type _request_timeout: int, tuple(int, int), optional 12134 :param _request_auth: set to override the auth_settings for an a single 12135 request; this effectively ignores the 12136 authentication in the spec for a single request. 12137 :type _request_auth: dict, optional 12138 :param _content_type: force content-type for the request. 12139 :type _content_type: str, Optional 12140 :param _headers: set to override the headers for a single 12141 request; this effectively ignores the headers 12142 in the spec for a single request. 12143 :type _headers: dict, optional 12144 :param _host_index: set to override the host_index for a single 12145 request; this effectively ignores the host_index 12146 in the spec for a single request. 12147 :type _host_index: int, optional 12148 :return: Returns the result object. 12149 """ # noqa: E501 12150 12151 _param = self._enterprise_get_teams_serialize( 12152 org_id=org_id, 12153 limit=limit, 12154 cursor=cursor, 12155 name=name, 12156 _request_auth=_request_auth, 12157 _content_type=_content_type, 12158 _headers=_headers, 12159 _host_index=_host_index, 12160 ) 12161 12162 _response_types_map: Dict[str, Optional[str]] = { 12163 "200": "TeamsPage", 12164 "400": None, 12165 "401": None, 12166 "403": None, 12167 "404": None, 12168 "429": None, 12169 } 12170 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12171 response_data.read() 12172 return self.api_client.response_deserialize( 12173 response_data=response_data, 12174 response_types_map=_response_types_map, 12175 ).data
List teams
Retrieves list of teams in an existing organization.
Required scope
organizations:teams:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param limit: :type limit: int :param cursor: An indicator of the position of a page in the full set of results. To obtain the first page leave it empty. To obtain subsequent pages set it to the value returned in the cursor field of the previous request. :type cursor: str :param name: Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer's team" and "Team for developers". :type name: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
12241 @validate_call 12242 def enterprise_update_team( 12243 self, 12244 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 12245 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 12246 team_changes: TeamChanges, 12247 _request_timeout: Union[ 12248 None, 12249 Annotated[StrictFloat, Field(gt=0)], 12250 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12251 ] = None, 12252 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12253 _content_type: Optional[StrictStr] = None, 12254 _headers: Optional[Dict[StrictStr, Any]] = None, 12255 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12256 ) -> Team: 12257 """Update team 12258 12259 Updates an existing team.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 12260 12261 :param org_id: The ID of an organization. (required) 12262 :type org_id: str 12263 :param team_id: The ID of a team. (required) 12264 :type team_id: str 12265 :param team_changes: (required) 12266 :type team_changes: TeamChanges 12267 :param _request_timeout: timeout setting for this request. If one 12268 number provided, it will be total request 12269 timeout. It can also be a pair (tuple) of 12270 (connection, read) timeouts. 12271 :type _request_timeout: int, tuple(int, int), optional 12272 :param _request_auth: set to override the auth_settings for an a single 12273 request; this effectively ignores the 12274 authentication in the spec for a single request. 12275 :type _request_auth: dict, optional 12276 :param _content_type: force content-type for the request. 12277 :type _content_type: str, Optional 12278 :param _headers: set to override the headers for a single 12279 request; this effectively ignores the headers 12280 in the spec for a single request. 12281 :type _headers: dict, optional 12282 :param _host_index: set to override the host_index for a single 12283 request; this effectively ignores the host_index 12284 in the spec for a single request. 12285 :type _host_index: int, optional 12286 :return: Returns the result object. 12287 """ # noqa: E501 12288 12289 _param = self._enterprise_update_team_serialize( 12290 org_id=org_id, 12291 team_id=team_id, 12292 team_changes=team_changes, 12293 _request_auth=_request_auth, 12294 _content_type=_content_type, 12295 _headers=_headers, 12296 _host_index=_host_index, 12297 ) 12298 12299 _response_types_map: Dict[str, Optional[str]] = { 12300 "200": "Team", 12301 "400": None, 12302 "401": None, 12303 "403": None, 12304 "404": None, 12305 "429": None, 12306 } 12307 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12308 response_data.read() 12309 return self.api_client.response_deserialize( 12310 response_data=response_data, 12311 response_types_map=_response_types_map, 12312 ).data
Update team
Updates an existing team.
Required scope
organizations:teams:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param team_id: The ID of a team. (required) :type team_id: str :param team_changes: (required) :type team_changes: TeamChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
12377 @validate_call 12378 def create_user( 12379 self, 12380 create_user_resource: CreateUserResource, 12381 _request_timeout: Union[ 12382 None, 12383 Annotated[StrictFloat, Field(gt=0)], 12384 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12385 ] = None, 12386 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12387 _content_type: Optional[StrictStr] = None, 12388 _headers: Optional[Dict[StrictStr, Any]] = None, 12389 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12390 ) -> UserResource: 12391 """Create user 12392 12393 Creates a new user in the organization. <br><br> <br>Note</b>: All newly provisioned users are added to the default team. 12394 12395 :param create_user_resource: (required) 12396 :type create_user_resource: CreateUserResource 12397 :param _request_timeout: timeout setting for this request. If one 12398 number provided, it will be total request 12399 timeout. It can also be a pair (tuple) of 12400 (connection, read) timeouts. 12401 :type _request_timeout: int, tuple(int, int), optional 12402 :param _request_auth: set to override the auth_settings for an a single 12403 request; this effectively ignores the 12404 authentication in the spec for a single request. 12405 :type _request_auth: dict, optional 12406 :param _content_type: force content-type for the request. 12407 :type _content_type: str, Optional 12408 :param _headers: set to override the headers for a single 12409 request; this effectively ignores the headers 12410 in the spec for a single request. 12411 :type _headers: dict, optional 12412 :param _host_index: set to override the host_index for a single 12413 request; this effectively ignores the host_index 12414 in the spec for a single request. 12415 :type _host_index: int, optional 12416 :return: Returns the result object. 12417 """ # noqa: E501 12418 12419 _param = self._create_user_serialize( 12420 create_user_resource=create_user_resource, 12421 _request_auth=_request_auth, 12422 _content_type=_content_type, 12423 _headers=_headers, 12424 _host_index=_host_index, 12425 ) 12426 12427 _response_types_map: Dict[str, Optional[str]] = { 12428 "201": "UserResource", 12429 "400": None, 12430 "401": None, 12431 "403": None, 12432 "404": None, 12433 "409": None, 12434 "413": None, 12435 "429": None, 12436 "500": None, 12437 } 12438 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12439 response_data.read() 12440 return self.api_client.response_deserialize( 12441 response_data=response_data, 12442 response_types_map=_response_types_map, 12443 ).data
Create user
Creates a new user in the organization.
Note: All newly provisioned users are added to the default team.
:param create_user_resource: (required) :type create_user_resource: CreateUserResource :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
12504 @validate_call 12505 def delete_user( 12506 self, 12507 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 12508 _request_timeout: Union[ 12509 None, 12510 Annotated[StrictFloat, Field(gt=0)], 12511 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12512 ] = None, 12513 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12514 _content_type: Optional[StrictStr] = None, 12515 _headers: Optional[Dict[StrictStr, Any]] = None, 12516 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12517 ) -> None: 12518 """Delete user 12519 12520 Deletes a single user from the organization.<br><br> Note: A user who is the last admin in the team or the last admin in the organization cannot be deleted. User must be a member in the organization to be deleted. Users that have guest role in the organization cannot be deleted. <br><br> After a user is deleted, the ownership of all the boards that belong to the deleted user is transferred to the oldest team member who currently has an admin role. 12521 12522 :param id: User ID. A server-assigned, unique identifier for this user. (required) 12523 :type id: str 12524 :param _request_timeout: timeout setting for this request. If one 12525 number provided, it will be total request 12526 timeout. It can also be a pair (tuple) of 12527 (connection, read) timeouts. 12528 :type _request_timeout: int, tuple(int, int), optional 12529 :param _request_auth: set to override the auth_settings for an a single 12530 request; this effectively ignores the 12531 authentication in the spec for a single request. 12532 :type _request_auth: dict, optional 12533 :param _content_type: force content-type for the request. 12534 :type _content_type: str, Optional 12535 :param _headers: set to override the headers for a single 12536 request; this effectively ignores the headers 12537 in the spec for a single request. 12538 :type _headers: dict, optional 12539 :param _host_index: set to override the host_index for a single 12540 request; this effectively ignores the host_index 12541 in the spec for a single request. 12542 :type _host_index: int, optional 12543 :return: Returns the result object. 12544 """ # noqa: E501 12545 12546 _param = self._delete_user_serialize( 12547 id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 12548 ) 12549 12550 _response_types_map: Dict[str, Optional[str]] = { 12551 "204": None, 12552 "400": None, 12553 "401": None, 12554 "403": None, 12555 "404": None, 12556 "409": None, 12557 "429": None, 12558 "500": None, 12559 } 12560 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12561 response_data.read() 12562 return self.api_client.response_deserialize( 12563 response_data=response_data, 12564 response_types_map=_response_types_map, 12565 ).data
Delete user
Deletes a single user from the organization.
Note: A user who is the last admin in the team or the last admin in the organization cannot be deleted. User must be a member in the organization to be deleted. Users that have guest role in the organization cannot be deleted.
After a user is deleted, the ownership of all the boards that belong to the deleted user is transferred to the oldest team member who currently has an admin role.
:param id: User ID. A server-assigned, unique identifier for this user. (required) :type id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
12613 @validate_call 12614 def get_user( 12615 self, 12616 id: Annotated[StrictStr, Field(description="User ID of the user to be retrieved")], 12617 attributes: Annotated[ 12618 Optional[StrictStr], 12619 Field( 12620 description="A comma-separated list of attribute names to return in the response. <br><br> <br>Example attributes</b> - id, userName, displayName, name, userType, active, emails, photos, groups, roles. <br><br> <br>Note</b>: It is also possible to fetch attributes within complex attributes, for Example: emails.value" 12621 ), 12622 ] = None, 12623 _request_timeout: Union[ 12624 None, 12625 Annotated[StrictFloat, Field(gt=0)], 12626 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12627 ] = None, 12628 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12629 _content_type: Optional[StrictStr] = None, 12630 _headers: Optional[Dict[StrictStr, Any]] = None, 12631 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12632 ) -> UserResource: 12633 """Get user 12634 12635 Retrieves a single user resource. <br><b> <br>Note</b>: Returns only users that are members in the organization. It does not return users that are added in the organization as guests. 12636 12637 :param id: User ID of the user to be retrieved (required) 12638 :type id: str 12639 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> <br>Example attributes</b> - id, userName, displayName, name, userType, active, emails, photos, groups, roles. <br><br> <br>Note</b>: It is also possible to fetch attributes within complex attributes, for Example: emails.value 12640 :type attributes: str 12641 :param _request_timeout: timeout setting for this request. If one 12642 number provided, it will be total request 12643 timeout. It can also be a pair (tuple) of 12644 (connection, read) timeouts. 12645 :type _request_timeout: int, tuple(int, int), optional 12646 :param _request_auth: set to override the auth_settings for an a single 12647 request; this effectively ignores the 12648 authentication in the spec for a single request. 12649 :type _request_auth: dict, optional 12650 :param _content_type: force content-type for the request. 12651 :type _content_type: str, Optional 12652 :param _headers: set to override the headers for a single 12653 request; this effectively ignores the headers 12654 in the spec for a single request. 12655 :type _headers: dict, optional 12656 :param _host_index: set to override the host_index for a single 12657 request; this effectively ignores the host_index 12658 in the spec for a single request. 12659 :type _host_index: int, optional 12660 :return: Returns the result object. 12661 """ # noqa: E501 12662 12663 _param = self._get_user_serialize( 12664 id=id, 12665 attributes=attributes, 12666 _request_auth=_request_auth, 12667 _content_type=_content_type, 12668 _headers=_headers, 12669 _host_index=_host_index, 12670 ) 12671 12672 _response_types_map: Dict[str, Optional[str]] = { 12673 "200": "UserResource", 12674 "400": None, 12675 "401": None, 12676 "403": None, 12677 "404": None, 12678 "429": None, 12679 "500": None, 12680 } 12681 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12682 response_data.read() 12683 return self.api_client.response_deserialize( 12684 response_data=response_data, 12685 response_types_map=_response_types_map, 12686 ).data
Get user
Retrieves a single user resource.
Note: Returns only users that are members in the organization. It does not return users that are added in the organization as guests.
:param id: User ID of the user to be retrieved (required)
:type id: str
:param attributes: A comma-separated list of attribute names to return in the response.
Example attributes - id, userName, displayName, name, userType, active, emails, photos, groups, roles.
Note: It is also possible to fetch attributes within complex attributes, for Example: emails.value
:type attributes: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
12742 @validate_call 12743 def list_users( 12744 self, 12745 attributes: Annotated[ 12746 Optional[StrictStr], 12747 Field( 12748 description="A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter." 12749 ), 12750 ] = None, 12751 filter: Annotated[ 12752 Optional[StrictStr], 12753 Field( 12754 description='You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical "and"<br> or = Logical "or"<br> not = "Not" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br> <u>Example filters</u>:<br><br> For fetching users with user name as user@miro.com: userName eq "user@miro.com" <br><br> For fetching all active users in the organization: active eq true <br><br> For fetching users with "user" in their displayName: displayName co "user" <br><br> For fetching users that are member of a specific group (team): groups.value eq "3458764577585056871" <br><br> For fetching users that are not of userType Full: userType ne "Full"' 12755 ), 12756 ] = None, 12757 start_index: Annotated[ 12758 Optional[StrictInt], 12759 Field( 12760 description="Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1" 12761 ), 12762 ] = None, 12763 count: Annotated[ 12764 Optional[StrictInt], 12765 Field( 12766 description="Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12" 12767 ), 12768 ] = None, 12769 sort_by: Annotated[ 12770 Optional[StrictStr], 12771 Field( 12772 description="Specifies the attribute whose value will be used to order the response. <br><br> Example: sortBy=userName, sortBy=emails.value" 12773 ), 12774 ] = None, 12775 sort_order: Annotated[ 12776 Optional[StrictStr], 12777 Field( 12778 description="Defines the order in which the sortBy parameter is applied. <br><br> Example: sortOrder=ascending" 12779 ), 12780 ] = None, 12781 _request_timeout: Union[ 12782 None, 12783 Annotated[StrictFloat, Field(gt=0)], 12784 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12785 ] = None, 12786 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12787 _content_type: Optional[StrictStr] = None, 12788 _headers: Optional[Dict[StrictStr, Any]] = None, 12789 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12790 ) -> UserListResponse: 12791 """List users 12792 12793 Retrieves the list of users in your organization. <br><b> <br>Note</b>: The API returns users that are members in the organization, it does not return users that are added in the organization as guests. 12794 12795 :param attributes: A comma-separated list of attribute names to return in the response. <br><br> Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter. 12796 :type attributes: str 12797 :param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value. <br>eq = equal<br> ne = not equal<br> co = contains<br> sw = starts with<br> ew = ends with<br> pr = preset (has value)<br> gt = greater than<br> ge = greater than or equal to<br> lt = less than<br> le = less than or equal to<br> and = Logical \"and\"<br> or = Logical \"or\"<br> not = \"Not\" function<br> () = Precedence grouping <br>The value must be passed within parenthesis. <br><br> <u>Example filters</u>:<br><br> For fetching users with user name as user@miro.com: userName eq \"user@miro.com\" <br><br> For fetching all active users in the organization: active eq true <br><br> For fetching users with \"user\" in their displayName: displayName co \"user\" <br><br> For fetching users that are member of a specific group (team): groups.value eq \"3458764577585056871\" <br><br> For fetching users that are not of userType Full: userType ne \"Full\" 12798 :type filter: str 12799 :param start_index: Use startIndex in combination with count query parameters to receive paginated results. <br><br> start index is 1-based. <br><br> Example: startIndex=1 12800 :type start_index: int 12801 :param count: Specifies the maximum number of query results per page. <br><br> Use count in combination with startIndex query parameters to receive paginated results. <br><br> The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000. <br><br> Example: count=12 12802 :type count: int 12803 :param sort_by: Specifies the attribute whose value will be used to order the response. <br><br> Example: sortBy=userName, sortBy=emails.value 12804 :type sort_by: str 12805 :param sort_order: Defines the order in which the sortBy parameter is applied. <br><br> Example: sortOrder=ascending 12806 :type sort_order: str 12807 :param _request_timeout: timeout setting for this request. If one 12808 number provided, it will be total request 12809 timeout. It can also be a pair (tuple) of 12810 (connection, read) timeouts. 12811 :type _request_timeout: int, tuple(int, int), optional 12812 :param _request_auth: set to override the auth_settings for an a single 12813 request; this effectively ignores the 12814 authentication in the spec for a single request. 12815 :type _request_auth: dict, optional 12816 :param _content_type: force content-type for the request. 12817 :type _content_type: str, Optional 12818 :param _headers: set to override the headers for a single 12819 request; this effectively ignores the headers 12820 in the spec for a single request. 12821 :type _headers: dict, optional 12822 :param _host_index: set to override the host_index for a single 12823 request; this effectively ignores the host_index 12824 in the spec for a single request. 12825 :type _host_index: int, optional 12826 :return: Returns the result object. 12827 """ # noqa: E501 12828 12829 _param = self._list_users_serialize( 12830 attributes=attributes, 12831 filter=filter, 12832 start_index=start_index, 12833 count=count, 12834 sort_by=sort_by, 12835 sort_order=sort_order, 12836 _request_auth=_request_auth, 12837 _content_type=_content_type, 12838 _headers=_headers, 12839 _host_index=_host_index, 12840 ) 12841 12842 _response_types_map: Dict[str, Optional[str]] = { 12843 "200": "UserListResponse", 12844 "400": None, 12845 "401": None, 12846 "403": None, 12847 "404": None, 12848 "429": None, 12849 "500": None, 12850 } 12851 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 12852 response_data.read() 12853 return self.api_client.response_deserialize( 12854 response_data=response_data, 12855 response_types_map=_response_types_map, 12856 ).data
List users
Retrieves the list of users in your organization.
Note: The API returns users that are members in the organization, it does not return users that are added in the organization as guests.
:param attributes: A comma-separated list of attribute names to return in the response.
Example attributes: id, userName, displayName, name, userType, active, emails, photos, groups, roles. You can also retrieve attributes within complex attributes, for Example: emails.value. The API also supports sorting and the filter parameter.
:type attributes: str
:param filter: You can request a subset of resources by specifying the filter query parameter containing a filter expression. Attribute names and attribute operators used in filters are not case sensitive. The filter parameter must contain at least one valid expression. Each expression must contain an attribute name followed by an attribute operator and an optional value.
eq = equal
ne = not equal
co = contains
sw = starts with
ew = ends with
pr = preset (has value)
gt = greater than
ge = greater than or equal to
lt = less than
le = less than or equal to
and = Logical "and"
or = Logical "or"
not = "Not" function
() = Precedence grouping
The value must be passed within parenthesis.
Example filters:
For fetching users with user name as user@miro.com: userName eq "user@miro.com"
For fetching all active users in the organization: active eq true
For fetching users with "user" in their displayName: displayName co "user"
For fetching users that are member of a specific group (team): groups.value eq "3458764577585056871"
For fetching users that are not of userType Full: userType ne "Full"
:type filter: str
:param start_index: Use startIndex in combination with count query parameters to receive paginated results.
start index is 1-based.
Example: startIndex=1
:type start_index: int
:param count: Specifies the maximum number of query results per page.
Use count in combination with startIndex query parameters to receive paginated results.
The count query parameter is set to 100 by default and the maximum value allowed for this parameter is 1000.
Example: count=12
:type count: int
:param sort_by: Specifies the attribute whose value will be used to order the response.
Example: sortBy=userName, sortBy=emails.value
:type sort_by: str
:param sort_order: Defines the order in which the sortBy parameter is applied.
Example: sortOrder=ascending
:type sort_order: str
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
12934 @validate_call 12935 def patch_user( 12936 self, 12937 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 12938 patch_user_resource: Annotated[ 12939 PatchUserResource, 12940 Field( 12941 description='Payload to update user information. <br><br> The body of a PATCH request must contain the attribute `Operations`, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one "op" member.' 12942 ), 12943 ], 12944 _request_timeout: Union[ 12945 None, 12946 Annotated[StrictFloat, Field(gt=0)], 12947 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 12948 ] = None, 12949 _request_auth: Optional[Dict[StrictStr, Any]] = None, 12950 _content_type: Optional[StrictStr] = None, 12951 _headers: Optional[Dict[StrictStr, Any]] = None, 12952 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 12953 ) -> UserResource: 12954 """Patch user 12955 12956 Updates an existing user resource, overwriting values for specified attributes. Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided. <br><br> Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated. 12957 12958 :param id: User ID. A server-assigned, unique identifier for this user. (required) 12959 :type id: str 12960 :param patch_user_resource: Payload to update user information. <br><br> The body of a PATCH request must contain the attribute `Operations`, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one \"op\" member. (required) 12961 :type patch_user_resource: PatchUserResource 12962 :param _request_timeout: timeout setting for this request. If one 12963 number provided, it will be total request 12964 timeout. It can also be a pair (tuple) of 12965 (connection, read) timeouts. 12966 :type _request_timeout: int, tuple(int, int), optional 12967 :param _request_auth: set to override the auth_settings for an a single 12968 request; this effectively ignores the 12969 authentication in the spec for a single request. 12970 :type _request_auth: dict, optional 12971 :param _content_type: force content-type for the request. 12972 :type _content_type: str, Optional 12973 :param _headers: set to override the headers for a single 12974 request; this effectively ignores the headers 12975 in the spec for a single request. 12976 :type _headers: dict, optional 12977 :param _host_index: set to override the host_index for a single 12978 request; this effectively ignores the host_index 12979 in the spec for a single request. 12980 :type _host_index: int, optional 12981 :return: Returns the result object. 12982 """ # noqa: E501 12983 12984 _param = self._patch_user_serialize( 12985 id=id, 12986 patch_user_resource=patch_user_resource, 12987 _request_auth=_request_auth, 12988 _content_type=_content_type, 12989 _headers=_headers, 12990 _host_index=_host_index, 12991 ) 12992 12993 _response_types_map: Dict[str, Optional[str]] = { 12994 "200": "UserResource", 12995 "400": None, 12996 "401": None, 12997 "403": None, 12998 "404": None, 12999 "409": None, 13000 "429": None, 13001 "500": None, 13002 } 13003 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13004 response_data.read() 13005 return self.api_client.response_deserialize( 13006 response_data=response_data, 13007 response_types_map=_response_types_map, 13008 ).data
Patch user
Updates an existing user resource, overwriting values for specified attributes. Attributes that are not provided will remain unchanged. PATCH operation only updates the fields provided.
Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated.
:param id: User ID. A server-assigned, unique identifier for this user. (required)
:type id: str
:param patch_user_resource: Payload to update user information.
The body of a PATCH request must contain the attribute Operations, and its value is an array of one or more PATCH operations. Each PATCH operation object must have exactly one "op" member. (required)
:type patch_user_resource: PatchUserResource
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
13072 @validate_call 13073 def replace_user( 13074 self, 13075 id: Annotated[StrictStr, Field(description="User ID. A server-assigned, unique identifier for this user.")], 13076 user_resource: Annotated[UserResource, Field(description="Payload to update user information.")], 13077 _request_timeout: Union[ 13078 None, 13079 Annotated[StrictFloat, Field(gt=0)], 13080 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13081 ] = None, 13082 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13083 _content_type: Optional[StrictStr] = None, 13084 _headers: Optional[Dict[StrictStr, Any]] = None, 13085 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13086 ) -> UserResource: 13087 """Replace user 13088 13089 Updates an existing user resource. This is the easiest way to replace user information. <br><br> If the user is deactivated, <br> userName, userType, and roles.value cannot be updated. <br> emails.value, emails.display, emails.primary get ignored and do not return any error. <br><br> Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated. 13090 13091 :param id: User ID. A server-assigned, unique identifier for this user. (required) 13092 :type id: str 13093 :param user_resource: Payload to update user information. (required) 13094 :type user_resource: UserResource 13095 :param _request_timeout: timeout setting for this request. If one 13096 number provided, it will be total request 13097 timeout. It can also be a pair (tuple) of 13098 (connection, read) timeouts. 13099 :type _request_timeout: int, tuple(int, int), optional 13100 :param _request_auth: set to override the auth_settings for an a single 13101 request; this effectively ignores the 13102 authentication in the spec for a single request. 13103 :type _request_auth: dict, optional 13104 :param _content_type: force content-type for the request. 13105 :type _content_type: str, Optional 13106 :param _headers: set to override the headers for a single 13107 request; this effectively ignores the headers 13108 in the spec for a single request. 13109 :type _headers: dict, optional 13110 :param _host_index: set to override the host_index for a single 13111 request; this effectively ignores the host_index 13112 in the spec for a single request. 13113 :type _host_index: int, optional 13114 :return: Returns the result object. 13115 """ # noqa: E501 13116 13117 _param = self._replace_user_serialize( 13118 id=id, 13119 user_resource=user_resource, 13120 _request_auth=_request_auth, 13121 _content_type=_content_type, 13122 _headers=_headers, 13123 _host_index=_host_index, 13124 ) 13125 13126 _response_types_map: Dict[str, Optional[str]] = { 13127 "200": "UserResource", 13128 "400": None, 13129 "401": None, 13130 "403": None, 13131 "404": None, 13132 "409": None, 13133 "429": None, 13134 "500": None, 13135 } 13136 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13137 response_data.read() 13138 return self.api_client.response_deserialize( 13139 response_data=response_data, 13140 response_types_map=_response_types_map, 13141 ).data
Replace user
Updates an existing user resource. This is the easiest way to replace user information.
If the user is deactivated,
userName, userType, and roles.value cannot be updated.
emails.value, emails.display, emails.primary get ignored and do not return any error.
Note: If the user is not a member in the organization, they cannot be updated. Additionally, users with guest role in the organization cannot be updated.
:param id: User ID. A server-assigned, unique identifier for this user. (required) :type id: str :param user_resource: Payload to update user information. (required) :type user_resource: UserResource :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
13205 @validate_call 13206 def enterprise_create_group_member( 13207 self, 13208 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13209 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13210 create_group_member_request: CreateGroupMemberRequest, 13211 _request_timeout: Union[ 13212 None, 13213 Annotated[StrictFloat, Field(gt=0)], 13214 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13215 ] = None, 13216 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13217 _content_type: Optional[StrictStr] = None, 13218 _headers: Optional[Dict[StrictStr, Any]] = None, 13219 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13220 ) -> GroupMember: 13221 """Create user group member 13222 13223 Adds a member to a user group in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13224 13225 :param org_id: The ID of an organization. (required) 13226 :type org_id: str 13227 :param group_id: The ID of a user group. (required) 13228 :type group_id: str 13229 :param create_group_member_request: (required) 13230 :type create_group_member_request: CreateGroupMemberRequest 13231 :param _request_timeout: timeout setting for this request. If one 13232 number provided, it will be total request 13233 timeout. It can also be a pair (tuple) of 13234 (connection, read) timeouts. 13235 :type _request_timeout: int, tuple(int, int), optional 13236 :param _request_auth: set to override the auth_settings for an a single 13237 request; this effectively ignores the 13238 authentication in the spec for a single request. 13239 :type _request_auth: dict, optional 13240 :param _content_type: force content-type for the request. 13241 :type _content_type: str, Optional 13242 :param _headers: set to override the headers for a single 13243 request; this effectively ignores the headers 13244 in the spec for a single request. 13245 :type _headers: dict, optional 13246 :param _host_index: set to override the host_index for a single 13247 request; this effectively ignores the host_index 13248 in the spec for a single request. 13249 :type _host_index: int, optional 13250 :return: Returns the result object. 13251 """ # noqa: E501 13252 13253 _param = self._enterprise_create_group_member_serialize( 13254 org_id=org_id, 13255 group_id=group_id, 13256 create_group_member_request=create_group_member_request, 13257 _request_auth=_request_auth, 13258 _content_type=_content_type, 13259 _headers=_headers, 13260 _host_index=_host_index, 13261 ) 13262 13263 _response_types_map: Dict[str, Optional[str]] = { 13264 "201": "GroupMember", 13265 "400": None, 13266 "401": None, 13267 "403": None, 13268 "409": None, 13269 "429": None, 13270 } 13271 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13272 response_data.read() 13273 return self.api_client.response_deserialize( 13274 response_data=response_data, 13275 response_types_map=_response_types_map, 13276 ).data
Create user group member
Adds a member to a user group in an organization.
Required scope
organizations:groups:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param create_group_member_request: (required) :type create_group_member_request: CreateGroupMemberRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
13341 @validate_call 13342 def enterprise_delete_group_member( 13343 self, 13344 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13345 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13346 member_id: Annotated[StrictStr, Field(description="The ID of a group member.")], 13347 _request_timeout: Union[ 13348 None, 13349 Annotated[StrictFloat, Field(gt=0)], 13350 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13351 ] = None, 13352 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13353 _content_type: Optional[StrictStr] = None, 13354 _headers: Optional[Dict[StrictStr, Any]] = None, 13355 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13356 ) -> None: 13357 """Delete user group member 13358 13359 Removes a member from a user group in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13360 13361 :param org_id: The ID of an organization. (required) 13362 :type org_id: str 13363 :param group_id: The ID of a user group. (required) 13364 :type group_id: str 13365 :param member_id: The ID of a group member. (required) 13366 :type member_id: str 13367 :param _request_timeout: timeout setting for this request. If one 13368 number provided, it will be total request 13369 timeout. It can also be a pair (tuple) of 13370 (connection, read) timeouts. 13371 :type _request_timeout: int, tuple(int, int), optional 13372 :param _request_auth: set to override the auth_settings for an a single 13373 request; this effectively ignores the 13374 authentication in the spec for a single request. 13375 :type _request_auth: dict, optional 13376 :param _content_type: force content-type for the request. 13377 :type _content_type: str, Optional 13378 :param _headers: set to override the headers for a single 13379 request; this effectively ignores the headers 13380 in the spec for a single request. 13381 :type _headers: dict, optional 13382 :param _host_index: set to override the host_index for a single 13383 request; this effectively ignores the host_index 13384 in the spec for a single request. 13385 :type _host_index: int, optional 13386 :return: Returns the result object. 13387 """ # noqa: E501 13388 13389 _param = self._enterprise_delete_group_member_serialize( 13390 org_id=org_id, 13391 group_id=group_id, 13392 member_id=member_id, 13393 _request_auth=_request_auth, 13394 _content_type=_content_type, 13395 _headers=_headers, 13396 _host_index=_host_index, 13397 ) 13398 13399 _response_types_map: Dict[str, Optional[str]] = { 13400 "204": None, 13401 "400": None, 13402 "401": None, 13403 "403": None, 13404 "404": None, 13405 "429": None, 13406 } 13407 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13408 response_data.read() 13409 return self.api_client.response_deserialize( 13410 response_data=response_data, 13411 response_types_map=_response_types_map, 13412 ).data
Delete user group member
Removes a member from a user group in an organization.
Required scope
organizations:groups:writeRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param member_id: The ID of a group member. (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
13466 @validate_call 13467 def enterprise_get_group_member( 13468 self, 13469 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13470 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13471 member_id: Annotated[StrictStr, Field(description="The ID of a group member.")], 13472 _request_timeout: Union[ 13473 None, 13474 Annotated[StrictFloat, Field(gt=0)], 13475 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13476 ] = None, 13477 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13478 _content_type: Optional[StrictStr] = None, 13479 _headers: Optional[Dict[StrictStr, Any]] = None, 13480 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13481 ) -> GroupMember: 13482 """Get user group member 13483 13484 Retrieves information about a user group member in an organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13485 13486 :param org_id: The ID of an organization. (required) 13487 :type org_id: str 13488 :param group_id: The ID of a user group. (required) 13489 :type group_id: str 13490 :param member_id: The ID of a group member. (required) 13491 :type member_id: str 13492 :param _request_timeout: timeout setting for this request. If one 13493 number provided, it will be total request 13494 timeout. It can also be a pair (tuple) of 13495 (connection, read) timeouts. 13496 :type _request_timeout: int, tuple(int, int), optional 13497 :param _request_auth: set to override the auth_settings for an a single 13498 request; this effectively ignores the 13499 authentication in the spec for a single request. 13500 :type _request_auth: dict, optional 13501 :param _content_type: force content-type for the request. 13502 :type _content_type: str, Optional 13503 :param _headers: set to override the headers for a single 13504 request; this effectively ignores the headers 13505 in the spec for a single request. 13506 :type _headers: dict, optional 13507 :param _host_index: set to override the host_index for a single 13508 request; this effectively ignores the host_index 13509 in the spec for a single request. 13510 :type _host_index: int, optional 13511 :return: Returns the result object. 13512 """ # noqa: E501 13513 13514 _param = self._enterprise_get_group_member_serialize( 13515 org_id=org_id, 13516 group_id=group_id, 13517 member_id=member_id, 13518 _request_auth=_request_auth, 13519 _content_type=_content_type, 13520 _headers=_headers, 13521 _host_index=_host_index, 13522 ) 13523 13524 _response_types_map: Dict[str, Optional[str]] = { 13525 "200": "GroupMember", 13526 "400": None, 13527 "401": None, 13528 "403": None, 13529 "404": None, 13530 "429": None, 13531 } 13532 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13533 response_data.read() 13534 return self.api_client.response_deserialize( 13535 response_data=response_data, 13536 response_types_map=_response_types_map, 13537 ).data
Get user group member
Retrieves information about a user group member in an organization.
Required scope
organizations:groups:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param member_id: The ID of a group member. (required) :type member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
13594 @validate_call 13595 def enterprise_get_group_members( 13596 self, 13597 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13598 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13599 limit: Annotated[ 13600 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 13601 Field(description="The maximum number of members in the result list."), 13602 ] = None, 13603 cursor: Annotated[ 13604 Optional[StrictStr], 13605 Field( 13606 description="A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 13607 ), 13608 ] = None, 13609 _request_timeout: Union[ 13610 None, 13611 Annotated[StrictFloat, Field(gt=0)], 13612 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13613 ] = None, 13614 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13615 _content_type: Optional[StrictStr] = None, 13616 _headers: Optional[Dict[StrictStr, Any]] = None, 13617 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13618 ) -> GroupMembersPage: 13619 """List of user group members 13620 13621 Retrieves the list of members who are part of a team in an existing organization.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13622 13623 :param org_id: The ID of an organization. (required) 13624 :type org_id: str 13625 :param group_id: The ID of a user group. (required) 13626 :type group_id: str 13627 :param limit: The maximum number of members in the result list. 13628 :type limit: int 13629 :param cursor: A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 13630 :type cursor: str 13631 :param _request_timeout: timeout setting for this request. If one 13632 number provided, it will be total request 13633 timeout. It can also be a pair (tuple) of 13634 (connection, read) timeouts. 13635 :type _request_timeout: int, tuple(int, int), optional 13636 :param _request_auth: set to override the auth_settings for an a single 13637 request; this effectively ignores the 13638 authentication in the spec for a single request. 13639 :type _request_auth: dict, optional 13640 :param _content_type: force content-type for the request. 13641 :type _content_type: str, Optional 13642 :param _headers: set to override the headers for a single 13643 request; this effectively ignores the headers 13644 in the spec for a single request. 13645 :type _headers: dict, optional 13646 :param _host_index: set to override the host_index for a single 13647 request; this effectively ignores the host_index 13648 in the spec for a single request. 13649 :type _host_index: int, optional 13650 :return: Returns the result object. 13651 """ # noqa: E501 13652 13653 _param = self._enterprise_get_group_members_serialize( 13654 org_id=org_id, 13655 group_id=group_id, 13656 limit=limit, 13657 cursor=cursor, 13658 _request_auth=_request_auth, 13659 _content_type=_content_type, 13660 _headers=_headers, 13661 _host_index=_host_index, 13662 ) 13663 13664 _response_types_map: Dict[str, Optional[str]] = { 13665 "200": "GroupMembersPage", 13666 "400": None, 13667 "401": None, 13668 "403": None, 13669 "429": None, 13670 } 13671 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13672 response_data.read() 13673 return self.api_client.response_deserialize( 13674 response_data=response_data, 13675 response_types_map=_response_types_map, 13676 ).data
List of user group members
Retrieves the list of members who are part of a team in an existing organization.
Required scope
organizations:groups:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param limit: The maximum number of members in the result list. :type limit: int :param cursor: A representation of the position of a member in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
13740 @validate_call 13741 def enterprise_update_group_members( 13742 self, 13743 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13744 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13745 update_user_group_members_request: UpdateUserGroupMembersRequest, 13746 _request_timeout: Union[ 13747 None, 13748 Annotated[StrictFloat, Field(gt=0)], 13749 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13750 ] = None, 13751 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13752 _content_type: Optional[StrictStr] = None, 13753 _headers: Optional[Dict[StrictStr, Any]] = None, 13754 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13755 ) -> List[UpdateUserGroupMembersResultInner]: 13756 """Bulk edit of membership in user group 13757 13758 Add and remove members in one request. For example, remove user A and add user B.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> per item. For example, if you want to add 10 users and remove 5, the rate limiting applicable will be 750 credits. This is because each user addition or deletion takes Level 1 rate limiting of 50 credits, so 15 * 50 = 750.<br/> <h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13759 13760 :param org_id: The ID of an organization. (required) 13761 :type org_id: str 13762 :param group_id: The ID of a user group. (required) 13763 :type group_id: str 13764 :param update_user_group_members_request: (required) 13765 :type update_user_group_members_request: UpdateUserGroupMembersRequest 13766 :param _request_timeout: timeout setting for this request. If one 13767 number provided, it will be total request 13768 timeout. It can also be a pair (tuple) of 13769 (connection, read) timeouts. 13770 :type _request_timeout: int, tuple(int, int), optional 13771 :param _request_auth: set to override the auth_settings for an a single 13772 request; this effectively ignores the 13773 authentication in the spec for a single request. 13774 :type _request_auth: dict, optional 13775 :param _content_type: force content-type for the request. 13776 :type _content_type: str, Optional 13777 :param _headers: set to override the headers for a single 13778 request; this effectively ignores the headers 13779 in the spec for a single request. 13780 :type _headers: dict, optional 13781 :param _host_index: set to override the host_index for a single 13782 request; this effectively ignores the host_index 13783 in the spec for a single request. 13784 :type _host_index: int, optional 13785 :return: Returns the result object. 13786 """ # noqa: E501 13787 13788 _param = self._enterprise_update_group_members_serialize( 13789 org_id=org_id, 13790 group_id=group_id, 13791 update_user_group_members_request=update_user_group_members_request, 13792 _request_auth=_request_auth, 13793 _content_type=_content_type, 13794 _headers=_headers, 13795 _host_index=_host_index, 13796 ) 13797 13798 _response_types_map: Dict[str, Optional[str]] = { 13799 "207": "List[UpdateUserGroupMembersResultInner]", 13800 "400": None, 13801 "401": None, 13802 "403": None, 13803 "404": None, 13804 "409": None, 13805 "413": None, 13806 "429": None, 13807 } 13808 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13809 response_data.read() 13810 return self.api_client.response_deserialize( 13811 response_data=response_data, 13812 response_types_map=_response_types_map, 13813 ).data
Bulk edit of membership in user group
Add and remove members in one request. For example, remove user A and add user B.
Required scope
organizations:groups:writeRate limiting
Level 1 per item. For example, if you want to add 10 users and remove 5, the rate limiting applicable will be 750 credits. This is because each user addition or deletion takes Level 1 rate limiting of 50 credits, so 15 * 50 = 750.Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param update_user_group_members_request: (required) :type update_user_group_members_request: UpdateUserGroupMembersRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
13878 @validate_call 13879 def enterprise_groups_get_team( 13880 self, 13881 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 13882 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 13883 team_id: Annotated[StrictStr, Field(description="The ID of a team.")], 13884 _request_timeout: Union[ 13885 None, 13886 Annotated[StrictFloat, Field(gt=0)], 13887 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 13888 ] = None, 13889 _request_auth: Optional[Dict[StrictStr, Any]] = None, 13890 _content_type: Optional[StrictStr] = None, 13891 _headers: Optional[Dict[StrictStr, Any]] = None, 13892 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 13893 ) -> GroupTeam: 13894 """Get user group team 13895 13896 Retrieves information of a team that the user group is a part of in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 13897 13898 :param org_id: The ID of an organization. (required) 13899 :type org_id: str 13900 :param group_id: The ID of a user group. (required) 13901 :type group_id: str 13902 :param team_id: The ID of a team. (required) 13903 :type team_id: str 13904 :param _request_timeout: timeout setting for this request. If one 13905 number provided, it will be total request 13906 timeout. It can also be a pair (tuple) of 13907 (connection, read) timeouts. 13908 :type _request_timeout: int, tuple(int, int), optional 13909 :param _request_auth: set to override the auth_settings for an a single 13910 request; this effectively ignores the 13911 authentication in the spec for a single request. 13912 :type _request_auth: dict, optional 13913 :param _content_type: force content-type for the request. 13914 :type _content_type: str, Optional 13915 :param _headers: set to override the headers for a single 13916 request; this effectively ignores the headers 13917 in the spec for a single request. 13918 :type _headers: dict, optional 13919 :param _host_index: set to override the host_index for a single 13920 request; this effectively ignores the host_index 13921 in the spec for a single request. 13922 :type _host_index: int, optional 13923 :return: Returns the result object. 13924 """ # noqa: E501 13925 13926 _param = self._enterprise_groups_get_team_serialize( 13927 org_id=org_id, 13928 group_id=group_id, 13929 team_id=team_id, 13930 _request_auth=_request_auth, 13931 _content_type=_content_type, 13932 _headers=_headers, 13933 _host_index=_host_index, 13934 ) 13935 13936 _response_types_map: Dict[str, Optional[str]] = { 13937 "200": "GroupTeam", 13938 "400": None, 13939 "401": None, 13940 "403": None, 13941 "429": None, 13942 } 13943 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 13944 response_data.read() 13945 return self.api_client.response_deserialize( 13946 response_data=response_data, 13947 response_types_map=_response_types_map, 13948 ).data
Get user group team
Retrieves information of a team that the user group is a part of in an organization.
Required scope
organizations:groups:readorganizations:teams:read
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param team_id: The ID of a team. (required) :type team_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14005 @validate_call 14006 def enterprise_groups_get_teams( 14007 self, 14008 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14009 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14010 limit: Annotated[ 14011 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 14012 Field(description="The maximum number of teams in the result list."), 14013 ] = None, 14014 cursor: Annotated[ 14015 Optional[StrictStr], 14016 Field( 14017 description="A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 14018 ), 14019 ] = None, 14020 _request_timeout: Union[ 14021 None, 14022 Annotated[StrictFloat, Field(gt=0)], 14023 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14024 ] = None, 14025 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14026 _content_type: Optional[StrictStr] = None, 14027 _headers: Optional[Dict[StrictStr, Any]] = None, 14028 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14029 ) -> GroupTeamsPage: 14030 """Get teams of a user group 14031 14032 Retrieves the list of teams that the user group is a part of.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><a target=_blank href=https://developers.miro.com/reference/scopes>organizations:teams:read</a><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14033 14034 :param org_id: The ID of an organization. (required) 14035 :type org_id: str 14036 :param group_id: The ID of a user group. (required) 14037 :type group_id: str 14038 :param limit: The maximum number of teams in the result list. 14039 :type limit: int 14040 :param cursor: A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 14041 :type cursor: str 14042 :param _request_timeout: timeout setting for this request. If one 14043 number provided, it will be total request 14044 timeout. It can also be a pair (tuple) of 14045 (connection, read) timeouts. 14046 :type _request_timeout: int, tuple(int, int), optional 14047 :param _request_auth: set to override the auth_settings for an a single 14048 request; this effectively ignores the 14049 authentication in the spec for a single request. 14050 :type _request_auth: dict, optional 14051 :param _content_type: force content-type for the request. 14052 :type _content_type: str, Optional 14053 :param _headers: set to override the headers for a single 14054 request; this effectively ignores the headers 14055 in the spec for a single request. 14056 :type _headers: dict, optional 14057 :param _host_index: set to override the host_index for a single 14058 request; this effectively ignores the host_index 14059 in the spec for a single request. 14060 :type _host_index: int, optional 14061 :return: Returns the result object. 14062 """ # noqa: E501 14063 14064 _param = self._enterprise_groups_get_teams_serialize( 14065 org_id=org_id, 14066 group_id=group_id, 14067 limit=limit, 14068 cursor=cursor, 14069 _request_auth=_request_auth, 14070 _content_type=_content_type, 14071 _headers=_headers, 14072 _host_index=_host_index, 14073 ) 14074 14075 _response_types_map: Dict[str, Optional[str]] = { 14076 "200": "GroupTeamsPage", 14077 "400": None, 14078 "401": None, 14079 "403": None, 14080 "429": None, 14081 } 14082 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14083 response_data.read() 14084 return self.api_client.response_deserialize( 14085 response_data=response_data, 14086 response_types_map=_response_types_map, 14087 ).data
Get teams of a user group
Retrieves the list of teams that the user group is a part of.
Required scope
organizations:groups:readorganizations:teams:read
Rate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param limit: The maximum number of teams in the result list. :type limit: int :param cursor: A representation of the position of a team in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14151 @validate_call 14152 def enterprise_create_group( 14153 self, 14154 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14155 create_group_request: CreateGroupRequest, 14156 _request_timeout: Union[ 14157 None, 14158 Annotated[StrictFloat, Field(gt=0)], 14159 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14160 ] = None, 14161 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14162 _content_type: Optional[StrictStr] = None, 14163 _headers: Optional[Dict[StrictStr, Any]] = None, 14164 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14165 ) -> Group: 14166 """Create user group 14167 14168 Creates a new user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14169 14170 :param org_id: The ID of an organization. (required) 14171 :type org_id: str 14172 :param create_group_request: (required) 14173 :type create_group_request: CreateGroupRequest 14174 :param _request_timeout: timeout setting for this request. If one 14175 number provided, it will be total request 14176 timeout. It can also be a pair (tuple) of 14177 (connection, read) timeouts. 14178 :type _request_timeout: int, tuple(int, int), optional 14179 :param _request_auth: set to override the auth_settings for an a single 14180 request; this effectively ignores the 14181 authentication in the spec for a single request. 14182 :type _request_auth: dict, optional 14183 :param _content_type: force content-type for the request. 14184 :type _content_type: str, Optional 14185 :param _headers: set to override the headers for a single 14186 request; this effectively ignores the headers 14187 in the spec for a single request. 14188 :type _headers: dict, optional 14189 :param _host_index: set to override the host_index for a single 14190 request; this effectively ignores the host_index 14191 in the spec for a single request. 14192 :type _host_index: int, optional 14193 :return: Returns the result object. 14194 """ # noqa: E501 14195 14196 _param = self._enterprise_create_group_serialize( 14197 org_id=org_id, 14198 create_group_request=create_group_request, 14199 _request_auth=_request_auth, 14200 _content_type=_content_type, 14201 _headers=_headers, 14202 _host_index=_host_index, 14203 ) 14204 14205 _response_types_map: Dict[str, Optional[str]] = { 14206 "201": "Group", 14207 "400": None, 14208 "401": None, 14209 "403": None, 14210 "409": None, 14211 "429": None, 14212 } 14213 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14214 response_data.read() 14215 return self.api_client.response_deserialize( 14216 response_data=response_data, 14217 response_types_map=_response_types_map, 14218 ).data
Create user group
Creates a new user group in an organization.
Required scope
organizations:groups:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param create_group_request: (required) :type create_group_request: CreateGroupRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14280 @validate_call 14281 def enterprise_delete_group( 14282 self, 14283 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14284 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14285 _request_timeout: Union[ 14286 None, 14287 Annotated[StrictFloat, Field(gt=0)], 14288 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14289 ] = None, 14290 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14291 _content_type: Optional[StrictStr] = None, 14292 _headers: Optional[Dict[StrictStr, Any]] = None, 14293 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14294 ) -> None: 14295 """Delete user group 14296 14297 Deletes a user group from an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14298 14299 :param org_id: The ID of an organization. (required) 14300 :type org_id: str 14301 :param group_id: The ID of a user group. (required) 14302 :type group_id: str 14303 :param _request_timeout: timeout setting for this request. If one 14304 number provided, it will be total request 14305 timeout. It can also be a pair (tuple) of 14306 (connection, read) timeouts. 14307 :type _request_timeout: int, tuple(int, int), optional 14308 :param _request_auth: set to override the auth_settings for an a single 14309 request; this effectively ignores the 14310 authentication in the spec for a single request. 14311 :type _request_auth: dict, optional 14312 :param _content_type: force content-type for the request. 14313 :type _content_type: str, Optional 14314 :param _headers: set to override the headers for a single 14315 request; this effectively ignores the headers 14316 in the spec for a single request. 14317 :type _headers: dict, optional 14318 :param _host_index: set to override the host_index for a single 14319 request; this effectively ignores the host_index 14320 in the spec for a single request. 14321 :type _host_index: int, optional 14322 :return: Returns the result object. 14323 """ # noqa: E501 14324 14325 _param = self._enterprise_delete_group_serialize( 14326 org_id=org_id, 14327 group_id=group_id, 14328 _request_auth=_request_auth, 14329 _content_type=_content_type, 14330 _headers=_headers, 14331 _host_index=_host_index, 14332 ) 14333 14334 _response_types_map: Dict[str, Optional[str]] = { 14335 "204": None, 14336 "400": None, 14337 "401": None, 14338 "403": None, 14339 "404": None, 14340 "429": None, 14341 } 14342 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14343 response_data.read() 14344 return self.api_client.response_deserialize( 14345 response_data=response_data, 14346 response_types_map=_response_types_map, 14347 ).data
Delete user group
Deletes a user group from an organization.
Required scope
organizations:groups:writeRate limiting
Level 4Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14398 @validate_call 14399 def enterprise_get_group( 14400 self, 14401 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14402 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14403 _request_timeout: Union[ 14404 None, 14405 Annotated[StrictFloat, Field(gt=0)], 14406 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14407 ] = None, 14408 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14409 _content_type: Optional[StrictStr] = None, 14410 _headers: Optional[Dict[StrictStr, Any]] = None, 14411 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14412 ) -> Group: 14413 """Get user group 14414 14415 Retrieves a user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14416 14417 :param org_id: The ID of an organization. (required) 14418 :type org_id: str 14419 :param group_id: The ID of a user group. (required) 14420 :type group_id: str 14421 :param _request_timeout: timeout setting for this request. If one 14422 number provided, it will be total request 14423 timeout. It can also be a pair (tuple) of 14424 (connection, read) timeouts. 14425 :type _request_timeout: int, tuple(int, int), optional 14426 :param _request_auth: set to override the auth_settings for an a single 14427 request; this effectively ignores the 14428 authentication in the spec for a single request. 14429 :type _request_auth: dict, optional 14430 :param _content_type: force content-type for the request. 14431 :type _content_type: str, Optional 14432 :param _headers: set to override the headers for a single 14433 request; this effectively ignores the headers 14434 in the spec for a single request. 14435 :type _headers: dict, optional 14436 :param _host_index: set to override the host_index for a single 14437 request; this effectively ignores the host_index 14438 in the spec for a single request. 14439 :type _host_index: int, optional 14440 :return: Returns the result object. 14441 """ # noqa: E501 14442 14443 _param = self._enterprise_get_group_serialize( 14444 org_id=org_id, 14445 group_id=group_id, 14446 _request_auth=_request_auth, 14447 _content_type=_content_type, 14448 _headers=_headers, 14449 _host_index=_host_index, 14450 ) 14451 14452 _response_types_map: Dict[str, Optional[str]] = { 14453 "200": "Group", 14454 "400": None, 14455 "401": None, 14456 "403": None, 14457 "404": None, 14458 "429": None, 14459 } 14460 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14461 response_data.read() 14462 return self.api_client.response_deserialize( 14463 response_data=response_data, 14464 response_types_map=_response_types_map, 14465 ).data
Get user group
Retrieves a user group in an organization.
Required scope
organizations:groups:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14519 @validate_call 14520 def enterprise_get_groups( 14521 self, 14522 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14523 limit: Annotated[ 14524 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 14525 Field(description="The maximum number of user groups in the result list."), 14526 ] = None, 14527 cursor: Annotated[ 14528 Optional[StrictStr], 14529 Field( 14530 description="A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning." 14531 ), 14532 ] = None, 14533 _request_timeout: Union[ 14534 None, 14535 Annotated[StrictFloat, Field(gt=0)], 14536 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14537 ] = None, 14538 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14539 _content_type: Optional[StrictStr] = None, 14540 _headers: Optional[Dict[StrictStr, Any]] = None, 14541 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14542 ) -> GroupsPage: 14543 """List of user groups 14544 14545 Retrieves the list of user groups in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14546 14547 :param org_id: The ID of an organization. (required) 14548 :type org_id: str 14549 :param limit: The maximum number of user groups in the result list. 14550 :type limit: int 14551 :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. 14552 :type cursor: str 14553 :param _request_timeout: timeout setting for this request. If one 14554 number provided, it will be total request 14555 timeout. It can also be a pair (tuple) of 14556 (connection, read) timeouts. 14557 :type _request_timeout: int, tuple(int, int), optional 14558 :param _request_auth: set to override the auth_settings for an a single 14559 request; this effectively ignores the 14560 authentication in the spec for a single request. 14561 :type _request_auth: dict, optional 14562 :param _content_type: force content-type for the request. 14563 :type _content_type: str, Optional 14564 :param _headers: set to override the headers for a single 14565 request; this effectively ignores the headers 14566 in the spec for a single request. 14567 :type _headers: dict, optional 14568 :param _host_index: set to override the host_index for a single 14569 request; this effectively ignores the host_index 14570 in the spec for a single request. 14571 :type _host_index: int, optional 14572 :return: Returns the result object. 14573 """ # noqa: E501 14574 14575 _param = self._enterprise_get_groups_serialize( 14576 org_id=org_id, 14577 limit=limit, 14578 cursor=cursor, 14579 _request_auth=_request_auth, 14580 _content_type=_content_type, 14581 _headers=_headers, 14582 _host_index=_host_index, 14583 ) 14584 14585 _response_types_map: Dict[str, Optional[str]] = { 14586 "200": "GroupsPage", 14587 "400": None, 14588 "401": None, 14589 "403": None, 14590 "429": None, 14591 } 14592 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14593 response_data.read() 14594 return self.api_client.response_deserialize( 14595 response_data=response_data, 14596 response_types_map=_response_types_map, 14597 ).data
List of user groups
Retrieves the list of user groups in an organization.
Required scope
organizations:groups:readRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param limit: The maximum number of user groups in the result list. :type limit: int :param cursor: A representation of the position of a user group in the full set of results. It is used to determine the first item of the resulting set. Leave empty to retrieve items from the beginning. :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14658 @validate_call 14659 def enterprise_update_group( 14660 self, 14661 org_id: Annotated[StrictStr, Field(description="The ID of an organization.")], 14662 group_id: Annotated[StrictStr, Field(description="The ID of a user group.")], 14663 update_group_request: UpdateGroupRequest, 14664 _request_timeout: Union[ 14665 None, 14666 Annotated[StrictFloat, Field(gt=0)], 14667 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14668 ] = None, 14669 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14670 _content_type: Optional[StrictStr] = None, 14671 _headers: Optional[Dict[StrictStr, Any]] = None, 14672 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14673 ) -> Group: 14674 """Update user group 14675 14676 Updates a user group in an organization.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>organizations:groups:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a> <br/><h3>Enterprise only</h3> <p>This API is available only for <a target=_blank href=\"/reference/api-reference#enterprise-plan\">Enterprise plan</a> users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using <a target=_blank href=\"https://q2oeb0jrhgi.typeform.com/to/BVPTNWJ9\">this form</a>.</p> 14677 14678 :param org_id: The ID of an organization. (required) 14679 :type org_id: str 14680 :param group_id: The ID of a user group. (required) 14681 :type group_id: str 14682 :param update_group_request: (required) 14683 :type update_group_request: UpdateGroupRequest 14684 :param _request_timeout: timeout setting for this request. If one 14685 number provided, it will be total request 14686 timeout. It can also be a pair (tuple) of 14687 (connection, read) timeouts. 14688 :type _request_timeout: int, tuple(int, int), optional 14689 :param _request_auth: set to override the auth_settings for an a single 14690 request; this effectively ignores the 14691 authentication in the spec for a single request. 14692 :type _request_auth: dict, optional 14693 :param _content_type: force content-type for the request. 14694 :type _content_type: str, Optional 14695 :param _headers: set to override the headers for a single 14696 request; this effectively ignores the headers 14697 in the spec for a single request. 14698 :type _headers: dict, optional 14699 :param _host_index: set to override the host_index for a single 14700 request; this effectively ignores the host_index 14701 in the spec for a single request. 14702 :type _host_index: int, optional 14703 :return: Returns the result object. 14704 """ # noqa: E501 14705 14706 _param = self._enterprise_update_group_serialize( 14707 org_id=org_id, 14708 group_id=group_id, 14709 update_group_request=update_group_request, 14710 _request_auth=_request_auth, 14711 _content_type=_content_type, 14712 _headers=_headers, 14713 _host_index=_host_index, 14714 ) 14715 14716 _response_types_map: Dict[str, Optional[str]] = { 14717 "200": "Group", 14718 "400": None, 14719 "401": None, 14720 "403": None, 14721 "404": None, 14722 "409": None, 14723 "429": None, 14724 } 14725 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14726 response_data.read() 14727 return self.api_client.response_deserialize( 14728 response_data=response_data, 14729 response_types_map=_response_types_map, 14730 ).data
Update user group
Updates a user group in an organization.
Required scope
organizations:groups:writeRate limiting
Level 1Enterprise only
This API is available only for Enterprise plan users. You can only use this endpoint if you have the role of a Company Admin. You can request temporary access to Enterprise APIs using this form.
:param org_id: The ID of an organization. (required) :type org_id: str :param group_id: The ID of a user group. (required) :type group_id: str :param update_group_request: (required) :type update_group_request: UpdateGroupRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14795 @validate_call 14796 def create_app_card_item( 14797 self, 14798 board_id: Annotated[ 14799 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 14800 ], 14801 app_card_create_request: AppCardCreateRequest, 14802 _request_timeout: Union[ 14803 None, 14804 Annotated[StrictFloat, Field(gt=0)], 14805 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14806 ] = None, 14807 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14808 _content_type: Optional[StrictStr] = None, 14809 _headers: Optional[Dict[StrictStr, Any]] = None, 14810 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14811 ) -> AppCardItem: 14812 """Create app card item 14813 14814 Adds an app card item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 14815 14816 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 14817 :type board_id: str 14818 :param app_card_create_request: (required) 14819 :type app_card_create_request: AppCardCreateRequest 14820 :param _request_timeout: timeout setting for this request. If one 14821 number provided, it will be total request 14822 timeout. It can also be a pair (tuple) of 14823 (connection, read) timeouts. 14824 :type _request_timeout: int, tuple(int, int), optional 14825 :param _request_auth: set to override the auth_settings for an a single 14826 request; this effectively ignores the 14827 authentication in the spec for a single request. 14828 :type _request_auth: dict, optional 14829 :param _content_type: force content-type for the request. 14830 :type _content_type: str, Optional 14831 :param _headers: set to override the headers for a single 14832 request; this effectively ignores the headers 14833 in the spec for a single request. 14834 :type _headers: dict, optional 14835 :param _host_index: set to override the host_index for a single 14836 request; this effectively ignores the host_index 14837 in the spec for a single request. 14838 :type _host_index: int, optional 14839 :return: Returns the result object. 14840 """ # noqa: E501 14841 14842 _param = self._create_app_card_item_serialize( 14843 board_id=board_id, 14844 app_card_create_request=app_card_create_request, 14845 _request_auth=_request_auth, 14846 _content_type=_content_type, 14847 _headers=_headers, 14848 _host_index=_host_index, 14849 ) 14850 14851 _response_types_map: Dict[str, Optional[str]] = { 14852 "201": "AppCardItem", 14853 "400": None, 14854 "404": None, 14855 "429": None, 14856 } 14857 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14858 response_data.read() 14859 return self.api_client.response_deserialize( 14860 response_data=response_data, 14861 response_types_map=_response_types_map, 14862 ).data
Create app card item
Adds an app card item to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param app_card_create_request: (required) :type app_card_create_request: AppCardCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
14924 @validate_call 14925 def delete_app_card_item( 14926 self, 14927 board_id: Annotated[ 14928 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete an item.") 14929 ], 14930 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 14931 _request_timeout: Union[ 14932 None, 14933 Annotated[StrictFloat, Field(gt=0)], 14934 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 14935 ] = None, 14936 _request_auth: Optional[Dict[StrictStr, Any]] = None, 14937 _content_type: Optional[StrictStr] = None, 14938 _headers: Optional[Dict[StrictStr, Any]] = None, 14939 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 14940 ) -> object: 14941 """Delete app card item 14942 14943 Deletes an app card item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 14944 14945 :param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) 14946 :type board_id: str 14947 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 14948 :type item_id: str 14949 :param _request_timeout: timeout setting for this request. If one 14950 number provided, it will be total request 14951 timeout. It can also be a pair (tuple) of 14952 (connection, read) timeouts. 14953 :type _request_timeout: int, tuple(int, int), optional 14954 :param _request_auth: set to override the auth_settings for an a single 14955 request; this effectively ignores the 14956 authentication in the spec for a single request. 14957 :type _request_auth: dict, optional 14958 :param _content_type: force content-type for the request. 14959 :type _content_type: str, Optional 14960 :param _headers: set to override the headers for a single 14961 request; this effectively ignores the headers 14962 in the spec for a single request. 14963 :type _headers: dict, optional 14964 :param _host_index: set to override the host_index for a single 14965 request; this effectively ignores the host_index 14966 in the spec for a single request. 14967 :type _host_index: int, optional 14968 :return: Returns the result object. 14969 """ # noqa: E501 14970 14971 _param = self._delete_app_card_item_serialize( 14972 board_id=board_id, 14973 item_id=item_id, 14974 _request_auth=_request_auth, 14975 _content_type=_content_type, 14976 _headers=_headers, 14977 _host_index=_host_index, 14978 ) 14979 14980 _response_types_map: Dict[str, Optional[str]] = { 14981 "204": "object", 14982 "400": None, 14983 "404": None, 14984 "429": None, 14985 } 14986 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 14987 response_data.read() 14988 return self.api_client.response_deserialize( 14989 response_data=response_data, 14990 response_types_map=_response_types_map, 14991 ).data
Delete app card item
Deletes an app card item from a board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15045 @validate_call 15046 def get_app_card_item( 15047 self, 15048 board_id: Annotated[ 15049 StrictStr, 15050 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 15051 ], 15052 item_id: Annotated[ 15053 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 15054 ], 15055 _request_timeout: Union[ 15056 None, 15057 Annotated[StrictFloat, Field(gt=0)], 15058 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15059 ] = None, 15060 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15061 _content_type: Optional[StrictStr] = None, 15062 _headers: Optional[Dict[StrictStr, Any]] = None, 15063 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15064 ) -> AppCardItem: 15065 """Get app card item 15066 15067 Retrieves information for a specific app card item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15068 15069 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 15070 :type board_id: str 15071 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 15072 :type item_id: str 15073 :param _request_timeout: timeout setting for this request. If one 15074 number provided, it will be total request 15075 timeout. It can also be a pair (tuple) of 15076 (connection, read) timeouts. 15077 :type _request_timeout: int, tuple(int, int), optional 15078 :param _request_auth: set to override the auth_settings for an a single 15079 request; this effectively ignores the 15080 authentication in the spec for a single request. 15081 :type _request_auth: dict, optional 15082 :param _content_type: force content-type for the request. 15083 :type _content_type: str, Optional 15084 :param _headers: set to override the headers for a single 15085 request; this effectively ignores the headers 15086 in the spec for a single request. 15087 :type _headers: dict, optional 15088 :param _host_index: set to override the host_index for a single 15089 request; this effectively ignores the host_index 15090 in the spec for a single request. 15091 :type _host_index: int, optional 15092 :return: Returns the result object. 15093 """ # noqa: E501 15094 15095 _param = self._get_app_card_item_serialize( 15096 board_id=board_id, 15097 item_id=item_id, 15098 _request_auth=_request_auth, 15099 _content_type=_content_type, 15100 _headers=_headers, 15101 _host_index=_host_index, 15102 ) 15103 15104 _response_types_map: Dict[str, Optional[str]] = { 15105 "200": "AppCardItem", 15106 "400": None, 15107 "404": None, 15108 "429": None, 15109 } 15110 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15111 response_data.read() 15112 return self.api_client.response_deserialize( 15113 response_data=response_data, 15114 response_types_map=_response_types_map, 15115 ).data
Get app card item
Retrieves information for a specific app card item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15169 @validate_call 15170 def update_app_card_item( 15171 self, 15172 board_id: Annotated[ 15173 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 15174 ], 15175 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 15176 app_card_update_request: AppCardUpdateRequest, 15177 _request_timeout: Union[ 15178 None, 15179 Annotated[StrictFloat, Field(gt=0)], 15180 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15181 ] = None, 15182 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15183 _content_type: Optional[StrictStr] = None, 15184 _headers: Optional[Dict[StrictStr, Any]] = None, 15185 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15186 ) -> AppCardItem: 15187 """Update app card item 15188 15189 Updates an app card item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15190 15191 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 15192 :type board_id: str 15193 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 15194 :type item_id: str 15195 :param app_card_update_request: (required) 15196 :type app_card_update_request: AppCardUpdateRequest 15197 :param _request_timeout: timeout setting for this request. If one 15198 number provided, it will be total request 15199 timeout. It can also be a pair (tuple) of 15200 (connection, read) timeouts. 15201 :type _request_timeout: int, tuple(int, int), optional 15202 :param _request_auth: set to override the auth_settings for an a single 15203 request; this effectively ignores the 15204 authentication in the spec for a single request. 15205 :type _request_auth: dict, optional 15206 :param _content_type: force content-type for the request. 15207 :type _content_type: str, Optional 15208 :param _headers: set to override the headers for a single 15209 request; this effectively ignores the headers 15210 in the spec for a single request. 15211 :type _headers: dict, optional 15212 :param _host_index: set to override the host_index for a single 15213 request; this effectively ignores the host_index 15214 in the spec for a single request. 15215 :type _host_index: int, optional 15216 :return: Returns the result object. 15217 """ # noqa: E501 15218 15219 _param = self._update_app_card_item_serialize( 15220 board_id=board_id, 15221 item_id=item_id, 15222 app_card_update_request=app_card_update_request, 15223 _request_auth=_request_auth, 15224 _content_type=_content_type, 15225 _headers=_headers, 15226 _host_index=_host_index, 15227 ) 15228 15229 _response_types_map: Dict[str, Optional[str]] = { 15230 "200": "AppCardItem", 15231 "400": None, 15232 "404": None, 15233 "409": None, 15234 "429": None, 15235 } 15236 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15237 response_data.read() 15238 return self.api_client.response_deserialize( 15239 response_data=response_data, 15240 response_types_map=_response_types_map, 15241 ).data
Update app card item
Updates an app card item on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param app_card_update_request: (required) :type app_card_update_request: AppCardUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15306 @validate_call 15307 def get_board_members( 15308 self, 15309 board_id: Annotated[ 15310 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15311 ], 15312 limit: Optional[Annotated[str, Field(strict=True)]] = None, 15313 offset: Optional[StrictStr] = None, 15314 _request_timeout: Union[ 15315 None, 15316 Annotated[StrictFloat, Field(gt=0)], 15317 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15318 ] = None, 15319 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15320 _content_type: Optional[StrictStr] = None, 15321 _headers: Optional[Dict[StrictStr, Any]] = None, 15322 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15323 ) -> BoardMembersPagedResponse: 15324 """Get all board members 15325 15326 Retrieves a pageable list of members for a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15327 15328 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15329 :type board_id: str 15330 :param limit: 15331 :type limit: str 15332 :param offset: 15333 :type offset: str 15334 :param _request_timeout: timeout setting for this request. If one 15335 number provided, it will be total request 15336 timeout. It can also be a pair (tuple) of 15337 (connection, read) timeouts. 15338 :type _request_timeout: int, tuple(int, int), optional 15339 :param _request_auth: set to override the auth_settings for an a single 15340 request; this effectively ignores the 15341 authentication in the spec for a single request. 15342 :type _request_auth: dict, optional 15343 :param _content_type: force content-type for the request. 15344 :type _content_type: str, Optional 15345 :param _headers: set to override the headers for a single 15346 request; this effectively ignores the headers 15347 in the spec for a single request. 15348 :type _headers: dict, optional 15349 :param _host_index: set to override the host_index for a single 15350 request; this effectively ignores the host_index 15351 in the spec for a single request. 15352 :type _host_index: int, optional 15353 :return: Returns the result object. 15354 """ # noqa: E501 15355 15356 _param = self._get_board_members_serialize( 15357 board_id=board_id, 15358 limit=limit, 15359 offset=offset, 15360 _request_auth=_request_auth, 15361 _content_type=_content_type, 15362 _headers=_headers, 15363 _host_index=_host_index, 15364 ) 15365 15366 _response_types_map: Dict[str, Optional[str]] = { 15367 "200": "BoardMembersPagedResponse", 15368 "400": None, 15369 "404": None, 15370 "429": None, 15371 } 15372 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15373 response_data.read() 15374 return self.api_client.response_deserialize( 15375 response_data=response_data, 15376 response_types_map=_response_types_map, 15377 ).data
Get all board members
Retrieves a pageable list of members for a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) :type board_id: str :param limit: :type limit: str :param offset: :type offset: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15438 @validate_call 15439 def get_specific_board_member( 15440 self, 15441 board_id: Annotated[ 15442 StrictStr, Field(description="Unique identifier (ID) of the board to which the board member belongs.") 15443 ], 15444 board_member_id: Annotated[ 15445 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to retrieve.") 15446 ], 15447 _request_timeout: Union[ 15448 None, 15449 Annotated[StrictFloat, Field(gt=0)], 15450 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15451 ] = None, 15452 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15453 _content_type: Optional[StrictStr] = None, 15454 _headers: Optional[Dict[StrictStr, Any]] = None, 15455 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15456 ) -> BoardMemberWithLinks: 15457 """Get specific board member 15458 15459 Retrieves information for a board member.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 15460 15461 :param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) 15462 :type board_id: str 15463 :param board_member_id: Unique identifier (ID) of the board member whose role you want to retrieve. (required) 15464 :type board_member_id: str 15465 :param _request_timeout: timeout setting for this request. If one 15466 number provided, it will be total request 15467 timeout. It can also be a pair (tuple) of 15468 (connection, read) timeouts. 15469 :type _request_timeout: int, tuple(int, int), optional 15470 :param _request_auth: set to override the auth_settings for an a single 15471 request; this effectively ignores the 15472 authentication in the spec for a single request. 15473 :type _request_auth: dict, optional 15474 :param _content_type: force content-type for the request. 15475 :type _content_type: str, Optional 15476 :param _headers: set to override the headers for a single 15477 request; this effectively ignores the headers 15478 in the spec for a single request. 15479 :type _headers: dict, optional 15480 :param _host_index: set to override the host_index for a single 15481 request; this effectively ignores the host_index 15482 in the spec for a single request. 15483 :type _host_index: int, optional 15484 :return: Returns the result object. 15485 """ # noqa: E501 15486 15487 _param = self._get_specific_board_member_serialize( 15488 board_id=board_id, 15489 board_member_id=board_member_id, 15490 _request_auth=_request_auth, 15491 _content_type=_content_type, 15492 _headers=_headers, 15493 _host_index=_host_index, 15494 ) 15495 15496 _response_types_map: Dict[str, Optional[str]] = { 15497 "200": "BoardMemberWithLinks", 15498 "400": None, 15499 "404": None, 15500 "429": None, 15501 } 15502 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15503 response_data.read() 15504 return self.api_client.response_deserialize( 15505 response_data=response_data, 15506 response_types_map=_response_types_map, 15507 ).data
Get specific board member
Retrieves information for a board member.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board to which the board member belongs. (required) :type board_id: str :param board_member_id: Unique identifier (ID) of the board member whose role you want to retrieve. (required) :type board_member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15561 @validate_call 15562 def remove_board_member( 15563 self, 15564 board_id: Annotated[ 15565 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete an item.") 15566 ], 15567 board_member_id: Annotated[ 15568 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to delete.") 15569 ], 15570 _request_timeout: Union[ 15571 None, 15572 Annotated[StrictFloat, Field(gt=0)], 15573 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15574 ] = None, 15575 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15576 _content_type: Optional[StrictStr] = None, 15577 _headers: Optional[Dict[StrictStr, Any]] = None, 15578 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15579 ) -> object: 15580 """Remove board member 15581 15582 Removes a board member from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15583 15584 :param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) 15585 :type board_id: str 15586 :param board_member_id: Unique identifier (ID) of the board member whose role you want to delete. (required) 15587 :type board_member_id: str 15588 :param _request_timeout: timeout setting for this request. If one 15589 number provided, it will be total request 15590 timeout. It can also be a pair (tuple) of 15591 (connection, read) timeouts. 15592 :type _request_timeout: int, tuple(int, int), optional 15593 :param _request_auth: set to override the auth_settings for an a single 15594 request; this effectively ignores the 15595 authentication in the spec for a single request. 15596 :type _request_auth: dict, optional 15597 :param _content_type: force content-type for the request. 15598 :type _content_type: str, Optional 15599 :param _headers: set to override the headers for a single 15600 request; this effectively ignores the headers 15601 in the spec for a single request. 15602 :type _headers: dict, optional 15603 :param _host_index: set to override the host_index for a single 15604 request; this effectively ignores the host_index 15605 in the spec for a single request. 15606 :type _host_index: int, optional 15607 :return: Returns the result object. 15608 """ # noqa: E501 15609 15610 _param = self._remove_board_member_serialize( 15611 board_id=board_id, 15612 board_member_id=board_member_id, 15613 _request_auth=_request_auth, 15614 _content_type=_content_type, 15615 _headers=_headers, 15616 _host_index=_host_index, 15617 ) 15618 15619 _response_types_map: Dict[str, Optional[str]] = { 15620 "204": "object", 15621 "400": None, 15622 "404": None, 15623 "429": None, 15624 } 15625 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15626 response_data.read() 15627 return self.api_client.response_deserialize( 15628 response_data=response_data, 15629 response_types_map=_response_types_map, 15630 ).data
Remove board member
Removes a board member from a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board from which you want to delete an item. (required) :type board_id: str :param board_member_id: Unique identifier (ID) of the board member whose role you want to delete. (required) :type board_member_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15813 @validate_call 15814 def update_board_member( 15815 self, 15816 board_id: Annotated[ 15817 StrictStr, 15818 Field( 15819 description="Unique identifier (ID) of the board for which you want to update the role of the board member." 15820 ), 15821 ], 15822 board_member_id: Annotated[ 15823 StrictStr, Field(description="Unique identifier (ID) of the board member whose role you want to update.") 15824 ], 15825 board_member_changes: BoardMemberChanges, 15826 _request_timeout: Union[ 15827 None, 15828 Annotated[StrictFloat, Field(gt=0)], 15829 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15830 ] = None, 15831 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15832 _content_type: Optional[StrictStr] = None, 15833 _headers: Optional[Dict[StrictStr, Any]] = None, 15834 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15835 ) -> BoardMemberWithLinks: 15836 """Update board member 15837 15838 Updates the role of a board member.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 15839 15840 :param board_id: Unique identifier (ID) of the board for which you want to update the role of the board member. (required) 15841 :type board_id: str 15842 :param board_member_id: Unique identifier (ID) of the board member whose role you want to update. (required) 15843 :type board_member_id: str 15844 :param board_member_changes: (required) 15845 :type board_member_changes: BoardMemberChanges 15846 :param _request_timeout: timeout setting for this request. If one 15847 number provided, it will be total request 15848 timeout. It can also be a pair (tuple) of 15849 (connection, read) timeouts. 15850 :type _request_timeout: int, tuple(int, int), optional 15851 :param _request_auth: set to override the auth_settings for an a single 15852 request; this effectively ignores the 15853 authentication in the spec for a single request. 15854 :type _request_auth: dict, optional 15855 :param _content_type: force content-type for the request. 15856 :type _content_type: str, Optional 15857 :param _headers: set to override the headers for a single 15858 request; this effectively ignores the headers 15859 in the spec for a single request. 15860 :type _headers: dict, optional 15861 :param _host_index: set to override the host_index for a single 15862 request; this effectively ignores the host_index 15863 in the spec for a single request. 15864 :type _host_index: int, optional 15865 :return: Returns the result object. 15866 """ # noqa: E501 15867 15868 _param = self._update_board_member_serialize( 15869 board_id=board_id, 15870 board_member_id=board_member_id, 15871 board_member_changes=board_member_changes, 15872 _request_auth=_request_auth, 15873 _content_type=_content_type, 15874 _headers=_headers, 15875 _host_index=_host_index, 15876 ) 15877 15878 _response_types_map: Dict[str, Optional[str]] = { 15879 "200": "BoardMemberWithLinks", 15880 "400": None, 15881 "404": None, 15882 "429": None, 15883 } 15884 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 15885 response_data.read() 15886 return self.api_client.response_deserialize( 15887 response_data=response_data, 15888 response_types_map=_response_types_map, 15889 ).data
Update board member
Updates the role of a board member.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board for which you want to update the role of the board member. (required) :type board_id: str :param board_member_id: Unique identifier (ID) of the board member whose role you want to update. (required) :type board_member_id: str :param board_member_changes: (required) :type board_member_changes: BoardMemberChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
15954 @validate_call 15955 def copy_board( 15956 self, 15957 copy_from: Annotated[ 15958 StrictStr, Field(description="Unique identifier (ID) of the board that you want to copy.") 15959 ], 15960 copy_board_changes: Optional[CopyBoardChanges] = None, 15961 _request_timeout: Union[ 15962 None, 15963 Annotated[StrictFloat, Field(gt=0)], 15964 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 15965 ] = None, 15966 _request_auth: Optional[Dict[StrictStr, Any]] = None, 15967 _content_type: Optional[StrictStr] = None, 15968 _headers: Optional[Dict[StrictStr, Any]] = None, 15969 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 15970 ) -> BoardWithLinksAndWithoutProject: 15971 """Copy board 15972 15973 Creates a copy of an existing board. You can also update the name, description, sharing policy, and permissions policy for the new board in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 4</a><br/> 15974 15975 :param copy_from: Unique identifier (ID) of the board that you want to copy. (required) 15976 :type copy_from: str 15977 :param copy_board_changes: 15978 :type copy_board_changes: CopyBoardChanges 15979 :param _request_timeout: timeout setting for this request. If one 15980 number provided, it will be total request 15981 timeout. It can also be a pair (tuple) of 15982 (connection, read) timeouts. 15983 :type _request_timeout: int, tuple(int, int), optional 15984 :param _request_auth: set to override the auth_settings for an a single 15985 request; this effectively ignores the 15986 authentication in the spec for a single request. 15987 :type _request_auth: dict, optional 15988 :param _content_type: force content-type for the request. 15989 :type _content_type: str, Optional 15990 :param _headers: set to override the headers for a single 15991 request; this effectively ignores the headers 15992 in the spec for a single request. 15993 :type _headers: dict, optional 15994 :param _host_index: set to override the host_index for a single 15995 request; this effectively ignores the host_index 15996 in the spec for a single request. 15997 :type _host_index: int, optional 15998 :return: Returns the result object. 15999 """ # noqa: E501 16000 16001 _param = self._copy_board_serialize( 16002 copy_from=copy_from, 16003 copy_board_changes=copy_board_changes, 16004 _request_auth=_request_auth, 16005 _content_type=_content_type, 16006 _headers=_headers, 16007 _host_index=_host_index, 16008 ) 16009 16010 _response_types_map: Dict[str, Optional[str]] = { 16011 "201": "BoardWithLinksAndWithoutProject", 16012 "400": None, 16013 "404": None, 16014 "409": None, 16015 "429": None, 16016 } 16017 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16018 response_data.read() 16019 return self.api_client.response_deserialize( 16020 response_data=response_data, 16021 response_types_map=_response_types_map, 16022 ).data
Copy board
Creates a copy of an existing board. You can also update the name, description, sharing policy, and permissions policy for the new board in the request body.
Required scope
boards:writeRate limiting
Level 4:param copy_from: Unique identifier (ID) of the board that you want to copy. (required) :type copy_from: str :param copy_board_changes: :type copy_board_changes: CopyBoardChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16086 @validate_call 16087 def create_board( 16088 self, 16089 board_changes: Optional[BoardChanges] = None, 16090 _request_timeout: Union[ 16091 None, 16092 Annotated[StrictFloat, Field(gt=0)], 16093 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16094 ] = None, 16095 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16096 _content_type: Optional[StrictStr] = None, 16097 _headers: Optional[Dict[StrictStr, Any]] = None, 16098 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16099 ) -> BoardWithLinks: 16100 """Create board 16101 16102 Creates a board with the specified name and sharing policies.<br/><h4>Note</h4> You can only create up to 3 team boards with the free plan.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16103 16104 :param board_changes: 16105 :type board_changes: BoardChanges 16106 :param _request_timeout: timeout setting for this request. If one 16107 number provided, it will be total request 16108 timeout. It can also be a pair (tuple) of 16109 (connection, read) timeouts. 16110 :type _request_timeout: int, tuple(int, int), optional 16111 :param _request_auth: set to override the auth_settings for an a single 16112 request; this effectively ignores the 16113 authentication in the spec for a single request. 16114 :type _request_auth: dict, optional 16115 :param _content_type: force content-type for the request. 16116 :type _content_type: str, Optional 16117 :param _headers: set to override the headers for a single 16118 request; this effectively ignores the headers 16119 in the spec for a single request. 16120 :type _headers: dict, optional 16121 :param _host_index: set to override the host_index for a single 16122 request; this effectively ignores the host_index 16123 in the spec for a single request. 16124 :type _host_index: int, optional 16125 :return: Returns the result object. 16126 """ # noqa: E501 16127 16128 _param = self._create_board_serialize( 16129 board_changes=board_changes, 16130 _request_auth=_request_auth, 16131 _content_type=_content_type, 16132 _headers=_headers, 16133 _host_index=_host_index, 16134 ) 16135 16136 _response_types_map: Dict[str, Optional[str]] = { 16137 "201": "BoardWithLinks", 16138 "400": None, 16139 "404": None, 16140 "409": None, 16141 "429": None, 16142 } 16143 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16144 response_data.read() 16145 return self.api_client.response_deserialize( 16146 response_data=response_data, 16147 response_types_map=_response_types_map, 16148 ).data
Create board
Creates a board with the specified name and sharing policies.
Note
You can only create up to 3 team boards with the free plan.Required scope
boards:writeRate limiting
Level 3:param board_changes: :type board_changes: BoardChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16207 @validate_call 16208 def delete_board( 16209 self, 16210 board_id: Annotated[ 16211 StrictStr, Field(description="Unique identifier (ID) of the board that you want to delete.") 16212 ], 16213 _request_timeout: Union[ 16214 None, 16215 Annotated[StrictFloat, Field(gt=0)], 16216 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16217 ] = None, 16218 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16219 _content_type: Optional[StrictStr] = None, 16220 _headers: Optional[Dict[StrictStr, Any]] = None, 16221 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16222 ) -> object: 16223 """Delete board 16224 16225 Deletes a board. Deleted boards go to Trash (on paid plans) and can be restored via UI within 90 days after deletion.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16226 16227 :param board_id: Unique identifier (ID) of the board that you want to delete. (required) 16228 :type board_id: str 16229 :param _request_timeout: timeout setting for this request. If one 16230 number provided, it will be total request 16231 timeout. It can also be a pair (tuple) of 16232 (connection, read) timeouts. 16233 :type _request_timeout: int, tuple(int, int), optional 16234 :param _request_auth: set to override the auth_settings for an a single 16235 request; this effectively ignores the 16236 authentication in the spec for a single request. 16237 :type _request_auth: dict, optional 16238 :param _content_type: force content-type for the request. 16239 :type _content_type: str, Optional 16240 :param _headers: set to override the headers for a single 16241 request; this effectively ignores the headers 16242 in the spec for a single request. 16243 :type _headers: dict, optional 16244 :param _host_index: set to override the host_index for a single 16245 request; this effectively ignores the host_index 16246 in the spec for a single request. 16247 :type _host_index: int, optional 16248 :return: Returns the result object. 16249 """ # noqa: E501 16250 16251 _param = self._delete_board_serialize( 16252 board_id=board_id, 16253 _request_auth=_request_auth, 16254 _content_type=_content_type, 16255 _headers=_headers, 16256 _host_index=_host_index, 16257 ) 16258 16259 _response_types_map: Dict[str, Optional[str]] = { 16260 "204": "object", 16261 "400": None, 16262 "404": None, 16263 "409": None, 16264 "429": None, 16265 } 16266 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16267 response_data.read() 16268 return self.api_client.response_deserialize( 16269 response_data=response_data, 16270 response_types_map=_response_types_map, 16271 ).data
Delete board
Deletes a board. Deleted boards go to Trash (on paid plans) and can be restored via UI within 90 days after deletion.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board that you want to delete. (required) :type board_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16322 @validate_call 16323 def get_boards( 16324 self, 16325 team_id: Optional[StrictStr] = None, 16326 project_id: Optional[StrictStr] = None, 16327 query: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None, 16328 owner: Optional[StrictStr] = None, 16329 limit: Optional[Annotated[str, Field(strict=True)]] = None, 16330 offset: Optional[StrictStr] = None, 16331 sort: Optional[StrictStr] = None, 16332 _request_timeout: Union[ 16333 None, 16334 Annotated[StrictFloat, Field(gt=0)], 16335 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16336 ] = None, 16337 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16338 _content_type: Optional[StrictStr] = None, 16339 _headers: Optional[Dict[StrictStr, Any]] = None, 16340 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16341 ) -> BoardsPagedResponse: 16342 """Get boards 16343 16344 Retrieves a list of boards accessible to the user associated with the provided access token. This endpoint supports filtering and sorting through URL query parameters. Customize the response by specifying `team_id`, `project_id`, or other query parameters. Filtering by `team_id` or `project_id` (or both) returns results instantly. For other filters, allow a few seconds for indexing of newly created boards. If you're an Enterprise customer with Company Admin permissions: - Enable **Content Admin** permissions to retrieve all boards, including private boards (those not explicitly shared with you). For details, see the [Content Admin Permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins). - Note that **Private board contents remain inaccessible**. The API allows you to verify their existence but prevents viewing their contents to uphold security best practices. Unauthorized access attempts will return an error. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 16345 16346 :param team_id: 16347 :type team_id: str 16348 :param project_id: 16349 :type project_id: str 16350 :param query: 16351 :type query: str 16352 :param owner: 16353 :type owner: str 16354 :param limit: 16355 :type limit: str 16356 :param offset: 16357 :type offset: str 16358 :param sort: 16359 :type sort: str 16360 :param _request_timeout: timeout setting for this request. If one 16361 number provided, it will be total request 16362 timeout. It can also be a pair (tuple) of 16363 (connection, read) timeouts. 16364 :type _request_timeout: int, tuple(int, int), optional 16365 :param _request_auth: set to override the auth_settings for an a single 16366 request; this effectively ignores the 16367 authentication in the spec for a single request. 16368 :type _request_auth: dict, optional 16369 :param _content_type: force content-type for the request. 16370 :type _content_type: str, Optional 16371 :param _headers: set to override the headers for a single 16372 request; this effectively ignores the headers 16373 in the spec for a single request. 16374 :type _headers: dict, optional 16375 :param _host_index: set to override the host_index for a single 16376 request; this effectively ignores the host_index 16377 in the spec for a single request. 16378 :type _host_index: int, optional 16379 :return: Returns the result object. 16380 """ # noqa: E501 16381 16382 _param = self._get_boards_serialize( 16383 team_id=team_id, 16384 project_id=project_id, 16385 query=query, 16386 owner=owner, 16387 limit=limit, 16388 offset=offset, 16389 sort=sort, 16390 _request_auth=_request_auth, 16391 _content_type=_content_type, 16392 _headers=_headers, 16393 _host_index=_host_index, 16394 ) 16395 16396 _response_types_map: Dict[str, Optional[str]] = { 16397 "200": "BoardsPagedResponse", 16398 "400": None, 16399 "404": None, 16400 "429": None, 16401 } 16402 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16403 response_data.read() 16404 return self.api_client.response_deserialize( 16405 response_data=response_data, 16406 response_types_map=_response_types_map, 16407 ).data
Get boards
Retrieves a list of boards accessible to the user associated with the provided access token. This endpoint supports filtering and sorting through URL query parameters. Customize the response by specifying team_id, project_id, or other query parameters. Filtering by team_id or project_id (or both) returns results instantly. For other filters, allow a few seconds for indexing of newly created boards. If you're an Enterprise customer with Company Admin permissions: - Enable Content Admin permissions to retrieve all boards, including private boards (those not explicitly shared with you). For details, see the Content Admin Permissions for Company Admins. - Note that Private board contents remain inaccessible. The API allows you to verify their existence but prevents viewing their contents to uphold security best practices. Unauthorized access attempts will return an error.
Required scope
boards:readRate limiting
Level 1:param team_id: :type team_id: str :param project_id: :type project_id: str :param query: :type query: str :param owner: :type owner: str :param limit: :type limit: str :param offset: :type offset: str :param sort: :type sort: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16490 @validate_call 16491 def get_specific_board( 16492 self, 16493 board_id: Annotated[ 16494 StrictStr, Field(description="Unique identifier (ID) of the board that you want to retrieve.") 16495 ], 16496 _request_timeout: Union[ 16497 None, 16498 Annotated[StrictFloat, Field(gt=0)], 16499 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16500 ] = None, 16501 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16502 _content_type: Optional[StrictStr] = None, 16503 _headers: Optional[Dict[StrictStr, Any]] = None, 16504 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16505 ) -> BoardWithLinksAndLastOpened: 16506 """Get specific board 16507 16508 Retrieves information about a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 16509 16510 :param board_id: Unique identifier (ID) of the board that you want to retrieve. (required) 16511 :type board_id: str 16512 :param _request_timeout: timeout setting for this request. If one 16513 number provided, it will be total request 16514 timeout. It can also be a pair (tuple) of 16515 (connection, read) timeouts. 16516 :type _request_timeout: int, tuple(int, int), optional 16517 :param _request_auth: set to override the auth_settings for an a single 16518 request; this effectively ignores the 16519 authentication in the spec for a single request. 16520 :type _request_auth: dict, optional 16521 :param _content_type: force content-type for the request. 16522 :type _content_type: str, Optional 16523 :param _headers: set to override the headers for a single 16524 request; this effectively ignores the headers 16525 in the spec for a single request. 16526 :type _headers: dict, optional 16527 :param _host_index: set to override the host_index for a single 16528 request; this effectively ignores the host_index 16529 in the spec for a single request. 16530 :type _host_index: int, optional 16531 :return: Returns the result object. 16532 """ # noqa: E501 16533 16534 _param = self._get_specific_board_serialize( 16535 board_id=board_id, 16536 _request_auth=_request_auth, 16537 _content_type=_content_type, 16538 _headers=_headers, 16539 _host_index=_host_index, 16540 ) 16541 16542 _response_types_map: Dict[str, Optional[str]] = { 16543 "200": "BoardWithLinksAndLastOpened", 16544 "400": None, 16545 "404": None, 16546 "429": None, 16547 } 16548 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16549 response_data.read() 16550 return self.api_client.response_deserialize( 16551 response_data=response_data, 16552 response_types_map=_response_types_map, 16553 ).data
Get specific board
Retrieves information about a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board that you want to retrieve. (required) :type board_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16604 @validate_call 16605 def update_board( 16606 self, 16607 board_id: Annotated[ 16608 StrictStr, Field(description="Unique identifier (ID) of the board that you want to update.") 16609 ], 16610 board_changes: BoardChanges, 16611 _request_timeout: Union[ 16612 None, 16613 Annotated[StrictFloat, Field(gt=0)], 16614 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16615 ] = None, 16616 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16617 _content_type: Optional[StrictStr] = None, 16618 _headers: Optional[Dict[StrictStr, Any]] = None, 16619 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16620 ) -> BoardWithLinks: 16621 """Update board 16622 16623 Updates a specific board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 16624 16625 :param board_id: Unique identifier (ID) of the board that you want to update. (required) 16626 :type board_id: str 16627 :param board_changes: (required) 16628 :type board_changes: BoardChanges 16629 :param _request_timeout: timeout setting for this request. If one 16630 number provided, it will be total request 16631 timeout. It can also be a pair (tuple) of 16632 (connection, read) timeouts. 16633 :type _request_timeout: int, tuple(int, int), optional 16634 :param _request_auth: set to override the auth_settings for an a single 16635 request; this effectively ignores the 16636 authentication in the spec for a single request. 16637 :type _request_auth: dict, optional 16638 :param _content_type: force content-type for the request. 16639 :type _content_type: str, Optional 16640 :param _headers: set to override the headers for a single 16641 request; this effectively ignores the headers 16642 in the spec for a single request. 16643 :type _headers: dict, optional 16644 :param _host_index: set to override the host_index for a single 16645 request; this effectively ignores the host_index 16646 in the spec for a single request. 16647 :type _host_index: int, optional 16648 :return: Returns the result object. 16649 """ # noqa: E501 16650 16651 _param = self._update_board_serialize( 16652 board_id=board_id, 16653 board_changes=board_changes, 16654 _request_auth=_request_auth, 16655 _content_type=_content_type, 16656 _headers=_headers, 16657 _host_index=_host_index, 16658 ) 16659 16660 _response_types_map: Dict[str, Optional[str]] = { 16661 "200": "BoardWithLinks", 16662 "202": None, 16663 "400": None, 16664 "404": None, 16665 "409": None, 16666 "429": None, 16667 } 16668 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16669 response_data.read() 16670 return self.api_client.response_deserialize( 16671 response_data=response_data, 16672 response_types_map=_response_types_map, 16673 ).data
Update board
Updates a specific board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board that you want to update. (required) :type board_id: str :param board_changes: (required) :type board_changes: BoardChanges :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16735 @validate_call 16736 def create_card_item( 16737 self, 16738 board_id: Annotated[ 16739 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 16740 ], 16741 card_create_request: CardCreateRequest, 16742 _request_timeout: Union[ 16743 None, 16744 Annotated[StrictFloat, Field(gt=0)], 16745 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16746 ] = None, 16747 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16748 _content_type: Optional[StrictStr] = None, 16749 _headers: Optional[Dict[StrictStr, Any]] = None, 16750 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16751 ) -> CardItem: 16752 """Create card item 16753 16754 Adds a card item to a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 16755 16756 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 16757 :type board_id: str 16758 :param card_create_request: (required) 16759 :type card_create_request: CardCreateRequest 16760 :param _request_timeout: timeout setting for this request. If one 16761 number provided, it will be total request 16762 timeout. It can also be a pair (tuple) of 16763 (connection, read) timeouts. 16764 :type _request_timeout: int, tuple(int, int), optional 16765 :param _request_auth: set to override the auth_settings for an a single 16766 request; this effectively ignores the 16767 authentication in the spec for a single request. 16768 :type _request_auth: dict, optional 16769 :param _content_type: force content-type for the request. 16770 :type _content_type: str, Optional 16771 :param _headers: set to override the headers for a single 16772 request; this effectively ignores the headers 16773 in the spec for a single request. 16774 :type _headers: dict, optional 16775 :param _host_index: set to override the host_index for a single 16776 request; this effectively ignores the host_index 16777 in the spec for a single request. 16778 :type _host_index: int, optional 16779 :return: Returns the result object. 16780 """ # noqa: E501 16781 16782 _param = self._create_card_item_serialize( 16783 board_id=board_id, 16784 card_create_request=card_create_request, 16785 _request_auth=_request_auth, 16786 _content_type=_content_type, 16787 _headers=_headers, 16788 _host_index=_host_index, 16789 ) 16790 16791 _response_types_map: Dict[str, Optional[str]] = { 16792 "201": "CardItem", 16793 "400": None, 16794 "404": None, 16795 "429": None, 16796 } 16797 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16798 response_data.read() 16799 return self.api_client.response_deserialize( 16800 response_data=response_data, 16801 response_types_map=_response_types_map, 16802 ).data
Create card item
Adds a card item to a board
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param card_create_request: (required) :type card_create_request: CardCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16864 @validate_call 16865 def delete_card_item( 16866 self, 16867 board_id: Annotated[ 16868 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 16869 ], 16870 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 16871 _request_timeout: Union[ 16872 None, 16873 Annotated[StrictFloat, Field(gt=0)], 16874 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16875 ] = None, 16876 _request_auth: Optional[Dict[StrictStr, Any]] = None, 16877 _content_type: Optional[StrictStr] = None, 16878 _headers: Optional[Dict[StrictStr, Any]] = None, 16879 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 16880 ) -> object: 16881 """Delete card item 16882 16883 Deletes a card item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 16884 16885 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 16886 :type board_id: str 16887 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 16888 :type item_id: str 16889 :param _request_timeout: timeout setting for this request. If one 16890 number provided, it will be total request 16891 timeout. It can also be a pair (tuple) of 16892 (connection, read) timeouts. 16893 :type _request_timeout: int, tuple(int, int), optional 16894 :param _request_auth: set to override the auth_settings for an a single 16895 request; this effectively ignores the 16896 authentication in the spec for a single request. 16897 :type _request_auth: dict, optional 16898 :param _content_type: force content-type for the request. 16899 :type _content_type: str, Optional 16900 :param _headers: set to override the headers for a single 16901 request; this effectively ignores the headers 16902 in the spec for a single request. 16903 :type _headers: dict, optional 16904 :param _host_index: set to override the host_index for a single 16905 request; this effectively ignores the host_index 16906 in the spec for a single request. 16907 :type _host_index: int, optional 16908 :return: Returns the result object. 16909 """ # noqa: E501 16910 16911 _param = self._delete_card_item_serialize( 16912 board_id=board_id, 16913 item_id=item_id, 16914 _request_auth=_request_auth, 16915 _content_type=_content_type, 16916 _headers=_headers, 16917 _host_index=_host_index, 16918 ) 16919 16920 _response_types_map: Dict[str, Optional[str]] = { 16921 "204": "object", 16922 "400": None, 16923 "404": None, 16924 "429": None, 16925 } 16926 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 16927 response_data.read() 16928 return self.api_client.response_deserialize( 16929 response_data=response_data, 16930 response_types_map=_response_types_map, 16931 ).data
Delete card item
Deletes a card item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
16985 @validate_call 16986 def get_card_item( 16987 self, 16988 board_id: Annotated[ 16989 StrictStr, 16990 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 16991 ], 16992 item_id: Annotated[ 16993 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 16994 ], 16995 _request_timeout: Union[ 16996 None, 16997 Annotated[StrictFloat, Field(gt=0)], 16998 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 16999 ] = None, 17000 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17001 _content_type: Optional[StrictStr] = None, 17002 _headers: Optional[Dict[StrictStr, Any]] = None, 17003 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17004 ) -> CardItem: 17005 """Get card item 17006 17007 Retrieves information for a specific card item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 17008 17009 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 17010 :type board_id: str 17011 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 17012 :type item_id: str 17013 :param _request_timeout: timeout setting for this request. If one 17014 number provided, it will be total request 17015 timeout. It can also be a pair (tuple) of 17016 (connection, read) timeouts. 17017 :type _request_timeout: int, tuple(int, int), optional 17018 :param _request_auth: set to override the auth_settings for an a single 17019 request; this effectively ignores the 17020 authentication in the spec for a single request. 17021 :type _request_auth: dict, optional 17022 :param _content_type: force content-type for the request. 17023 :type _content_type: str, Optional 17024 :param _headers: set to override the headers for a single 17025 request; this effectively ignores the headers 17026 in the spec for a single request. 17027 :type _headers: dict, optional 17028 :param _host_index: set to override the host_index for a single 17029 request; this effectively ignores the host_index 17030 in the spec for a single request. 17031 :type _host_index: int, optional 17032 :return: Returns the result object. 17033 """ # noqa: E501 17034 17035 _param = self._get_card_item_serialize( 17036 board_id=board_id, 17037 item_id=item_id, 17038 _request_auth=_request_auth, 17039 _content_type=_content_type, 17040 _headers=_headers, 17041 _host_index=_host_index, 17042 ) 17043 17044 _response_types_map: Dict[str, Optional[str]] = { 17045 "200": "CardItem", 17046 "400": None, 17047 "404": None, 17048 "429": None, 17049 } 17050 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17051 response_data.read() 17052 return self.api_client.response_deserialize( 17053 response_data=response_data, 17054 response_types_map=_response_types_map, 17055 ).data
Get card item
Retrieves information for a specific card item on a board
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17109 @validate_call 17110 def update_card_item( 17111 self, 17112 board_id: Annotated[ 17113 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 17114 ], 17115 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 17116 card_update_request: CardUpdateRequest, 17117 _request_timeout: Union[ 17118 None, 17119 Annotated[StrictFloat, Field(gt=0)], 17120 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17121 ] = None, 17122 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17123 _content_type: Optional[StrictStr] = None, 17124 _headers: Optional[Dict[StrictStr, Any]] = None, 17125 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17126 ) -> CardItem: 17127 """Update card item 17128 17129 Updates a card item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17130 17131 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 17132 :type board_id: str 17133 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 17134 :type item_id: str 17135 :param card_update_request: (required) 17136 :type card_update_request: CardUpdateRequest 17137 :param _request_timeout: timeout setting for this request. If one 17138 number provided, it will be total request 17139 timeout. It can also be a pair (tuple) of 17140 (connection, read) timeouts. 17141 :type _request_timeout: int, tuple(int, int), optional 17142 :param _request_auth: set to override the auth_settings for an a single 17143 request; this effectively ignores the 17144 authentication in the spec for a single request. 17145 :type _request_auth: dict, optional 17146 :param _content_type: force content-type for the request. 17147 :type _content_type: str, Optional 17148 :param _headers: set to override the headers for a single 17149 request; this effectively ignores the headers 17150 in the spec for a single request. 17151 :type _headers: dict, optional 17152 :param _host_index: set to override the host_index for a single 17153 request; this effectively ignores the host_index 17154 in the spec for a single request. 17155 :type _host_index: int, optional 17156 :return: Returns the result object. 17157 """ # noqa: E501 17158 17159 _param = self._update_card_item_serialize( 17160 board_id=board_id, 17161 item_id=item_id, 17162 card_update_request=card_update_request, 17163 _request_auth=_request_auth, 17164 _content_type=_content_type, 17165 _headers=_headers, 17166 _host_index=_host_index, 17167 ) 17168 17169 _response_types_map: Dict[str, Optional[str]] = { 17170 "200": "CardItem", 17171 "400": None, 17172 "404": None, 17173 "409": None, 17174 "429": None, 17175 } 17176 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17177 response_data.read() 17178 return self.api_client.response_deserialize( 17179 response_data=response_data, 17180 response_types_map=_response_types_map, 17181 ).data
Update card item
Updates a card item on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param card_update_request: (required) :type card_update_request: CardUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17246 @validate_call 17247 def create_connector( 17248 self, 17249 board_id: Annotated[ 17250 StrictStr, 17251 Field(description="Unique identifier (ID) of the board for which you want to create the connector."), 17252 ], 17253 connector_creation_data: ConnectorCreationData, 17254 _request_timeout: Union[ 17255 None, 17256 Annotated[StrictFloat, Field(gt=0)], 17257 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17258 ] = None, 17259 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17260 _content_type: Optional[StrictStr] = None, 17261 _headers: Optional[Dict[StrictStr, Any]] = None, 17262 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17263 ) -> ConnectorWithLinks: 17264 """Create connector 17265 17266 Adds a connector to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17267 17268 :param board_id: Unique identifier (ID) of the board for which you want to create the connector. (required) 17269 :type board_id: str 17270 :param connector_creation_data: (required) 17271 :type connector_creation_data: ConnectorCreationData 17272 :param _request_timeout: timeout setting for this request. If one 17273 number provided, it will be total request 17274 timeout. It can also be a pair (tuple) of 17275 (connection, read) timeouts. 17276 :type _request_timeout: int, tuple(int, int), optional 17277 :param _request_auth: set to override the auth_settings for an a single 17278 request; this effectively ignores the 17279 authentication in the spec for a single request. 17280 :type _request_auth: dict, optional 17281 :param _content_type: force content-type for the request. 17282 :type _content_type: str, Optional 17283 :param _headers: set to override the headers for a single 17284 request; this effectively ignores the headers 17285 in the spec for a single request. 17286 :type _headers: dict, optional 17287 :param _host_index: set to override the host_index for a single 17288 request; this effectively ignores the host_index 17289 in the spec for a single request. 17290 :type _host_index: int, optional 17291 :return: Returns the result object. 17292 """ # noqa: E501 17293 17294 _param = self._create_connector_serialize( 17295 board_id=board_id, 17296 connector_creation_data=connector_creation_data, 17297 _request_auth=_request_auth, 17298 _content_type=_content_type, 17299 _headers=_headers, 17300 _host_index=_host_index, 17301 ) 17302 17303 _response_types_map: Dict[str, Optional[str]] = { 17304 "200": "ConnectorWithLinks", 17305 "400": None, 17306 "404": None, 17307 "429": None, 17308 } 17309 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17310 response_data.read() 17311 return self.api_client.response_deserialize( 17312 response_data=response_data, 17313 response_types_map=_response_types_map, 17314 ).data
Create connector
Adds a connector to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board for which you want to create the connector. (required) :type board_id: str :param connector_creation_data: (required) :type connector_creation_data: ConnectorCreationData :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17376 @validate_call 17377 def delete_connector( 17378 self, 17379 board_id: Annotated[ 17380 StrictStr, 17381 Field(description="Unique identifier (ID) of the board from which you want to delete the connector."), 17382 ], 17383 connector_id: Annotated[ 17384 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to delete.") 17385 ], 17386 _request_timeout: Union[ 17387 None, 17388 Annotated[StrictFloat, Field(gt=0)], 17389 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17390 ] = None, 17391 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17392 _content_type: Optional[StrictStr] = None, 17393 _headers: Optional[Dict[StrictStr, Any]] = None, 17394 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17395 ) -> object: 17396 """Delete connector 17397 17398 Deletes the specified connector from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 17399 17400 :param board_id: Unique identifier (ID) of the board from which you want to delete the connector. (required) 17401 :type board_id: str 17402 :param connector_id: Unique identifier (ID) of the connector that you want to delete. (required) 17403 :type connector_id: str 17404 :param _request_timeout: timeout setting for this request. If one 17405 number provided, it will be total request 17406 timeout. It can also be a pair (tuple) of 17407 (connection, read) timeouts. 17408 :type _request_timeout: int, tuple(int, int), optional 17409 :param _request_auth: set to override the auth_settings for an a single 17410 request; this effectively ignores the 17411 authentication in the spec for a single request. 17412 :type _request_auth: dict, optional 17413 :param _content_type: force content-type for the request. 17414 :type _content_type: str, Optional 17415 :param _headers: set to override the headers for a single 17416 request; this effectively ignores the headers 17417 in the spec for a single request. 17418 :type _headers: dict, optional 17419 :param _host_index: set to override the host_index for a single 17420 request; this effectively ignores the host_index 17421 in the spec for a single request. 17422 :type _host_index: int, optional 17423 :return: Returns the result object. 17424 """ # noqa: E501 17425 17426 _param = self._delete_connector_serialize( 17427 board_id=board_id, 17428 connector_id=connector_id, 17429 _request_auth=_request_auth, 17430 _content_type=_content_type, 17431 _headers=_headers, 17432 _host_index=_host_index, 17433 ) 17434 17435 _response_types_map: Dict[str, Optional[str]] = { 17436 "204": "object", 17437 "400": None, 17438 "404": None, 17439 "429": None, 17440 } 17441 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17442 response_data.read() 17443 return self.api_client.response_deserialize( 17444 response_data=response_data, 17445 response_types_map=_response_types_map, 17446 ).data
Delete connector
Deletes the specified connector from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the connector. (required) :type board_id: str :param connector_id: Unique identifier (ID) of the connector that you want to delete. (required) :type connector_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17500 @validate_call 17501 def get_connector( 17502 self, 17503 board_id: Annotated[ 17504 StrictStr, 17505 Field( 17506 description="Unique identifier (ID) of the board from which you want to retrieve a specific connector." 17507 ), 17508 ], 17509 connector_id: Annotated[ 17510 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to retrieve.") 17511 ], 17512 _request_timeout: Union[ 17513 None, 17514 Annotated[StrictFloat, Field(gt=0)], 17515 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17516 ] = None, 17517 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17518 _content_type: Optional[StrictStr] = None, 17519 _headers: Optional[Dict[StrictStr, Any]] = None, 17520 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17521 ) -> ConnectorWithLinks: 17522 """Get specific connector 17523 17524 Retrieves information for a specific connector on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 17525 17526 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific connector. (required) 17527 :type board_id: str 17528 :param connector_id: Unique identifier (ID) of the connector that you want to retrieve. (required) 17529 :type connector_id: str 17530 :param _request_timeout: timeout setting for this request. If one 17531 number provided, it will be total request 17532 timeout. It can also be a pair (tuple) of 17533 (connection, read) timeouts. 17534 :type _request_timeout: int, tuple(int, int), optional 17535 :param _request_auth: set to override the auth_settings for an a single 17536 request; this effectively ignores the 17537 authentication in the spec for a single request. 17538 :type _request_auth: dict, optional 17539 :param _content_type: force content-type for the request. 17540 :type _content_type: str, Optional 17541 :param _headers: set to override the headers for a single 17542 request; this effectively ignores the headers 17543 in the spec for a single request. 17544 :type _headers: dict, optional 17545 :param _host_index: set to override the host_index for a single 17546 request; this effectively ignores the host_index 17547 in the spec for a single request. 17548 :type _host_index: int, optional 17549 :return: Returns the result object. 17550 """ # noqa: E501 17551 17552 _param = self._get_connector_serialize( 17553 board_id=board_id, 17554 connector_id=connector_id, 17555 _request_auth=_request_auth, 17556 _content_type=_content_type, 17557 _headers=_headers, 17558 _host_index=_host_index, 17559 ) 17560 17561 _response_types_map: Dict[str, Optional[str]] = { 17562 "200": "ConnectorWithLinks", 17563 "400": None, 17564 "404": None, 17565 "429": None, 17566 } 17567 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17568 response_data.read() 17569 return self.api_client.response_deserialize( 17570 response_data=response_data, 17571 response_types_map=_response_types_map, 17572 ).data
Get specific connector
Retrieves information for a specific connector on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific connector. (required) :type board_id: str :param connector_id: Unique identifier (ID) of the connector that you want to retrieve. (required) :type connector_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17626 @validate_call 17627 def get_connectors( 17628 self, 17629 board_id: Annotated[ 17630 StrictStr, 17631 Field( 17632 description="Unique identifier (ID) of the board from which you want to retrieve a list of connectors." 17633 ), 17634 ], 17635 limit: Optional[Annotated[str, Field(strict=True)]] = None, 17636 cursor: Optional[StrictStr] = None, 17637 _request_timeout: Union[ 17638 None, 17639 Annotated[StrictFloat, Field(gt=0)], 17640 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17641 ] = None, 17642 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17643 _content_type: Optional[StrictStr] = None, 17644 _headers: Optional[Dict[StrictStr, Any]] = None, 17645 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17646 ) -> ConnectorsCursorPaged: 17647 """Get connectors 17648 17649 Retrieves a list of connectors for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17650 17651 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a list of connectors. (required) 17652 :type board_id: str 17653 :param limit: 17654 :type limit: str 17655 :param cursor: 17656 :type cursor: str 17657 :param _request_timeout: timeout setting for this request. If one 17658 number provided, it will be total request 17659 timeout. It can also be a pair (tuple) of 17660 (connection, read) timeouts. 17661 :type _request_timeout: int, tuple(int, int), optional 17662 :param _request_auth: set to override the auth_settings for an a single 17663 request; this effectively ignores the 17664 authentication in the spec for a single request. 17665 :type _request_auth: dict, optional 17666 :param _content_type: force content-type for the request. 17667 :type _content_type: str, Optional 17668 :param _headers: set to override the headers for a single 17669 request; this effectively ignores the headers 17670 in the spec for a single request. 17671 :type _headers: dict, optional 17672 :param _host_index: set to override the host_index for a single 17673 request; this effectively ignores the host_index 17674 in the spec for a single request. 17675 :type _host_index: int, optional 17676 :return: Returns the result object. 17677 """ # noqa: E501 17678 17679 _param = self._get_connectors_serialize( 17680 board_id=board_id, 17681 limit=limit, 17682 cursor=cursor, 17683 _request_auth=_request_auth, 17684 _content_type=_content_type, 17685 _headers=_headers, 17686 _host_index=_host_index, 17687 ) 17688 17689 _response_types_map: Dict[str, Optional[str]] = { 17690 "200": "ConnectorsCursorPaged", 17691 "400": None, 17692 "404": None, 17693 "429": None, 17694 } 17695 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17696 response_data.read() 17697 return self.api_client.response_deserialize( 17698 response_data=response_data, 17699 response_types_map=_response_types_map, 17700 ).data
Get connectors
Retrieves a list of connectors for a specific board. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request. For example, if you set the limit query parameter to 10 and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id: Unique identifier (ID) of the board from which you want to retrieve a list of connectors. (required) :type board_id: str :param limit: :type limit: str :param cursor: :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17761 @validate_call 17762 def update_connector( 17763 self, 17764 board_id: Annotated[ 17765 StrictStr, 17766 Field(description="Unique identifier (ID) of the board for which you want to update the connector."), 17767 ], 17768 connector_id: Annotated[ 17769 StrictStr, Field(description="Unique identifier (ID) of the connector that you want to update.") 17770 ], 17771 connector_changes_data: ConnectorChangesData, 17772 _request_timeout: Union[ 17773 None, 17774 Annotated[StrictFloat, Field(gt=0)], 17775 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17776 ] = None, 17777 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17778 _content_type: Optional[StrictStr] = None, 17779 _headers: Optional[Dict[StrictStr, Any]] = None, 17780 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17781 ) -> ConnectorWithLinks: 17782 """Update connector 17783 17784 Updates a connector on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17785 17786 :param board_id: Unique identifier (ID) of the board for which you want to update the connector. (required) 17787 :type board_id: str 17788 :param connector_id: Unique identifier (ID) of the connector that you want to update. (required) 17789 :type connector_id: str 17790 :param connector_changes_data: (required) 17791 :type connector_changes_data: ConnectorChangesData 17792 :param _request_timeout: timeout setting for this request. If one 17793 number provided, it will be total request 17794 timeout. It can also be a pair (tuple) of 17795 (connection, read) timeouts. 17796 :type _request_timeout: int, tuple(int, int), optional 17797 :param _request_auth: set to override the auth_settings for an a single 17798 request; this effectively ignores the 17799 authentication in the spec for a single request. 17800 :type _request_auth: dict, optional 17801 :param _content_type: force content-type for the request. 17802 :type _content_type: str, Optional 17803 :param _headers: set to override the headers for a single 17804 request; this effectively ignores the headers 17805 in the spec for a single request. 17806 :type _headers: dict, optional 17807 :param _host_index: set to override the host_index for a single 17808 request; this effectively ignores the host_index 17809 in the spec for a single request. 17810 :type _host_index: int, optional 17811 :return: Returns the result object. 17812 """ # noqa: E501 17813 17814 _param = self._update_connector_serialize( 17815 board_id=board_id, 17816 connector_id=connector_id, 17817 connector_changes_data=connector_changes_data, 17818 _request_auth=_request_auth, 17819 _content_type=_content_type, 17820 _headers=_headers, 17821 _host_index=_host_index, 17822 ) 17823 17824 _response_types_map: Dict[str, Optional[str]] = { 17825 "200": "ConnectorWithLinks", 17826 "400": None, 17827 "404": None, 17828 "409": None, 17829 "429": None, 17830 } 17831 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17832 response_data.read() 17833 return self.api_client.response_deserialize( 17834 response_data=response_data, 17835 response_types_map=_response_types_map, 17836 ).data
Update connector
Updates a connector on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board for which you want to update the connector. (required) :type board_id: str :param connector_id: Unique identifier (ID) of the connector that you want to update. (required) :type connector_id: str :param connector_changes_data: (required) :type connector_changes_data: ConnectorChangesData :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
17901 @validate_call 17902 def create_doc_format_item( 17903 self, 17904 board_id: Annotated[ 17905 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 17906 ], 17907 doc_format_create_request: DocFormatCreateRequest, 17908 _request_timeout: Union[ 17909 None, 17910 Annotated[StrictFloat, Field(gt=0)], 17911 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 17912 ] = None, 17913 _request_auth: Optional[Dict[StrictStr, Any]] = None, 17914 _content_type: Optional[StrictStr] = None, 17915 _headers: Optional[Dict[StrictStr, Any]] = None, 17916 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 17917 ) -> DocFormatItem: 17918 """Create doc format item 17919 17920 Adds a doc format item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 17921 17922 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 17923 :type board_id: str 17924 :param doc_format_create_request: (required) 17925 :type doc_format_create_request: DocFormatCreateRequest 17926 :param _request_timeout: timeout setting for this request. If one 17927 number provided, it will be total request 17928 timeout. It can also be a pair (tuple) of 17929 (connection, read) timeouts. 17930 :type _request_timeout: int, tuple(int, int), optional 17931 :param _request_auth: set to override the auth_settings for an a single 17932 request; this effectively ignores the 17933 authentication in the spec for a single request. 17934 :type _request_auth: dict, optional 17935 :param _content_type: force content-type for the request. 17936 :type _content_type: str, Optional 17937 :param _headers: set to override the headers for a single 17938 request; this effectively ignores the headers 17939 in the spec for a single request. 17940 :type _headers: dict, optional 17941 :param _host_index: set to override the host_index for a single 17942 request; this effectively ignores the host_index 17943 in the spec for a single request. 17944 :type _host_index: int, optional 17945 :return: Returns the result object. 17946 """ # noqa: E501 17947 17948 _param = self._create_doc_format_item_serialize( 17949 board_id=board_id, 17950 doc_format_create_request=doc_format_create_request, 17951 _request_auth=_request_auth, 17952 _content_type=_content_type, 17953 _headers=_headers, 17954 _host_index=_host_index, 17955 ) 17956 17957 _response_types_map: Dict[str, Optional[str]] = { 17958 "201": "DocFormatItem", 17959 "400": None, 17960 "404": None, 17961 "429": None, 17962 } 17963 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 17964 response_data.read() 17965 return self.api_client.response_deserialize( 17966 response_data=response_data, 17967 response_types_map=_response_types_map, 17968 ).data
Create doc format item
Adds a doc format item to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param doc_format_create_request: (required) :type doc_format_create_request: DocFormatCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18030 @validate_call 18031 def delete_doc_format_item( 18032 self, 18033 board_id: Annotated[ 18034 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 18035 ], 18036 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 18037 _request_timeout: Union[ 18038 None, 18039 Annotated[StrictFloat, Field(gt=0)], 18040 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18041 ] = None, 18042 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18043 _content_type: Optional[StrictStr] = None, 18044 _headers: Optional[Dict[StrictStr, Any]] = None, 18045 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18046 ) -> object: 18047 """Delete doc format item 18048 18049 Deletes a doc format item from the board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 18050 18051 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 18052 :type board_id: str 18053 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 18054 :type item_id: str 18055 :param _request_timeout: timeout setting for this request. If one 18056 number provided, it will be total request 18057 timeout. It can also be a pair (tuple) of 18058 (connection, read) timeouts. 18059 :type _request_timeout: int, tuple(int, int), optional 18060 :param _request_auth: set to override the auth_settings for an a single 18061 request; this effectively ignores the 18062 authentication in the spec for a single request. 18063 :type _request_auth: dict, optional 18064 :param _content_type: force content-type for the request. 18065 :type _content_type: str, Optional 18066 :param _headers: set to override the headers for a single 18067 request; this effectively ignores the headers 18068 in the spec for a single request. 18069 :type _headers: dict, optional 18070 :param _host_index: set to override the host_index for a single 18071 request; this effectively ignores the host_index 18072 in the spec for a single request. 18073 :type _host_index: int, optional 18074 :return: Returns the result object. 18075 """ # noqa: E501 18076 18077 _param = self._delete_doc_format_item_serialize( 18078 board_id=board_id, 18079 item_id=item_id, 18080 _request_auth=_request_auth, 18081 _content_type=_content_type, 18082 _headers=_headers, 18083 _host_index=_host_index, 18084 ) 18085 18086 _response_types_map: Dict[str, Optional[str]] = { 18087 "204": "object", 18088 "400": None, 18089 "404": None, 18090 "429": None, 18091 } 18092 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18093 response_data.read() 18094 return self.api_client.response_deserialize( 18095 response_data=response_data, 18096 response_types_map=_response_types_map, 18097 ).data
Delete doc format item
Deletes a doc format item from the board
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18151 @validate_call 18152 def get_doc_format_item( 18153 self, 18154 board_id: Annotated[ 18155 StrictStr, 18156 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 18157 ], 18158 item_id: Annotated[ 18159 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 18160 ], 18161 text_content_type: Annotated[ 18162 Optional[StrictStr], Field(description="Controls the contentType of the returned doc's content.") 18163 ] = None, 18164 _request_timeout: Union[ 18165 None, 18166 Annotated[StrictFloat, Field(gt=0)], 18167 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18168 ] = None, 18169 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18170 _content_type: Optional[StrictStr] = None, 18171 _headers: Optional[Dict[StrictStr, Any]] = None, 18172 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18173 ) -> DocFormatItem: 18174 """Get doc format item 18175 18176 Retrieves information for a specific doc format item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 18177 18178 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 18179 :type board_id: str 18180 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 18181 :type item_id: str 18182 :param text_content_type: Controls the contentType of the returned doc's content. 18183 :type text_content_type: str 18184 :param _request_timeout: timeout setting for this request. If one 18185 number provided, it will be total request 18186 timeout. It can also be a pair (tuple) of 18187 (connection, read) timeouts. 18188 :type _request_timeout: int, tuple(int, int), optional 18189 :param _request_auth: set to override the auth_settings for an a single 18190 request; this effectively ignores the 18191 authentication in the spec for a single request. 18192 :type _request_auth: dict, optional 18193 :param _content_type: force content-type for the request. 18194 :type _content_type: str, Optional 18195 :param _headers: set to override the headers for a single 18196 request; this effectively ignores the headers 18197 in the spec for a single request. 18198 :type _headers: dict, optional 18199 :param _host_index: set to override the host_index for a single 18200 request; this effectively ignores the host_index 18201 in the spec for a single request. 18202 :type _host_index: int, optional 18203 :return: Returns the result object. 18204 """ # noqa: E501 18205 18206 _param = self._get_doc_format_item_serialize( 18207 board_id=board_id, 18208 item_id=item_id, 18209 text_content_type=text_content_type, 18210 _request_auth=_request_auth, 18211 _content_type=_content_type, 18212 _headers=_headers, 18213 _host_index=_host_index, 18214 ) 18215 18216 _response_types_map: Dict[str, Optional[str]] = { 18217 "200": "DocFormatItem", 18218 "400": None, 18219 "404": None, 18220 "429": None, 18221 } 18222 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18223 response_data.read() 18224 return self.api_client.response_deserialize( 18225 response_data=response_data, 18226 response_types_map=_response_types_map, 18227 ).data
Get doc format item
Retrieves information for a specific doc format item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param text_content_type: Controls the contentType of the returned doc's content. :type text_content_type: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18286 @validate_call 18287 def create_document_item_using_file_from_device( 18288 self, 18289 board_id_platform_file_upload: Annotated[ 18290 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 18291 ], 18292 resource: Annotated[ 18293 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 18294 ], 18295 data: Optional[CreateDocumentItemUsingFileFromDeviceRequestData] = None, 18296 _request_timeout: Union[ 18297 None, 18298 Annotated[StrictFloat, Field(gt=0)], 18299 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18300 ] = None, 18301 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18302 _content_type: Optional[StrictStr] = None, 18303 _headers: Optional[Dict[StrictStr, Any]] = None, 18304 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18305 ) -> DocumentItem: 18306 """Create document item using file from device 18307 18308 Adds a document item to a board by selecting file from device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18309 18310 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) 18311 :type board_id_platform_file_upload: str 18312 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 18313 :type resource: bytearray 18314 :param data: 18315 :type data: CreateDocumentItemUsingFileFromDeviceRequestData 18316 :param _request_timeout: timeout setting for this request. If one 18317 number provided, it will be total request 18318 timeout. It can also be a pair (tuple) of 18319 (connection, read) timeouts. 18320 :type _request_timeout: int, tuple(int, int), optional 18321 :param _request_auth: set to override the auth_settings for an a single 18322 request; this effectively ignores the 18323 authentication in the spec for a single request. 18324 :type _request_auth: dict, optional 18325 :param _content_type: force content-type for the request. 18326 :type _content_type: str, Optional 18327 :param _headers: set to override the headers for a single 18328 request; this effectively ignores the headers 18329 in the spec for a single request. 18330 :type _headers: dict, optional 18331 :param _host_index: set to override the host_index for a single 18332 request; this effectively ignores the host_index 18333 in the spec for a single request. 18334 :type _host_index: int, optional 18335 :return: Returns the result object. 18336 """ # noqa: E501 18337 18338 _param = self._create_document_item_using_file_from_device_serialize( 18339 board_id_platform_file_upload=board_id_platform_file_upload, 18340 resource=resource, 18341 data=data, 18342 _request_auth=_request_auth, 18343 _content_type=_content_type, 18344 _headers=_headers, 18345 _host_index=_host_index, 18346 ) 18347 18348 _response_types_map: Dict[str, Optional[str]] = { 18349 "201": "DocumentItem", 18350 } 18351 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18352 response_data.read() 18353 return self.api_client.response_deserialize( 18354 response_data=response_data, 18355 response_types_map=_response_types_map, 18356 ).data
Create document item using file from device
Adds a document item to a board by selecting file from device.
Required scope
boards:writeRate limiting
Level 2:param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id_platform_file_upload: str :param resource: Select a file to upload. Maximum file size is 6 MB. (required) :type resource: bytearray :param data: :type data: CreateDocumentItemUsingFileFromDeviceRequestData :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18421 @validate_call 18422 def create_document_item_using_url( 18423 self, 18424 board_id: Annotated[ 18425 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 18426 ], 18427 document_create_request: DocumentCreateRequest, 18428 _request_timeout: Union[ 18429 None, 18430 Annotated[StrictFloat, Field(gt=0)], 18431 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18432 ] = None, 18433 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18434 _content_type: Optional[StrictStr] = None, 18435 _headers: Optional[Dict[StrictStr, Any]] = None, 18436 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18437 ) -> DocumentItem: 18438 """Create document item using URL 18439 18440 Adds a document item to a board by specifying the URL where the document is hosted.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18441 18442 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 18443 :type board_id: str 18444 :param document_create_request: (required) 18445 :type document_create_request: DocumentCreateRequest 18446 :param _request_timeout: timeout setting for this request. If one 18447 number provided, it will be total request 18448 timeout. It can also be a pair (tuple) of 18449 (connection, read) timeouts. 18450 :type _request_timeout: int, tuple(int, int), optional 18451 :param _request_auth: set to override the auth_settings for an a single 18452 request; this effectively ignores the 18453 authentication in the spec for a single request. 18454 :type _request_auth: dict, optional 18455 :param _content_type: force content-type for the request. 18456 :type _content_type: str, Optional 18457 :param _headers: set to override the headers for a single 18458 request; this effectively ignores the headers 18459 in the spec for a single request. 18460 :type _headers: dict, optional 18461 :param _host_index: set to override the host_index for a single 18462 request; this effectively ignores the host_index 18463 in the spec for a single request. 18464 :type _host_index: int, optional 18465 :return: Returns the result object. 18466 """ # noqa: E501 18467 18468 _param = self._create_document_item_using_url_serialize( 18469 board_id=board_id, 18470 document_create_request=document_create_request, 18471 _request_auth=_request_auth, 18472 _content_type=_content_type, 18473 _headers=_headers, 18474 _host_index=_host_index, 18475 ) 18476 18477 _response_types_map: Dict[str, Optional[str]] = { 18478 "201": "DocumentItem", 18479 "400": None, 18480 "404": None, 18481 "429": None, 18482 } 18483 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18484 response_data.read() 18485 return self.api_client.response_deserialize( 18486 response_data=response_data, 18487 response_types_map=_response_types_map, 18488 ).data
Create document item using URL
Adds a document item to a board by specifying the URL where the document is hosted.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param document_create_request: (required) :type document_create_request: DocumentCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18550 @validate_call 18551 def delete_document_item( 18552 self, 18553 board_id: Annotated[ 18554 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 18555 ], 18556 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 18557 _request_timeout: Union[ 18558 None, 18559 Annotated[StrictFloat, Field(gt=0)], 18560 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18561 ] = None, 18562 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18563 _content_type: Optional[StrictStr] = None, 18564 _headers: Optional[Dict[StrictStr, Any]] = None, 18565 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18566 ) -> object: 18567 """Delete document item 18568 18569 Deletes a document item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 18570 18571 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 18572 :type board_id: str 18573 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 18574 :type item_id: str 18575 :param _request_timeout: timeout setting for this request. If one 18576 number provided, it will be total request 18577 timeout. It can also be a pair (tuple) of 18578 (connection, read) timeouts. 18579 :type _request_timeout: int, tuple(int, int), optional 18580 :param _request_auth: set to override the auth_settings for an a single 18581 request; this effectively ignores the 18582 authentication in the spec for a single request. 18583 :type _request_auth: dict, optional 18584 :param _content_type: force content-type for the request. 18585 :type _content_type: str, Optional 18586 :param _headers: set to override the headers for a single 18587 request; this effectively ignores the headers 18588 in the spec for a single request. 18589 :type _headers: dict, optional 18590 :param _host_index: set to override the host_index for a single 18591 request; this effectively ignores the host_index 18592 in the spec for a single request. 18593 :type _host_index: int, optional 18594 :return: Returns the result object. 18595 """ # noqa: E501 18596 18597 _param = self._delete_document_item_serialize( 18598 board_id=board_id, 18599 item_id=item_id, 18600 _request_auth=_request_auth, 18601 _content_type=_content_type, 18602 _headers=_headers, 18603 _host_index=_host_index, 18604 ) 18605 18606 _response_types_map: Dict[str, Optional[str]] = { 18607 "204": "object", 18608 "400": None, 18609 "404": None, 18610 "429": None, 18611 } 18612 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18613 response_data.read() 18614 return self.api_client.response_deserialize( 18615 response_data=response_data, 18616 response_types_map=_response_types_map, 18617 ).data
Delete document item
Deletes a document item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18671 @validate_call 18672 def get_document_item( 18673 self, 18674 board_id: Annotated[ 18675 StrictStr, 18676 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 18677 ], 18678 item_id: Annotated[ 18679 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 18680 ], 18681 _request_timeout: Union[ 18682 None, 18683 Annotated[StrictFloat, Field(gt=0)], 18684 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18685 ] = None, 18686 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18687 _content_type: Optional[StrictStr] = None, 18688 _headers: Optional[Dict[StrictStr, Any]] = None, 18689 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18690 ) -> DocumentItem: 18691 """Get document item 18692 18693 Retrieves information for a specific document item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 18694 18695 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 18696 :type board_id: str 18697 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 18698 :type item_id: str 18699 :param _request_timeout: timeout setting for this request. If one 18700 number provided, it will be total request 18701 timeout. It can also be a pair (tuple) of 18702 (connection, read) timeouts. 18703 :type _request_timeout: int, tuple(int, int), optional 18704 :param _request_auth: set to override the auth_settings for an a single 18705 request; this effectively ignores the 18706 authentication in the spec for a single request. 18707 :type _request_auth: dict, optional 18708 :param _content_type: force content-type for the request. 18709 :type _content_type: str, Optional 18710 :param _headers: set to override the headers for a single 18711 request; this effectively ignores the headers 18712 in the spec for a single request. 18713 :type _headers: dict, optional 18714 :param _host_index: set to override the host_index for a single 18715 request; this effectively ignores the host_index 18716 in the spec for a single request. 18717 :type _host_index: int, optional 18718 :return: Returns the result object. 18719 """ # noqa: E501 18720 18721 _param = self._get_document_item_serialize( 18722 board_id=board_id, 18723 item_id=item_id, 18724 _request_auth=_request_auth, 18725 _content_type=_content_type, 18726 _headers=_headers, 18727 _host_index=_host_index, 18728 ) 18729 18730 _response_types_map: Dict[str, Optional[str]] = { 18731 "200": "DocumentItem", 18732 "400": None, 18733 "404": None, 18734 "429": None, 18735 } 18736 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18737 response_data.read() 18738 return self.api_client.response_deserialize( 18739 response_data=response_data, 18740 response_types_map=_response_types_map, 18741 ).data
Get document item
Retrieves information for a specific document item on a board
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18795 @validate_call 18796 def update_document_item_using_file_from_device( 18797 self, 18798 board_id_platform_file_upload: Annotated[ 18799 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 18800 ], 18801 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 18802 resource: Annotated[ 18803 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 18804 ], 18805 data: Optional[UploadFileFromDeviceData] = None, 18806 _request_timeout: Union[ 18807 None, 18808 Annotated[StrictFloat, Field(gt=0)], 18809 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18810 ] = None, 18811 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18812 _content_type: Optional[StrictStr] = None, 18813 _headers: Optional[Dict[StrictStr, Any]] = None, 18814 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18815 ) -> DocumentItem: 18816 """Update document item using file from device 18817 18818 Updates a document item on a board by using file from a device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18819 18820 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) 18821 :type board_id_platform_file_upload: str 18822 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 18823 :type item_id: str 18824 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 18825 :type resource: bytearray 18826 :param data: 18827 :type data: UploadFileFromDeviceData 18828 :param _request_timeout: timeout setting for this request. If one 18829 number provided, it will be total request 18830 timeout. It can also be a pair (tuple) of 18831 (connection, read) timeouts. 18832 :type _request_timeout: int, tuple(int, int), optional 18833 :param _request_auth: set to override the auth_settings for an a single 18834 request; this effectively ignores the 18835 authentication in the spec for a single request. 18836 :type _request_auth: dict, optional 18837 :param _content_type: force content-type for the request. 18838 :type _content_type: str, Optional 18839 :param _headers: set to override the headers for a single 18840 request; this effectively ignores the headers 18841 in the spec for a single request. 18842 :type _headers: dict, optional 18843 :param _host_index: set to override the host_index for a single 18844 request; this effectively ignores the host_index 18845 in the spec for a single request. 18846 :type _host_index: int, optional 18847 :return: Returns the result object. 18848 """ # noqa: E501 18849 18850 _param = self._update_document_item_using_file_from_device_serialize( 18851 board_id_platform_file_upload=board_id_platform_file_upload, 18852 item_id=item_id, 18853 resource=resource, 18854 data=data, 18855 _request_auth=_request_auth, 18856 _content_type=_content_type, 18857 _headers=_headers, 18858 _host_index=_host_index, 18859 ) 18860 18861 _response_types_map: Dict[str, Optional[str]] = { 18862 "200": "DocumentItem", 18863 } 18864 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 18865 response_data.read() 18866 return self.api_client.response_deserialize( 18867 response_data=response_data, 18868 response_types_map=_response_types_map, 18869 ).data
Update document item using file from device
Updates a document item on a board by using file from a device.
Required scope
boards:writeRate limiting
Level 2:param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id_platform_file_upload: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param resource: Select a file to upload. Maximum file size is 6 MB. (required) :type resource: bytearray :param data: :type data: UploadFileFromDeviceData :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
18937 @validate_call 18938 def update_document_item_using_url( 18939 self, 18940 board_id: Annotated[ 18941 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 18942 ], 18943 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 18944 document_update_request: DocumentUpdateRequest, 18945 _request_timeout: Union[ 18946 None, 18947 Annotated[StrictFloat, Field(gt=0)], 18948 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 18949 ] = None, 18950 _request_auth: Optional[Dict[StrictStr, Any]] = None, 18951 _content_type: Optional[StrictStr] = None, 18952 _headers: Optional[Dict[StrictStr, Any]] = None, 18953 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 18954 ) -> DocumentItem: 18955 """Update document item using URL 18956 18957 Updates a document item on a board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 18958 18959 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 18960 :type board_id: str 18961 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 18962 :type item_id: str 18963 :param document_update_request: (required) 18964 :type document_update_request: DocumentUpdateRequest 18965 :param _request_timeout: timeout setting for this request. If one 18966 number provided, it will be total request 18967 timeout. It can also be a pair (tuple) of 18968 (connection, read) timeouts. 18969 :type _request_timeout: int, tuple(int, int), optional 18970 :param _request_auth: set to override the auth_settings for an a single 18971 request; this effectively ignores the 18972 authentication in the spec for a single request. 18973 :type _request_auth: dict, optional 18974 :param _content_type: force content-type for the request. 18975 :type _content_type: str, Optional 18976 :param _headers: set to override the headers for a single 18977 request; this effectively ignores the headers 18978 in the spec for a single request. 18979 :type _headers: dict, optional 18980 :param _host_index: set to override the host_index for a single 18981 request; this effectively ignores the host_index 18982 in the spec for a single request. 18983 :type _host_index: int, optional 18984 :return: Returns the result object. 18985 """ # noqa: E501 18986 18987 _param = self._update_document_item_using_url_serialize( 18988 board_id=board_id, 18989 item_id=item_id, 18990 document_update_request=document_update_request, 18991 _request_auth=_request_auth, 18992 _content_type=_content_type, 18993 _headers=_headers, 18994 _host_index=_host_index, 18995 ) 18996 18997 _response_types_map: Dict[str, Optional[str]] = { 18998 "200": "DocumentItem", 18999 "400": None, 19000 "404": None, 19001 "409": None, 19002 "429": None, 19003 } 19004 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19005 response_data.read() 19006 return self.api_client.response_deserialize( 19007 response_data=response_data, 19008 response_types_map=_response_types_map, 19009 ).data
Update document item using URL
Updates a document item on a board
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param document_update_request: (required) :type document_update_request: DocumentUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19074 @validate_call 19075 def create_embed_item( 19076 self, 19077 board_id: Annotated[ 19078 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 19079 ], 19080 embed_create_request: EmbedCreateRequest, 19081 _request_timeout: Union[ 19082 None, 19083 Annotated[StrictFloat, Field(gt=0)], 19084 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19085 ] = None, 19086 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19087 _content_type: Optional[StrictStr] = None, 19088 _headers: Optional[Dict[StrictStr, Any]] = None, 19089 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19090 ) -> EmbedItem: 19091 """Create embed item 19092 19093 Adds an embed item containing external content to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19094 19095 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 19096 :type board_id: str 19097 :param embed_create_request: (required) 19098 :type embed_create_request: EmbedCreateRequest 19099 :param _request_timeout: timeout setting for this request. If one 19100 number provided, it will be total request 19101 timeout. It can also be a pair (tuple) of 19102 (connection, read) timeouts. 19103 :type _request_timeout: int, tuple(int, int), optional 19104 :param _request_auth: set to override the auth_settings for an a single 19105 request; this effectively ignores the 19106 authentication in the spec for a single request. 19107 :type _request_auth: dict, optional 19108 :param _content_type: force content-type for the request. 19109 :type _content_type: str, Optional 19110 :param _headers: set to override the headers for a single 19111 request; this effectively ignores the headers 19112 in the spec for a single request. 19113 :type _headers: dict, optional 19114 :param _host_index: set to override the host_index for a single 19115 request; this effectively ignores the host_index 19116 in the spec for a single request. 19117 :type _host_index: int, optional 19118 :return: Returns the result object. 19119 """ # noqa: E501 19120 19121 _param = self._create_embed_item_serialize( 19122 board_id=board_id, 19123 embed_create_request=embed_create_request, 19124 _request_auth=_request_auth, 19125 _content_type=_content_type, 19126 _headers=_headers, 19127 _host_index=_host_index, 19128 ) 19129 19130 _response_types_map: Dict[str, Optional[str]] = { 19131 "201": "EmbedItem", 19132 "400": None, 19133 "404": None, 19134 "429": None, 19135 } 19136 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19137 response_data.read() 19138 return self.api_client.response_deserialize( 19139 response_data=response_data, 19140 response_types_map=_response_types_map, 19141 ).data
Create embed item
Adds an embed item containing external content to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param embed_create_request: (required) :type embed_create_request: EmbedCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19203 @validate_call 19204 def delete_embed_item( 19205 self, 19206 board_id: Annotated[ 19207 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 19208 ], 19209 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 19210 _request_timeout: Union[ 19211 None, 19212 Annotated[StrictFloat, Field(gt=0)], 19213 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19214 ] = None, 19215 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19216 _content_type: Optional[StrictStr] = None, 19217 _headers: Optional[Dict[StrictStr, Any]] = None, 19218 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19219 ) -> object: 19220 """Delete embed item 19221 19222 Deletes an embed item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 19223 19224 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 19225 :type board_id: str 19226 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 19227 :type item_id: str 19228 :param _request_timeout: timeout setting for this request. If one 19229 number provided, it will be total request 19230 timeout. It can also be a pair (tuple) of 19231 (connection, read) timeouts. 19232 :type _request_timeout: int, tuple(int, int), optional 19233 :param _request_auth: set to override the auth_settings for an a single 19234 request; this effectively ignores the 19235 authentication in the spec for a single request. 19236 :type _request_auth: dict, optional 19237 :param _content_type: force content-type for the request. 19238 :type _content_type: str, Optional 19239 :param _headers: set to override the headers for a single 19240 request; this effectively ignores the headers 19241 in the spec for a single request. 19242 :type _headers: dict, optional 19243 :param _host_index: set to override the host_index for a single 19244 request; this effectively ignores the host_index 19245 in the spec for a single request. 19246 :type _host_index: int, optional 19247 :return: Returns the result object. 19248 """ # noqa: E501 19249 19250 _param = self._delete_embed_item_serialize( 19251 board_id=board_id, 19252 item_id=item_id, 19253 _request_auth=_request_auth, 19254 _content_type=_content_type, 19255 _headers=_headers, 19256 _host_index=_host_index, 19257 ) 19258 19259 _response_types_map: Dict[str, Optional[str]] = { 19260 "204": "object", 19261 "400": None, 19262 "404": None, 19263 "429": None, 19264 } 19265 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19266 response_data.read() 19267 return self.api_client.response_deserialize( 19268 response_data=response_data, 19269 response_types_map=_response_types_map, 19270 ).data
Delete embed item
Deletes an embed item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19324 @validate_call 19325 def get_embed_item( 19326 self, 19327 board_id: Annotated[ 19328 StrictStr, 19329 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 19330 ], 19331 item_id: Annotated[ 19332 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 19333 ], 19334 _request_timeout: Union[ 19335 None, 19336 Annotated[StrictFloat, Field(gt=0)], 19337 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19338 ] = None, 19339 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19340 _content_type: Optional[StrictStr] = None, 19341 _headers: Optional[Dict[StrictStr, Any]] = None, 19342 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19343 ) -> EmbedItem: 19344 """Get embed item 19345 19346 Retrieves information for a specific embed item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 19347 19348 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 19349 :type board_id: str 19350 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 19351 :type item_id: str 19352 :param _request_timeout: timeout setting for this request. If one 19353 number provided, it will be total request 19354 timeout. It can also be a pair (tuple) of 19355 (connection, read) timeouts. 19356 :type _request_timeout: int, tuple(int, int), optional 19357 :param _request_auth: set to override the auth_settings for an a single 19358 request; this effectively ignores the 19359 authentication in the spec for a single request. 19360 :type _request_auth: dict, optional 19361 :param _content_type: force content-type for the request. 19362 :type _content_type: str, Optional 19363 :param _headers: set to override the headers for a single 19364 request; this effectively ignores the headers 19365 in the spec for a single request. 19366 :type _headers: dict, optional 19367 :param _host_index: set to override the host_index for a single 19368 request; this effectively ignores the host_index 19369 in the spec for a single request. 19370 :type _host_index: int, optional 19371 :return: Returns the result object. 19372 """ # noqa: E501 19373 19374 _param = self._get_embed_item_serialize( 19375 board_id=board_id, 19376 item_id=item_id, 19377 _request_auth=_request_auth, 19378 _content_type=_content_type, 19379 _headers=_headers, 19380 _host_index=_host_index, 19381 ) 19382 19383 _response_types_map: Dict[str, Optional[str]] = { 19384 "200": "EmbedItem", 19385 "400": None, 19386 "404": None, 19387 "429": None, 19388 } 19389 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19390 response_data.read() 19391 return self.api_client.response_deserialize( 19392 response_data=response_data, 19393 response_types_map=_response_types_map, 19394 ).data
Get embed item
Retrieves information for a specific embed item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19448 @validate_call 19449 def update_embed_item( 19450 self, 19451 board_id: Annotated[ 19452 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 19453 ], 19454 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 19455 embed_update_request: EmbedUpdateRequest, 19456 _request_timeout: Union[ 19457 None, 19458 Annotated[StrictFloat, Field(gt=0)], 19459 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19460 ] = None, 19461 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19462 _content_type: Optional[StrictStr] = None, 19463 _headers: Optional[Dict[StrictStr, Any]] = None, 19464 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19465 ) -> EmbedItem: 19466 """Update embed item 19467 19468 Updates an embed item on a board based on the data properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19469 19470 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 19471 :type board_id: str 19472 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 19473 :type item_id: str 19474 :param embed_update_request: (required) 19475 :type embed_update_request: EmbedUpdateRequest 19476 :param _request_timeout: timeout setting for this request. If one 19477 number provided, it will be total request 19478 timeout. It can also be a pair (tuple) of 19479 (connection, read) timeouts. 19480 :type _request_timeout: int, tuple(int, int), optional 19481 :param _request_auth: set to override the auth_settings for an a single 19482 request; this effectively ignores the 19483 authentication in the spec for a single request. 19484 :type _request_auth: dict, optional 19485 :param _content_type: force content-type for the request. 19486 :type _content_type: str, Optional 19487 :param _headers: set to override the headers for a single 19488 request; this effectively ignores the headers 19489 in the spec for a single request. 19490 :type _headers: dict, optional 19491 :param _host_index: set to override the host_index for a single 19492 request; this effectively ignores the host_index 19493 in the spec for a single request. 19494 :type _host_index: int, optional 19495 :return: Returns the result object. 19496 """ # noqa: E501 19497 19498 _param = self._update_embed_item_serialize( 19499 board_id=board_id, 19500 item_id=item_id, 19501 embed_update_request=embed_update_request, 19502 _request_auth=_request_auth, 19503 _content_type=_content_type, 19504 _headers=_headers, 19505 _host_index=_host_index, 19506 ) 19507 19508 _response_types_map: Dict[str, Optional[str]] = { 19509 "200": "EmbedItem", 19510 "400": None, 19511 "404": None, 19512 "409": None, 19513 "429": None, 19514 } 19515 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19516 response_data.read() 19517 return self.api_client.response_deserialize( 19518 response_data=response_data, 19519 response_types_map=_response_types_map, 19520 ).data
Update embed item
Updates an embed item on a board based on the data properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param embed_update_request: (required) :type embed_update_request: EmbedUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19585 @validate_call 19586 def create_frame_item( 19587 self, 19588 board_id: Annotated[ 19589 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create a frame.") 19590 ], 19591 frame_create_request: FrameCreateRequest, 19592 _request_timeout: Union[ 19593 None, 19594 Annotated[StrictFloat, Field(gt=0)], 19595 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19596 ] = None, 19597 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19598 _content_type: Optional[StrictStr] = None, 19599 _headers: Optional[Dict[StrictStr, Any]] = None, 19600 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19601 ) -> FrameItem: 19602 """Create frame 19603 19604 Adds a frame to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19605 19606 :param board_id: Unique identifier (ID) of the board where you want to create a frame. (required) 19607 :type board_id: str 19608 :param frame_create_request: (required) 19609 :type frame_create_request: FrameCreateRequest 19610 :param _request_timeout: timeout setting for this request. If one 19611 number provided, it will be total request 19612 timeout. It can also be a pair (tuple) of 19613 (connection, read) timeouts. 19614 :type _request_timeout: int, tuple(int, int), optional 19615 :param _request_auth: set to override the auth_settings for an a single 19616 request; this effectively ignores the 19617 authentication in the spec for a single request. 19618 :type _request_auth: dict, optional 19619 :param _content_type: force content-type for the request. 19620 :type _content_type: str, Optional 19621 :param _headers: set to override the headers for a single 19622 request; this effectively ignores the headers 19623 in the spec for a single request. 19624 :type _headers: dict, optional 19625 :param _host_index: set to override the host_index for a single 19626 request; this effectively ignores the host_index 19627 in the spec for a single request. 19628 :type _host_index: int, optional 19629 :return: Returns the result object. 19630 """ # noqa: E501 19631 19632 _param = self._create_frame_item_serialize( 19633 board_id=board_id, 19634 frame_create_request=frame_create_request, 19635 _request_auth=_request_auth, 19636 _content_type=_content_type, 19637 _headers=_headers, 19638 _host_index=_host_index, 19639 ) 19640 19641 _response_types_map: Dict[str, Optional[str]] = { 19642 "201": "FrameItem", 19643 "400": "CreateFrameItem400Response", 19644 "404": "CreateFrameItem400Response", 19645 "429": "CreateFrameItem400Response", 19646 } 19647 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19648 response_data.read() 19649 return self.api_client.response_deserialize( 19650 response_data=response_data, 19651 response_types_map=_response_types_map, 19652 ).data
Create frame
Adds a frame to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create a frame. (required) :type board_id: str :param frame_create_request: (required) :type frame_create_request: FrameCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19714 @validate_call 19715 def delete_frame_item( 19716 self, 19717 board_id: Annotated[ 19718 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the frame.") 19719 ], 19720 item_id: Annotated[ 19721 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to delete.") 19722 ], 19723 _request_timeout: Union[ 19724 None, 19725 Annotated[StrictFloat, Field(gt=0)], 19726 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19727 ] = None, 19728 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19729 _content_type: Optional[StrictStr] = None, 19730 _headers: Optional[Dict[StrictStr, Any]] = None, 19731 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19732 ) -> object: 19733 """Delete frame 19734 19735 Deletes a frame from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 19736 19737 :param board_id: Unique identifier (ID) of the board from which you want to delete the frame. (required) 19738 :type board_id: str 19739 :param item_id: Unique identifier (ID) of the frame that you want to delete. (required) 19740 :type item_id: str 19741 :param _request_timeout: timeout setting for this request. If one 19742 number provided, it will be total request 19743 timeout. It can also be a pair (tuple) of 19744 (connection, read) timeouts. 19745 :type _request_timeout: int, tuple(int, int), optional 19746 :param _request_auth: set to override the auth_settings for an a single 19747 request; this effectively ignores the 19748 authentication in the spec for a single request. 19749 :type _request_auth: dict, optional 19750 :param _content_type: force content-type for the request. 19751 :type _content_type: str, Optional 19752 :param _headers: set to override the headers for a single 19753 request; this effectively ignores the headers 19754 in the spec for a single request. 19755 :type _headers: dict, optional 19756 :param _host_index: set to override the host_index for a single 19757 request; this effectively ignores the host_index 19758 in the spec for a single request. 19759 :type _host_index: int, optional 19760 :return: Returns the result object. 19761 """ # noqa: E501 19762 19763 _param = self._delete_frame_item_serialize( 19764 board_id=board_id, 19765 item_id=item_id, 19766 _request_auth=_request_auth, 19767 _content_type=_content_type, 19768 _headers=_headers, 19769 _host_index=_host_index, 19770 ) 19771 19772 _response_types_map: Dict[str, Optional[str]] = { 19773 "204": "object", 19774 "400": "CreateFrameItem400Response", 19775 "404": "CreateFrameItem400Response", 19776 "429": "CreateFrameItem400Response", 19777 } 19778 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19779 response_data.read() 19780 return self.api_client.response_deserialize( 19781 response_data=response_data, 19782 response_types_map=_response_types_map, 19783 ).data
Delete frame
Deletes a frame from a board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the frame. (required) :type board_id: str :param item_id: Unique identifier (ID) of the frame that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19837 @validate_call 19838 def get_frame_item( 19839 self, 19840 board_id: Annotated[ 19841 StrictStr, 19842 Field(description="Unique identifier (ID) of the board that contains the frame that you want to retrieve"), 19843 ], 19844 item_id: Annotated[ 19845 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to retrieve.") 19846 ], 19847 _request_timeout: Union[ 19848 None, 19849 Annotated[StrictFloat, Field(gt=0)], 19850 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19851 ] = None, 19852 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19853 _content_type: Optional[StrictStr] = None, 19854 _headers: Optional[Dict[StrictStr, Any]] = None, 19855 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19856 ) -> FrameItem: 19857 """Get frame 19858 19859 Retrieves information for a specific frame on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 19860 19861 :param board_id: Unique identifier (ID) of the board that contains the frame that you want to retrieve (required) 19862 :type board_id: str 19863 :param item_id: Unique identifier (ID) of the frame that you want to retrieve. (required) 19864 :type item_id: str 19865 :param _request_timeout: timeout setting for this request. If one 19866 number provided, it will be total request 19867 timeout. It can also be a pair (tuple) of 19868 (connection, read) timeouts. 19869 :type _request_timeout: int, tuple(int, int), optional 19870 :param _request_auth: set to override the auth_settings for an a single 19871 request; this effectively ignores the 19872 authentication in the spec for a single request. 19873 :type _request_auth: dict, optional 19874 :param _content_type: force content-type for the request. 19875 :type _content_type: str, Optional 19876 :param _headers: set to override the headers for a single 19877 request; this effectively ignores the headers 19878 in the spec for a single request. 19879 :type _headers: dict, optional 19880 :param _host_index: set to override the host_index for a single 19881 request; this effectively ignores the host_index 19882 in the spec for a single request. 19883 :type _host_index: int, optional 19884 :return: Returns the result object. 19885 """ # noqa: E501 19886 19887 _param = self._get_frame_item_serialize( 19888 board_id=board_id, 19889 item_id=item_id, 19890 _request_auth=_request_auth, 19891 _content_type=_content_type, 19892 _headers=_headers, 19893 _host_index=_host_index, 19894 ) 19895 19896 _response_types_map: Dict[str, Optional[str]] = { 19897 "200": "FrameItem", 19898 "400": "CreateFrameItem400Response", 19899 "404": "CreateFrameItem400Response", 19900 "429": "CreateFrameItem400Response", 19901 } 19902 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 19903 response_data.read() 19904 return self.api_client.response_deserialize( 19905 response_data=response_data, 19906 response_types_map=_response_types_map, 19907 ).data
Get frame
Retrieves information for a specific frame on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board that contains the frame that you want to retrieve (required) :type board_id: str :param item_id: Unique identifier (ID) of the frame that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
19961 @validate_call 19962 def update_frame_item( 19963 self, 19964 board_id: Annotated[ 19965 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the frame.") 19966 ], 19967 item_id: Annotated[ 19968 StrictStr, Field(description="Unique identifier (ID) of the frame that you want to update.") 19969 ], 19970 frame_update_request: FrameUpdateRequest, 19971 _request_timeout: Union[ 19972 None, 19973 Annotated[StrictFloat, Field(gt=0)], 19974 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 19975 ] = None, 19976 _request_auth: Optional[Dict[StrictStr, Any]] = None, 19977 _content_type: Optional[StrictStr] = None, 19978 _headers: Optional[Dict[StrictStr, Any]] = None, 19979 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 19980 ) -> FrameItem: 19981 """Update frame 19982 19983 Updates a frame on a board based on the data, style, or geometry properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 19984 19985 :param board_id: Unique identifier (ID) of the board where you want to update the frame. (required) 19986 :type board_id: str 19987 :param item_id: Unique identifier (ID) of the frame that you want to update. (required) 19988 :type item_id: str 19989 :param frame_update_request: (required) 19990 :type frame_update_request: FrameUpdateRequest 19991 :param _request_timeout: timeout setting for this request. If one 19992 number provided, it will be total request 19993 timeout. It can also be a pair (tuple) of 19994 (connection, read) timeouts. 19995 :type _request_timeout: int, tuple(int, int), optional 19996 :param _request_auth: set to override the auth_settings for an a single 19997 request; this effectively ignores the 19998 authentication in the spec for a single request. 19999 :type _request_auth: dict, optional 20000 :param _content_type: force content-type for the request. 20001 :type _content_type: str, Optional 20002 :param _headers: set to override the headers for a single 20003 request; this effectively ignores the headers 20004 in the spec for a single request. 20005 :type _headers: dict, optional 20006 :param _host_index: set to override the host_index for a single 20007 request; this effectively ignores the host_index 20008 in the spec for a single request. 20009 :type _host_index: int, optional 20010 :return: Returns the result object. 20011 """ # noqa: E501 20012 20013 _param = self._update_frame_item_serialize( 20014 board_id=board_id, 20015 item_id=item_id, 20016 frame_update_request=frame_update_request, 20017 _request_auth=_request_auth, 20018 _content_type=_content_type, 20019 _headers=_headers, 20020 _host_index=_host_index, 20021 ) 20022 20023 _response_types_map: Dict[str, Optional[str]] = { 20024 "200": "FrameItem", 20025 "400": "CreateFrameItem400Response", 20026 "404": "CreateFrameItem400Response", 20027 "409": "UpdateFrameItem409Response", 20028 "429": "CreateFrameItem400Response", 20029 } 20030 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20031 response_data.read() 20032 return self.api_client.response_deserialize( 20033 response_data=response_data, 20034 response_types_map=_response_types_map, 20035 ).data
Update frame
Updates a frame on a board based on the data, style, or geometry properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the frame. (required) :type board_id: str :param item_id: Unique identifier (ID) of the frame that you want to update. (required) :type item_id: str :param frame_update_request: (required) :type frame_update_request: FrameUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
20100 @validate_call 20101 def create_group( 20102 self, 20103 board_id: StrictStr, 20104 group: Group, 20105 _request_timeout: Union[ 20106 None, 20107 Annotated[StrictFloat, Field(gt=0)], 20108 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20109 ] = None, 20110 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20111 _content_type: Optional[StrictStr] = None, 20112 _headers: Optional[Dict[StrictStr, Any]] = None, 20113 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20114 ) -> GroupResponseShort: 20115 """Create group 20116 20117 Creates a group of items on a board. The group is created with the items that are passed in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20118 20119 :param board_id: (required) 20120 :type board_id: str 20121 :param group: (required) 20122 :type group: Group 20123 :param _request_timeout: timeout setting for this request. If one 20124 number provided, it will be total request 20125 timeout. It can also be a pair (tuple) of 20126 (connection, read) timeouts. 20127 :type _request_timeout: int, tuple(int, int), optional 20128 :param _request_auth: set to override the auth_settings for an a single 20129 request; this effectively ignores the 20130 authentication in the spec for a single request. 20131 :type _request_auth: dict, optional 20132 :param _content_type: force content-type for the request. 20133 :type _content_type: str, Optional 20134 :param _headers: set to override the headers for a single 20135 request; this effectively ignores the headers 20136 in the spec for a single request. 20137 :type _headers: dict, optional 20138 :param _host_index: set to override the host_index for a single 20139 request; this effectively ignores the host_index 20140 in the spec for a single request. 20141 :type _host_index: int, optional 20142 :return: Returns the result object. 20143 """ # noqa: E501 20144 20145 _param = self._create_group_serialize( 20146 board_id=board_id, 20147 group=group, 20148 _request_auth=_request_auth, 20149 _content_type=_content_type, 20150 _headers=_headers, 20151 _host_index=_host_index, 20152 ) 20153 20154 _response_types_map: Dict[str, Optional[str]] = { 20155 "201": "GroupResponseShort", 20156 "400": "GetAllGroups400Response", 20157 "404": "GetAllGroups404Response", 20158 "429": "GetAllGroups429Response", 20159 } 20160 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20161 response_data.read() 20162 return self.api_client.response_deserialize( 20163 response_data=response_data, 20164 response_types_map=_response_types_map, 20165 ).data
Create group
Creates a group of items on a board. The group is created with the items that are passed in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: (required) :type board_id: str :param group: (required) :type group: Group :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
20227 @validate_call 20228 def delete_group( 20229 self, 20230 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20231 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20232 delete_items: Annotated[ 20233 StrictBool, 20234 Field( 20235 description="Indicates whether the items should be removed. Set to `true` to delete items in the group." 20236 ), 20237 ], 20238 _request_timeout: Union[ 20239 None, 20240 Annotated[StrictFloat, Field(gt=0)], 20241 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20242 ] = None, 20243 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20244 _content_type: Optional[StrictStr] = None, 20245 _headers: Optional[Dict[StrictStr, Any]] = None, 20246 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20247 ) -> object: 20248 """Deletes the group 20249 20250 Deletes a group from a board. All the items in the group are deleted along with the group. <b>Note - this endpoint will delete items which are locked as well. </b> <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 20251 20252 :param board_id: Unique identifier (ID) of the board. (required) 20253 :type board_id: str 20254 :param group_id: Unique identifier (ID) of the group. (required) 20255 :type group_id: str 20256 :param delete_items: Indicates whether the items should be removed. Set to `true` to delete items in the group. (required) 20257 :type delete_items: bool 20258 :param _request_timeout: timeout setting for this request. If one 20259 number provided, it will be total request 20260 timeout. It can also be a pair (tuple) of 20261 (connection, read) timeouts. 20262 :type _request_timeout: int, tuple(int, int), optional 20263 :param _request_auth: set to override the auth_settings for an a single 20264 request; this effectively ignores the 20265 authentication in the spec for a single request. 20266 :type _request_auth: dict, optional 20267 :param _content_type: force content-type for the request. 20268 :type _content_type: str, Optional 20269 :param _headers: set to override the headers for a single 20270 request; this effectively ignores the headers 20271 in the spec for a single request. 20272 :type _headers: dict, optional 20273 :param _host_index: set to override the host_index for a single 20274 request; this effectively ignores the host_index 20275 in the spec for a single request. 20276 :type _host_index: int, optional 20277 :return: Returns the result object. 20278 """ # noqa: E501 20279 20280 _param = self._delete_group_serialize( 20281 board_id=board_id, 20282 group_id=group_id, 20283 delete_items=delete_items, 20284 _request_auth=_request_auth, 20285 _content_type=_content_type, 20286 _headers=_headers, 20287 _host_index=_host_index, 20288 ) 20289 20290 _response_types_map: Dict[str, Optional[str]] = { 20291 "204": "object", 20292 "400": "UnGroup400Response", 20293 "404": "UnGroup404Response", 20294 "429": "UnGroup429Response", 20295 } 20296 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20297 response_data.read() 20298 return self.api_client.response_deserialize( 20299 response_data=response_data, 20300 response_types_map=_response_types_map, 20301 ).data
Deletes the group
Deletes a group from a board. All the items in the group are deleted along with the group. Note - this endpoint will delete items which are locked as well.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board. (required)
:type board_id: str
:param group_id: Unique identifier (ID) of the group. (required)
:type group_id: str
:param delete_items: Indicates whether the items should be removed. Set to true to delete items in the group. (required)
:type delete_items: bool
:param _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.
:type _request_timeout: int, tuple(int, int), optional
:param _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.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _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.
:type _host_index: int, optional
:return: Returns the result object.
20360 @validate_call 20361 def get_all_groups( 20362 self, 20363 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20364 limit: Annotated[ 20365 Optional[Annotated[int, Field(le=50, strict=True, ge=10)]], 20366 Field(description="The maximum number of items to return at one time, default is 10, maximum is 50."), 20367 ] = None, 20368 cursor: Optional[StrictStr] = None, 20369 _request_timeout: Union[ 20370 None, 20371 Annotated[StrictFloat, Field(gt=0)], 20372 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20373 ] = None, 20374 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20375 _content_type: Optional[StrictStr] = None, 20376 _headers: Optional[Dict[StrictStr, Any]] = None, 20377 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20378 ) -> GetAllGroups200Response: 20379 """Get all groups on a board 20380 20381 Returns all the groups and the items of the respective groups within a specific board.<br/> This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request.<br/> For example, if you set the `limit` query parameter to `10` and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20382 20383 :param board_id: Unique identifier (ID) of the board. (required) 20384 :type board_id: str 20385 :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. 20386 :type limit: int 20387 :param cursor: 20388 :type cursor: str 20389 :param _request_timeout: timeout setting for this request. If one 20390 number provided, it will be total request 20391 timeout. It can also be a pair (tuple) of 20392 (connection, read) timeouts. 20393 :type _request_timeout: int, tuple(int, int), optional 20394 :param _request_auth: set to override the auth_settings for an a single 20395 request; this effectively ignores the 20396 authentication in the spec for a single request. 20397 :type _request_auth: dict, optional 20398 :param _content_type: force content-type for the request. 20399 :type _content_type: str, Optional 20400 :param _headers: set to override the headers for a single 20401 request; this effectively ignores the headers 20402 in the spec for a single request. 20403 :type _headers: dict, optional 20404 :param _host_index: set to override the host_index for a single 20405 request; this effectively ignores the host_index 20406 in the spec for a single request. 20407 :type _host_index: int, optional 20408 :return: Returns the result object. 20409 """ # noqa: E501 20410 20411 _param = self._get_all_groups_serialize( 20412 board_id=board_id, 20413 limit=limit, 20414 cursor=cursor, 20415 _request_auth=_request_auth, 20416 _content_type=_content_type, 20417 _headers=_headers, 20418 _host_index=_host_index, 20419 ) 20420 20421 _response_types_map: Dict[str, Optional[str]] = { 20422 "200": "GetAllGroups200Response", 20423 "400": "GetAllGroups400Response", 20424 "404": "GetAllGroups404Response", 20425 "429": "GetAllGroups429Response", 20426 } 20427 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20428 response_data.read() 20429 return self.api_client.response_deserialize( 20430 response_data=response_data, 20431 response_types_map=_response_types_map, 20432 ).data
Get all groups on a board
Returns all the groups and the items of the respective groups within a specific board.
This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request.
For example, if you set the limit query parameter to 10 and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id: Unique identifier (ID) of the board. (required) :type board_id: str :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. :type limit: int :param cursor: :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
20493 @validate_call 20494 def get_group_by_id( 20495 self, 20496 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20497 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20498 _request_timeout: Union[ 20499 None, 20500 Annotated[StrictFloat, Field(gt=0)], 20501 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20502 ] = None, 20503 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20504 _content_type: Optional[StrictStr] = None, 20505 _headers: Optional[Dict[StrictStr, Any]] = None, 20506 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20507 ) -> GroupResponseShort: 20508 """Get a group by its ID 20509 20510 Returns a list of items in a specific group. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a> per item ID 20511 20512 :param board_id: Unique identifier (ID) of the board. (required) 20513 :type board_id: str 20514 :param group_id: Unique identifier (ID) of the group. (required) 20515 :type group_id: str 20516 :param _request_timeout: timeout setting for this request. If one 20517 number provided, it will be total request 20518 timeout. It can also be a pair (tuple) of 20519 (connection, read) timeouts. 20520 :type _request_timeout: int, tuple(int, int), optional 20521 :param _request_auth: set to override the auth_settings for an a single 20522 request; this effectively ignores the 20523 authentication in the spec for a single request. 20524 :type _request_auth: dict, optional 20525 :param _content_type: force content-type for the request. 20526 :type _content_type: str, Optional 20527 :param _headers: set to override the headers for a single 20528 request; this effectively ignores the headers 20529 in the spec for a single request. 20530 :type _headers: dict, optional 20531 :param _host_index: set to override the host_index for a single 20532 request; this effectively ignores the host_index 20533 in the spec for a single request. 20534 :type _host_index: int, optional 20535 :return: Returns the result object. 20536 """ # noqa: E501 20537 20538 _param = self._get_group_by_id_serialize( 20539 board_id=board_id, 20540 group_id=group_id, 20541 _request_auth=_request_auth, 20542 _content_type=_content_type, 20543 _headers=_headers, 20544 _host_index=_host_index, 20545 ) 20546 20547 _response_types_map: Dict[str, Optional[str]] = { 20548 "200": "GroupResponseShort", 20549 "400": "GetAllGroups400Response", 20550 "404": "GetAllGroups404Response", 20551 "429": "GetAllGroups429Response", 20552 } 20553 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20554 response_data.read() 20555 return self.api_client.response_deserialize( 20556 response_data=response_data, 20557 response_types_map=_response_types_map, 20558 ).data
Get a group by its ID
Returns a list of items in a specific group.
Required scope
boards:readRate limiting
Level 2 per item ID:param board_id: Unique identifier (ID) of the board. (required) :type board_id: str :param group_id: Unique identifier (ID) of the group. (required) :type group_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
20612 @validate_call 20613 def get_items_by_group_id( 20614 self, 20615 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20616 group_item_id: Annotated[StrictStr, Field(description="The ID of the group item to retrieve.")], 20617 limit: Annotated[ 20618 Optional[Annotated[int, Field(le=50, strict=True, ge=10)]], 20619 Field(description="The maximum number of items to return at one time, default is 10, maximum is 50."), 20620 ] = None, 20621 cursor: Optional[StrictStr] = None, 20622 _request_timeout: Union[ 20623 None, 20624 Annotated[StrictFloat, Field(gt=0)], 20625 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20626 ] = None, 20627 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20628 _content_type: Optional[StrictStr] = None, 20629 _headers: Optional[Dict[StrictStr, Any]] = None, 20630 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20631 ) -> GetItemsByGroupId200Response: 20632 """Get items of a group by ID 20633 20634 Returns a list of items that are a part of any group, within a specific board.<br/> This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request.<br/> For example, if you set the `limit` query parameter to `10` and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items (not 10 groups) in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20635 20636 :param board_id: Unique identifier (ID) of the board. (required) 20637 :type board_id: str 20638 :param group_item_id: The ID of the group item to retrieve. (required) 20639 :type group_item_id: str 20640 :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. 20641 :type limit: int 20642 :param cursor: 20643 :type cursor: str 20644 :param _request_timeout: timeout setting for this request. If one 20645 number provided, it will be total request 20646 timeout. It can also be a pair (tuple) of 20647 (connection, read) timeouts. 20648 :type _request_timeout: int, tuple(int, int), optional 20649 :param _request_auth: set to override the auth_settings for an a single 20650 request; this effectively ignores the 20651 authentication in the spec for a single request. 20652 :type _request_auth: dict, optional 20653 :param _content_type: force content-type for the request. 20654 :type _content_type: str, Optional 20655 :param _headers: set to override the headers for a single 20656 request; this effectively ignores the headers 20657 in the spec for a single request. 20658 :type _headers: dict, optional 20659 :param _host_index: set to override the host_index for a single 20660 request; this effectively ignores the host_index 20661 in the spec for a single request. 20662 :type _host_index: int, optional 20663 :return: Returns the result object. 20664 """ # noqa: E501 20665 20666 _param = self._get_items_by_group_id_serialize( 20667 board_id=board_id, 20668 group_item_id=group_item_id, 20669 limit=limit, 20670 cursor=cursor, 20671 _request_auth=_request_auth, 20672 _content_type=_content_type, 20673 _headers=_headers, 20674 _host_index=_host_index, 20675 ) 20676 20677 _response_types_map: Dict[str, Optional[str]] = { 20678 "200": "GetItemsByGroupId200Response", 20679 "400": "GetAllGroups400Response", 20680 "404": "GetAllGroups404Response", 20681 "429": "GetAllGroups429Response", 20682 } 20683 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20684 response_data.read() 20685 return self.api_client.response_deserialize( 20686 response_data=response_data, 20687 response_types_map=_response_types_map, 20688 ).data
Get items of a group by ID
Returns a list of items that are a part of any group, within a specific board.
This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request.
For example, if you set the limit query parameter to 10 and the board contains 20 items that are a part of a group, the first call will return information about the first 10 items (not 10 groups) in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id: Unique identifier (ID) of the board. (required) :type board_id: str :param group_item_id: The ID of the group item to retrieve. (required) :type group_item_id: str :param limit: The maximum number of items to return at one time, default is 10, maximum is 50. :type limit: int :param cursor: :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
20754 @validate_call 20755 def un_group( 20756 self, 20757 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20758 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20759 delete_items: Annotated[ 20760 Optional[StrictBool], Field(description="Indicates whether the items should be removed. By default, false.") 20761 ] = None, 20762 _request_timeout: Union[ 20763 None, 20764 Annotated[StrictFloat, Field(gt=0)], 20765 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20766 ] = None, 20767 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20768 _content_type: Optional[StrictStr] = None, 20769 _headers: Optional[Dict[StrictStr, Any]] = None, 20770 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20771 ) -> object: 20772 """Ungroup items 20773 20774 Ungroups items from a group.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 20775 20776 :param board_id: Unique identifier (ID) of the board. (required) 20777 :type board_id: str 20778 :param group_id: Unique identifier (ID) of the group. (required) 20779 :type group_id: str 20780 :param delete_items: Indicates whether the items should be removed. By default, false. 20781 :type delete_items: bool 20782 :param _request_timeout: timeout setting for this request. If one 20783 number provided, it will be total request 20784 timeout. It can also be a pair (tuple) of 20785 (connection, read) timeouts. 20786 :type _request_timeout: int, tuple(int, int), optional 20787 :param _request_auth: set to override the auth_settings for an a single 20788 request; this effectively ignores the 20789 authentication in the spec for a single request. 20790 :type _request_auth: dict, optional 20791 :param _content_type: force content-type for the request. 20792 :type _content_type: str, Optional 20793 :param _headers: set to override the headers for a single 20794 request; this effectively ignores the headers 20795 in the spec for a single request. 20796 :type _headers: dict, optional 20797 :param _host_index: set to override the host_index for a single 20798 request; this effectively ignores the host_index 20799 in the spec for a single request. 20800 :type _host_index: int, optional 20801 :return: Returns the result object. 20802 """ # noqa: E501 20803 20804 _param = self._un_group_serialize( 20805 board_id=board_id, 20806 group_id=group_id, 20807 delete_items=delete_items, 20808 _request_auth=_request_auth, 20809 _content_type=_content_type, 20810 _headers=_headers, 20811 _host_index=_host_index, 20812 ) 20813 20814 _response_types_map: Dict[str, Optional[str]] = { 20815 "204": "object", 20816 "400": "UnGroup400Response", 20817 "404": "UnGroup404Response", 20818 "429": "UnGroup429Response", 20819 } 20820 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20821 response_data.read() 20822 return self.api_client.response_deserialize( 20823 response_data=response_data, 20824 response_types_map=_response_types_map, 20825 ).data
Ungroup items
Ungroups items from a group.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board. (required) :type board_id: str :param group_id: Unique identifier (ID) of the group. (required) :type group_id: str :param delete_items: Indicates whether the items should be removed. By default, false. :type delete_items: bool :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
20884 @validate_call 20885 def update_group( 20886 self, 20887 board_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the board.")], 20888 group_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the group.")], 20889 group: Group, 20890 _request_timeout: Union[ 20891 None, 20892 Annotated[StrictFloat, Field(gt=0)], 20893 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 20894 ] = None, 20895 _request_auth: Optional[Dict[StrictStr, Any]] = None, 20896 _content_type: Optional[StrictStr] = None, 20897 _headers: Optional[Dict[StrictStr, Any]] = None, 20898 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 20899 ) -> GroupResponseShort: 20900 """Updates a group with new items 20901 20902 This endpoint updates an existing group by replacing it entirely with a new group. When the update is made, the original group is completely replaced, and a new group ID is assigned. <br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 20903 20904 :param board_id: Unique identifier (ID) of the board. (required) 20905 :type board_id: str 20906 :param group_id: Unique identifier (ID) of the group. (required) 20907 :type group_id: str 20908 :param group: (required) 20909 :type group: Group 20910 :param _request_timeout: timeout setting for this request. If one 20911 number provided, it will be total request 20912 timeout. It can also be a pair (tuple) of 20913 (connection, read) timeouts. 20914 :type _request_timeout: int, tuple(int, int), optional 20915 :param _request_auth: set to override the auth_settings for an a single 20916 request; this effectively ignores the 20917 authentication in the spec for a single request. 20918 :type _request_auth: dict, optional 20919 :param _content_type: force content-type for the request. 20920 :type _content_type: str, Optional 20921 :param _headers: set to override the headers for a single 20922 request; this effectively ignores the headers 20923 in the spec for a single request. 20924 :type _headers: dict, optional 20925 :param _host_index: set to override the host_index for a single 20926 request; this effectively ignores the host_index 20927 in the spec for a single request. 20928 :type _host_index: int, optional 20929 :return: Returns the result object. 20930 """ # noqa: E501 20931 20932 _param = self._update_group_serialize( 20933 board_id=board_id, 20934 group_id=group_id, 20935 group=group, 20936 _request_auth=_request_auth, 20937 _content_type=_content_type, 20938 _headers=_headers, 20939 _host_index=_host_index, 20940 ) 20941 20942 _response_types_map: Dict[str, Optional[str]] = { 20943 "200": "GroupResponseShort", 20944 "400": "GetAllGroups400Response", 20945 "404": "GetAllGroups404Response", 20946 "429": "GetAllGroups429Response", 20947 } 20948 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 20949 response_data.read() 20950 return self.api_client.response_deserialize( 20951 response_data=response_data, 20952 response_types_map=_response_types_map, 20953 ).data
Updates a group with new items
This endpoint updates an existing group by replacing it entirely with a new group. When the update is made, the original group is completely replaced, and a new group ID is assigned.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board. (required) :type board_id: str :param group_id: Unique identifier (ID) of the group. (required) :type group_id: str :param group: (required) :type group: Group :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21018 @validate_call 21019 def create_image_item_using_local_file( 21020 self, 21021 board_id_platform_file_upload: Annotated[ 21022 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 21023 ], 21024 resource: Annotated[ 21025 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 21026 ], 21027 data: Optional[UploadFileFromDeviceData] = None, 21028 _request_timeout: Union[ 21029 None, 21030 Annotated[StrictFloat, Field(gt=0)], 21031 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21032 ] = None, 21033 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21034 _content_type: Optional[StrictStr] = None, 21035 _headers: Optional[Dict[StrictStr, Any]] = None, 21036 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21037 ) -> ImageItem: 21038 """Create image item using file from device 21039 21040 Adds an image item to a board by specifying a file from device.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21041 21042 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) 21043 :type board_id_platform_file_upload: str 21044 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 21045 :type resource: bytearray 21046 :param data: 21047 :type data: UploadFileFromDeviceData 21048 :param _request_timeout: timeout setting for this request. If one 21049 number provided, it will be total request 21050 timeout. It can also be a pair (tuple) of 21051 (connection, read) timeouts. 21052 :type _request_timeout: int, tuple(int, int), optional 21053 :param _request_auth: set to override the auth_settings for an a single 21054 request; this effectively ignores the 21055 authentication in the spec for a single request. 21056 :type _request_auth: dict, optional 21057 :param _content_type: force content-type for the request. 21058 :type _content_type: str, Optional 21059 :param _headers: set to override the headers for a single 21060 request; this effectively ignores the headers 21061 in the spec for a single request. 21062 :type _headers: dict, optional 21063 :param _host_index: set to override the host_index for a single 21064 request; this effectively ignores the host_index 21065 in the spec for a single request. 21066 :type _host_index: int, optional 21067 :return: Returns the result object. 21068 """ # noqa: E501 21069 21070 _param = self._create_image_item_using_local_file_serialize( 21071 board_id_platform_file_upload=board_id_platform_file_upload, 21072 resource=resource, 21073 data=data, 21074 _request_auth=_request_auth, 21075 _content_type=_content_type, 21076 _headers=_headers, 21077 _host_index=_host_index, 21078 ) 21079 21080 _response_types_map: Dict[str, Optional[str]] = { 21081 "201": "ImageItem", 21082 } 21083 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21084 response_data.read() 21085 return self.api_client.response_deserialize( 21086 response_data=response_data, 21087 response_types_map=_response_types_map, 21088 ).data
Create image item using file from device
Adds an image item to a board by specifying a file from device.
Required scope
boards:writeRate limiting
Level 2:param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id_platform_file_upload: str :param resource: Select a file to upload. Maximum file size is 6 MB. (required) :type resource: bytearray :param data: :type data: UploadFileFromDeviceData :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21153 @validate_call 21154 def create_image_item_using_url( 21155 self, 21156 board_id: Annotated[ 21157 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 21158 ], 21159 image_create_request: ImageCreateRequest, 21160 _request_timeout: Union[ 21161 None, 21162 Annotated[StrictFloat, Field(gt=0)], 21163 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21164 ] = None, 21165 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21166 _content_type: Optional[StrictStr] = None, 21167 _headers: Optional[Dict[StrictStr, Any]] = None, 21168 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21169 ) -> ImageItem: 21170 """Create image item using URL 21171 21172 Adds an image item to a board by specifying an image URL.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21173 21174 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 21175 :type board_id: str 21176 :param image_create_request: (required) 21177 :type image_create_request: ImageCreateRequest 21178 :param _request_timeout: timeout setting for this request. If one 21179 number provided, it will be total request 21180 timeout. It can also be a pair (tuple) of 21181 (connection, read) timeouts. 21182 :type _request_timeout: int, tuple(int, int), optional 21183 :param _request_auth: set to override the auth_settings for an a single 21184 request; this effectively ignores the 21185 authentication in the spec for a single request. 21186 :type _request_auth: dict, optional 21187 :param _content_type: force content-type for the request. 21188 :type _content_type: str, Optional 21189 :param _headers: set to override the headers for a single 21190 request; this effectively ignores the headers 21191 in the spec for a single request. 21192 :type _headers: dict, optional 21193 :param _host_index: set to override the host_index for a single 21194 request; this effectively ignores the host_index 21195 in the spec for a single request. 21196 :type _host_index: int, optional 21197 :return: Returns the result object. 21198 """ # noqa: E501 21199 21200 _param = self._create_image_item_using_url_serialize( 21201 board_id=board_id, 21202 image_create_request=image_create_request, 21203 _request_auth=_request_auth, 21204 _content_type=_content_type, 21205 _headers=_headers, 21206 _host_index=_host_index, 21207 ) 21208 21209 _response_types_map: Dict[str, Optional[str]] = { 21210 "201": "ImageItem", 21211 "400": None, 21212 "404": None, 21213 "429": None, 21214 } 21215 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21216 response_data.read() 21217 return self.api_client.response_deserialize( 21218 response_data=response_data, 21219 response_types_map=_response_types_map, 21220 ).data
Create image item using URL
Adds an image item to a board by specifying an image URL.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param image_create_request: (required) :type image_create_request: ImageCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21282 @validate_call 21283 def delete_image_item( 21284 self, 21285 board_id: Annotated[ 21286 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21287 ], 21288 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21289 _request_timeout: Union[ 21290 None, 21291 Annotated[StrictFloat, Field(gt=0)], 21292 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21293 ] = None, 21294 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21295 _content_type: Optional[StrictStr] = None, 21296 _headers: Optional[Dict[StrictStr, Any]] = None, 21297 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21298 ) -> object: 21299 """Delete image item 21300 21301 Deletes an image item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21302 21303 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21304 :type board_id: str 21305 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21306 :type item_id: str 21307 :param _request_timeout: timeout setting for this request. If one 21308 number provided, it will be total request 21309 timeout. It can also be a pair (tuple) of 21310 (connection, read) timeouts. 21311 :type _request_timeout: int, tuple(int, int), optional 21312 :param _request_auth: set to override the auth_settings for an a single 21313 request; this effectively ignores the 21314 authentication in the spec for a single request. 21315 :type _request_auth: dict, optional 21316 :param _content_type: force content-type for the request. 21317 :type _content_type: str, Optional 21318 :param _headers: set to override the headers for a single 21319 request; this effectively ignores the headers 21320 in the spec for a single request. 21321 :type _headers: dict, optional 21322 :param _host_index: set to override the host_index for a single 21323 request; this effectively ignores the host_index 21324 in the spec for a single request. 21325 :type _host_index: int, optional 21326 :return: Returns the result object. 21327 """ # noqa: E501 21328 21329 _param = self._delete_image_item_serialize( 21330 board_id=board_id, 21331 item_id=item_id, 21332 _request_auth=_request_auth, 21333 _content_type=_content_type, 21334 _headers=_headers, 21335 _host_index=_host_index, 21336 ) 21337 21338 _response_types_map: Dict[str, Optional[str]] = { 21339 "204": "object", 21340 "400": None, 21341 "404": None, 21342 "429": None, 21343 } 21344 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21345 response_data.read() 21346 return self.api_client.response_deserialize( 21347 response_data=response_data, 21348 response_types_map=_response_types_map, 21349 ).data
Delete image item
Deletes an image item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21403 @validate_call 21404 def get_image_item( 21405 self, 21406 board_id: Annotated[ 21407 StrictStr, 21408 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 21409 ], 21410 item_id: Annotated[ 21411 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 21412 ], 21413 _request_timeout: Union[ 21414 None, 21415 Annotated[StrictFloat, Field(gt=0)], 21416 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21417 ] = None, 21418 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21419 _content_type: Optional[StrictStr] = None, 21420 _headers: Optional[Dict[StrictStr, Any]] = None, 21421 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21422 ) -> ImageItem: 21423 """Get image item 21424 21425 Retrieves information for a specific image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 21426 21427 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 21428 :type board_id: str 21429 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 21430 :type item_id: str 21431 :param _request_timeout: timeout setting for this request. If one 21432 number provided, it will be total request 21433 timeout. It can also be a pair (tuple) of 21434 (connection, read) timeouts. 21435 :type _request_timeout: int, tuple(int, int), optional 21436 :param _request_auth: set to override the auth_settings for an a single 21437 request; this effectively ignores the 21438 authentication in the spec for a single request. 21439 :type _request_auth: dict, optional 21440 :param _content_type: force content-type for the request. 21441 :type _content_type: str, Optional 21442 :param _headers: set to override the headers for a single 21443 request; this effectively ignores the headers 21444 in the spec for a single request. 21445 :type _headers: dict, optional 21446 :param _host_index: set to override the host_index for a single 21447 request; this effectively ignores the host_index 21448 in the spec for a single request. 21449 :type _host_index: int, optional 21450 :return: Returns the result object. 21451 """ # noqa: E501 21452 21453 _param = self._get_image_item_serialize( 21454 board_id=board_id, 21455 item_id=item_id, 21456 _request_auth=_request_auth, 21457 _content_type=_content_type, 21458 _headers=_headers, 21459 _host_index=_host_index, 21460 ) 21461 21462 _response_types_map: Dict[str, Optional[str]] = { 21463 "200": "ImageItem", 21464 "400": None, 21465 "404": None, 21466 "429": None, 21467 } 21468 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21469 response_data.read() 21470 return self.api_client.response_deserialize( 21471 response_data=response_data, 21472 response_types_map=_response_types_map, 21473 ).data
Get image item
Retrieves information for a specific image item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21527 @validate_call 21528 def update_image_item_using_file_from_device( 21529 self, 21530 board_id_platform_file_upload: Annotated[ 21531 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 21532 ], 21533 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 21534 resource: Annotated[ 21535 Union[StrictBytes, StrictStr], Field(description="Select a file to upload. Maximum file size is 6 MB.") 21536 ], 21537 data: Optional[UploadFileFromDeviceData] = None, 21538 _request_timeout: Union[ 21539 None, 21540 Annotated[StrictFloat, Field(gt=0)], 21541 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21542 ] = None, 21543 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21544 _content_type: Optional[StrictStr] = None, 21545 _headers: Optional[Dict[StrictStr, Any]] = None, 21546 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21547 ) -> ImageItem: 21548 """Update image item using file from device 21549 21550 Updates an image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21551 21552 :param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) 21553 :type board_id_platform_file_upload: str 21554 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 21555 :type item_id: str 21556 :param resource: Select a file to upload. Maximum file size is 6 MB. (required) 21557 :type resource: bytearray 21558 :param data: 21559 :type data: UploadFileFromDeviceData 21560 :param _request_timeout: timeout setting for this request. If one 21561 number provided, it will be total request 21562 timeout. It can also be a pair (tuple) of 21563 (connection, read) timeouts. 21564 :type _request_timeout: int, tuple(int, int), optional 21565 :param _request_auth: set to override the auth_settings for an a single 21566 request; this effectively ignores the 21567 authentication in the spec for a single request. 21568 :type _request_auth: dict, optional 21569 :param _content_type: force content-type for the request. 21570 :type _content_type: str, Optional 21571 :param _headers: set to override the headers for a single 21572 request; this effectively ignores the headers 21573 in the spec for a single request. 21574 :type _headers: dict, optional 21575 :param _host_index: set to override the host_index for a single 21576 request; this effectively ignores the host_index 21577 in the spec for a single request. 21578 :type _host_index: int, optional 21579 :return: Returns the result object. 21580 """ # noqa: E501 21581 21582 _param = self._update_image_item_using_file_from_device_serialize( 21583 board_id_platform_file_upload=board_id_platform_file_upload, 21584 item_id=item_id, 21585 resource=resource, 21586 data=data, 21587 _request_auth=_request_auth, 21588 _content_type=_content_type, 21589 _headers=_headers, 21590 _host_index=_host_index, 21591 ) 21592 21593 _response_types_map: Dict[str, Optional[str]] = { 21594 "200": "ImageItem", 21595 } 21596 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21597 response_data.read() 21598 return self.api_client.response_deserialize( 21599 response_data=response_data, 21600 response_types_map=_response_types_map, 21601 ).data
Update image item using file from device
Updates an image item on a board.
Required scope
boards:writeRate limiting
Level 2:param board_id_platform_file_upload: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id_platform_file_upload: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param resource: Select a file to upload. Maximum file size is 6 MB. (required) :type resource: bytearray :param data: :type data: UploadFileFromDeviceData :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21669 @validate_call 21670 def update_image_item_using_url( 21671 self, 21672 board_id: Annotated[ 21673 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 21674 ], 21675 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 21676 image_update_request: ImageUpdateRequest, 21677 _request_timeout: Union[ 21678 None, 21679 Annotated[StrictFloat, Field(gt=0)], 21680 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21681 ] = None, 21682 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21683 _content_type: Optional[StrictStr] = None, 21684 _headers: Optional[Dict[StrictStr, Any]] = None, 21685 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21686 ) -> ImageItem: 21687 """Update image item using URL 21688 21689 Updates an image item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 21690 21691 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 21692 :type board_id: str 21693 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 21694 :type item_id: str 21695 :param image_update_request: (required) 21696 :type image_update_request: ImageUpdateRequest 21697 :param _request_timeout: timeout setting for this request. If one 21698 number provided, it will be total request 21699 timeout. It can also be a pair (tuple) of 21700 (connection, read) timeouts. 21701 :type _request_timeout: int, tuple(int, int), optional 21702 :param _request_auth: set to override the auth_settings for an a single 21703 request; this effectively ignores the 21704 authentication in the spec for a single request. 21705 :type _request_auth: dict, optional 21706 :param _content_type: force content-type for the request. 21707 :type _content_type: str, Optional 21708 :param _headers: set to override the headers for a single 21709 request; this effectively ignores the headers 21710 in the spec for a single request. 21711 :type _headers: dict, optional 21712 :param _host_index: set to override the host_index for a single 21713 request; this effectively ignores the host_index 21714 in the spec for a single request. 21715 :type _host_index: int, optional 21716 :return: Returns the result object. 21717 """ # noqa: E501 21718 21719 _param = self._update_image_item_using_url_serialize( 21720 board_id=board_id, 21721 item_id=item_id, 21722 image_update_request=image_update_request, 21723 _request_auth=_request_auth, 21724 _content_type=_content_type, 21725 _headers=_headers, 21726 _host_index=_host_index, 21727 ) 21728 21729 _response_types_map: Dict[str, Optional[str]] = { 21730 "200": "ImageItem", 21731 "400": None, 21732 "404": None, 21733 "409": None, 21734 "429": None, 21735 } 21736 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21737 response_data.read() 21738 return self.api_client.response_deserialize( 21739 response_data=response_data, 21740 response_types_map=_response_types_map, 21741 ).data
Update image item using URL
Updates an image item on a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param image_update_request: (required) :type image_update_request: ImageUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21806 @validate_call 21807 def delete_item( 21808 self, 21809 board_id: Annotated[ 21810 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21811 ], 21812 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21813 _request_timeout: Union[ 21814 None, 21815 Annotated[StrictFloat, Field(gt=0)], 21816 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21817 ] = None, 21818 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21819 _content_type: Optional[StrictStr] = None, 21820 _headers: Optional[Dict[StrictStr, Any]] = None, 21821 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21822 ) -> object: 21823 """Delete item 21824 21825 Deletes an item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21826 21827 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21828 :type board_id: str 21829 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21830 :type item_id: str 21831 :param _request_timeout: timeout setting for this request. If one 21832 number provided, it will be total request 21833 timeout. It can also be a pair (tuple) of 21834 (connection, read) timeouts. 21835 :type _request_timeout: int, tuple(int, int), optional 21836 :param _request_auth: set to override the auth_settings for an a single 21837 request; this effectively ignores the 21838 authentication in the spec for a single request. 21839 :type _request_auth: dict, optional 21840 :param _content_type: force content-type for the request. 21841 :type _content_type: str, Optional 21842 :param _headers: set to override the headers for a single 21843 request; this effectively ignores the headers 21844 in the spec for a single request. 21845 :type _headers: dict, optional 21846 :param _host_index: set to override the host_index for a single 21847 request; this effectively ignores the host_index 21848 in the spec for a single request. 21849 :type _host_index: int, optional 21850 :return: Returns the result object. 21851 """ # noqa: E501 21852 21853 _param = self._delete_item_serialize( 21854 board_id=board_id, 21855 item_id=item_id, 21856 _request_auth=_request_auth, 21857 _content_type=_content_type, 21858 _headers=_headers, 21859 _host_index=_host_index, 21860 ) 21861 21862 _response_types_map: Dict[str, Optional[str]] = { 21863 "204": "object", 21864 "400": None, 21865 "404": None, 21866 "429": None, 21867 } 21868 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21869 response_data.read() 21870 return self.api_client.response_deserialize( 21871 response_data=response_data, 21872 response_types_map=_response_types_map, 21873 ).data
Delete item
Deletes an item from a board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
21927 @validate_call 21928 def delete_item_experimental( 21929 self, 21930 board_id: Annotated[ 21931 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 21932 ], 21933 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 21934 _request_timeout: Union[ 21935 None, 21936 Annotated[StrictFloat, Field(gt=0)], 21937 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 21938 ] = None, 21939 _request_auth: Optional[Dict[StrictStr, Any]] = None, 21940 _content_type: Optional[StrictStr] = None, 21941 _headers: Optional[Dict[StrictStr, Any]] = None, 21942 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 21943 ) -> object: 21944 """Delete item 21945 21946 Deletes an item from a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 21947 21948 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 21949 :type board_id: str 21950 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 21951 :type item_id: str 21952 :param _request_timeout: timeout setting for this request. If one 21953 number provided, it will be total request 21954 timeout. It can also be a pair (tuple) of 21955 (connection, read) timeouts. 21956 :type _request_timeout: int, tuple(int, int), optional 21957 :param _request_auth: set to override the auth_settings for an a single 21958 request; this effectively ignores the 21959 authentication in the spec for a single request. 21960 :type _request_auth: dict, optional 21961 :param _content_type: force content-type for the request. 21962 :type _content_type: str, Optional 21963 :param _headers: set to override the headers for a single 21964 request; this effectively ignores the headers 21965 in the spec for a single request. 21966 :type _headers: dict, optional 21967 :param _host_index: set to override the host_index for a single 21968 request; this effectively ignores the host_index 21969 in the spec for a single request. 21970 :type _host_index: int, optional 21971 :return: Returns the result object. 21972 """ # noqa: E501 21973 21974 _param = self._delete_item_experimental_serialize( 21975 board_id=board_id, 21976 item_id=item_id, 21977 _request_auth=_request_auth, 21978 _content_type=_content_type, 21979 _headers=_headers, 21980 _host_index=_host_index, 21981 ) 21982 21983 _response_types_map: Dict[str, Optional[str]] = { 21984 "204": "object", 21985 "400": "CreateFrameItem400Response", 21986 "404": "CreateFrameItem400Response", 21987 "429": "CreateFrameItem400Response", 21988 } 21989 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 21990 response_data.read() 21991 return self.api_client.response_deserialize( 21992 response_data=response_data, 21993 response_types_map=_response_types_map, 21994 ).data
Delete item
Deletes an item from a board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22048 @validate_call 22049 def get_items( 22050 self, 22051 board_id: Annotated[ 22052 StrictStr, 22053 Field( 22054 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 22055 ), 22056 ], 22057 limit: Optional[Annotated[str, Field(strict=True)]] = None, 22058 type: Optional[StrictStr] = None, 22059 cursor: Optional[StrictStr] = None, 22060 _request_timeout: Union[ 22061 None, 22062 Annotated[StrictFloat, Field(gt=0)], 22063 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22064 ] = None, 22065 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22066 _content_type: Optional[StrictStr] = None, 22067 _headers: Optional[Dict[StrictStr, Any]] = None, 22068 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22069 ) -> GenericItemCursorPaged: 22070 """Get items on board 22071 22072 Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22073 22074 :param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) 22075 :type board_id: str 22076 :param limit: 22077 :type limit: str 22078 :param type: 22079 :type type: str 22080 :param cursor: 22081 :type cursor: str 22082 :param _request_timeout: timeout setting for this request. If one 22083 number provided, it will be total request 22084 timeout. It can also be a pair (tuple) of 22085 (connection, read) timeouts. 22086 :type _request_timeout: int, tuple(int, int), optional 22087 :param _request_auth: set to override the auth_settings for an a single 22088 request; this effectively ignores the 22089 authentication in the spec for a single request. 22090 :type _request_auth: dict, optional 22091 :param _content_type: force content-type for the request. 22092 :type _content_type: str, Optional 22093 :param _headers: set to override the headers for a single 22094 request; this effectively ignores the headers 22095 in the spec for a single request. 22096 :type _headers: dict, optional 22097 :param _host_index: set to override the host_index for a single 22098 request; this effectively ignores the host_index 22099 in the spec for a single request. 22100 :type _host_index: int, optional 22101 :return: Returns the result object. 22102 """ # noqa: E501 22103 22104 _param = self._get_items_serialize( 22105 board_id=board_id, 22106 limit=limit, 22107 type=type, 22108 cursor=cursor, 22109 _request_auth=_request_auth, 22110 _content_type=_content_type, 22111 _headers=_headers, 22112 _host_index=_host_index, 22113 ) 22114 22115 _response_types_map: Dict[str, Optional[str]] = { 22116 "200": "GenericItemCursorPaged", 22117 "400": None, 22118 "404": None, 22119 "429": None, 22120 } 22121 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22122 response_data.read() 22123 return self.api_client.response_deserialize( 22124 response_data=response_data, 22125 response_types_map=_response_types_map, 22126 ).data
Get items on board
Retrieves a list of items for a specific board. You can retrieve all items on the board, a list of child items inside a parent item, or a list of specific types of items by specifying URL query parameter values. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request. For example, if you set the limit query parameter to 10 and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id: Unique identifier (ID) of the board for which you want to retrieve the list of available items. (required) :type board_id: str :param limit: :type limit: str :param type: :type type: str :param cursor: :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22192 @validate_call 22193 def get_items_within_frame( 22194 self, 22195 board_id_platform_containers: Annotated[ 22196 StrictStr, 22197 Field( 22198 description="Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items." 22199 ), 22200 ], 22201 parent_item_id: Annotated[ 22202 str, 22203 Field( 22204 strict=True, description="ID of the frame for which you want to retrieve the list of available items." 22205 ), 22206 ], 22207 limit: Optional[Annotated[str, Field(strict=True)]] = None, 22208 type: Optional[StrictStr] = None, 22209 cursor: Optional[StrictStr] = None, 22210 _request_timeout: Union[ 22211 None, 22212 Annotated[StrictFloat, Field(gt=0)], 22213 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22214 ] = None, 22215 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22216 _content_type: Optional[StrictStr] = None, 22217 _headers: Optional[Dict[StrictStr, Any]] = None, 22218 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22219 ) -> GenericItemCursorPaged: 22220 """Get items within frame 22221 22222 Retrieves a list of items within a specific frame. A frame is a parent item and all items within a frame are child items. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the `cursor` parameter equal to the `cursor` value you received in the response of the previous request. For example, if you set the `limit` query parameter to `10` and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is `foo`. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to `foo`.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22223 22224 :param board_id_platform_containers: Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items. (required) 22225 :type board_id_platform_containers: str 22226 :param parent_item_id: ID of the frame for which you want to retrieve the list of available items. (required) 22227 :type parent_item_id: str 22228 :param limit: 22229 :type limit: str 22230 :param type: 22231 :type type: str 22232 :param cursor: 22233 :type cursor: str 22234 :param _request_timeout: timeout setting for this request. If one 22235 number provided, it will be total request 22236 timeout. It can also be a pair (tuple) of 22237 (connection, read) timeouts. 22238 :type _request_timeout: int, tuple(int, int), optional 22239 :param _request_auth: set to override the auth_settings for an a single 22240 request; this effectively ignores the 22241 authentication in the spec for a single request. 22242 :type _request_auth: dict, optional 22243 :param _content_type: force content-type for the request. 22244 :type _content_type: str, Optional 22245 :param _headers: set to override the headers for a single 22246 request; this effectively ignores the headers 22247 in the spec for a single request. 22248 :type _headers: dict, optional 22249 :param _host_index: set to override the host_index for a single 22250 request; this effectively ignores the host_index 22251 in the spec for a single request. 22252 :type _host_index: int, optional 22253 :return: Returns the result object. 22254 """ # noqa: E501 22255 22256 _param = self._get_items_within_frame_serialize( 22257 board_id_platform_containers=board_id_platform_containers, 22258 parent_item_id=parent_item_id, 22259 limit=limit, 22260 type=type, 22261 cursor=cursor, 22262 _request_auth=_request_auth, 22263 _content_type=_content_type, 22264 _headers=_headers, 22265 _host_index=_host_index, 22266 ) 22267 22268 _response_types_map: Dict[str, Optional[str]] = { 22269 "200": "GenericItemCursorPaged", 22270 "400": "CreateFrameItem400Response", 22271 "404": "CreateFrameItem400Response", 22272 "429": "CreateFrameItem400Response", 22273 } 22274 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22275 response_data.read() 22276 return self.api_client.response_deserialize( 22277 response_data=response_data, 22278 response_types_map=_response_types_map, 22279 ).data
Get items within frame
Retrieves a list of items within a specific frame. A frame is a parent item and all items within a frame are child items. This method returns results using a cursor-based approach. A cursor-paginated method returns a portion of the total set of results based on the limit specified and a cursor that points to the next portion of the results. To retrieve the next portion of the collection, on your next call to the same method, set the cursor parameter equal to the cursor value you received in the response of the previous request. For example, if you set the limit query parameter to 10 and the board contains 20 objects, the first call will return information about the first 10 objects in the response along with a cursor parameter and value. In this example, let's say the cursor parameter value returned in the response is foo. If you want to retrieve the next set of objects, on your next call to the same method, set the cursor parameter value to foo.
Required scope
boards:readRate limiting
Level 2:param board_id_platform_containers: Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items. (required) :type board_id_platform_containers: str :param parent_item_id: ID of the frame for which you want to retrieve the list of available items. (required) :type parent_item_id: str :param limit: :type limit: str :param type: :type type: str :param cursor: :type cursor: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22350 @validate_call 22351 def get_specific_item( 22352 self, 22353 board_id: Annotated[ 22354 StrictStr, 22355 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 22356 ], 22357 item_id: Annotated[ 22358 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 22359 ], 22360 _request_timeout: Union[ 22361 None, 22362 Annotated[StrictFloat, Field(gt=0)], 22363 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22364 ] = None, 22365 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22366 _content_type: Optional[StrictStr] = None, 22367 _headers: Optional[Dict[StrictStr, Any]] = None, 22368 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22369 ) -> GenericItem: 22370 """Get specific item on board 22371 22372 Retrieves information for a specific item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 22373 22374 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 22375 :type board_id: str 22376 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 22377 :type item_id: str 22378 :param _request_timeout: timeout setting for this request. If one 22379 number provided, it will be total request 22380 timeout. It can also be a pair (tuple) of 22381 (connection, read) timeouts. 22382 :type _request_timeout: int, tuple(int, int), optional 22383 :param _request_auth: set to override the auth_settings for an a single 22384 request; this effectively ignores the 22385 authentication in the spec for a single request. 22386 :type _request_auth: dict, optional 22387 :param _content_type: force content-type for the request. 22388 :type _content_type: str, Optional 22389 :param _headers: set to override the headers for a single 22390 request; this effectively ignores the headers 22391 in the spec for a single request. 22392 :type _headers: dict, optional 22393 :param _host_index: set to override the host_index for a single 22394 request; this effectively ignores the host_index 22395 in the spec for a single request. 22396 :type _host_index: int, optional 22397 :return: Returns the result object. 22398 """ # noqa: E501 22399 22400 _param = self._get_specific_item_serialize( 22401 board_id=board_id, 22402 item_id=item_id, 22403 _request_auth=_request_auth, 22404 _content_type=_content_type, 22405 _headers=_headers, 22406 _host_index=_host_index, 22407 ) 22408 22409 _response_types_map: Dict[str, Optional[str]] = { 22410 "200": "GenericItem", 22411 "400": None, 22412 "404": None, 22413 "429": None, 22414 } 22415 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22416 response_data.read() 22417 return self.api_client.response_deserialize( 22418 response_data=response_data, 22419 response_types_map=_response_types_map, 22420 ).data
Get specific item on board
Retrieves information for a specific item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22474 @validate_call 22475 def update_item_position_or_parent( 22476 self, 22477 board_id: Annotated[ 22478 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 22479 ], 22480 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 22481 generic_item_update: GenericItemUpdate, 22482 _request_timeout: Union[ 22483 None, 22484 Annotated[StrictFloat, Field(gt=0)], 22485 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22486 ] = None, 22487 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22488 _content_type: Optional[StrictStr] = None, 22489 _headers: Optional[Dict[StrictStr, Any]] = None, 22490 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22491 ) -> GenericItem: 22492 """Update item position or parent 22493 22494 Updates the position or the parent of an item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22495 22496 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 22497 :type board_id: str 22498 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 22499 :type item_id: str 22500 :param generic_item_update: (required) 22501 :type generic_item_update: GenericItemUpdate 22502 :param _request_timeout: timeout setting for this request. If one 22503 number provided, it will be total request 22504 timeout. It can also be a pair (tuple) of 22505 (connection, read) timeouts. 22506 :type _request_timeout: int, tuple(int, int), optional 22507 :param _request_auth: set to override the auth_settings for an a single 22508 request; this effectively ignores the 22509 authentication in the spec for a single request. 22510 :type _request_auth: dict, optional 22511 :param _content_type: force content-type for the request. 22512 :type _content_type: str, Optional 22513 :param _headers: set to override the headers for a single 22514 request; this effectively ignores the headers 22515 in the spec for a single request. 22516 :type _headers: dict, optional 22517 :param _host_index: set to override the host_index for a single 22518 request; this effectively ignores the host_index 22519 in the spec for a single request. 22520 :type _host_index: int, optional 22521 :return: Returns the result object. 22522 """ # noqa: E501 22523 22524 _param = self._update_item_position_or_parent_serialize( 22525 board_id=board_id, 22526 item_id=item_id, 22527 generic_item_update=generic_item_update, 22528 _request_auth=_request_auth, 22529 _content_type=_content_type, 22530 _headers=_headers, 22531 _host_index=_host_index, 22532 ) 22533 22534 _response_types_map: Dict[str, Optional[str]] = { 22535 "200": "GenericItem", 22536 "400": None, 22537 "404": None, 22538 "429": None, 22539 } 22540 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22541 response_data.read() 22542 return self.api_client.response_deserialize( 22543 response_data=response_data, 22544 response_types_map=_response_types_map, 22545 ).data
Update item position or parent
Updates the position or the parent of an item on a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param generic_item_update: (required) :type generic_item_update: GenericItemUpdate :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22610 @validate_call 22611 def create_shape_item( 22612 self, 22613 board_id: Annotated[ 22614 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 22615 ], 22616 shape_create_request: ShapeCreateRequest, 22617 _request_timeout: Union[ 22618 None, 22619 Annotated[StrictFloat, Field(gt=0)], 22620 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22621 ] = None, 22622 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22623 _content_type: Optional[StrictStr] = None, 22624 _headers: Optional[Dict[StrictStr, Any]] = None, 22625 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22626 ) -> ShapeItem: 22627 """Create shape item 22628 22629 Adds a shape item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 22630 22631 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 22632 :type board_id: str 22633 :param shape_create_request: (required) 22634 :type shape_create_request: ShapeCreateRequest 22635 :param _request_timeout: timeout setting for this request. If one 22636 number provided, it will be total request 22637 timeout. It can also be a pair (tuple) of 22638 (connection, read) timeouts. 22639 :type _request_timeout: int, tuple(int, int), optional 22640 :param _request_auth: set to override the auth_settings for an a single 22641 request; this effectively ignores the 22642 authentication in the spec for a single request. 22643 :type _request_auth: dict, optional 22644 :param _content_type: force content-type for the request. 22645 :type _content_type: str, Optional 22646 :param _headers: set to override the headers for a single 22647 request; this effectively ignores the headers 22648 in the spec for a single request. 22649 :type _headers: dict, optional 22650 :param _host_index: set to override the host_index for a single 22651 request; this effectively ignores the host_index 22652 in the spec for a single request. 22653 :type _host_index: int, optional 22654 :return: Returns the result object. 22655 """ # noqa: E501 22656 22657 _param = self._create_shape_item_serialize( 22658 board_id=board_id, 22659 shape_create_request=shape_create_request, 22660 _request_auth=_request_auth, 22661 _content_type=_content_type, 22662 _headers=_headers, 22663 _host_index=_host_index, 22664 ) 22665 22666 _response_types_map: Dict[str, Optional[str]] = { 22667 "201": "ShapeItem", 22668 "400": None, 22669 "404": None, 22670 "429": None, 22671 } 22672 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22673 response_data.read() 22674 return self.api_client.response_deserialize( 22675 response_data=response_data, 22676 response_types_map=_response_types_map, 22677 ).data
Create shape item
Adds a shape item to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param shape_create_request: (required) :type shape_create_request: ShapeCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22739 @validate_call 22740 def delete_shape_item( 22741 self, 22742 board_id: Annotated[ 22743 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 22744 ], 22745 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 22746 _request_timeout: Union[ 22747 None, 22748 Annotated[StrictFloat, Field(gt=0)], 22749 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22750 ] = None, 22751 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22752 _content_type: Optional[StrictStr] = None, 22753 _headers: Optional[Dict[StrictStr, Any]] = None, 22754 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22755 ) -> object: 22756 """Delete shape item 22757 22758 Deletes a shape item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 22759 22760 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 22761 :type board_id: str 22762 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 22763 :type item_id: str 22764 :param _request_timeout: timeout setting for this request. If one 22765 number provided, it will be total request 22766 timeout. It can also be a pair (tuple) of 22767 (connection, read) timeouts. 22768 :type _request_timeout: int, tuple(int, int), optional 22769 :param _request_auth: set to override the auth_settings for an a single 22770 request; this effectively ignores the 22771 authentication in the spec for a single request. 22772 :type _request_auth: dict, optional 22773 :param _content_type: force content-type for the request. 22774 :type _content_type: str, Optional 22775 :param _headers: set to override the headers for a single 22776 request; this effectively ignores the headers 22777 in the spec for a single request. 22778 :type _headers: dict, optional 22779 :param _host_index: set to override the host_index for a single 22780 request; this effectively ignores the host_index 22781 in the spec for a single request. 22782 :type _host_index: int, optional 22783 :return: Returns the result object. 22784 """ # noqa: E501 22785 22786 _param = self._delete_shape_item_serialize( 22787 board_id=board_id, 22788 item_id=item_id, 22789 _request_auth=_request_auth, 22790 _content_type=_content_type, 22791 _headers=_headers, 22792 _host_index=_host_index, 22793 ) 22794 22795 _response_types_map: Dict[str, Optional[str]] = { 22796 "204": "object", 22797 "400": None, 22798 "404": None, 22799 "429": None, 22800 } 22801 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22802 response_data.read() 22803 return self.api_client.response_deserialize( 22804 response_data=response_data, 22805 response_types_map=_response_types_map, 22806 ).data
Delete shape item
Deletes a shape item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22860 @validate_call 22861 def get_shape_item( 22862 self, 22863 board_id: Annotated[ 22864 StrictStr, 22865 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 22866 ], 22867 item_id: Annotated[ 22868 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 22869 ], 22870 _request_timeout: Union[ 22871 None, 22872 Annotated[StrictFloat, Field(gt=0)], 22873 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22874 ] = None, 22875 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22876 _content_type: Optional[StrictStr] = None, 22877 _headers: Optional[Dict[StrictStr, Any]] = None, 22878 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 22879 ) -> ShapeItem: 22880 """Get shape item 22881 22882 Retrieves information for a specific shape item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 22883 22884 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 22885 :type board_id: str 22886 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 22887 :type item_id: str 22888 :param _request_timeout: timeout setting for this request. If one 22889 number provided, it will be total request 22890 timeout. It can also be a pair (tuple) of 22891 (connection, read) timeouts. 22892 :type _request_timeout: int, tuple(int, int), optional 22893 :param _request_auth: set to override the auth_settings for an a single 22894 request; this effectively ignores the 22895 authentication in the spec for a single request. 22896 :type _request_auth: dict, optional 22897 :param _content_type: force content-type for the request. 22898 :type _content_type: str, Optional 22899 :param _headers: set to override the headers for a single 22900 request; this effectively ignores the headers 22901 in the spec for a single request. 22902 :type _headers: dict, optional 22903 :param _host_index: set to override the host_index for a single 22904 request; this effectively ignores the host_index 22905 in the spec for a single request. 22906 :type _host_index: int, optional 22907 :return: Returns the result object. 22908 """ # noqa: E501 22909 22910 _param = self._get_shape_item_serialize( 22911 board_id=board_id, 22912 item_id=item_id, 22913 _request_auth=_request_auth, 22914 _content_type=_content_type, 22915 _headers=_headers, 22916 _host_index=_host_index, 22917 ) 22918 22919 _response_types_map: Dict[str, Optional[str]] = { 22920 "200": "ShapeItem", 22921 "400": None, 22922 "404": None, 22923 "429": None, 22924 } 22925 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 22926 response_data.read() 22927 return self.api_client.response_deserialize( 22928 response_data=response_data, 22929 response_types_map=_response_types_map, 22930 ).data
Get shape item
Retrieves information for a specific shape item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
22984 @validate_call 22985 def update_shape_item( 22986 self, 22987 board_id: Annotated[ 22988 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 22989 ], 22990 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 22991 shape_update_request: ShapeUpdateRequest, 22992 _request_timeout: Union[ 22993 None, 22994 Annotated[StrictFloat, Field(gt=0)], 22995 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 22996 ] = None, 22997 _request_auth: Optional[Dict[StrictStr, Any]] = None, 22998 _content_type: Optional[StrictStr] = None, 22999 _headers: Optional[Dict[StrictStr, Any]] = None, 23000 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23001 ) -> ShapeItem: 23002 """Update shape item 23003 23004 Updates a shape item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23005 23006 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 23007 :type board_id: str 23008 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 23009 :type item_id: str 23010 :param shape_update_request: (required) 23011 :type shape_update_request: ShapeUpdateRequest 23012 :param _request_timeout: timeout setting for this request. If one 23013 number provided, it will be total request 23014 timeout. It can also be a pair (tuple) of 23015 (connection, read) timeouts. 23016 :type _request_timeout: int, tuple(int, int), optional 23017 :param _request_auth: set to override the auth_settings for an a single 23018 request; this effectively ignores the 23019 authentication in the spec for a single request. 23020 :type _request_auth: dict, optional 23021 :param _content_type: force content-type for the request. 23022 :type _content_type: str, Optional 23023 :param _headers: set to override the headers for a single 23024 request; this effectively ignores the headers 23025 in the spec for a single request. 23026 :type _headers: dict, optional 23027 :param _host_index: set to override the host_index for a single 23028 request; this effectively ignores the host_index 23029 in the spec for a single request. 23030 :type _host_index: int, optional 23031 :return: Returns the result object. 23032 """ # noqa: E501 23033 23034 _param = self._update_shape_item_serialize( 23035 board_id=board_id, 23036 item_id=item_id, 23037 shape_update_request=shape_update_request, 23038 _request_auth=_request_auth, 23039 _content_type=_content_type, 23040 _headers=_headers, 23041 _host_index=_host_index, 23042 ) 23043 23044 _response_types_map: Dict[str, Optional[str]] = { 23045 "200": "ShapeItem", 23046 "400": None, 23047 "404": None, 23048 "409": None, 23049 "429": None, 23050 } 23051 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23052 response_data.read() 23053 return self.api_client.response_deserialize( 23054 response_data=response_data, 23055 response_types_map=_response_types_map, 23056 ).data
Update shape item
Updates a shape item on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param shape_update_request: (required) :type shape_update_request: ShapeUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23121 @validate_call 23122 def create_sticky_note_item( 23123 self, 23124 board_id: Annotated[ 23125 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 23126 ], 23127 sticky_note_create_request: StickyNoteCreateRequest, 23128 _request_timeout: Union[ 23129 None, 23130 Annotated[StrictFloat, Field(gt=0)], 23131 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23132 ] = None, 23133 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23134 _content_type: Optional[StrictStr] = None, 23135 _headers: Optional[Dict[StrictStr, Any]] = None, 23136 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23137 ) -> StickyNoteItem: 23138 """Create sticky note item 23139 23140 Adds a sticky note item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23141 23142 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 23143 :type board_id: str 23144 :param sticky_note_create_request: (required) 23145 :type sticky_note_create_request: StickyNoteCreateRequest 23146 :param _request_timeout: timeout setting for this request. If one 23147 number provided, it will be total request 23148 timeout. It can also be a pair (tuple) of 23149 (connection, read) timeouts. 23150 :type _request_timeout: int, tuple(int, int), optional 23151 :param _request_auth: set to override the auth_settings for an a single 23152 request; this effectively ignores the 23153 authentication in the spec for a single request. 23154 :type _request_auth: dict, optional 23155 :param _content_type: force content-type for the request. 23156 :type _content_type: str, Optional 23157 :param _headers: set to override the headers for a single 23158 request; this effectively ignores the headers 23159 in the spec for a single request. 23160 :type _headers: dict, optional 23161 :param _host_index: set to override the host_index for a single 23162 request; this effectively ignores the host_index 23163 in the spec for a single request. 23164 :type _host_index: int, optional 23165 :return: Returns the result object. 23166 """ # noqa: E501 23167 23168 _param = self._create_sticky_note_item_serialize( 23169 board_id=board_id, 23170 sticky_note_create_request=sticky_note_create_request, 23171 _request_auth=_request_auth, 23172 _content_type=_content_type, 23173 _headers=_headers, 23174 _host_index=_host_index, 23175 ) 23176 23177 _response_types_map: Dict[str, Optional[str]] = { 23178 "201": "StickyNoteItem", 23179 "400": None, 23180 "404": None, 23181 "429": None, 23182 } 23183 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23184 response_data.read() 23185 return self.api_client.response_deserialize( 23186 response_data=response_data, 23187 response_types_map=_response_types_map, 23188 ).data
Create sticky note item
Adds a sticky note item to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param sticky_note_create_request: (required) :type sticky_note_create_request: StickyNoteCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23250 @validate_call 23251 def delete_sticky_note_item( 23252 self, 23253 board_id: Annotated[ 23254 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 23255 ], 23256 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 23257 _request_timeout: Union[ 23258 None, 23259 Annotated[StrictFloat, Field(gt=0)], 23260 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23261 ] = None, 23262 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23263 _content_type: Optional[StrictStr] = None, 23264 _headers: Optional[Dict[StrictStr, Any]] = None, 23265 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23266 ) -> object: 23267 """Delete sticky note item 23268 23269 Deletes a sticky note item from the board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 23270 23271 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 23272 :type board_id: str 23273 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 23274 :type item_id: str 23275 :param _request_timeout: timeout setting for this request. If one 23276 number provided, it will be total request 23277 timeout. It can also be a pair (tuple) of 23278 (connection, read) timeouts. 23279 :type _request_timeout: int, tuple(int, int), optional 23280 :param _request_auth: set to override the auth_settings for an a single 23281 request; this effectively ignores the 23282 authentication in the spec for a single request. 23283 :type _request_auth: dict, optional 23284 :param _content_type: force content-type for the request. 23285 :type _content_type: str, Optional 23286 :param _headers: set to override the headers for a single 23287 request; this effectively ignores the headers 23288 in the spec for a single request. 23289 :type _headers: dict, optional 23290 :param _host_index: set to override the host_index for a single 23291 request; this effectively ignores the host_index 23292 in the spec for a single request. 23293 :type _host_index: int, optional 23294 :return: Returns the result object. 23295 """ # noqa: E501 23296 23297 _param = self._delete_sticky_note_item_serialize( 23298 board_id=board_id, 23299 item_id=item_id, 23300 _request_auth=_request_auth, 23301 _content_type=_content_type, 23302 _headers=_headers, 23303 _host_index=_host_index, 23304 ) 23305 23306 _response_types_map: Dict[str, Optional[str]] = { 23307 "204": "object", 23308 "400": None, 23309 "404": None, 23310 "429": None, 23311 } 23312 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23313 response_data.read() 23314 return self.api_client.response_deserialize( 23315 response_data=response_data, 23316 response_types_map=_response_types_map, 23317 ).data
Delete sticky note item
Deletes a sticky note item from the board.
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23371 @validate_call 23372 def get_sticky_note_item( 23373 self, 23374 board_id: Annotated[ 23375 StrictStr, 23376 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 23377 ], 23378 item_id: Annotated[ 23379 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 23380 ], 23381 _request_timeout: Union[ 23382 None, 23383 Annotated[StrictFloat, Field(gt=0)], 23384 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23385 ] = None, 23386 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23387 _content_type: Optional[StrictStr] = None, 23388 _headers: Optional[Dict[StrictStr, Any]] = None, 23389 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23390 ) -> StickyNoteItem: 23391 """Get sticky note item 23392 23393 Retrieves information for a specific sticky note item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23394 23395 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 23396 :type board_id: str 23397 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 23398 :type item_id: str 23399 :param _request_timeout: timeout setting for this request. If one 23400 number provided, it will be total request 23401 timeout. It can also be a pair (tuple) of 23402 (connection, read) timeouts. 23403 :type _request_timeout: int, tuple(int, int), optional 23404 :param _request_auth: set to override the auth_settings for an a single 23405 request; this effectively ignores the 23406 authentication in the spec for a single request. 23407 :type _request_auth: dict, optional 23408 :param _content_type: force content-type for the request. 23409 :type _content_type: str, Optional 23410 :param _headers: set to override the headers for a single 23411 request; this effectively ignores the headers 23412 in the spec for a single request. 23413 :type _headers: dict, optional 23414 :param _host_index: set to override the host_index for a single 23415 request; this effectively ignores the host_index 23416 in the spec for a single request. 23417 :type _host_index: int, optional 23418 :return: Returns the result object. 23419 """ # noqa: E501 23420 23421 _param = self._get_sticky_note_item_serialize( 23422 board_id=board_id, 23423 item_id=item_id, 23424 _request_auth=_request_auth, 23425 _content_type=_content_type, 23426 _headers=_headers, 23427 _host_index=_host_index, 23428 ) 23429 23430 _response_types_map: Dict[str, Optional[str]] = { 23431 "200": "StickyNoteItem", 23432 "400": None, 23433 "404": None, 23434 "429": None, 23435 } 23436 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23437 response_data.read() 23438 return self.api_client.response_deserialize( 23439 response_data=response_data, 23440 response_types_map=_response_types_map, 23441 ).data
Get sticky note item
Retrieves information for a specific sticky note item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23495 @validate_call 23496 def update_sticky_note_item( 23497 self, 23498 board_id: Annotated[ 23499 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 23500 ], 23501 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 23502 sticky_note_update_request: StickyNoteUpdateRequest, 23503 _request_timeout: Union[ 23504 None, 23505 Annotated[StrictFloat, Field(gt=0)], 23506 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23507 ] = None, 23508 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23509 _content_type: Optional[StrictStr] = None, 23510 _headers: Optional[Dict[StrictStr, Any]] = None, 23511 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23512 ) -> StickyNoteItem: 23513 """Update sticky note item 23514 23515 Updates a sticky note item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 23516 23517 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 23518 :type board_id: str 23519 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 23520 :type item_id: str 23521 :param sticky_note_update_request: (required) 23522 :type sticky_note_update_request: StickyNoteUpdateRequest 23523 :param _request_timeout: timeout setting for this request. If one 23524 number provided, it will be total request 23525 timeout. It can also be a pair (tuple) of 23526 (connection, read) timeouts. 23527 :type _request_timeout: int, tuple(int, int), optional 23528 :param _request_auth: set to override the auth_settings for an a single 23529 request; this effectively ignores the 23530 authentication in the spec for a single request. 23531 :type _request_auth: dict, optional 23532 :param _content_type: force content-type for the request. 23533 :type _content_type: str, Optional 23534 :param _headers: set to override the headers for a single 23535 request; this effectively ignores the headers 23536 in the spec for a single request. 23537 :type _headers: dict, optional 23538 :param _host_index: set to override the host_index for a single 23539 request; this effectively ignores the host_index 23540 in the spec for a single request. 23541 :type _host_index: int, optional 23542 :return: Returns the result object. 23543 """ # noqa: E501 23544 23545 _param = self._update_sticky_note_item_serialize( 23546 board_id=board_id, 23547 item_id=item_id, 23548 sticky_note_update_request=sticky_note_update_request, 23549 _request_auth=_request_auth, 23550 _content_type=_content_type, 23551 _headers=_headers, 23552 _host_index=_host_index, 23553 ) 23554 23555 _response_types_map: Dict[str, Optional[str]] = { 23556 "200": "StickyNoteItem", 23557 "400": None, 23558 "404": None, 23559 "409": None, 23560 "429": None, 23561 } 23562 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23563 response_data.read() 23564 return self.api_client.response_deserialize( 23565 response_data=response_data, 23566 response_types_map=_response_types_map, 23567 ).data
Update sticky note item
Updates a sticky note item on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param sticky_note_update_request: (required) :type sticky_note_update_request: StickyNoteUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23632 @validate_call 23633 def attach_tag_to_item( 23634 self, 23635 board_id_platform_tags: Annotated[ 23636 StrictStr, 23637 Field(description="Unique identifier (ID) of the board with the item that you want to add a tag to."), 23638 ], 23639 item_id: Annotated[ 23640 StrictStr, Field(description="Unique identifier (ID) of the item to which you want to add a tag.") 23641 ], 23642 tag_id: Annotated[ 23643 StrictStr, Field(description="Unique identifier (ID) of the tag you want to add to the item.") 23644 ], 23645 _request_timeout: Union[ 23646 None, 23647 Annotated[StrictFloat, Field(gt=0)], 23648 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23649 ] = None, 23650 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23651 _content_type: Optional[StrictStr] = None, 23652 _headers: Optional[Dict[StrictStr, Any]] = None, 23653 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23654 ) -> object: 23655 """Attach tag to item 23656 23657 Attach an existing tag to the specified item. Card and sticky note items can have up to 8 tags. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Update tag](https://developers.miro.com/reference/update-tag), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23658 23659 :param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to add a tag to. (required) 23660 :type board_id_platform_tags: str 23661 :param item_id: Unique identifier (ID) of the item to which you want to add a tag. (required) 23662 :type item_id: str 23663 :param tag_id: Unique identifier (ID) of the tag you want to add to the item. (required) 23664 :type tag_id: str 23665 :param _request_timeout: timeout setting for this request. If one 23666 number provided, it will be total request 23667 timeout. It can also be a pair (tuple) of 23668 (connection, read) timeouts. 23669 :type _request_timeout: int, tuple(int, int), optional 23670 :param _request_auth: set to override the auth_settings for an a single 23671 request; this effectively ignores the 23672 authentication in the spec for a single request. 23673 :type _request_auth: dict, optional 23674 :param _content_type: force content-type for the request. 23675 :type _content_type: str, Optional 23676 :param _headers: set to override the headers for a single 23677 request; this effectively ignores the headers 23678 in the spec for a single request. 23679 :type _headers: dict, optional 23680 :param _host_index: set to override the host_index for a single 23681 request; this effectively ignores the host_index 23682 in the spec for a single request. 23683 :type _host_index: int, optional 23684 :return: Returns the result object. 23685 """ # noqa: E501 23686 23687 _param = self._attach_tag_to_item_serialize( 23688 board_id_platform_tags=board_id_platform_tags, 23689 item_id=item_id, 23690 tag_id=tag_id, 23691 _request_auth=_request_auth, 23692 _content_type=_content_type, 23693 _headers=_headers, 23694 _host_index=_host_index, 23695 ) 23696 23697 _response_types_map: Dict[str, Optional[str]] = { 23698 "204": "object", 23699 "400": "GetTagsFromItem400Response", 23700 "404": "GetTagsFromItem400Response", 23701 "429": "GetTagsFromItem400Response", 23702 } 23703 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23704 response_data.read() 23705 return self.api_client.response_deserialize( 23706 response_data=response_data, 23707 response_types_map=_response_types_map, 23708 ).data
Attach tag to item
Attach an existing tag to the specified item. Card and sticky note items can have up to 8 tags.
Note: Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: Remove tag from item, Update tag, Delete tag.
Required scope
boards:writeRate limiting
Level 1:param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to add a tag to. (required) :type board_id_platform_tags: str :param item_id: Unique identifier (ID) of the item to which you want to add a tag. (required) :type item_id: str :param tag_id: Unique identifier (ID) of the tag you want to add to the item. (required) :type tag_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23767 @validate_call 23768 def create_tag( 23769 self, 23770 board_id: Annotated[ 23771 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the tag.") 23772 ], 23773 tag_create_request: TagCreateRequest, 23774 _request_timeout: Union[ 23775 None, 23776 Annotated[StrictFloat, Field(gt=0)], 23777 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23778 ] = None, 23779 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23780 _content_type: Optional[StrictStr] = None, 23781 _headers: Optional[Dict[StrictStr, Any]] = None, 23782 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23783 ) -> TagWithLinks: 23784 """Create tag 23785 23786 Creates a tag on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23787 23788 :param board_id: Unique identifier (ID) of the board where you want to create the tag. (required) 23789 :type board_id: str 23790 :param tag_create_request: (required) 23791 :type tag_create_request: TagCreateRequest 23792 :param _request_timeout: timeout setting for this request. If one 23793 number provided, it will be total request 23794 timeout. It can also be a pair (tuple) of 23795 (connection, read) timeouts. 23796 :type _request_timeout: int, tuple(int, int), optional 23797 :param _request_auth: set to override the auth_settings for an a single 23798 request; this effectively ignores the 23799 authentication in the spec for a single request. 23800 :type _request_auth: dict, optional 23801 :param _content_type: force content-type for the request. 23802 :type _content_type: str, Optional 23803 :param _headers: set to override the headers for a single 23804 request; this effectively ignores the headers 23805 in the spec for a single request. 23806 :type _headers: dict, optional 23807 :param _host_index: set to override the host_index for a single 23808 request; this effectively ignores the host_index 23809 in the spec for a single request. 23810 :type _host_index: int, optional 23811 :return: Returns the result object. 23812 """ # noqa: E501 23813 23814 _param = self._create_tag_serialize( 23815 board_id=board_id, 23816 tag_create_request=tag_create_request, 23817 _request_auth=_request_auth, 23818 _content_type=_content_type, 23819 _headers=_headers, 23820 _host_index=_host_index, 23821 ) 23822 23823 _response_types_map: Dict[str, Optional[str]] = { 23824 "201": "TagWithLinks", 23825 "400": "GetTagsFromItem400Response", 23826 "404": "GetTagsFromItem400Response", 23827 "429": "GetTagsFromItem400Response", 23828 } 23829 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23830 response_data.read() 23831 return self.api_client.response_deserialize( 23832 response_data=response_data, 23833 response_types_map=_response_types_map, 23834 ).data
Create tag
Creates a tag on a board.
Required scope
boards:writeRate limiting
Level 1:param board_id: Unique identifier (ID) of the board where you want to create the tag. (required) :type board_id: str :param tag_create_request: (required) :type tag_create_request: TagCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
23896 @validate_call 23897 def delete_tag( 23898 self, 23899 board_id: Annotated[ 23900 StrictStr, Field(description="Unique identifier (ID) of the board where you want to delete a specific tag.") 23901 ], 23902 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to delete.")], 23903 _request_timeout: Union[ 23904 None, 23905 Annotated[StrictFloat, Field(gt=0)], 23906 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 23907 ] = None, 23908 _request_auth: Optional[Dict[StrictStr, Any]] = None, 23909 _content_type: Optional[StrictStr] = None, 23910 _headers: Optional[Dict[StrictStr, Any]] = None, 23911 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 23912 ) -> object: 23913 """Delete tag 23914 23915 Deletes the specified tag from the board. The tag is also removed from all cards and sticky notes on the board. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Update tag](https://developers.miro.com/reference/update-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 23916 23917 :param board_id: Unique identifier (ID) of the board where you want to delete a specific tag. (required) 23918 :type board_id: str 23919 :param tag_id: Unique identifier (ID) of the tag that you want to delete. (required) 23920 :type tag_id: str 23921 :param _request_timeout: timeout setting for this request. If one 23922 number provided, it will be total request 23923 timeout. It can also be a pair (tuple) of 23924 (connection, read) timeouts. 23925 :type _request_timeout: int, tuple(int, int), optional 23926 :param _request_auth: set to override the auth_settings for an a single 23927 request; this effectively ignores the 23928 authentication in the spec for a single request. 23929 :type _request_auth: dict, optional 23930 :param _content_type: force content-type for the request. 23931 :type _content_type: str, Optional 23932 :param _headers: set to override the headers for a single 23933 request; this effectively ignores the headers 23934 in the spec for a single request. 23935 :type _headers: dict, optional 23936 :param _host_index: set to override the host_index for a single 23937 request; this effectively ignores the host_index 23938 in the spec for a single request. 23939 :type _host_index: int, optional 23940 :return: Returns the result object. 23941 """ # noqa: E501 23942 23943 _param = self._delete_tag_serialize( 23944 board_id=board_id, 23945 tag_id=tag_id, 23946 _request_auth=_request_auth, 23947 _content_type=_content_type, 23948 _headers=_headers, 23949 _host_index=_host_index, 23950 ) 23951 23952 _response_types_map: Dict[str, Optional[str]] = { 23953 "204": "object", 23954 "400": "GetTagsFromItem400Response", 23955 "404": "GetTagsFromItem400Response", 23956 "429": "GetTagsFromItem400Response", 23957 } 23958 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 23959 response_data.read() 23960 return self.api_client.response_deserialize( 23961 response_data=response_data, 23962 response_types_map=_response_types_map, 23963 ).data
Delete tag
Deletes the specified tag from the board. The tag is also removed from all cards and sticky notes on the board.
Note: Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: Attach tag to item, Remove tag from item, Update tag.
Required scope
boards:writeRate limiting
Level 1:param board_id: Unique identifier (ID) of the board where you want to delete a specific tag. (required) :type board_id: str :param tag_id: Unique identifier (ID) of the tag that you want to delete. (required) :type tag_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
24017 @validate_call 24018 def get_items_by_tag( 24019 self, 24020 board_id_platform_tags: Annotated[ 24021 StrictStr, 24022 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 24023 ], 24024 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to retrieve.")], 24025 limit: Optional[Annotated[str, Field(strict=True)]] = None, 24026 offset: Optional[StrictStr] = None, 24027 _request_timeout: Union[ 24028 None, 24029 Annotated[StrictFloat, Field(gt=0)], 24030 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24031 ] = None, 24032 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24033 _content_type: Optional[StrictStr] = None, 24034 _headers: Optional[Dict[StrictStr, Any]] = None, 24035 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24036 ) -> ItemPagedResponse: 24037 """Get items by tag 24038 24039 Retrieves all the items that have the specified tag.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24040 24041 :param board_id_platform_tags: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) 24042 :type board_id_platform_tags: str 24043 :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) 24044 :type tag_id: str 24045 :param limit: 24046 :type limit: str 24047 :param offset: 24048 :type offset: str 24049 :param _request_timeout: timeout setting for this request. If one 24050 number provided, it will be total request 24051 timeout. It can also be a pair (tuple) of 24052 (connection, read) timeouts. 24053 :type _request_timeout: int, tuple(int, int), optional 24054 :param _request_auth: set to override the auth_settings for an a single 24055 request; this effectively ignores the 24056 authentication in the spec for a single request. 24057 :type _request_auth: dict, optional 24058 :param _content_type: force content-type for the request. 24059 :type _content_type: str, Optional 24060 :param _headers: set to override the headers for a single 24061 request; this effectively ignores the headers 24062 in the spec for a single request. 24063 :type _headers: dict, optional 24064 :param _host_index: set to override the host_index for a single 24065 request; this effectively ignores the host_index 24066 in the spec for a single request. 24067 :type _host_index: int, optional 24068 :return: Returns the result object. 24069 """ # noqa: E501 24070 24071 _param = self._get_items_by_tag_serialize( 24072 board_id_platform_tags=board_id_platform_tags, 24073 tag_id=tag_id, 24074 limit=limit, 24075 offset=offset, 24076 _request_auth=_request_auth, 24077 _content_type=_content_type, 24078 _headers=_headers, 24079 _host_index=_host_index, 24080 ) 24081 24082 _response_types_map: Dict[str, Optional[str]] = { 24083 "200": "ItemPagedResponse", 24084 "400": "GetTagsFromItem400Response", 24085 "404": "GetTagsFromItem400Response", 24086 "429": "GetTagsFromItem400Response", 24087 } 24088 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24089 response_data.read() 24090 return self.api_client.response_deserialize( 24091 response_data=response_data, 24092 response_types_map=_response_types_map, 24093 ).data
Get items by tag
Retrieves all the items that have the specified tag.
Required scope
boards:readRate limiting
Level 1:param board_id_platform_tags: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) :type board_id_platform_tags: str :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) :type tag_id: str :param limit: :type limit: str :param offset: :type offset: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
24159 @validate_call 24160 def get_tag( 24161 self, 24162 board_id: Annotated[ 24163 StrictStr, 24164 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 24165 ], 24166 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to retrieve.")], 24167 _request_timeout: Union[ 24168 None, 24169 Annotated[StrictFloat, Field(gt=0)], 24170 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24171 ] = None, 24172 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24173 _content_type: Optional[StrictStr] = None, 24174 _headers: Optional[Dict[StrictStr, Any]] = None, 24175 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24176 ) -> TagWithLinks: 24177 """Get tag 24178 24179 Retrieves information for a specific tag.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24180 24181 :param board_id: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) 24182 :type board_id: str 24183 :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) 24184 :type tag_id: str 24185 :param _request_timeout: timeout setting for this request. If one 24186 number provided, it will be total request 24187 timeout. It can also be a pair (tuple) of 24188 (connection, read) timeouts. 24189 :type _request_timeout: int, tuple(int, int), optional 24190 :param _request_auth: set to override the auth_settings for an a single 24191 request; this effectively ignores the 24192 authentication in the spec for a single request. 24193 :type _request_auth: dict, optional 24194 :param _content_type: force content-type for the request. 24195 :type _content_type: str, Optional 24196 :param _headers: set to override the headers for a single 24197 request; this effectively ignores the headers 24198 in the spec for a single request. 24199 :type _headers: dict, optional 24200 :param _host_index: set to override the host_index for a single 24201 request; this effectively ignores the host_index 24202 in the spec for a single request. 24203 :type _host_index: int, optional 24204 :return: Returns the result object. 24205 """ # noqa: E501 24206 24207 _param = self._get_tag_serialize( 24208 board_id=board_id, 24209 tag_id=tag_id, 24210 _request_auth=_request_auth, 24211 _content_type=_content_type, 24212 _headers=_headers, 24213 _host_index=_host_index, 24214 ) 24215 24216 _response_types_map: Dict[str, Optional[str]] = { 24217 "200": "TagWithLinks", 24218 "400": "GetTagsFromItem400Response", 24219 "404": "GetTagsFromItem400Response", 24220 "429": "GetTagsFromItem400Response", 24221 } 24222 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24223 response_data.read() 24224 return self.api_client.response_deserialize( 24225 response_data=response_data, 24226 response_types_map=_response_types_map, 24227 ).data
Get tag
Retrieves information for a specific tag.
Required scope
boards:writeRate limiting
Level 1:param board_id: Unique identifier (ID) of the board where you want to retrieve a specific tag. (required) :type board_id: str :param tag_id: Unique identifier (ID) of the tag that you want to retrieve. (required) :type tag_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
24537 @validate_call 24538 def remove_tag_from_item( 24539 self, 24540 board_id_platform_tags: Annotated[ 24541 StrictStr, 24542 Field(description="Unique identifier (ID) of the board with the item that you want to remove a tag from."), 24543 ], 24544 item_id: Annotated[ 24545 StrictStr, Field(description="Unique identifier (ID) of the item that you want to remove the tag from.") 24546 ], 24547 tag_id: Annotated[ 24548 StrictStr, Field(description="Unique identifier (ID) of the tag that you want to remove from the item.") 24549 ], 24550 _request_timeout: Union[ 24551 None, 24552 Annotated[StrictFloat, Field(gt=0)], 24553 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24554 ] = None, 24555 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24556 _content_type: Optional[StrictStr] = None, 24557 _headers: Optional[Dict[StrictStr, Any]] = None, 24558 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24559 ) -> object: 24560 """Remove tag from item 24561 24562 Removes the specified tag from the specified item. The tag still exists on the board. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Update tag](https://developers.miro.com/reference/update-tag), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24563 24564 :param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to remove a tag from. (required) 24565 :type board_id_platform_tags: str 24566 :param item_id: Unique identifier (ID) of the item that you want to remove the tag from. (required) 24567 :type item_id: str 24568 :param tag_id: Unique identifier (ID) of the tag that you want to remove from the item. (required) 24569 :type tag_id: str 24570 :param _request_timeout: timeout setting for this request. If one 24571 number provided, it will be total request 24572 timeout. It can also be a pair (tuple) of 24573 (connection, read) timeouts. 24574 :type _request_timeout: int, tuple(int, int), optional 24575 :param _request_auth: set to override the auth_settings for an a single 24576 request; this effectively ignores the 24577 authentication in the spec for a single request. 24578 :type _request_auth: dict, optional 24579 :param _content_type: force content-type for the request. 24580 :type _content_type: str, Optional 24581 :param _headers: set to override the headers for a single 24582 request; this effectively ignores the headers 24583 in the spec for a single request. 24584 :type _headers: dict, optional 24585 :param _host_index: set to override the host_index for a single 24586 request; this effectively ignores the host_index 24587 in the spec for a single request. 24588 :type _host_index: int, optional 24589 :return: Returns the result object. 24590 """ # noqa: E501 24591 24592 _param = self._remove_tag_from_item_serialize( 24593 board_id_platform_tags=board_id_platform_tags, 24594 item_id=item_id, 24595 tag_id=tag_id, 24596 _request_auth=_request_auth, 24597 _content_type=_content_type, 24598 _headers=_headers, 24599 _host_index=_host_index, 24600 ) 24601 24602 _response_types_map: Dict[str, Optional[str]] = { 24603 "204": "object", 24604 "400": "GetTagsFromItem400Response", 24605 "404": "GetTagsFromItem400Response", 24606 "429": "GetTagsFromItem400Response", 24607 } 24608 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24609 response_data.read() 24610 return self.api_client.response_deserialize( 24611 response_data=response_data, 24612 response_types_map=_response_types_map, 24613 ).data
Remove tag from item
Removes the specified tag from the specified item. The tag still exists on the board.
Note: Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: Attach tag to item, Update tag, Delete tag.
Required scope
boards:writeRate limiting
Level 1:param board_id_platform_tags: Unique identifier (ID) of the board with the item that you want to remove a tag from. (required) :type board_id_platform_tags: str :param item_id: Unique identifier (ID) of the item that you want to remove the tag from. (required) :type item_id: str :param tag_id: Unique identifier (ID) of the tag that you want to remove from the item. (required) :type tag_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
24672 @validate_call 24673 def update_tag( 24674 self, 24675 board_id: Annotated[ 24676 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update a specific tag.") 24677 ], 24678 tag_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the tag that you want to update.")], 24679 tag_update_request: TagUpdateRequest, 24680 _request_timeout: Union[ 24681 None, 24682 Annotated[StrictFloat, Field(gt=0)], 24683 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24684 ] = None, 24685 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24686 _content_type: Optional[StrictStr] = None, 24687 _headers: Optional[Dict[StrictStr, Any]] = None, 24688 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24689 ) -> TagWithLinks: 24690 """Update tag 24691 24692 Updates a tag based on the data properties provided in the request body. <br><blockquote><strong>Note:</strong> Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: [Attach tag to item](https://developers.miro.com/reference/attach-tag-to-item), [Remove tag from item](https://developers.miro.com/reference/remove-tag-from-item), [Delete tag](https://developers.miro.com/reference/delete-tag).</blockquote><br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 24693 24694 :param board_id: Unique identifier (ID) of the board where you want to update a specific tag. (required) 24695 :type board_id: str 24696 :param tag_id: Unique identifier (ID) of the tag that you want to update. (required) 24697 :type tag_id: str 24698 :param tag_update_request: (required) 24699 :type tag_update_request: TagUpdateRequest 24700 :param _request_timeout: timeout setting for this request. If one 24701 number provided, it will be total request 24702 timeout. It can also be a pair (tuple) of 24703 (connection, read) timeouts. 24704 :type _request_timeout: int, tuple(int, int), optional 24705 :param _request_auth: set to override the auth_settings for an a single 24706 request; this effectively ignores the 24707 authentication in the spec for a single request. 24708 :type _request_auth: dict, optional 24709 :param _content_type: force content-type for the request. 24710 :type _content_type: str, Optional 24711 :param _headers: set to override the headers for a single 24712 request; this effectively ignores the headers 24713 in the spec for a single request. 24714 :type _headers: dict, optional 24715 :param _host_index: set to override the host_index for a single 24716 request; this effectively ignores the host_index 24717 in the spec for a single request. 24718 :type _host_index: int, optional 24719 :return: Returns the result object. 24720 """ # noqa: E501 24721 24722 _param = self._update_tag_serialize( 24723 board_id=board_id, 24724 tag_id=tag_id, 24725 tag_update_request=tag_update_request, 24726 _request_auth=_request_auth, 24727 _content_type=_content_type, 24728 _headers=_headers, 24729 _host_index=_host_index, 24730 ) 24731 24732 _response_types_map: Dict[str, Optional[str]] = { 24733 "200": "TagWithLinks", 24734 "400": "GetTagsFromItem400Response", 24735 "404": "GetTagsFromItem400Response", 24736 "429": "GetTagsFromItem400Response", 24737 } 24738 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24739 response_data.read() 24740 return self.api_client.response_deserialize( 24741 response_data=response_data, 24742 response_types_map=_response_types_map, 24743 ).data
Update tag
Updates a tag based on the data properties provided in the request body.
Note: Updates to tags made via the REST API will not be reflected on the board in realtime. To see REST API updates to tags on a board, you need to refresh the board. This applies to the following endpoints: Attach tag to item, Remove tag from item, Delete tag.
Required scope
boards:writeRate limiting
Level 1:param board_id: Unique identifier (ID) of the board where you want to update a specific tag. (required) :type board_id: str :param tag_id: Unique identifier (ID) of the tag that you want to update. (required) :type tag_id: str :param tag_update_request: (required) :type tag_update_request: TagUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
24808 @validate_call 24809 def create_text_item( 24810 self, 24811 board_id: Annotated[ 24812 StrictStr, Field(description="Unique identifier (ID) of the board where you want to create the item.") 24813 ], 24814 text_create_request: TextCreateRequest, 24815 _request_timeout: Union[ 24816 None, 24817 Annotated[StrictFloat, Field(gt=0)], 24818 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24819 ] = None, 24820 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24821 _content_type: Optional[StrictStr] = None, 24822 _headers: Optional[Dict[StrictStr, Any]] = None, 24823 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24824 ) -> TextItem: 24825 """Create text item 24826 24827 Adds a text item to a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 24828 24829 :param board_id: Unique identifier (ID) of the board where you want to create the item. (required) 24830 :type board_id: str 24831 :param text_create_request: (required) 24832 :type text_create_request: TextCreateRequest 24833 :param _request_timeout: timeout setting for this request. If one 24834 number provided, it will be total request 24835 timeout. It can also be a pair (tuple) of 24836 (connection, read) timeouts. 24837 :type _request_timeout: int, tuple(int, int), optional 24838 :param _request_auth: set to override the auth_settings for an a single 24839 request; this effectively ignores the 24840 authentication in the spec for a single request. 24841 :type _request_auth: dict, optional 24842 :param _content_type: force content-type for the request. 24843 :type _content_type: str, Optional 24844 :param _headers: set to override the headers for a single 24845 request; this effectively ignores the headers 24846 in the spec for a single request. 24847 :type _headers: dict, optional 24848 :param _host_index: set to override the host_index for a single 24849 request; this effectively ignores the host_index 24850 in the spec for a single request. 24851 :type _host_index: int, optional 24852 :return: Returns the result object. 24853 """ # noqa: E501 24854 24855 _param = self._create_text_item_serialize( 24856 board_id=board_id, 24857 text_create_request=text_create_request, 24858 _request_auth=_request_auth, 24859 _content_type=_content_type, 24860 _headers=_headers, 24861 _host_index=_host_index, 24862 ) 24863 24864 _response_types_map: Dict[str, Optional[str]] = { 24865 "201": "TextItem", 24866 "400": None, 24867 "404": None, 24868 "429": None, 24869 } 24870 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 24871 response_data.read() 24872 return self.api_client.response_deserialize( 24873 response_data=response_data, 24874 response_types_map=_response_types_map, 24875 ).data
Create text item
Adds a text item to a board.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to create the item. (required) :type board_id: str :param text_create_request: (required) :type text_create_request: TextCreateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
24937 @validate_call 24938 def delete_text_item( 24939 self, 24940 board_id: Annotated[ 24941 StrictStr, Field(description="Unique identifier (ID) of the board from which you want to delete the item.") 24942 ], 24943 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to delete.")], 24944 _request_timeout: Union[ 24945 None, 24946 Annotated[StrictFloat, Field(gt=0)], 24947 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 24948 ] = None, 24949 _request_auth: Optional[Dict[StrictStr, Any]] = None, 24950 _content_type: Optional[StrictStr] = None, 24951 _headers: Optional[Dict[StrictStr, Any]] = None, 24952 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 24953 ) -> object: 24954 """Delete text item 24955 24956 Deletes a text item from the board<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 3</a><br/> 24957 24958 :param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) 24959 :type board_id: str 24960 :param item_id: Unique identifier (ID) of the item that you want to delete. (required) 24961 :type item_id: str 24962 :param _request_timeout: timeout setting for this request. If one 24963 number provided, it will be total request 24964 timeout. It can also be a pair (tuple) of 24965 (connection, read) timeouts. 24966 :type _request_timeout: int, tuple(int, int), optional 24967 :param _request_auth: set to override the auth_settings for an a single 24968 request; this effectively ignores the 24969 authentication in the spec for a single request. 24970 :type _request_auth: dict, optional 24971 :param _content_type: force content-type for the request. 24972 :type _content_type: str, Optional 24973 :param _headers: set to override the headers for a single 24974 request; this effectively ignores the headers 24975 in the spec for a single request. 24976 :type _headers: dict, optional 24977 :param _host_index: set to override the host_index for a single 24978 request; this effectively ignores the host_index 24979 in the spec for a single request. 24980 :type _host_index: int, optional 24981 :return: Returns the result object. 24982 """ # noqa: E501 24983 24984 _param = self._delete_text_item_serialize( 24985 board_id=board_id, 24986 item_id=item_id, 24987 _request_auth=_request_auth, 24988 _content_type=_content_type, 24989 _headers=_headers, 24990 _host_index=_host_index, 24991 ) 24992 24993 _response_types_map: Dict[str, Optional[str]] = { 24994 "204": "object", 24995 "400": None, 24996 "404": None, 24997 "429": None, 24998 } 24999 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25000 response_data.read() 25001 return self.api_client.response_deserialize( 25002 response_data=response_data, 25003 response_types_map=_response_types_map, 25004 ).data
Delete text item
Deletes a text item from the board
Required scope
boards:writeRate limiting
Level 3:param board_id: Unique identifier (ID) of the board from which you want to delete the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to delete. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
25058 @validate_call 25059 def get_text_item( 25060 self, 25061 board_id: Annotated[ 25062 StrictStr, 25063 Field(description="Unique identifier (ID) of the board from which you want to retrieve a specific item."), 25064 ], 25065 item_id: Annotated[ 25066 StrictStr, Field(description="Unique identifier (ID) of the item that you want to retrieve.") 25067 ], 25068 _request_timeout: Union[ 25069 None, 25070 Annotated[StrictFloat, Field(gt=0)], 25071 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25072 ] = None, 25073 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25074 _content_type: Optional[StrictStr] = None, 25075 _headers: Optional[Dict[StrictStr, Any]] = None, 25076 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25077 ) -> TextItem: 25078 """Get text item 25079 25080 Retrieves information for a specific text item on a board.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 1</a><br/> 25081 25082 :param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) 25083 :type board_id: str 25084 :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) 25085 :type item_id: str 25086 :param _request_timeout: timeout setting for this request. If one 25087 number provided, it will be total request 25088 timeout. It can also be a pair (tuple) of 25089 (connection, read) timeouts. 25090 :type _request_timeout: int, tuple(int, int), optional 25091 :param _request_auth: set to override the auth_settings for an a single 25092 request; this effectively ignores the 25093 authentication in the spec for a single request. 25094 :type _request_auth: dict, optional 25095 :param _content_type: force content-type for the request. 25096 :type _content_type: str, Optional 25097 :param _headers: set to override the headers for a single 25098 request; this effectively ignores the headers 25099 in the spec for a single request. 25100 :type _headers: dict, optional 25101 :param _host_index: set to override the host_index for a single 25102 request; this effectively ignores the host_index 25103 in the spec for a single request. 25104 :type _host_index: int, optional 25105 :return: Returns the result object. 25106 """ # noqa: E501 25107 25108 _param = self._get_text_item_serialize( 25109 board_id=board_id, 25110 item_id=item_id, 25111 _request_auth=_request_auth, 25112 _content_type=_content_type, 25113 _headers=_headers, 25114 _host_index=_host_index, 25115 ) 25116 25117 _response_types_map: Dict[str, Optional[str]] = { 25118 "200": "TextItem", 25119 "400": None, 25120 "404": None, 25121 "429": None, 25122 } 25123 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25124 response_data.read() 25125 return self.api_client.response_deserialize( 25126 response_data=response_data, 25127 response_types_map=_response_types_map, 25128 ).data
Get text item
Retrieves information for a specific text item on a board.
Required scope
boards:readRate limiting
Level 1:param board_id: Unique identifier (ID) of the board from which you want to retrieve a specific item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to retrieve. (required) :type item_id: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
25182 @validate_call 25183 def update_text_item( 25184 self, 25185 board_id: Annotated[ 25186 StrictStr, Field(description="Unique identifier (ID) of the board where you want to update the item.") 25187 ], 25188 item_id: Annotated[StrictStr, Field(description="Unique identifier (ID) of the item that you want to update.")], 25189 text_update_request: TextUpdateRequest, 25190 _request_timeout: Union[ 25191 None, 25192 Annotated[StrictFloat, Field(gt=0)], 25193 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25194 ] = None, 25195 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25196 _content_type: Optional[StrictStr] = None, 25197 _headers: Optional[Dict[StrictStr, Any]] = None, 25198 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25199 ) -> TextItem: 25200 """Update text item 25201 25202 Updates a text item on a board based on the data and style properties provided in the request body.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:write</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/reference/rate-limiting#rate-limit-tiers\">Level 2</a><br/> 25203 25204 :param board_id: Unique identifier (ID) of the board where you want to update the item. (required) 25205 :type board_id: str 25206 :param item_id: Unique identifier (ID) of the item that you want to update. (required) 25207 :type item_id: str 25208 :param text_update_request: (required) 25209 :type text_update_request: TextUpdateRequest 25210 :param _request_timeout: timeout setting for this request. If one 25211 number provided, it will be total request 25212 timeout. It can also be a pair (tuple) of 25213 (connection, read) timeouts. 25214 :type _request_timeout: int, tuple(int, int), optional 25215 :param _request_auth: set to override the auth_settings for an a single 25216 request; this effectively ignores the 25217 authentication in the spec for a single request. 25218 :type _request_auth: dict, optional 25219 :param _content_type: force content-type for the request. 25220 :type _content_type: str, Optional 25221 :param _headers: set to override the headers for a single 25222 request; this effectively ignores the headers 25223 in the spec for a single request. 25224 :type _headers: dict, optional 25225 :param _host_index: set to override the host_index for a single 25226 request; this effectively ignores the host_index 25227 in the spec for a single request. 25228 :type _host_index: int, optional 25229 :return: Returns the result object. 25230 """ # noqa: E501 25231 25232 _param = self._update_text_item_serialize( 25233 board_id=board_id, 25234 item_id=item_id, 25235 text_update_request=text_update_request, 25236 _request_auth=_request_auth, 25237 _content_type=_content_type, 25238 _headers=_headers, 25239 _host_index=_host_index, 25240 ) 25241 25242 _response_types_map: Dict[str, Optional[str]] = { 25243 "200": "TextItem", 25244 "400": None, 25245 "404": None, 25246 "409": None, 25247 "429": None, 25248 } 25249 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25250 response_data.read() 25251 return self.api_client.response_deserialize( 25252 response_data=response_data, 25253 response_types_map=_response_types_map, 25254 ).data
Update text item
Updates a text item on a board based on the data and style properties provided in the request body.
Required scope
boards:writeRate limiting
Level 2:param board_id: Unique identifier (ID) of the board where you want to update the item. (required) :type board_id: str :param item_id: Unique identifier (ID) of the item that you want to update. (required) :type item_id: str :param text_update_request: (required) :type text_update_request: TextUpdateRequest :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
25319 @validate_call 25320 def revoke_token( 25321 self, 25322 access_token: Annotated[StrictStr, Field(description="Access token that you want to revoke")], 25323 _request_timeout: Union[ 25324 None, 25325 Annotated[StrictFloat, Field(gt=0)], 25326 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25327 ] = None, 25328 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25329 _content_type: Optional[StrictStr] = None, 25330 _headers: Optional[Dict[StrictStr, Any]] = None, 25331 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25332 ) -> None: 25333 """(Deprecated) Revoke token (v1) 25334 25335 <p><b>Please use the new revoke endpoint <code>/v2/oauth/revoke</code>. This endpoint is considered vulnerable and deprecated due to access token passed publicly in the URL.</b></p> Revoke the current access token. Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user. 25336 25337 :param access_token: Access token that you want to revoke (required) 25338 :type access_token: str 25339 :param _request_timeout: timeout setting for this request. If one 25340 number provided, it will be total request 25341 timeout. It can also be a pair (tuple) of 25342 (connection, read) timeouts. 25343 :type _request_timeout: int, tuple(int, int), optional 25344 :param _request_auth: set to override the auth_settings for an a single 25345 request; this effectively ignores the 25346 authentication in the spec for a single request. 25347 :type _request_auth: dict, optional 25348 :param _content_type: force content-type for the request. 25349 :type _content_type: str, Optional 25350 :param _headers: set to override the headers for a single 25351 request; this effectively ignores the headers 25352 in the spec for a single request. 25353 :type _headers: dict, optional 25354 :param _host_index: set to override the host_index for a single 25355 request; this effectively ignores the host_index 25356 in the spec for a single request. 25357 :type _host_index: int, optional 25358 :return: Returns the result object. 25359 """ # noqa: E501 25360 warnings.warn("POST /v1/oauth/revoke is deprecated.", DeprecationWarning) 25361 25362 _param = self._revoke_token_serialize( 25363 access_token=access_token, 25364 _request_auth=_request_auth, 25365 _content_type=_content_type, 25366 _headers=_headers, 25367 _host_index=_host_index, 25368 ) 25369 25370 _response_types_map: Dict[str, Optional[str]] = { 25371 "204": None, 25372 "400": None, 25373 } 25374 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25375 response_data.read() 25376 return self.api_client.response_deserialize( 25377 response_data=response_data, 25378 response_types_map=_response_types_map, 25379 ).data
(Deprecated) Revoke token (v1)
Please use the new revoke endpoint /v2/oauth/revoke. This endpoint is considered vulnerable and deprecated due to access token passed publicly in the URL.
:param access_token: Access token that you want to revoke (required) :type access_token: str :param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.
25429 @validate_call 25430 def token_info( 25431 self, 25432 _request_timeout: Union[ 25433 None, 25434 Annotated[StrictFloat, Field(gt=0)], 25435 Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 25436 ] = None, 25437 _request_auth: Optional[Dict[StrictStr, Any]] = None, 25438 _content_type: Optional[StrictStr] = None, 25439 _headers: Optional[Dict[StrictStr, Any]] = None, 25440 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 25441 ) -> TokenInformation: 25442 """Get access token information 25443 25444 Get information about an access token, such as the token type, scopes, team, user, token creation date and time, and the user who created the token. 25445 25446 :param _request_timeout: timeout setting for this request. If one 25447 number provided, it will be total request 25448 timeout. It can also be a pair (tuple) of 25449 (connection, read) timeouts. 25450 :type _request_timeout: int, tuple(int, int), optional 25451 :param _request_auth: set to override the auth_settings for an a single 25452 request; this effectively ignores the 25453 authentication in the spec for a single request. 25454 :type _request_auth: dict, optional 25455 :param _content_type: force content-type for the request. 25456 :type _content_type: str, Optional 25457 :param _headers: set to override the headers for a single 25458 request; this effectively ignores the headers 25459 in the spec for a single request. 25460 :type _headers: dict, optional 25461 :param _host_index: set to override the host_index for a single 25462 request; this effectively ignores the host_index 25463 in the spec for a single request. 25464 :type _host_index: int, optional 25465 :return: Returns the result object. 25466 """ # noqa: E501 25467 25468 _param = self._token_info_serialize( 25469 _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index 25470 ) 25471 25472 _response_types_map: Dict[str, Optional[str]] = { 25473 "200": "TokenInformation", 25474 "400": None, 25475 } 25476 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 25477 response_data.read() 25478 return self.api_client.response_deserialize( 25479 response_data=response_data, 25480 response_types_map=_response_types_map, 25481 ).data
Get access token information
Get information about an access token, such as the token type, scopes, team, user, token creation date and time, and the user who created the token.
:param _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. :type _request_timeout: int, tuple(int, int), optional :param _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. :type _request_auth: dict, optional :param _content_type: force content-type for the request. :type _content_type: str, Optional :param _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request. :type _headers: dict, optional :param _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. :type _host_index: int, optional :return: Returns the result object.