datadog_api_client 2.9.0 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/conftest.py +5 -24
- data/.generator/poetry.lock +164 -189
- data/.generator/schemas/v1/openapi.yaml +901 -30
- data/.generator/schemas/v2/openapi.yaml +3810 -1428
- data/.generator/src/generator/formatter.py +1 -1
- data/.generator/src/generator/openapi.py +2 -1
- data/.generator/src/generator/templates/api_client.j2 +2 -2
- data/.generator/src/generator/templates/example.j2 +1 -1
- data/.generator/src/generator/templates/model_oneof.j2 +1 -1
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/test_integration.yml +3 -3
- data/CHANGELOG.md +36 -0
- data/README.md +1 -1
- data/examples/v1/dashboard-lists/CreateDashboardList.rb +1 -1
- data/examples/v1/dashboard-lists/UpdateDashboardList.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1024858348.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1039800684.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_109450134.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1094917386.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1177423752.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1200099236.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1213075383.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1307120899.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1423904722.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1442588603.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_145494973.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_173805046.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_1738608750.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2029850837.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2034634967.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2064651578.rb +64 -0
- data/examples/v1/dashboards/CreateDashboard_2104498738.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2308247857.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2316374332.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2336428357.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2338918735.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2342457693.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2349863258.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2432046716.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2490110261.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_252716965.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2607944105.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2610827685.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2634813877.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2644712913.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2652180930.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2705593938.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2800096921.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2843286292.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2917274132.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_2921337351.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_3117424216.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_3195475781.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_3250131584.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_3882428227.rb +2 -2
- data/examples/v1/dashboards/CreateDashboard_3982498788.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_4026341408.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_4076476470.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_41622531.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_417992286.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_578885732.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_651038379.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_765140092.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_798168180.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_803346562.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_913313564.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_915214113.rb +1 -1
- data/examples/v1/dashboards/CreateDashboard_927141680.rb +1 -1
- data/examples/v1/dashboards/CreatePublicDashboard.rb +17 -0
- data/examples/v1/dashboards/DeletePublicDashboard.rb +5 -0
- data/examples/v1/dashboards/DeletePublicDashboardInvitation.rb +16 -0
- data/examples/v1/dashboards/GetPublicDashboard.rb +8 -0
- data/examples/v1/dashboards/GetPublicDashboardInvitations.rb +8 -0
- data/examples/v1/dashboards/SendPublicDashboardInvitation.rb +17 -0
- data/examples/v1/dashboards/UpdateDashboard.rb +1 -1
- data/examples/v1/dashboards/UpdateDashboard_3454865944.rb +40 -0
- data/examples/v1/dashboards/UpdatePublicDashboard.rb +16 -0
- data/examples/v1/downtimes/CreateDowntime.rb +2 -2
- data/examples/v1/downtimes/CreateDowntime_1393233946.rb +1 -1
- data/examples/v1/downtimes/CreateDowntime_2908359488.rb +1 -1
- data/examples/v1/downtimes/CreateDowntime_3059354445.rb +1 -1
- data/examples/v1/downtimes/CreateDowntime_3355644446.rb +2 -2
- data/examples/v1/downtimes/ListDowntimes.rb +4 -1
- data/examples/v1/downtimes/UpdateDowntime.rb +1 -1
- data/examples/v1/events/CreateEvent.rb +2 -2
- data/examples/v1/events/CreateEvent_19927815.rb +2 -2
- data/examples/v1/logs/SubmitLog.rb +2 -2
- data/examples/v1/logs/SubmitLog_1920474053.rb +2 -2
- data/examples/v1/logs/SubmitLog_3418823904.rb +2 -2
- data/examples/v1/metrics/SubmitMetrics.rb +1 -1
- data/examples/v1/metrics/SubmitMetrics_2203981258.rb +1 -1
- data/examples/v1/monitors/CreateMonitor.rb +2 -2
- data/examples/v1/monitors/CreateMonitor_1969035628.rb +2 -2
- data/examples/v1/monitors/CreateMonitor_2012680290.rb +1 -1
- data/examples/v1/monitors/CreateMonitor_2520912138.rb +2 -2
- data/examples/v1/monitors/CreateMonitor_3790803616.rb +2 -2
- data/examples/v1/monitors/CreateMonitor_3824294658.rb +2 -2
- data/examples/v1/monitors/CreateMonitor_3883669300.rb +2 -2
- data/examples/v1/monitors/CreateMonitor_440013737.rb +2 -2
- data/examples/v1/monitors/ListMonitors_3448441939.rb +1 -1
- data/examples/v1/monitors/ValidateExistingMonitor.rb +2 -2
- data/examples/v1/monitors/ValidateMonitor.rb +2 -2
- data/examples/v1/monitors/ValidateMonitor_4247196452.rb +2 -2
- data/examples/v1/notebooks/CreateNotebook.rb +1 -1
- data/examples/v1/notebooks/UpdateNotebook.rb +1 -1
- data/examples/v1/service-checks/SubmitServiceCheck.rb +1 -1
- data/examples/v1/service-level-objective-corrections/CreateSLOCorrection.rb +1 -1
- data/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.rb +1 -1
- data/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb +1 -1
- data/examples/v1/service-level-objectives/CreateSLO.rb +1 -1
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +1 -1
- data/examples/v1/synthetics/CreatePrivateLocation.rb +3 -3
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +3 -3
- data/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.rb +3 -3
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +1 -1
- data/examples/v1/synthetics/UpdateAPITest.rb +2 -2
- data/examples/v1/webhooks-integration/CreateWebhooksIntegration.rb +1 -1
- data/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.rb +1 -1
- data/examples/v2/authn-mappings/CreateAuthNMapping.rb +2 -2
- data/examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb +1 -1
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +2 -2
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +1 -1
- data/examples/v2/confluent-cloud/CreateConfluentResource.rb +1 -1
- data/examples/v2/events/ListEvents.rb +1 -1
- data/examples/v2/events/ListEvents_1527584014.rb +1 -1
- data/examples/v2/events/ListEvents_2663715109.rb +1 -1
- data/examples/v2/events/SearchEvents.rb +1 -1
- data/examples/v2/events/SearchEvents_3856995058.rb +1 -1
- data/examples/v2/fastly-integration/CreateFastlyAccount.rb +2 -2
- data/examples/v2/incident-services/CreateIncidentService.rb +2 -2
- data/examples/v2/incident-services/DeleteIncidentService.rb +1 -1
- data/examples/v2/incident-services/GetIncidentService.rb +1 -1
- data/examples/v2/incident-services/ListIncidentServices.rb +1 -1
- data/examples/v2/incident-services/UpdateIncidentService.rb +1 -1
- data/examples/v2/incident-teams/CreateIncidentTeam.rb +2 -2
- data/examples/v2/incident-teams/DeleteIncidentTeam.rb +1 -1
- data/examples/v2/incident-teams/GetIncidentTeam.rb +1 -1
- data/examples/v2/incident-teams/ListIncidentTeams.rb +1 -1
- data/examples/v2/incident-teams/UpdateIncidentTeam.rb +1 -1
- data/examples/v2/incidents/CreateIncident.rb +2 -2
- data/examples/v2/incidents/CreateIncidentIntegration.rb +1 -1
- data/examples/v2/incidents/CreateIncidentTodo.rb +23 -0
- data/examples/v2/incidents/DeleteIncident.rb +1 -1
- data/examples/v2/incidents/DeleteIncidentIntegration.rb +1 -1
- data/examples/v2/incidents/DeleteIncidentTodo.rb +14 -0
- data/examples/v2/incidents/GetIncident.rb +1 -1
- data/examples/v2/incidents/GetIncidentIntegration.rb +1 -1
- data/examples/v2/incidents/GetIncidentTodo.rb +14 -0
- data/examples/v2/incidents/ListIncidentAttachments.rb +1 -1
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +1 -1
- data/examples/v2/incidents/ListIncidentIntegrations.rb +1 -1
- data/examples/v2/incidents/ListIncidentTodos.rb +11 -0
- data/examples/v2/incidents/ListIncidents.rb +1 -1
- data/examples/v2/incidents/ListIncidents_2665616954.rb +1 -1
- data/examples/v2/incidents/SearchIncidents.rb +1 -1
- data/examples/v2/incidents/SearchIncidents_1931679109.rb +11 -0
- data/examples/v2/incidents/UpdateIncident.rb +1 -1
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +1 -1
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +2 -2
- data/examples/v2/incidents/UpdateIncidentIntegration.rb +1 -1
- data/examples/v2/incidents/UpdateIncidentTodo.rb +28 -0
- data/examples/v2/incidents/UpdateIncident_1009194038.rb +1 -1
- data/examples/v2/incidents/UpdateIncident_3369341440.rb +1 -1
- data/examples/v2/ip-allowlist/UpdateIPAllowlist.rb +1 -1
- data/examples/v2/key-management/CreateAPIKey.rb +1 -1
- data/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.rb +1 -1
- data/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.rb +1 -1
- data/examples/v2/key-management/UpdateAPIKey.rb +1 -1
- data/examples/v2/logs/SubmitLog.rb +1 -1
- data/examples/v2/logs-metrics/CreateLogsMetric.rb +1 -1
- data/examples/v2/logs-metrics/DeleteLogsMetric.rb +1 -1
- data/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.rb +1 -1
- data/examples/v2/metrics/CreateTagConfiguration.rb +2 -2
- data/examples/v2/metrics/DeleteTagConfiguration.rb +1 -1
- data/examples/v2/metrics/ListActiveMetricConfigurations.rb +1 -1
- data/examples/v2/metrics/ListTagConfigurations_265033704.rb +1 -1
- data/examples/v2/metrics/ListVolumesByMetricName.rb +1 -1
- data/examples/v2/metrics/QueryScalarData.rb +1 -1
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +1 -1
- data/examples/v2/metrics/QueryTimeseriesData.rb +1 -1
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +1 -1
- data/examples/v2/opsgenie-integration/CreateOpsgenieService.rb +1 -1
- data/examples/v2/roles/CloneRole.rb +1 -1
- data/examples/v2/roles/CreateRole.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityFilter.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +1 -1
- data/examples/v2/security-monitoring/UpdateSecurityFilter.rb +2 -2
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +1 -1
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.rb +1 -1
- data/examples/v2/sensitive-data-scanner/CreateScanningGroup.rb +1 -1
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +1 -1
- data/examples/v2/sensitive-data-scanner/UpdateScanningGroup.rb +1 -1
- data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +1 -1
- data/examples/v2/service-accounts/CreateServiceAccount.rb +1 -1
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.rb +1 -1
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.rb +1 -1
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +19 -27
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_1808735248.rb +54 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2619874414.rb +53 -0
- data/examples/v2/service-definition/ListServiceDefinitions_336468013.rb +8 -0
- data/examples/v2/spans-metrics/CreateSpansMetric.rb +28 -0
- data/examples/v2/spans-metrics/DeleteSpansMetric.rb +8 -0
- data/examples/v2/spans-metrics/GetSpansMetric.rb +8 -0
- data/examples/v2/spans-metrics/ListSpansMetrics.rb +5 -0
- data/examples/v2/spans-metrics/UpdateSpansMetric.rb +29 -0
- data/examples/v2/teams/CreateTeam.rb +20 -0
- data/examples/v2/teams/CreateTeamLink.rb +19 -0
- data/examples/v2/teams/CreateTeamMembership.rb +22 -0
- data/examples/v2/teams/DeleteTeam.rb +8 -0
- data/examples/v2/teams/DeleteTeamLink.rb +11 -0
- data/examples/v2/teams/DeleteTeamMembership.rb +8 -0
- data/examples/v2/teams/GetTeam.rb +8 -0
- data/examples/v2/teams/GetTeamLink.rb +11 -0
- data/examples/v2/teams/GetTeamLinks.rb +8 -0
- data/examples/v2/teams/GetTeamMemberships.rb +8 -0
- data/examples/v2/teams/GetTeamPermissionSettings.rb +8 -0
- data/examples/v2/teams/ListTeams.rb +5 -0
- data/examples/v2/teams/UpdateTeam.rb +20 -0
- data/examples/v2/teams/UpdateTeamLink.rb +21 -0
- data/examples/v2/teams/UpdateTeamMembership.rb +14 -0
- data/examples/v2/teams/UpdateTeamPermissionSetting.rb +17 -0
- data/examples/v2/users/CreateUser.rb +1 -1
- data/lib/datadog_api_client/api_client.rb +2 -2
- data/lib/datadog_api_client/configuration.rb +10 -0
- data/lib/datadog_api_client/inflector.rb +126 -0
- data/lib/datadog_api_client/v1/api/dashboards_api.rb +482 -0
- data/lib/datadog_api_client/v1/api/downtimes_api.rb +2 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +3 -3
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +2 -2
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +9 -6
- data/lib/datadog_api_client/v1/models/check_can_delete_monitor_response.rb +8 -0
- data/lib/datadog_api_client/v1/models/dashboard.rb +25 -1
- data/lib/datadog_api_client/v1/models/dashboard_global_time.rb +91 -0
- data/lib/datadog_api_client/v1/models/dashboard_global_time_live_span.rb +33 -0
- data/lib/datadog_api_client/v1/models/dashboard_invite_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/dashboard_share_type.rb +27 -0
- data/lib/datadog_api_client/v1/models/dashboard_type.rb +27 -0
- data/lib/datadog_api_client/v1/models/delete_shared_dashboard_response.rb +91 -0
- data/lib/datadog_api_client/v1/models/distribution_point_item.rb +1 -1
- data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_query.rb +1 -1
- data/lib/datadog_api_client/v1/models/downtime.rb +1 -0
- data/lib/datadog_api_client/v1/models/downtime_child.rb +1 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +1 -1
- data/lib/datadog_api_client/v1/models/host.rb +8 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +19 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/logs_list_response.rb +8 -0
- data/lib/datadog_api_client/v1/models/logs_processor.rb +1 -1
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +2 -2
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb +1 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +19 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +46 -6
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_response_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_time.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_global_time.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_update_cell.rb +1 -1
- data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +131 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard.rb +228 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_author.rb +109 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_invites.rb +112 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_invites_data.rb +63 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object.rb +123 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object_attributes.rb +149 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta.rb +91 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta_page.rb +91 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb +147 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_update_request_global_time.rb +91 -0
- data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +3 -0
- data/lib/datadog_api_client/v1/models/slo_creator.rb +8 -0
- data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +8 -0
- data/lib/datadog_api_client/v1/models/slo_history_response.rb +8 -0
- data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +9 -0
- data/lib/datadog_api_client/v1/models/sunburst_widget_legend.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +8 -0
- data/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +7 -7
- data/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb +11 -0
- data/lib/datadog_api_client/v1/models/usage_cws_hour.rb +9 -0
- data/lib/datadog_api_client/v1/models/usage_dbm_hour.rb +9 -0
- data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -0
- data/lib/datadog_api_client/v1/models/usage_host_hour.rb +22 -0
- data/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb +8 -0
- data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +9 -0
- data/lib/datadog_api_client/v1/models/usage_logs_hour.rb +26 -1
- data/lib/datadog_api_client/v1/models/usage_online_archive_hour.rb +8 -0
- data/lib/datadog_api_client/v1/models/usage_profiling_hour.rb +9 -0
- data/lib/datadog_api_client/v1/models/usage_rum_units_hour.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_snmp_hour.rb +8 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_synthetics_api_hour.rb +8 -0
- data/lib/datadog_api_client/v1/models/usage_synthetics_browser_hour.rb +8 -0
- data/lib/datadog_api_client/v1/models/usage_top_avg_metrics_pagination.rb +1 -0
- data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -1
- data/lib/datadog_api_client/v2/api/incidents_api.rb +409 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +9 -0
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +25 -0
- data/lib/datadog_api_client/v2/api/spans_metrics_api.rb +357 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +1166 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/models/api_key_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/application_key_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_group_by_missing.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_group_by_total.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb +9 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb +8 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb +8 -0
- data/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/creator.rb +8 -0
- data/lib/datadog_api_client/v2/models/dashboard_list_item.rb +8 -0
- data/lib/datadog_api_client/v2/models/get_team_memberships_sort.rb +33 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_field_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_search_response.rb +14 -4
- data/lib/datadog_api_client/v2/models/incident_search_response_meta.rb +91 -0
- data/lib/datadog_api_client/v2/models/incident_service_included_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_team_included_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_timeline_cell_create_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_todo_anonymous_assignee.rb +165 -0
- data/lib/datadog_api_client/v2/models/incident_todo_anonymous_assignee_source.rb +27 -0
- data/lib/datadog_api_client/v2/models/incident_todo_assignee.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +164 -0
- data/lib/datadog_api_client/v2/models/incident_todo_create_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_todo_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/incident_todo_list_response.rb +126 -0
- data/lib/datadog_api_client/v2/models/incident_todo_patch_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_todo_patch_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/incident_todo_response.rb +114 -0
- data/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/incident_todo_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_todo_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/list_teams_include.rb +27 -0
- data/lib/datadog_api_client/v2/models/list_teams_sort.rb +29 -0
- data/lib/datadog_api_client/v2/models/logs_aggregate_bucket_value.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_archive_create_request_destination.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_archive_destination.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_group_by_missing.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_group_by_total.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_volumes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/relationship_to_team_link_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_team_links.rb +93 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb +91 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_permission_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_user.rb +102 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_user_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/rum_aggregate_bucket_value.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_group_by_missing.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_group_by_total.rb +1 -1
- data/lib/datadog_api_client/v2/models/scalar_column.rb +1 -1
- data/lib/datadog_api_client/v2/models/scalar_query.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb +8 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/service_definition_schema.rb +3 -2
- data/lib/datadog_api_client/v2/models/service_definition_v2_contact.rb +3 -2
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1.rb +229 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_contact.rb +64 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_email.rb +133 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_email_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_integrations.rb +101 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_link.rb +154 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_link_type.rb +30 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_ms_teams.rb +133 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_ms_teams_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_opsgenie.rb +112 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_opsgenie_region.rb +27 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_pagerduty.rb +91 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_slack.rb +133 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_slack_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot1_version.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_ms_teams.rb +133 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_ms_teams_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definitions_create_request.rb +2 -1
- data/lib/datadog_api_client/v2/models/spans_metric_compute.rb +123 -0
- data/lib/datadog_api_client/v2/models/spans_metric_compute_aggregation_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/spans_metric_create_attributes.rb +124 -0
- data/lib/datadog_api_client/v2/models/spans_metric_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/spans_metric_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/spans_metric_filter.rb +91 -0
- data/lib/datadog_api_client/v2/models/spans_metric_group_by.rb +112 -0
- data/lib/datadog_api_client/v2/models/spans_metric_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/spans_metric_response_attributes.rb +113 -0
- data/lib/datadog_api_client/v2/models/spans_metric_response_compute.rb +112 -0
- data/lib/datadog_api_client/v2/models/spans_metric_response_data.rb +111 -0
- data/lib/datadog_api_client/v2/models/spans_metric_response_filter.rb +91 -0
- data/lib/datadog_api_client/v2/models/spans_metric_response_group_by.rb +101 -0
- data/lib/datadog_api_client/v2/models/spans_metric_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/spans_metric_update_attributes.rb +113 -0
- data/lib/datadog_api_client/v2/models/spans_metric_update_compute.rb +92 -0
- data/lib/datadog_api_client/v2/models/spans_metric_update_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/spans_metric_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/spans_metrics_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/team.rb +154 -0
- data/lib/datadog_api_client/v2/models/team_attributes.rb +233 -0
- data/lib/datadog_api_client/v2/models/team_create.rb +133 -0
- data/lib/datadog_api_client/v2/models/team_create_attributes.rb +162 -0
- data/lib/datadog_api_client/v2/models/team_create_relationships.rb +91 -0
- data/lib/datadog_api_client/v2/models/team_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/team_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_included.rb +64 -0
- data/lib/datadog_api_client/v2/models/team_link.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_link_attributes.rb +158 -0
- data/lib/datadog_api_client/v2/models/team_link_create.rb +123 -0
- data/lib/datadog_api_client/v2/models/team_link_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/team_link_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/team_link_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_links_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting.rb +133 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_serializer_action.rb +27 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_update.rb +112 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_update_attributes.rb +91 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/team_permission_setting_value.rb +30 -0
- data/lib/datadog_api_client/v2/models/team_permission_settings_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/team_relationships.rb +101 -0
- data/lib/datadog_api_client/v2/models/team_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/team_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_update.rb +133 -0
- data/lib/datadog_api_client/v2/models/team_update_attributes.rb +187 -0
- data/lib/datadog_api_client/v2/models/team_update_relationships.rb +91 -0
- data/lib/datadog_api_client/v2/models/team_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/teams_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/timeseries_query.rb +1 -1
- data/lib/datadog_api_client/v2/models/user_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/user_team.rb +143 -0
- data/lib/datadog_api_client/v2/models/user_team_attributes.rb +99 -0
- data/lib/datadog_api_client/v2/models/user_team_create.rb +122 -0
- data/lib/datadog_api_client/v2/models/user_team_permission.rb +133 -0
- data/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb +91 -0
- data/lib/datadog_api_client/v2/models/user_team_permission_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_team_relationships.rb +91 -0
- data/lib/datadog_api_client/v2/models/user_team_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/user_team_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/user_team_role.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_team_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_team_update.rb +112 -0
- data/lib/datadog_api_client/v2/models/user_team_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/user_team_user_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_teams_response.rb +93 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +167 -2
@@ -0,0 +1,1166 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'cgi'
|
17
|
+
|
18
|
+
module DatadogAPIClient::V2
|
19
|
+
class TeamsAPI
|
20
|
+
attr_accessor :api_client
|
21
|
+
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
23
|
+
@api_client = api_client
|
24
|
+
end
|
25
|
+
|
26
|
+
# Create a team.
|
27
|
+
#
|
28
|
+
# @see #create_team_with_http_info
|
29
|
+
def create_team(body, opts = {})
|
30
|
+
data, _status_code, _headers = create_team_with_http_info(body, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a team.
|
35
|
+
#
|
36
|
+
# Create a new team.
|
37
|
+
# User IDs passed through the `users` relationship field are added to the team.
|
38
|
+
#
|
39
|
+
# @param body [TeamCreateRequest]
|
40
|
+
# @param opts [Hash] the optional parameters
|
41
|
+
# @return [Array<(TeamResponse, Integer, Hash)>] TeamResponse data, response status code and response headers
|
42
|
+
def create_team_with_http_info(body, opts = {})
|
43
|
+
|
44
|
+
if @api_client.config.debugging
|
45
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.create_team ...'
|
46
|
+
end
|
47
|
+
# verify the required parameter 'body' is set
|
48
|
+
if @api_client.config.client_side_validation && body.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/api/v2/team'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'TeamResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :create_team,
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type,
|
84
|
+
:api_version => "V2"
|
85
|
+
)
|
86
|
+
|
87
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug "API called: TeamsAPI#create_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
|
+
end
|
91
|
+
return data, status_code, headers
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create a team link.
|
95
|
+
#
|
96
|
+
# @see #create_team_link_with_http_info
|
97
|
+
def create_team_link(team_id, body, opts = {})
|
98
|
+
data, _status_code, _headers = create_team_link_with_http_info(team_id, body, opts)
|
99
|
+
data
|
100
|
+
end
|
101
|
+
|
102
|
+
# Create a team link.
|
103
|
+
#
|
104
|
+
# Add a new link to a team.
|
105
|
+
#
|
106
|
+
# @param team_id [String] None
|
107
|
+
# @param body [TeamLinkCreateRequest]
|
108
|
+
# @param opts [Hash] the optional parameters
|
109
|
+
# @return [Array<(TeamLinkResponse, Integer, Hash)>] TeamLinkResponse data, response status code and response headers
|
110
|
+
def create_team_link_with_http_info(team_id, body, opts = {})
|
111
|
+
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_link ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'team_id' is set
|
116
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.create_team_link"
|
118
|
+
end
|
119
|
+
# verify the required parameter 'body' is set
|
120
|
+
if @api_client.config.client_side_validation && body.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_link"
|
122
|
+
end
|
123
|
+
# resource path
|
124
|
+
local_var_path = '/api/v2/team/{team_id}/links'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
125
|
+
|
126
|
+
# query parameters
|
127
|
+
query_params = opts[:query_params] || {}
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = opts[:header_params] || {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
135
|
+
|
136
|
+
# form parameters
|
137
|
+
form_params = opts[:form_params] || {}
|
138
|
+
|
139
|
+
# http body (model)
|
140
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
141
|
+
|
142
|
+
# return_type
|
143
|
+
return_type = opts[:debug_return_type] || 'TeamLinkResponse'
|
144
|
+
|
145
|
+
# auth_names
|
146
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
147
|
+
|
148
|
+
new_options = opts.merge(
|
149
|
+
:operation => :create_team_link,
|
150
|
+
:header_params => header_params,
|
151
|
+
:query_params => query_params,
|
152
|
+
:form_params => form_params,
|
153
|
+
:body => post_body,
|
154
|
+
:auth_names => auth_names,
|
155
|
+
:return_type => return_type,
|
156
|
+
:api_version => "V2"
|
157
|
+
)
|
158
|
+
|
159
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug "API called: TeamsAPI#create_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
162
|
+
end
|
163
|
+
return data, status_code, headers
|
164
|
+
end
|
165
|
+
|
166
|
+
# Add a user to a team.
|
167
|
+
#
|
168
|
+
# @see #create_team_membership_with_http_info
|
169
|
+
def create_team_membership(team_id, body, opts = {})
|
170
|
+
data, _status_code, _headers = create_team_membership_with_http_info(team_id, body, opts)
|
171
|
+
data
|
172
|
+
end
|
173
|
+
|
174
|
+
# Add a user to a team.
|
175
|
+
#
|
176
|
+
# Add a user to a team.
|
177
|
+
#
|
178
|
+
# @param team_id [String] None
|
179
|
+
# @param body [UserTeamRequest]
|
180
|
+
# @param opts [Hash] the optional parameters
|
181
|
+
# @return [Array<(UserTeamResponse, Integer, Hash)>] UserTeamResponse data, response status code and response headers
|
182
|
+
def create_team_membership_with_http_info(team_id, body, opts = {})
|
183
|
+
|
184
|
+
if @api_client.config.debugging
|
185
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_membership ...'
|
186
|
+
end
|
187
|
+
# verify the required parameter 'team_id' is set
|
188
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
189
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.create_team_membership"
|
190
|
+
end
|
191
|
+
# verify the required parameter 'body' is set
|
192
|
+
if @api_client.config.client_side_validation && body.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_membership"
|
194
|
+
end
|
195
|
+
# resource path
|
196
|
+
local_var_path = '/api/v2/team/{team_id}/memberships'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
197
|
+
|
198
|
+
# query parameters
|
199
|
+
query_params = opts[:query_params] || {}
|
200
|
+
|
201
|
+
# header parameters
|
202
|
+
header_params = opts[:header_params] || {}
|
203
|
+
# HTTP header 'Accept' (if needed)
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
205
|
+
# HTTP header 'Content-Type'
|
206
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
207
|
+
|
208
|
+
# form parameters
|
209
|
+
form_params = opts[:form_params] || {}
|
210
|
+
|
211
|
+
# http body (model)
|
212
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
213
|
+
|
214
|
+
# return_type
|
215
|
+
return_type = opts[:debug_return_type] || 'UserTeamResponse'
|
216
|
+
|
217
|
+
# auth_names
|
218
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
219
|
+
|
220
|
+
new_options = opts.merge(
|
221
|
+
:operation => :create_team_membership,
|
222
|
+
:header_params => header_params,
|
223
|
+
:query_params => query_params,
|
224
|
+
:form_params => form_params,
|
225
|
+
:body => post_body,
|
226
|
+
:auth_names => auth_names,
|
227
|
+
:return_type => return_type,
|
228
|
+
:api_version => "V2"
|
229
|
+
)
|
230
|
+
|
231
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
232
|
+
if @api_client.config.debugging
|
233
|
+
@api_client.config.logger.debug "API called: TeamsAPI#create_team_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
234
|
+
end
|
235
|
+
return data, status_code, headers
|
236
|
+
end
|
237
|
+
|
238
|
+
# Remove a team.
|
239
|
+
#
|
240
|
+
# @see #delete_team_with_http_info
|
241
|
+
def delete_team(team_id, opts = {})
|
242
|
+
delete_team_with_http_info(team_id, opts)
|
243
|
+
nil
|
244
|
+
end
|
245
|
+
|
246
|
+
# Remove a team.
|
247
|
+
#
|
248
|
+
# Remove a team using the team's `id`.
|
249
|
+
#
|
250
|
+
# @param team_id [String] None
|
251
|
+
# @param opts [Hash] the optional parameters
|
252
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
253
|
+
def delete_team_with_http_info(team_id, opts = {})
|
254
|
+
|
255
|
+
if @api_client.config.debugging
|
256
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team ...'
|
257
|
+
end
|
258
|
+
# verify the required parameter 'team_id' is set
|
259
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
260
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team"
|
261
|
+
end
|
262
|
+
# resource path
|
263
|
+
local_var_path = '/api/v2/team/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
264
|
+
|
265
|
+
# query parameters
|
266
|
+
query_params = opts[:query_params] || {}
|
267
|
+
|
268
|
+
# header parameters
|
269
|
+
header_params = opts[:header_params] || {}
|
270
|
+
# HTTP header 'Accept' (if needed)
|
271
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
272
|
+
|
273
|
+
# form parameters
|
274
|
+
form_params = opts[:form_params] || {}
|
275
|
+
|
276
|
+
# http body (model)
|
277
|
+
post_body = opts[:debug_body]
|
278
|
+
|
279
|
+
# return_type
|
280
|
+
return_type = opts[:debug_return_type]
|
281
|
+
|
282
|
+
# auth_names
|
283
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
284
|
+
|
285
|
+
new_options = opts.merge(
|
286
|
+
:operation => :delete_team,
|
287
|
+
:header_params => header_params,
|
288
|
+
:query_params => query_params,
|
289
|
+
:form_params => form_params,
|
290
|
+
:body => post_body,
|
291
|
+
:auth_names => auth_names,
|
292
|
+
:return_type => return_type,
|
293
|
+
:api_version => "V2"
|
294
|
+
)
|
295
|
+
|
296
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
297
|
+
if @api_client.config.debugging
|
298
|
+
@api_client.config.logger.debug "API called: TeamsAPI#delete_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
299
|
+
end
|
300
|
+
return data, status_code, headers
|
301
|
+
end
|
302
|
+
|
303
|
+
# Remove a team link.
|
304
|
+
#
|
305
|
+
# @see #delete_team_link_with_http_info
|
306
|
+
def delete_team_link(team_id, link_id, opts = {})
|
307
|
+
delete_team_link_with_http_info(team_id, link_id, opts)
|
308
|
+
nil
|
309
|
+
end
|
310
|
+
|
311
|
+
# Remove a team link.
|
312
|
+
#
|
313
|
+
# Remove a link from a team.
|
314
|
+
#
|
315
|
+
# @param team_id [String] None
|
316
|
+
# @param link_id [String] None
|
317
|
+
# @param opts [Hash] the optional parameters
|
318
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
319
|
+
def delete_team_link_with_http_info(team_id, link_id, opts = {})
|
320
|
+
|
321
|
+
if @api_client.config.debugging
|
322
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_link ...'
|
323
|
+
end
|
324
|
+
# verify the required parameter 'team_id' is set
|
325
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
326
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team_link"
|
327
|
+
end
|
328
|
+
# verify the required parameter 'link_id' is set
|
329
|
+
if @api_client.config.client_side_validation && link_id.nil?
|
330
|
+
fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.delete_team_link"
|
331
|
+
end
|
332
|
+
# resource path
|
333
|
+
local_var_path = '/api/v2/team/{team_id}/links/{link_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/'))
|
334
|
+
|
335
|
+
# query parameters
|
336
|
+
query_params = opts[:query_params] || {}
|
337
|
+
|
338
|
+
# header parameters
|
339
|
+
header_params = opts[:header_params] || {}
|
340
|
+
# HTTP header 'Accept' (if needed)
|
341
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
342
|
+
|
343
|
+
# form parameters
|
344
|
+
form_params = opts[:form_params] || {}
|
345
|
+
|
346
|
+
# http body (model)
|
347
|
+
post_body = opts[:debug_body]
|
348
|
+
|
349
|
+
# return_type
|
350
|
+
return_type = opts[:debug_return_type]
|
351
|
+
|
352
|
+
# auth_names
|
353
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
354
|
+
|
355
|
+
new_options = opts.merge(
|
356
|
+
:operation => :delete_team_link,
|
357
|
+
:header_params => header_params,
|
358
|
+
:query_params => query_params,
|
359
|
+
:form_params => form_params,
|
360
|
+
:body => post_body,
|
361
|
+
:auth_names => auth_names,
|
362
|
+
:return_type => return_type,
|
363
|
+
:api_version => "V2"
|
364
|
+
)
|
365
|
+
|
366
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
367
|
+
if @api_client.config.debugging
|
368
|
+
@api_client.config.logger.debug "API called: TeamsAPI#delete_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
369
|
+
end
|
370
|
+
return data, status_code, headers
|
371
|
+
end
|
372
|
+
|
373
|
+
# Remove a user from a team.
|
374
|
+
#
|
375
|
+
# @see #delete_team_membership_with_http_info
|
376
|
+
def delete_team_membership(team_id, user_id, opts = {})
|
377
|
+
delete_team_membership_with_http_info(team_id, user_id, opts)
|
378
|
+
nil
|
379
|
+
end
|
380
|
+
|
381
|
+
# Remove a user from a team.
|
382
|
+
#
|
383
|
+
# Remove a user from a team.
|
384
|
+
#
|
385
|
+
# @param team_id [String] None
|
386
|
+
# @param user_id [String] None
|
387
|
+
# @param opts [Hash] the optional parameters
|
388
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
389
|
+
def delete_team_membership_with_http_info(team_id, user_id, opts = {})
|
390
|
+
|
391
|
+
if @api_client.config.debugging
|
392
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_membership ...'
|
393
|
+
end
|
394
|
+
# verify the required parameter 'team_id' is set
|
395
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
396
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team_membership"
|
397
|
+
end
|
398
|
+
# verify the required parameter 'user_id' is set
|
399
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
400
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsAPI.delete_team_membership"
|
401
|
+
end
|
402
|
+
# resource path
|
403
|
+
local_var_path = '/api/v2/team/{team_id}/memberships/{user_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/'))
|
404
|
+
|
405
|
+
# query parameters
|
406
|
+
query_params = opts[:query_params] || {}
|
407
|
+
|
408
|
+
# header parameters
|
409
|
+
header_params = opts[:header_params] || {}
|
410
|
+
# HTTP header 'Accept' (if needed)
|
411
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
412
|
+
|
413
|
+
# form parameters
|
414
|
+
form_params = opts[:form_params] || {}
|
415
|
+
|
416
|
+
# http body (model)
|
417
|
+
post_body = opts[:debug_body]
|
418
|
+
|
419
|
+
# return_type
|
420
|
+
return_type = opts[:debug_return_type]
|
421
|
+
|
422
|
+
# auth_names
|
423
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
424
|
+
|
425
|
+
new_options = opts.merge(
|
426
|
+
:operation => :delete_team_membership,
|
427
|
+
:header_params => header_params,
|
428
|
+
:query_params => query_params,
|
429
|
+
:form_params => form_params,
|
430
|
+
:body => post_body,
|
431
|
+
:auth_names => auth_names,
|
432
|
+
:return_type => return_type,
|
433
|
+
:api_version => "V2"
|
434
|
+
)
|
435
|
+
|
436
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
437
|
+
if @api_client.config.debugging
|
438
|
+
@api_client.config.logger.debug "API called: TeamsAPI#delete_team_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
439
|
+
end
|
440
|
+
return data, status_code, headers
|
441
|
+
end
|
442
|
+
|
443
|
+
# Get a team.
|
444
|
+
#
|
445
|
+
# @see #get_team_with_http_info
|
446
|
+
def get_team(team_id, opts = {})
|
447
|
+
data, _status_code, _headers = get_team_with_http_info(team_id, opts)
|
448
|
+
data
|
449
|
+
end
|
450
|
+
|
451
|
+
# Get a team.
|
452
|
+
#
|
453
|
+
# Get a single team using the team's `id`.
|
454
|
+
#
|
455
|
+
# @param team_id [String] None
|
456
|
+
# @param opts [Hash] the optional parameters
|
457
|
+
# @return [Array<(TeamResponse, Integer, Hash)>] TeamResponse data, response status code and response headers
|
458
|
+
def get_team_with_http_info(team_id, opts = {})
|
459
|
+
|
460
|
+
if @api_client.config.debugging
|
461
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.get_team ...'
|
462
|
+
end
|
463
|
+
# verify the required parameter 'team_id' is set
|
464
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
465
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team"
|
466
|
+
end
|
467
|
+
# resource path
|
468
|
+
local_var_path = '/api/v2/team/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
469
|
+
|
470
|
+
# query parameters
|
471
|
+
query_params = opts[:query_params] || {}
|
472
|
+
|
473
|
+
# header parameters
|
474
|
+
header_params = opts[:header_params] || {}
|
475
|
+
# HTTP header 'Accept' (if needed)
|
476
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
477
|
+
|
478
|
+
# form parameters
|
479
|
+
form_params = opts[:form_params] || {}
|
480
|
+
|
481
|
+
# http body (model)
|
482
|
+
post_body = opts[:debug_body]
|
483
|
+
|
484
|
+
# return_type
|
485
|
+
return_type = opts[:debug_return_type] || 'TeamResponse'
|
486
|
+
|
487
|
+
# auth_names
|
488
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
489
|
+
|
490
|
+
new_options = opts.merge(
|
491
|
+
:operation => :get_team,
|
492
|
+
:header_params => header_params,
|
493
|
+
:query_params => query_params,
|
494
|
+
:form_params => form_params,
|
495
|
+
:body => post_body,
|
496
|
+
:auth_names => auth_names,
|
497
|
+
:return_type => return_type,
|
498
|
+
:api_version => "V2"
|
499
|
+
)
|
500
|
+
|
501
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
502
|
+
if @api_client.config.debugging
|
503
|
+
@api_client.config.logger.debug "API called: TeamsAPI#get_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
504
|
+
end
|
505
|
+
return data, status_code, headers
|
506
|
+
end
|
507
|
+
|
508
|
+
# Get a team link.
|
509
|
+
#
|
510
|
+
# @see #get_team_link_with_http_info
|
511
|
+
def get_team_link(team_id, link_id, opts = {})
|
512
|
+
data, _status_code, _headers = get_team_link_with_http_info(team_id, link_id, opts)
|
513
|
+
data
|
514
|
+
end
|
515
|
+
|
516
|
+
# Get a team link.
|
517
|
+
#
|
518
|
+
# Get a single link for a team.
|
519
|
+
#
|
520
|
+
# @param team_id [String] None
|
521
|
+
# @param link_id [String] None
|
522
|
+
# @param opts [Hash] the optional parameters
|
523
|
+
# @return [Array<(TeamLinkResponse, Integer, Hash)>] TeamLinkResponse data, response status code and response headers
|
524
|
+
def get_team_link_with_http_info(team_id, link_id, opts = {})
|
525
|
+
|
526
|
+
if @api_client.config.debugging
|
527
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_link ...'
|
528
|
+
end
|
529
|
+
# verify the required parameter 'team_id' is set
|
530
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
531
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_link"
|
532
|
+
end
|
533
|
+
# verify the required parameter 'link_id' is set
|
534
|
+
if @api_client.config.client_side_validation && link_id.nil?
|
535
|
+
fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.get_team_link"
|
536
|
+
end
|
537
|
+
# resource path
|
538
|
+
local_var_path = '/api/v2/team/{team_id}/links/{link_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/'))
|
539
|
+
|
540
|
+
# query parameters
|
541
|
+
query_params = opts[:query_params] || {}
|
542
|
+
|
543
|
+
# header parameters
|
544
|
+
header_params = opts[:header_params] || {}
|
545
|
+
# HTTP header 'Accept' (if needed)
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
547
|
+
|
548
|
+
# form parameters
|
549
|
+
form_params = opts[:form_params] || {}
|
550
|
+
|
551
|
+
# http body (model)
|
552
|
+
post_body = opts[:debug_body]
|
553
|
+
|
554
|
+
# return_type
|
555
|
+
return_type = opts[:debug_return_type] || 'TeamLinkResponse'
|
556
|
+
|
557
|
+
# auth_names
|
558
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
559
|
+
|
560
|
+
new_options = opts.merge(
|
561
|
+
:operation => :get_team_link,
|
562
|
+
:header_params => header_params,
|
563
|
+
:query_params => query_params,
|
564
|
+
:form_params => form_params,
|
565
|
+
:body => post_body,
|
566
|
+
:auth_names => auth_names,
|
567
|
+
:return_type => return_type,
|
568
|
+
:api_version => "V2"
|
569
|
+
)
|
570
|
+
|
571
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
572
|
+
if @api_client.config.debugging
|
573
|
+
@api_client.config.logger.debug "API called: TeamsAPI#get_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
574
|
+
end
|
575
|
+
return data, status_code, headers
|
576
|
+
end
|
577
|
+
|
578
|
+
# Get links for a team.
|
579
|
+
#
|
580
|
+
# @see #get_team_links_with_http_info
|
581
|
+
def get_team_links(team_id, opts = {})
|
582
|
+
data, _status_code, _headers = get_team_links_with_http_info(team_id, opts)
|
583
|
+
data
|
584
|
+
end
|
585
|
+
|
586
|
+
# Get links for a team.
|
587
|
+
#
|
588
|
+
# Get all links for a given team.
|
589
|
+
#
|
590
|
+
# @param team_id [String] None
|
591
|
+
# @param opts [Hash] the optional parameters
|
592
|
+
# @return [Array<(TeamLinksResponse, Integer, Hash)>] TeamLinksResponse data, response status code and response headers
|
593
|
+
def get_team_links_with_http_info(team_id, opts = {})
|
594
|
+
|
595
|
+
if @api_client.config.debugging
|
596
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_links ...'
|
597
|
+
end
|
598
|
+
# verify the required parameter 'team_id' is set
|
599
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
600
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_links"
|
601
|
+
end
|
602
|
+
# resource path
|
603
|
+
local_var_path = '/api/v2/team/{team_id}/links'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
604
|
+
|
605
|
+
# query parameters
|
606
|
+
query_params = opts[:query_params] || {}
|
607
|
+
|
608
|
+
# header parameters
|
609
|
+
header_params = opts[:header_params] || {}
|
610
|
+
# HTTP header 'Accept' (if needed)
|
611
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
612
|
+
|
613
|
+
# form parameters
|
614
|
+
form_params = opts[:form_params] || {}
|
615
|
+
|
616
|
+
# http body (model)
|
617
|
+
post_body = opts[:debug_body]
|
618
|
+
|
619
|
+
# return_type
|
620
|
+
return_type = opts[:debug_return_type] || 'TeamLinksResponse'
|
621
|
+
|
622
|
+
# auth_names
|
623
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
624
|
+
|
625
|
+
new_options = opts.merge(
|
626
|
+
:operation => :get_team_links,
|
627
|
+
:header_params => header_params,
|
628
|
+
:query_params => query_params,
|
629
|
+
:form_params => form_params,
|
630
|
+
:body => post_body,
|
631
|
+
:auth_names => auth_names,
|
632
|
+
:return_type => return_type,
|
633
|
+
:api_version => "V2"
|
634
|
+
)
|
635
|
+
|
636
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
637
|
+
if @api_client.config.debugging
|
638
|
+
@api_client.config.logger.debug "API called: TeamsAPI#get_team_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
639
|
+
end
|
640
|
+
return data, status_code, headers
|
641
|
+
end
|
642
|
+
|
643
|
+
# Get team memberships.
|
644
|
+
#
|
645
|
+
# @see #get_team_memberships_with_http_info
|
646
|
+
def get_team_memberships(team_id, opts = {})
|
647
|
+
data, _status_code, _headers = get_team_memberships_with_http_info(team_id, opts)
|
648
|
+
data
|
649
|
+
end
|
650
|
+
|
651
|
+
# Get team memberships.
|
652
|
+
#
|
653
|
+
# Get a paginated list of members for a team
|
654
|
+
#
|
655
|
+
# @param team_id [String] None
|
656
|
+
# @param opts [Hash] the optional parameters
|
657
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 5000.
|
658
|
+
# @option opts [Integer] :page_number Specific page number to return.
|
659
|
+
# @option opts [GetTeamMembershipsSort] :sort Specifies the order of returned team memberships
|
660
|
+
# @option opts [String] :filter_keyword Search query, can be user email or name
|
661
|
+
# @return [Array<(UserTeamsResponse, Integer, Hash)>] UserTeamsResponse data, response status code and response headers
|
662
|
+
def get_team_memberships_with_http_info(team_id, opts = {})
|
663
|
+
|
664
|
+
if @api_client.config.debugging
|
665
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_memberships ...'
|
666
|
+
end
|
667
|
+
# verify the required parameter 'team_id' is set
|
668
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
669
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_memberships"
|
670
|
+
end
|
671
|
+
allowable_values = ['manager_name', '-manager_name', 'name', '-name', 'handle', '-handle', 'email', '-email']
|
672
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
673
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
674
|
+
end
|
675
|
+
# resource path
|
676
|
+
local_var_path = '/api/v2/team/{team_id}/memberships'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
677
|
+
|
678
|
+
# query parameters
|
679
|
+
query_params = opts[:query_params] || {}
|
680
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
681
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
682
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
683
|
+
query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil?
|
684
|
+
|
685
|
+
# header parameters
|
686
|
+
header_params = opts[:header_params] || {}
|
687
|
+
# HTTP header 'Accept' (if needed)
|
688
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
689
|
+
|
690
|
+
# form parameters
|
691
|
+
form_params = opts[:form_params] || {}
|
692
|
+
|
693
|
+
# http body (model)
|
694
|
+
post_body = opts[:debug_body]
|
695
|
+
|
696
|
+
# return_type
|
697
|
+
return_type = opts[:debug_return_type] || 'UserTeamsResponse'
|
698
|
+
|
699
|
+
# auth_names
|
700
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
701
|
+
|
702
|
+
new_options = opts.merge(
|
703
|
+
:operation => :get_team_memberships,
|
704
|
+
:header_params => header_params,
|
705
|
+
:query_params => query_params,
|
706
|
+
:form_params => form_params,
|
707
|
+
:body => post_body,
|
708
|
+
:auth_names => auth_names,
|
709
|
+
:return_type => return_type,
|
710
|
+
:api_version => "V2"
|
711
|
+
)
|
712
|
+
|
713
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
714
|
+
if @api_client.config.debugging
|
715
|
+
@api_client.config.logger.debug "API called: TeamsAPI#get_team_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
716
|
+
end
|
717
|
+
return data, status_code, headers
|
718
|
+
end
|
719
|
+
|
720
|
+
# Get permission settings for a team.
|
721
|
+
#
|
722
|
+
# @see #get_team_permission_settings_with_http_info
|
723
|
+
def get_team_permission_settings(team_id, opts = {})
|
724
|
+
data, _status_code, _headers = get_team_permission_settings_with_http_info(team_id, opts)
|
725
|
+
data
|
726
|
+
end
|
727
|
+
|
728
|
+
# Get permission settings for a team.
|
729
|
+
#
|
730
|
+
# Get all permission settings for a given team.
|
731
|
+
#
|
732
|
+
# @param team_id [String] None
|
733
|
+
# @param opts [Hash] the optional parameters
|
734
|
+
# @return [Array<(TeamPermissionSettingsResponse, Integer, Hash)>] TeamPermissionSettingsResponse data, response status code and response headers
|
735
|
+
def get_team_permission_settings_with_http_info(team_id, opts = {})
|
736
|
+
|
737
|
+
if @api_client.config.debugging
|
738
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_permission_settings ...'
|
739
|
+
end
|
740
|
+
# verify the required parameter 'team_id' is set
|
741
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
742
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_permission_settings"
|
743
|
+
end
|
744
|
+
# resource path
|
745
|
+
local_var_path = '/api/v2/team/{team_id}/permission-settings'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
746
|
+
|
747
|
+
# query parameters
|
748
|
+
query_params = opts[:query_params] || {}
|
749
|
+
|
750
|
+
# header parameters
|
751
|
+
header_params = opts[:header_params] || {}
|
752
|
+
# HTTP header 'Accept' (if needed)
|
753
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
754
|
+
|
755
|
+
# form parameters
|
756
|
+
form_params = opts[:form_params] || {}
|
757
|
+
|
758
|
+
# http body (model)
|
759
|
+
post_body = opts[:debug_body]
|
760
|
+
|
761
|
+
# return_type
|
762
|
+
return_type = opts[:debug_return_type] || 'TeamPermissionSettingsResponse'
|
763
|
+
|
764
|
+
# auth_names
|
765
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
766
|
+
|
767
|
+
new_options = opts.merge(
|
768
|
+
:operation => :get_team_permission_settings,
|
769
|
+
:header_params => header_params,
|
770
|
+
:query_params => query_params,
|
771
|
+
:form_params => form_params,
|
772
|
+
:body => post_body,
|
773
|
+
:auth_names => auth_names,
|
774
|
+
:return_type => return_type,
|
775
|
+
:api_version => "V2"
|
776
|
+
)
|
777
|
+
|
778
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
779
|
+
if @api_client.config.debugging
|
780
|
+
@api_client.config.logger.debug "API called: TeamsAPI#get_team_permission_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
781
|
+
end
|
782
|
+
return data, status_code, headers
|
783
|
+
end
|
784
|
+
|
785
|
+
# Get all teams.
|
786
|
+
#
|
787
|
+
# @see #list_teams_with_http_info
|
788
|
+
def list_teams(opts = {})
|
789
|
+
data, _status_code, _headers = list_teams_with_http_info(opts)
|
790
|
+
data
|
791
|
+
end
|
792
|
+
|
793
|
+
# Get all teams.
|
794
|
+
#
|
795
|
+
# Get all teams.
|
796
|
+
# Can be used to search for teams using the `filter[keyword]` and `filter[me]` query parameters.
|
797
|
+
#
|
798
|
+
# @param opts [Hash] the optional parameters
|
799
|
+
# @option opts [Integer] :page_number Specific page number to return.
|
800
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 5000.
|
801
|
+
# @option opts [ListTeamsSort] :sort Specifies the order of the returned teams
|
802
|
+
# @option opts [Array<ListTeamsInclude>] :include Included related resources optionally requested. Allowed enum values: `team_links, user_team_permissions`
|
803
|
+
# @option opts [String] :filter_keyword Search query. Can be team name, team handle, or email of team member
|
804
|
+
# @option opts [Boolean] :filter_me When true, only returns teams the current user belongs to
|
805
|
+
# @return [Array<(TeamsResponse, Integer, Hash)>] TeamsResponse data, response status code and response headers
|
806
|
+
def list_teams_with_http_info(opts = {})
|
807
|
+
|
808
|
+
if @api_client.config.debugging
|
809
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.list_teams ...'
|
810
|
+
end
|
811
|
+
allowable_values = ['name', '-name', 'user_count', '-user_count']
|
812
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
813
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
814
|
+
end
|
815
|
+
# resource path
|
816
|
+
local_var_path = '/api/v2/team'
|
817
|
+
|
818
|
+
# query parameters
|
819
|
+
query_params = opts[:query_params] || {}
|
820
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
821
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
822
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
823
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
|
824
|
+
query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil?
|
825
|
+
query_params[:'filter[me]'] = opts[:'filter_me'] if !opts[:'filter_me'].nil?
|
826
|
+
|
827
|
+
# header parameters
|
828
|
+
header_params = opts[:header_params] || {}
|
829
|
+
# HTTP header 'Accept' (if needed)
|
830
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
831
|
+
|
832
|
+
# form parameters
|
833
|
+
form_params = opts[:form_params] || {}
|
834
|
+
|
835
|
+
# http body (model)
|
836
|
+
post_body = opts[:debug_body]
|
837
|
+
|
838
|
+
# return_type
|
839
|
+
return_type = opts[:debug_return_type] || 'TeamsResponse'
|
840
|
+
|
841
|
+
# auth_names
|
842
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
843
|
+
|
844
|
+
new_options = opts.merge(
|
845
|
+
:operation => :list_teams,
|
846
|
+
:header_params => header_params,
|
847
|
+
:query_params => query_params,
|
848
|
+
:form_params => form_params,
|
849
|
+
:body => post_body,
|
850
|
+
:auth_names => auth_names,
|
851
|
+
:return_type => return_type,
|
852
|
+
:api_version => "V2"
|
853
|
+
)
|
854
|
+
|
855
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
856
|
+
if @api_client.config.debugging
|
857
|
+
@api_client.config.logger.debug "API called: TeamsAPI#list_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
858
|
+
end
|
859
|
+
return data, status_code, headers
|
860
|
+
end
|
861
|
+
|
862
|
+
# Update a team.
|
863
|
+
#
|
864
|
+
# @see #update_team_with_http_info
|
865
|
+
def update_team(team_id, body, opts = {})
|
866
|
+
data, _status_code, _headers = update_team_with_http_info(team_id, body, opts)
|
867
|
+
data
|
868
|
+
end
|
869
|
+
|
870
|
+
# Update a team.
|
871
|
+
#
|
872
|
+
# Update a team using the team's `id`.
|
873
|
+
# If the `team_links` relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed.
|
874
|
+
#
|
875
|
+
# @param team_id [String] None
|
876
|
+
# @param body [TeamUpdateRequest]
|
877
|
+
# @param opts [Hash] the optional parameters
|
878
|
+
# @return [Array<(TeamResponse, Integer, Hash)>] TeamResponse data, response status code and response headers
|
879
|
+
def update_team_with_http_info(team_id, body, opts = {})
|
880
|
+
|
881
|
+
if @api_client.config.debugging
|
882
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.update_team ...'
|
883
|
+
end
|
884
|
+
# verify the required parameter 'team_id' is set
|
885
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
886
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team"
|
887
|
+
end
|
888
|
+
# verify the required parameter 'body' is set
|
889
|
+
if @api_client.config.client_side_validation && body.nil?
|
890
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team"
|
891
|
+
end
|
892
|
+
# resource path
|
893
|
+
local_var_path = '/api/v2/team/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
894
|
+
|
895
|
+
# query parameters
|
896
|
+
query_params = opts[:query_params] || {}
|
897
|
+
|
898
|
+
# header parameters
|
899
|
+
header_params = opts[:header_params] || {}
|
900
|
+
# HTTP header 'Accept' (if needed)
|
901
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
902
|
+
# HTTP header 'Content-Type'
|
903
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
904
|
+
|
905
|
+
# form parameters
|
906
|
+
form_params = opts[:form_params] || {}
|
907
|
+
|
908
|
+
# http body (model)
|
909
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
910
|
+
|
911
|
+
# return_type
|
912
|
+
return_type = opts[:debug_return_type] || 'TeamResponse'
|
913
|
+
|
914
|
+
# auth_names
|
915
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
916
|
+
|
917
|
+
new_options = opts.merge(
|
918
|
+
:operation => :update_team,
|
919
|
+
:header_params => header_params,
|
920
|
+
:query_params => query_params,
|
921
|
+
:form_params => form_params,
|
922
|
+
:body => post_body,
|
923
|
+
:auth_names => auth_names,
|
924
|
+
:return_type => return_type,
|
925
|
+
:api_version => "V2"
|
926
|
+
)
|
927
|
+
|
928
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
929
|
+
if @api_client.config.debugging
|
930
|
+
@api_client.config.logger.debug "API called: TeamsAPI#update_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
931
|
+
end
|
932
|
+
return data, status_code, headers
|
933
|
+
end
|
934
|
+
|
935
|
+
# Update a team link.
|
936
|
+
#
|
937
|
+
# @see #update_team_link_with_http_info
|
938
|
+
def update_team_link(team_id, link_id, body, opts = {})
|
939
|
+
data, _status_code, _headers = update_team_link_with_http_info(team_id, link_id, body, opts)
|
940
|
+
data
|
941
|
+
end
|
942
|
+
|
943
|
+
# Update a team link.
|
944
|
+
#
|
945
|
+
# Update a team link.
|
946
|
+
#
|
947
|
+
# @param team_id [String] None
|
948
|
+
# @param link_id [String] None
|
949
|
+
# @param body [TeamLinkCreateRequest]
|
950
|
+
# @param opts [Hash] the optional parameters
|
951
|
+
# @return [Array<(TeamLinkResponse, Integer, Hash)>] TeamLinkResponse data, response status code and response headers
|
952
|
+
def update_team_link_with_http_info(team_id, link_id, body, opts = {})
|
953
|
+
|
954
|
+
if @api_client.config.debugging
|
955
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_link ...'
|
956
|
+
end
|
957
|
+
# verify the required parameter 'team_id' is set
|
958
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
959
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_link"
|
960
|
+
end
|
961
|
+
# verify the required parameter 'link_id' is set
|
962
|
+
if @api_client.config.client_side_validation && link_id.nil?
|
963
|
+
fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.update_team_link"
|
964
|
+
end
|
965
|
+
# verify the required parameter 'body' is set
|
966
|
+
if @api_client.config.client_side_validation && body.nil?
|
967
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_link"
|
968
|
+
end
|
969
|
+
# resource path
|
970
|
+
local_var_path = '/api/v2/team/{team_id}/links/{link_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/'))
|
971
|
+
|
972
|
+
# query parameters
|
973
|
+
query_params = opts[:query_params] || {}
|
974
|
+
|
975
|
+
# header parameters
|
976
|
+
header_params = opts[:header_params] || {}
|
977
|
+
# HTTP header 'Accept' (if needed)
|
978
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
979
|
+
# HTTP header 'Content-Type'
|
980
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
981
|
+
|
982
|
+
# form parameters
|
983
|
+
form_params = opts[:form_params] || {}
|
984
|
+
|
985
|
+
# http body (model)
|
986
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
987
|
+
|
988
|
+
# return_type
|
989
|
+
return_type = opts[:debug_return_type] || 'TeamLinkResponse'
|
990
|
+
|
991
|
+
# auth_names
|
992
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
993
|
+
|
994
|
+
new_options = opts.merge(
|
995
|
+
:operation => :update_team_link,
|
996
|
+
:header_params => header_params,
|
997
|
+
:query_params => query_params,
|
998
|
+
:form_params => form_params,
|
999
|
+
:body => post_body,
|
1000
|
+
:auth_names => auth_names,
|
1001
|
+
:return_type => return_type,
|
1002
|
+
:api_version => "V2"
|
1003
|
+
)
|
1004
|
+
|
1005
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
1006
|
+
if @api_client.config.debugging
|
1007
|
+
@api_client.config.logger.debug "API called: TeamsAPI#update_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1008
|
+
end
|
1009
|
+
return data, status_code, headers
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# Update a user's membership attributes on a team.
|
1013
|
+
#
|
1014
|
+
# @see #update_team_membership_with_http_info
|
1015
|
+
def update_team_membership(team_id, user_id, body, opts = {})
|
1016
|
+
data, _status_code, _headers = update_team_membership_with_http_info(team_id, user_id, body, opts)
|
1017
|
+
data
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
# Update a user's membership attributes on a team.
|
1021
|
+
#
|
1022
|
+
# Update a user's membership attributes on a team.
|
1023
|
+
#
|
1024
|
+
# @param team_id [String] None
|
1025
|
+
# @param user_id [String] None
|
1026
|
+
# @param body [UserTeamUpdateRequest]
|
1027
|
+
# @param opts [Hash] the optional parameters
|
1028
|
+
# @return [Array<(UserTeamResponse, Integer, Hash)>] UserTeamResponse data, response status code and response headers
|
1029
|
+
def update_team_membership_with_http_info(team_id, user_id, body, opts = {})
|
1030
|
+
|
1031
|
+
if @api_client.config.debugging
|
1032
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_membership ...'
|
1033
|
+
end
|
1034
|
+
# verify the required parameter 'team_id' is set
|
1035
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
1036
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_membership"
|
1037
|
+
end
|
1038
|
+
# verify the required parameter 'user_id' is set
|
1039
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
1040
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsAPI.update_team_membership"
|
1041
|
+
end
|
1042
|
+
# verify the required parameter 'body' is set
|
1043
|
+
if @api_client.config.client_side_validation && body.nil?
|
1044
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_membership"
|
1045
|
+
end
|
1046
|
+
# resource path
|
1047
|
+
local_var_path = '/api/v2/team/{team_id}/memberships/{user_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/'))
|
1048
|
+
|
1049
|
+
# query parameters
|
1050
|
+
query_params = opts[:query_params] || {}
|
1051
|
+
|
1052
|
+
# header parameters
|
1053
|
+
header_params = opts[:header_params] || {}
|
1054
|
+
# HTTP header 'Accept' (if needed)
|
1055
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1056
|
+
# HTTP header 'Content-Type'
|
1057
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1058
|
+
|
1059
|
+
# form parameters
|
1060
|
+
form_params = opts[:form_params] || {}
|
1061
|
+
|
1062
|
+
# http body (model)
|
1063
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1064
|
+
|
1065
|
+
# return_type
|
1066
|
+
return_type = opts[:debug_return_type] || 'UserTeamResponse'
|
1067
|
+
|
1068
|
+
# auth_names
|
1069
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1070
|
+
|
1071
|
+
new_options = opts.merge(
|
1072
|
+
:operation => :update_team_membership,
|
1073
|
+
:header_params => header_params,
|
1074
|
+
:query_params => query_params,
|
1075
|
+
:form_params => form_params,
|
1076
|
+
:body => post_body,
|
1077
|
+
:auth_names => auth_names,
|
1078
|
+
:return_type => return_type,
|
1079
|
+
:api_version => "V2"
|
1080
|
+
)
|
1081
|
+
|
1082
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
1083
|
+
if @api_client.config.debugging
|
1084
|
+
@api_client.config.logger.debug "API called: TeamsAPI#update_team_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1085
|
+
end
|
1086
|
+
return data, status_code, headers
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# Update permission setting for team.
|
1090
|
+
#
|
1091
|
+
# @see #update_team_permission_setting_with_http_info
|
1092
|
+
def update_team_permission_setting(team_id, action, body, opts = {})
|
1093
|
+
data, _status_code, _headers = update_team_permission_setting_with_http_info(team_id, action, body, opts)
|
1094
|
+
data
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# Update permission setting for team.
|
1098
|
+
#
|
1099
|
+
# Update a team permission setting for a given team.
|
1100
|
+
#
|
1101
|
+
# @param team_id [String] None
|
1102
|
+
# @param action [String] None
|
1103
|
+
# @param body [TeamPermissionSettingUpdateRequest]
|
1104
|
+
# @param opts [Hash] the optional parameters
|
1105
|
+
# @return [Array<(TeamPermissionSettingResponse, Integer, Hash)>] TeamPermissionSettingResponse data, response status code and response headers
|
1106
|
+
def update_team_permission_setting_with_http_info(team_id, action, body, opts = {})
|
1107
|
+
|
1108
|
+
if @api_client.config.debugging
|
1109
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_permission_setting ...'
|
1110
|
+
end
|
1111
|
+
# verify the required parameter 'team_id' is set
|
1112
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
1113
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_permission_setting"
|
1114
|
+
end
|
1115
|
+
# verify the required parameter 'action' is set
|
1116
|
+
if @api_client.config.client_side_validation && action.nil?
|
1117
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling TeamsAPI.update_team_permission_setting"
|
1118
|
+
end
|
1119
|
+
# verify the required parameter 'body' is set
|
1120
|
+
if @api_client.config.client_side_validation && body.nil?
|
1121
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_permission_setting"
|
1122
|
+
end
|
1123
|
+
# resource path
|
1124
|
+
local_var_path = '/api/v2/team/{team_id}/permission-settings/{action}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{action}', CGI.escape(action.to_s).gsub('%2F', '/'))
|
1125
|
+
|
1126
|
+
# query parameters
|
1127
|
+
query_params = opts[:query_params] || {}
|
1128
|
+
|
1129
|
+
# header parameters
|
1130
|
+
header_params = opts[:header_params] || {}
|
1131
|
+
# HTTP header 'Accept' (if needed)
|
1132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1133
|
+
# HTTP header 'Content-Type'
|
1134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1135
|
+
|
1136
|
+
# form parameters
|
1137
|
+
form_params = opts[:form_params] || {}
|
1138
|
+
|
1139
|
+
# http body (model)
|
1140
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1141
|
+
|
1142
|
+
# return_type
|
1143
|
+
return_type = opts[:debug_return_type] || 'TeamPermissionSettingResponse'
|
1144
|
+
|
1145
|
+
# auth_names
|
1146
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1147
|
+
|
1148
|
+
new_options = opts.merge(
|
1149
|
+
:operation => :update_team_permission_setting,
|
1150
|
+
:header_params => header_params,
|
1151
|
+
:query_params => query_params,
|
1152
|
+
:form_params => form_params,
|
1153
|
+
:body => post_body,
|
1154
|
+
:auth_names => auth_names,
|
1155
|
+
:return_type => return_type,
|
1156
|
+
:api_version => "V2"
|
1157
|
+
)
|
1158
|
+
|
1159
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
1160
|
+
if @api_client.config.debugging
|
1161
|
+
@api_client.config.logger.debug "API called: TeamsAPI#update_team_permission_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1162
|
+
end
|
1163
|
+
return data, status_code, headers
|
1164
|
+
end
|
1165
|
+
end
|
1166
|
+
end
|