workato-platform-cli 1.0.0rc5.dev5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- workato_platform_cli/__init__.py +135 -0
- workato_platform_cli/_version.py +34 -0
- workato_platform_cli/cli/__init__.py +126 -0
- workato_platform_cli/cli/commands/__init__.py +0 -0
- workato_platform_cli/cli/commands/api_clients.py +627 -0
- workato_platform_cli/cli/commands/api_collections.py +497 -0
- workato_platform_cli/cli/commands/assets.py +82 -0
- workato_platform_cli/cli/commands/connections.py +1205 -0
- workato_platform_cli/cli/commands/connectors/__init__.py +0 -0
- workato_platform_cli/cli/commands/connectors/command.py +178 -0
- workato_platform_cli/cli/commands/connectors/connector_manager.py +351 -0
- workato_platform_cli/cli/commands/data_tables.py +345 -0
- workato_platform_cli/cli/commands/guide.py +315 -0
- workato_platform_cli/cli/commands/init.py +229 -0
- workato_platform_cli/cli/commands/profiles.py +364 -0
- workato_platform_cli/cli/commands/projects/__init__.py +0 -0
- workato_platform_cli/cli/commands/projects/command.py +513 -0
- workato_platform_cli/cli/commands/projects/project_manager.py +338 -0
- workato_platform_cli/cli/commands/properties.py +174 -0
- workato_platform_cli/cli/commands/pull.py +327 -0
- workato_platform_cli/cli/commands/push/__init__.py +0 -0
- workato_platform_cli/cli/commands/push/command.py +320 -0
- workato_platform_cli/cli/commands/recipes/__init__.py +0 -0
- workato_platform_cli/cli/commands/recipes/command.py +847 -0
- workato_platform_cli/cli/commands/recipes/validator.py +1740 -0
- workato_platform_cli/cli/commands/workspace.py +73 -0
- workato_platform_cli/cli/containers.py +80 -0
- workato_platform_cli/cli/resources/data/connection-data.json +7364 -0
- workato_platform_cli/cli/resources/data/picklist-data.json +3706 -0
- workato_platform_cli/cli/resources/docs/README.md +178 -0
- workato_platform_cli/cli/resources/docs/actions.md +452 -0
- workato_platform_cli/cli/resources/docs/block-structure.md +424 -0
- workato_platform_cli/cli/resources/docs/connections-parameters.md +11946 -0
- workato_platform_cli/cli/resources/docs/data-mapping.md +779 -0
- workato_platform_cli/cli/resources/docs/formulas/array-list-formulas.md +1276 -0
- workato_platform_cli/cli/resources/docs/formulas/conditions.md +102 -0
- workato_platform_cli/cli/resources/docs/formulas/date-formulas.md +798 -0
- workato_platform_cli/cli/resources/docs/formulas/number-formulas.md +507 -0
- workato_platform_cli/cli/resources/docs/formulas/other-formulas.md +419 -0
- workato_platform_cli/cli/resources/docs/formulas/string-formulas.md +1353 -0
- workato_platform_cli/cli/resources/docs/formulas.md +214 -0
- workato_platform_cli/cli/resources/docs/naming-conventions.md +163 -0
- workato_platform_cli/cli/resources/docs/recipe-deployment-workflow.md +352 -0
- workato_platform_cli/cli/resources/docs/recipe-fundamentals.md +179 -0
- workato_platform_cli/cli/resources/docs/triggers.md +360 -0
- workato_platform_cli/cli/utils/__init__.py +10 -0
- workato_platform_cli/cli/utils/config/__init__.py +33 -0
- workato_platform_cli/cli/utils/config/manager.py +1001 -0
- workato_platform_cli/cli/utils/config/models.py +89 -0
- workato_platform_cli/cli/utils/config/profiles.py +491 -0
- workato_platform_cli/cli/utils/config/workspace.py +113 -0
- workato_platform_cli/cli/utils/exception_handler.py +531 -0
- workato_platform_cli/cli/utils/gitignore.py +32 -0
- workato_platform_cli/cli/utils/ignore_patterns.py +44 -0
- workato_platform_cli/cli/utils/spinner.py +63 -0
- workato_platform_cli/cli/utils/version_checker.py +237 -0
- workato_platform_cli/client/__init__.py +0 -0
- workato_platform_cli/client/workato_api/__init__.py +202 -0
- workato_platform_cli/client/workato_api/api/__init__.py +15 -0
- workato_platform_cli/client/workato_api/api/api_platform_api.py +2875 -0
- workato_platform_cli/client/workato_api/api/connections_api.py +1807 -0
- workato_platform_cli/client/workato_api/api/connectors_api.py +840 -0
- workato_platform_cli/client/workato_api/api/data_tables_api.py +604 -0
- workato_platform_cli/client/workato_api/api/export_api.py +621 -0
- workato_platform_cli/client/workato_api/api/folders_api.py +621 -0
- workato_platform_cli/client/workato_api/api/packages_api.py +1197 -0
- workato_platform_cli/client/workato_api/api/projects_api.py +590 -0
- workato_platform_cli/client/workato_api/api/properties_api.py +620 -0
- workato_platform_cli/client/workato_api/api/recipes_api.py +1379 -0
- workato_platform_cli/client/workato_api/api/users_api.py +285 -0
- workato_platform_cli/client/workato_api/api_client.py +807 -0
- workato_platform_cli/client/workato_api/api_response.py +21 -0
- workato_platform_cli/client/workato_api/configuration.py +601 -0
- workato_platform_cli/client/workato_api/docs/APIPlatformApi.md +844 -0
- workato_platform_cli/client/workato_api/docs/ApiClient.md +46 -0
- workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md +30 -0
- workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md +30 -0
- workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md +46 -0
- workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md +32 -0
- workato_platform_cli/client/workato_api/docs/ApiClientResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/ApiCollection.md +38 -0
- workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md +32 -0
- workato_platform_cli/client/workato_api/docs/ApiEndpoint.md +41 -0
- workato_platform_cli/client/workato_api/docs/ApiKey.md +36 -0
- workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md +32 -0
- workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md +32 -0
- workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/Asset.md +39 -0
- workato_platform_cli/client/workato_api/docs/AssetReference.md +37 -0
- workato_platform_cli/client/workato_api/docs/Connection.md +44 -0
- workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md +35 -0
- workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md +34 -0
- workato_platform_cli/client/workato_api/docs/ConnectionsApi.md +526 -0
- workato_platform_cli/client/workato_api/docs/ConnectorAction.md +33 -0
- workato_platform_cli/client/workato_api/docs/ConnectorVersion.md +32 -0
- workato_platform_cli/client/workato_api/docs/ConnectorsApi.md +249 -0
- workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md +29 -0
- workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md +30 -0
- workato_platform_cli/client/workato_api/docs/CustomConnector.md +35 -0
- workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md +29 -0
- workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/DataTable.md +34 -0
- workato_platform_cli/client/workato_api/docs/DataTableColumn.md +37 -0
- workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md +37 -0
- workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md +31 -0
- workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/DataTableListResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/DataTableRelation.md +30 -0
- workato_platform_cli/client/workato_api/docs/DataTablesApi.md +172 -0
- workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md +29 -0
- workato_platform_cli/client/workato_api/docs/Error.md +29 -0
- workato_platform_cli/client/workato_api/docs/ExportApi.md +175 -0
- workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md +35 -0
- workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md +36 -0
- workato_platform_cli/client/workato_api/docs/Folder.md +35 -0
- workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md +29 -0
- workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md +35 -0
- workato_platform_cli/client/workato_api/docs/FoldersApi.md +176 -0
- workato_platform_cli/client/workato_api/docs/ImportResults.md +32 -0
- workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md +29 -0
- workato_platform_cli/client/workato_api/docs/OpenApiSpec.md +30 -0
- workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md +35 -0
- workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md +30 -0
- workato_platform_cli/client/workato_api/docs/PackageResponse.md +33 -0
- workato_platform_cli/client/workato_api/docs/PackagesApi.md +364 -0
- workato_platform_cli/client/workato_api/docs/PicklistRequest.md +30 -0
- workato_platform_cli/client/workato_api/docs/PicklistResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/PlatformConnector.md +36 -0
- workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md +32 -0
- workato_platform_cli/client/workato_api/docs/Project.md +32 -0
- workato_platform_cli/client/workato_api/docs/ProjectsApi.md +173 -0
- workato_platform_cli/client/workato_api/docs/PropertiesApi.md +186 -0
- workato_platform_cli/client/workato_api/docs/Recipe.md +58 -0
- workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md +33 -0
- workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md +30 -0
- workato_platform_cli/client/workato_api/docs/RecipeListResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md +31 -0
- workato_platform_cli/client/workato_api/docs/RecipesApi.md +367 -0
- workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md +34 -0
- workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md +30 -0
- workato_platform_cli/client/workato_api/docs/SuccessResponse.md +29 -0
- workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md +29 -0
- workato_platform_cli/client/workato_api/docs/User.md +48 -0
- workato_platform_cli/client/workato_api/docs/UsersApi.md +84 -0
- workato_platform_cli/client/workato_api/docs/ValidationError.md +30 -0
- workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md +28 -0
- workato_platform_cli/client/workato_api/exceptions.py +216 -0
- workato_platform_cli/client/workato_api/models/__init__.py +83 -0
- workato_platform_cli/client/workato_api/models/api_client.py +185 -0
- workato_platform_cli/client/workato_api/models/api_client_api_collections_inner.py +89 -0
- workato_platform_cli/client/workato_api/models/api_client_api_policies_inner.py +89 -0
- workato_platform_cli/client/workato_api/models/api_client_create_request.py +138 -0
- workato_platform_cli/client/workato_api/models/api_client_list_response.py +101 -0
- workato_platform_cli/client/workato_api/models/api_client_response.py +91 -0
- workato_platform_cli/client/workato_api/models/api_collection.py +110 -0
- workato_platform_cli/client/workato_api/models/api_collection_create_request.py +97 -0
- workato_platform_cli/client/workato_api/models/api_endpoint.py +117 -0
- workato_platform_cli/client/workato_api/models/api_key.py +102 -0
- workato_platform_cli/client/workato_api/models/api_key_create_request.py +93 -0
- workato_platform_cli/client/workato_api/models/api_key_list_response.py +101 -0
- workato_platform_cli/client/workato_api/models/api_key_response.py +91 -0
- workato_platform_cli/client/workato_api/models/asset.py +124 -0
- workato_platform_cli/client/workato_api/models/asset_reference.py +110 -0
- workato_platform_cli/client/workato_api/models/connection.py +173 -0
- workato_platform_cli/client/workato_api/models/connection_create_request.py +99 -0
- workato_platform_cli/client/workato_api/models/connection_update_request.py +97 -0
- workato_platform_cli/client/workato_api/models/connector_action.py +100 -0
- workato_platform_cli/client/workato_api/models/connector_version.py +99 -0
- workato_platform_cli/client/workato_api/models/create_export_manifest_request.py +91 -0
- workato_platform_cli/client/workato_api/models/create_folder_request.py +89 -0
- workato_platform_cli/client/workato_api/models/custom_connector.py +117 -0
- workato_platform_cli/client/workato_api/models/custom_connector_code_response.py +91 -0
- workato_platform_cli/client/workato_api/models/custom_connector_code_response_data.py +87 -0
- workato_platform_cli/client/workato_api/models/custom_connector_list_response.py +95 -0
- workato_platform_cli/client/workato_api/models/data_table.py +107 -0
- workato_platform_cli/client/workato_api/models/data_table_column.py +125 -0
- workato_platform_cli/client/workato_api/models/data_table_column_request.py +130 -0
- workato_platform_cli/client/workato_api/models/data_table_create_request.py +99 -0
- workato_platform_cli/client/workato_api/models/data_table_create_response.py +91 -0
- workato_platform_cli/client/workato_api/models/data_table_list_response.py +95 -0
- workato_platform_cli/client/workato_api/models/data_table_relation.py +90 -0
- workato_platform_cli/client/workato_api/models/delete_project403_response.py +87 -0
- workato_platform_cli/client/workato_api/models/error.py +87 -0
- workato_platform_cli/client/workato_api/models/export_manifest_request.py +107 -0
- workato_platform_cli/client/workato_api/models/export_manifest_response.py +91 -0
- workato_platform_cli/client/workato_api/models/export_manifest_response_result.py +112 -0
- workato_platform_cli/client/workato_api/models/folder.py +110 -0
- workato_platform_cli/client/workato_api/models/folder_assets_response.py +91 -0
- workato_platform_cli/client/workato_api/models/folder_assets_response_result.py +95 -0
- workato_platform_cli/client/workato_api/models/folder_creation_response.py +110 -0
- workato_platform_cli/client/workato_api/models/import_results.py +93 -0
- workato_platform_cli/client/workato_api/models/o_auth_url_response.py +91 -0
- workato_platform_cli/client/workato_api/models/o_auth_url_response_data.py +87 -0
- workato_platform_cli/client/workato_api/models/open_api_spec.py +96 -0
- workato_platform_cli/client/workato_api/models/package_details_response.py +126 -0
- workato_platform_cli/client/workato_api/models/package_details_response_recipe_status_inner.py +99 -0
- workato_platform_cli/client/workato_api/models/package_response.py +109 -0
- workato_platform_cli/client/workato_api/models/picklist_request.py +89 -0
- workato_platform_cli/client/workato_api/models/picklist_response.py +88 -0
- workato_platform_cli/client/workato_api/models/platform_connector.py +116 -0
- workato_platform_cli/client/workato_api/models/platform_connector_list_response.py +101 -0
- workato_platform_cli/client/workato_api/models/project.py +93 -0
- workato_platform_cli/client/workato_api/models/recipe.py +174 -0
- workato_platform_cli/client/workato_api/models/recipe_config_inner.py +100 -0
- workato_platform_cli/client/workato_api/models/recipe_connection_update_request.py +89 -0
- workato_platform_cli/client/workato_api/models/recipe_list_response.py +95 -0
- workato_platform_cli/client/workato_api/models/recipe_start_response.py +91 -0
- workato_platform_cli/client/workato_api/models/runtime_user_connection_create_request.py +97 -0
- workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py +91 -0
- workato_platform_cli/client/workato_api/models/runtime_user_connection_response_data.py +89 -0
- workato_platform_cli/client/workato_api/models/success_response.py +87 -0
- workato_platform_cli/client/workato_api/models/upsert_project_properties_request.py +88 -0
- workato_platform_cli/client/workato_api/models/user.py +151 -0
- workato_platform_cli/client/workato_api/models/validation_error.py +102 -0
- workato_platform_cli/client/workato_api/models/validation_error_errors_value.py +143 -0
- workato_platform_cli/client/workato_api/rest.py +213 -0
- workato_platform_cli/client/workato_api/test/__init__.py +0 -0
- workato_platform_cli/client/workato_api/test/test_api_client.py +94 -0
- workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py +52 -0
- workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py +52 -0
- workato_platform_cli/client/workato_api/test/test_api_client_create_request.py +75 -0
- workato_platform_cli/client/workato_api/test/test_api_client_list_response.py +114 -0
- workato_platform_cli/client/workato_api/test/test_api_client_response.py +104 -0
- workato_platform_cli/client/workato_api/test/test_api_collection.py +72 -0
- workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py +57 -0
- workato_platform_cli/client/workato_api/test/test_api_endpoint.py +75 -0
- workato_platform_cli/client/workato_api/test/test_api_key.py +64 -0
- workato_platform_cli/client/workato_api/test/test_api_key_create_request.py +56 -0
- workato_platform_cli/client/workato_api/test/test_api_key_list_response.py +78 -0
- workato_platform_cli/client/workato_api/test/test_api_key_response.py +68 -0
- workato_platform_cli/client/workato_api/test/test_api_platform_api.py +101 -0
- workato_platform_cli/client/workato_api/test/test_asset.py +67 -0
- workato_platform_cli/client/workato_api/test/test_asset_reference.py +62 -0
- workato_platform_cli/client/workato_api/test/test_connection.py +81 -0
- workato_platform_cli/client/workato_api/test/test_connection_create_request.py +59 -0
- workato_platform_cli/client/workato_api/test/test_connection_update_request.py +56 -0
- workato_platform_cli/client/workato_api/test/test_connections_api.py +73 -0
- workato_platform_cli/client/workato_api/test/test_connector_action.py +59 -0
- workato_platform_cli/client/workato_api/test/test_connector_version.py +58 -0
- workato_platform_cli/client/workato_api/test/test_connectors_api.py +52 -0
- workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py +88 -0
- workato_platform_cli/client/workato_api/test/test_create_folder_request.py +53 -0
- workato_platform_cli/client/workato_api/test/test_custom_connector.py +76 -0
- workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py +54 -0
- workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py +52 -0
- workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py +82 -0
- workato_platform_cli/client/workato_api/test/test_data_table.py +88 -0
- workato_platform_cli/client/workato_api/test/test_data_table_column.py +72 -0
- workato_platform_cli/client/workato_api/test/test_data_table_column_request.py +64 -0
- workato_platform_cli/client/workato_api/test/test_data_table_create_request.py +82 -0
- workato_platform_cli/client/workato_api/test/test_data_table_create_response.py +90 -0
- workato_platform_cli/client/workato_api/test/test_data_table_list_response.py +94 -0
- workato_platform_cli/client/workato_api/test/test_data_table_relation.py +54 -0
- workato_platform_cli/client/workato_api/test/test_data_tables_api.py +45 -0
- workato_platform_cli/client/workato_api/test/test_delete_project403_response.py +51 -0
- workato_platform_cli/client/workato_api/test/test_error.py +52 -0
- workato_platform_cli/client/workato_api/test/test_export_api.py +45 -0
- workato_platform_cli/client/workato_api/test/test_export_manifest_request.py +69 -0
- workato_platform_cli/client/workato_api/test/test_export_manifest_response.py +68 -0
- workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py +66 -0
- workato_platform_cli/client/workato_api/test/test_folder.py +64 -0
- workato_platform_cli/client/workato_api/test/test_folder_assets_response.py +80 -0
- workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py +78 -0
- workato_platform_cli/client/workato_api/test/test_folder_creation_response.py +64 -0
- workato_platform_cli/client/workato_api/test/test_folders_api.py +45 -0
- workato_platform_cli/client/workato_api/test/test_import_results.py +58 -0
- workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py +54 -0
- workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py +52 -0
- workato_platform_cli/client/workato_api/test/test_open_api_spec.py +54 -0
- workato_platform_cli/client/workato_api/test/test_package_details_response.py +64 -0
- workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py +52 -0
- workato_platform_cli/client/workato_api/test/test_package_response.py +58 -0
- workato_platform_cli/client/workato_api/test/test_packages_api.py +59 -0
- workato_platform_cli/client/workato_api/test/test_picklist_request.py +53 -0
- workato_platform_cli/client/workato_api/test/test_picklist_response.py +52 -0
- workato_platform_cli/client/workato_api/test/test_platform_connector.py +94 -0
- workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py +106 -0
- workato_platform_cli/client/workato_api/test/test_project.py +57 -0
- workato_platform_cli/client/workato_api/test/test_projects_api.py +45 -0
- workato_platform_cli/client/workato_api/test/test_properties_api.py +45 -0
- workato_platform_cli/client/workato_api/test/test_recipe.py +124 -0
- workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py +55 -0
- workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py +54 -0
- workato_platform_cli/client/workato_api/test/test_recipe_list_response.py +134 -0
- workato_platform_cli/client/workato_api/test/test_recipe_start_response.py +54 -0
- workato_platform_cli/client/workato_api/test/test_recipes_api.py +59 -0
- workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py +59 -0
- workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py +56 -0
- workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py +54 -0
- workato_platform_cli/client/workato_api/test/test_success_response.py +52 -0
- workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py +52 -0
- workato_platform_cli/client/workato_api/test/test_user.py +85 -0
- workato_platform_cli/client/workato_api/test/test_users_api.py +38 -0
- workato_platform_cli/client/workato_api/test/test_validation_error.py +52 -0
- workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py +50 -0
- workato_platform_cli/client/workato_api_README.md +205 -0
- workato_platform_cli-1.0.0rc5.dev5.dist-info/METADATA +185 -0
- workato_platform_cli-1.0.0rc5.dev5.dist-info/RECORD +306 -0
- workato_platform_cli-1.0.0rc5.dev5.dist-info/WHEEL +4 -0
- workato_platform_cli-1.0.0rc5.dev5.dist-info/entry_points.txt +2 -0
- workato_platform_cli-1.0.0rc5.dev5.dist-info/licenses/LICENSE +7 -0
|
@@ -0,0 +1,2875 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Workato Platform API
|
|
5
|
+
|
|
6
|
+
Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com`
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictInt
|
|
20
|
+
from typing import List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest
|
|
23
|
+
from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse
|
|
24
|
+
from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse
|
|
25
|
+
from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection
|
|
26
|
+
from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest
|
|
27
|
+
from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint
|
|
28
|
+
from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest
|
|
29
|
+
from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse
|
|
30
|
+
from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse
|
|
31
|
+
from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse
|
|
32
|
+
|
|
33
|
+
from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized
|
|
34
|
+
from workato_platform_cli.client.workato_api.api_response import ApiResponse
|
|
35
|
+
from workato_platform_cli.client.workato_api.rest import RESTResponseType
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class APIPlatformApi:
|
|
39
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
40
|
+
Ref: https://openapi-generator.tech
|
|
41
|
+
|
|
42
|
+
Do not edit the class manually.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self, api_client=None) -> None:
|
|
46
|
+
if api_client is None:
|
|
47
|
+
api_client = ApiClient.get_default()
|
|
48
|
+
self.api_client = api_client
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@validate_call
|
|
52
|
+
async def create_api_client(
|
|
53
|
+
self,
|
|
54
|
+
api_client_create_request: ApiClientCreateRequest,
|
|
55
|
+
_request_timeout: Union[
|
|
56
|
+
None,
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Tuple[
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
61
|
+
]
|
|
62
|
+
] = None,
|
|
63
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_content_type: Optional[StrictStr] = None,
|
|
65
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
67
|
+
) -> ApiClientResponse:
|
|
68
|
+
"""Create API client (v2)
|
|
69
|
+
|
|
70
|
+
Create a new API client within a project with various authentication methods
|
|
71
|
+
|
|
72
|
+
:param api_client_create_request: (required)
|
|
73
|
+
:type api_client_create_request: ApiClientCreateRequest
|
|
74
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
75
|
+
number provided, it will be total request
|
|
76
|
+
timeout. It can also be a pair (tuple) of
|
|
77
|
+
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
93
|
+
:return: Returns the result object.
|
|
94
|
+
""" # noqa: E501
|
|
95
|
+
|
|
96
|
+
_param = self._create_api_client_serialize(
|
|
97
|
+
api_client_create_request=api_client_create_request,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'200': "ApiClientResponse",
|
|
106
|
+
'400': "ValidationError",
|
|
107
|
+
'401': "Error",
|
|
108
|
+
}
|
|
109
|
+
response_data = await self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
await response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
async def create_api_client_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
api_client_create_request: ApiClientCreateRequest,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[ApiClientResponse]:
|
|
137
|
+
"""Create API client (v2)
|
|
138
|
+
|
|
139
|
+
Create a new API client within a project with various authentication methods
|
|
140
|
+
|
|
141
|
+
:param api_client_create_request: (required)
|
|
142
|
+
:type api_client_create_request: ApiClientCreateRequest
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._create_api_client_serialize(
|
|
166
|
+
api_client_create_request=api_client_create_request,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'200': "ApiClientResponse",
|
|
175
|
+
'400': "ValidationError",
|
|
176
|
+
'401': "Error",
|
|
177
|
+
}
|
|
178
|
+
response_data = await self.api_client.call_api(
|
|
179
|
+
*_param,
|
|
180
|
+
_request_timeout=_request_timeout
|
|
181
|
+
)
|
|
182
|
+
await response_data.read()
|
|
183
|
+
return self.api_client.response_deserialize(
|
|
184
|
+
response_data=response_data,
|
|
185
|
+
response_types_map=_response_types_map,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@validate_call
|
|
190
|
+
async def create_api_client_without_preload_content(
|
|
191
|
+
self,
|
|
192
|
+
api_client_create_request: ApiClientCreateRequest,
|
|
193
|
+
_request_timeout: Union[
|
|
194
|
+
None,
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Tuple[
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
199
|
+
]
|
|
200
|
+
] = None,
|
|
201
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_content_type: Optional[StrictStr] = None,
|
|
203
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
205
|
+
) -> RESTResponseType:
|
|
206
|
+
"""Create API client (v2)
|
|
207
|
+
|
|
208
|
+
Create a new API client within a project with various authentication methods
|
|
209
|
+
|
|
210
|
+
:param api_client_create_request: (required)
|
|
211
|
+
:type api_client_create_request: ApiClientCreateRequest
|
|
212
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
213
|
+
number provided, it will be total request
|
|
214
|
+
timeout. It can also be a pair (tuple) of
|
|
215
|
+
(connection, read) timeouts.
|
|
216
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
217
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
218
|
+
request; this effectively ignores the
|
|
219
|
+
authentication in the spec for a single request.
|
|
220
|
+
:type _request_auth: dict, optional
|
|
221
|
+
:param _content_type: force content-type for the request.
|
|
222
|
+
:type _content_type: str, Optional
|
|
223
|
+
:param _headers: set to override the headers for a single
|
|
224
|
+
request; this effectively ignores the headers
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _headers: dict, optional
|
|
227
|
+
:param _host_index: set to override the host_index for a single
|
|
228
|
+
request; this effectively ignores the host_index
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _host_index: int, optional
|
|
231
|
+
:return: Returns the result object.
|
|
232
|
+
""" # noqa: E501
|
|
233
|
+
|
|
234
|
+
_param = self._create_api_client_serialize(
|
|
235
|
+
api_client_create_request=api_client_create_request,
|
|
236
|
+
_request_auth=_request_auth,
|
|
237
|
+
_content_type=_content_type,
|
|
238
|
+
_headers=_headers,
|
|
239
|
+
_host_index=_host_index
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
243
|
+
'200': "ApiClientResponse",
|
|
244
|
+
'400': "ValidationError",
|
|
245
|
+
'401': "Error",
|
|
246
|
+
}
|
|
247
|
+
response_data = await self.api_client.call_api(
|
|
248
|
+
*_param,
|
|
249
|
+
_request_timeout=_request_timeout
|
|
250
|
+
)
|
|
251
|
+
return response_data.response
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _create_api_client_serialize(
|
|
255
|
+
self,
|
|
256
|
+
api_client_create_request,
|
|
257
|
+
_request_auth,
|
|
258
|
+
_content_type,
|
|
259
|
+
_headers,
|
|
260
|
+
_host_index,
|
|
261
|
+
) -> RequestSerialized:
|
|
262
|
+
|
|
263
|
+
_host = None
|
|
264
|
+
|
|
265
|
+
_collection_formats: Dict[str, str] = {
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
_path_params: Dict[str, str] = {}
|
|
269
|
+
_query_params: List[Tuple[str, str]] = []
|
|
270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
271
|
+
_form_params: List[Tuple[str, str]] = []
|
|
272
|
+
_files: Dict[
|
|
273
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
274
|
+
] = {}
|
|
275
|
+
_body_params: Optional[bytes] = None
|
|
276
|
+
|
|
277
|
+
# process the path parameters
|
|
278
|
+
# process the query parameters
|
|
279
|
+
# process the header parameters
|
|
280
|
+
# process the form parameters
|
|
281
|
+
# process the body parameter
|
|
282
|
+
if api_client_create_request is not None:
|
|
283
|
+
_body_params = api_client_create_request
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Accept`
|
|
287
|
+
if 'Accept' not in _header_params:
|
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
289
|
+
[
|
|
290
|
+
'application/json'
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
# set the HTTP header `Content-Type`
|
|
295
|
+
if _content_type:
|
|
296
|
+
_header_params['Content-Type'] = _content_type
|
|
297
|
+
else:
|
|
298
|
+
_default_content_type = (
|
|
299
|
+
self.api_client.select_header_content_type(
|
|
300
|
+
[
|
|
301
|
+
'application/json'
|
|
302
|
+
]
|
|
303
|
+
)
|
|
304
|
+
)
|
|
305
|
+
if _default_content_type is not None:
|
|
306
|
+
_header_params['Content-Type'] = _default_content_type
|
|
307
|
+
|
|
308
|
+
# authentication setting
|
|
309
|
+
_auth_settings: List[str] = [
|
|
310
|
+
'BearerAuth'
|
|
311
|
+
]
|
|
312
|
+
|
|
313
|
+
return self.api_client.param_serialize(
|
|
314
|
+
method='POST',
|
|
315
|
+
resource_path='/api/v2/api_clients',
|
|
316
|
+
path_params=_path_params,
|
|
317
|
+
query_params=_query_params,
|
|
318
|
+
header_params=_header_params,
|
|
319
|
+
body=_body_params,
|
|
320
|
+
post_params=_form_params,
|
|
321
|
+
files=_files,
|
|
322
|
+
auth_settings=_auth_settings,
|
|
323
|
+
collection_formats=_collection_formats,
|
|
324
|
+
_host=_host,
|
|
325
|
+
_request_auth=_request_auth
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
@validate_call
|
|
332
|
+
async def create_api_collection(
|
|
333
|
+
self,
|
|
334
|
+
api_collection_create_request: ApiCollectionCreateRequest,
|
|
335
|
+
_request_timeout: Union[
|
|
336
|
+
None,
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Tuple[
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
340
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
341
|
+
]
|
|
342
|
+
] = None,
|
|
343
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_content_type: Optional[StrictStr] = None,
|
|
345
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
346
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
347
|
+
) -> ApiCollection:
|
|
348
|
+
"""Create API collection
|
|
349
|
+
|
|
350
|
+
Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec.
|
|
351
|
+
|
|
352
|
+
:param api_collection_create_request: (required)
|
|
353
|
+
:type api_collection_create_request: ApiCollectionCreateRequest
|
|
354
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
355
|
+
number provided, it will be total request
|
|
356
|
+
timeout. It can also be a pair (tuple) of
|
|
357
|
+
(connection, read) timeouts.
|
|
358
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
359
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
360
|
+
request; this effectively ignores the
|
|
361
|
+
authentication in the spec for a single request.
|
|
362
|
+
:type _request_auth: dict, optional
|
|
363
|
+
:param _content_type: force content-type for the request.
|
|
364
|
+
:type _content_type: str, Optional
|
|
365
|
+
:param _headers: set to override the headers for a single
|
|
366
|
+
request; this effectively ignores the headers
|
|
367
|
+
in the spec for a single request.
|
|
368
|
+
:type _headers: dict, optional
|
|
369
|
+
:param _host_index: set to override the host_index for a single
|
|
370
|
+
request; this effectively ignores the host_index
|
|
371
|
+
in the spec for a single request.
|
|
372
|
+
:type _host_index: int, optional
|
|
373
|
+
:return: Returns the result object.
|
|
374
|
+
""" # noqa: E501
|
|
375
|
+
|
|
376
|
+
_param = self._create_api_collection_serialize(
|
|
377
|
+
api_collection_create_request=api_collection_create_request,
|
|
378
|
+
_request_auth=_request_auth,
|
|
379
|
+
_content_type=_content_type,
|
|
380
|
+
_headers=_headers,
|
|
381
|
+
_host_index=_host_index
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
385
|
+
'200': "ApiCollection",
|
|
386
|
+
'400': "ValidationError",
|
|
387
|
+
'401': "Error",
|
|
388
|
+
}
|
|
389
|
+
response_data = await self.api_client.call_api(
|
|
390
|
+
*_param,
|
|
391
|
+
_request_timeout=_request_timeout
|
|
392
|
+
)
|
|
393
|
+
await response_data.read()
|
|
394
|
+
return self.api_client.response_deserialize(
|
|
395
|
+
response_data=response_data,
|
|
396
|
+
response_types_map=_response_types_map,
|
|
397
|
+
).data
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
@validate_call
|
|
401
|
+
async def create_api_collection_with_http_info(
|
|
402
|
+
self,
|
|
403
|
+
api_collection_create_request: ApiCollectionCreateRequest,
|
|
404
|
+
_request_timeout: Union[
|
|
405
|
+
None,
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
407
|
+
Tuple[
|
|
408
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
409
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
410
|
+
]
|
|
411
|
+
] = None,
|
|
412
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
413
|
+
_content_type: Optional[StrictStr] = None,
|
|
414
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
415
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
416
|
+
) -> ApiResponse[ApiCollection]:
|
|
417
|
+
"""Create API collection
|
|
418
|
+
|
|
419
|
+
Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec.
|
|
420
|
+
|
|
421
|
+
:param api_collection_create_request: (required)
|
|
422
|
+
:type api_collection_create_request: ApiCollectionCreateRequest
|
|
423
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
424
|
+
number provided, it will be total request
|
|
425
|
+
timeout. It can also be a pair (tuple) of
|
|
426
|
+
(connection, read) timeouts.
|
|
427
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
428
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
429
|
+
request; this effectively ignores the
|
|
430
|
+
authentication in the spec for a single request.
|
|
431
|
+
:type _request_auth: dict, optional
|
|
432
|
+
:param _content_type: force content-type for the request.
|
|
433
|
+
:type _content_type: str, Optional
|
|
434
|
+
:param _headers: set to override the headers for a single
|
|
435
|
+
request; this effectively ignores the headers
|
|
436
|
+
in the spec for a single request.
|
|
437
|
+
:type _headers: dict, optional
|
|
438
|
+
:param _host_index: set to override the host_index for a single
|
|
439
|
+
request; this effectively ignores the host_index
|
|
440
|
+
in the spec for a single request.
|
|
441
|
+
:type _host_index: int, optional
|
|
442
|
+
:return: Returns the result object.
|
|
443
|
+
""" # noqa: E501
|
|
444
|
+
|
|
445
|
+
_param = self._create_api_collection_serialize(
|
|
446
|
+
api_collection_create_request=api_collection_create_request,
|
|
447
|
+
_request_auth=_request_auth,
|
|
448
|
+
_content_type=_content_type,
|
|
449
|
+
_headers=_headers,
|
|
450
|
+
_host_index=_host_index
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
454
|
+
'200': "ApiCollection",
|
|
455
|
+
'400': "ValidationError",
|
|
456
|
+
'401': "Error",
|
|
457
|
+
}
|
|
458
|
+
response_data = await self.api_client.call_api(
|
|
459
|
+
*_param,
|
|
460
|
+
_request_timeout=_request_timeout
|
|
461
|
+
)
|
|
462
|
+
await response_data.read()
|
|
463
|
+
return self.api_client.response_deserialize(
|
|
464
|
+
response_data=response_data,
|
|
465
|
+
response_types_map=_response_types_map,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
@validate_call
|
|
470
|
+
async def create_api_collection_without_preload_content(
|
|
471
|
+
self,
|
|
472
|
+
api_collection_create_request: ApiCollectionCreateRequest,
|
|
473
|
+
_request_timeout: Union[
|
|
474
|
+
None,
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Tuple[
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
479
|
+
]
|
|
480
|
+
] = None,
|
|
481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_content_type: Optional[StrictStr] = None,
|
|
483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
485
|
+
) -> RESTResponseType:
|
|
486
|
+
"""Create API collection
|
|
487
|
+
|
|
488
|
+
Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec.
|
|
489
|
+
|
|
490
|
+
:param api_collection_create_request: (required)
|
|
491
|
+
:type api_collection_create_request: ApiCollectionCreateRequest
|
|
492
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
493
|
+
number provided, it will be total request
|
|
494
|
+
timeout. It can also be a pair (tuple) of
|
|
495
|
+
(connection, read) timeouts.
|
|
496
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
497
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
498
|
+
request; this effectively ignores the
|
|
499
|
+
authentication in the spec for a single request.
|
|
500
|
+
:type _request_auth: dict, optional
|
|
501
|
+
:param _content_type: force content-type for the request.
|
|
502
|
+
:type _content_type: str, Optional
|
|
503
|
+
:param _headers: set to override the headers for a single
|
|
504
|
+
request; this effectively ignores the headers
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _headers: dict, optional
|
|
507
|
+
:param _host_index: set to override the host_index for a single
|
|
508
|
+
request; this effectively ignores the host_index
|
|
509
|
+
in the spec for a single request.
|
|
510
|
+
:type _host_index: int, optional
|
|
511
|
+
:return: Returns the result object.
|
|
512
|
+
""" # noqa: E501
|
|
513
|
+
|
|
514
|
+
_param = self._create_api_collection_serialize(
|
|
515
|
+
api_collection_create_request=api_collection_create_request,
|
|
516
|
+
_request_auth=_request_auth,
|
|
517
|
+
_content_type=_content_type,
|
|
518
|
+
_headers=_headers,
|
|
519
|
+
_host_index=_host_index
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
523
|
+
'200': "ApiCollection",
|
|
524
|
+
'400': "ValidationError",
|
|
525
|
+
'401': "Error",
|
|
526
|
+
}
|
|
527
|
+
response_data = await self.api_client.call_api(
|
|
528
|
+
*_param,
|
|
529
|
+
_request_timeout=_request_timeout
|
|
530
|
+
)
|
|
531
|
+
return response_data.response
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
def _create_api_collection_serialize(
|
|
535
|
+
self,
|
|
536
|
+
api_collection_create_request,
|
|
537
|
+
_request_auth,
|
|
538
|
+
_content_type,
|
|
539
|
+
_headers,
|
|
540
|
+
_host_index,
|
|
541
|
+
) -> RequestSerialized:
|
|
542
|
+
|
|
543
|
+
_host = None
|
|
544
|
+
|
|
545
|
+
_collection_formats: Dict[str, str] = {
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
_path_params: Dict[str, str] = {}
|
|
549
|
+
_query_params: List[Tuple[str, str]] = []
|
|
550
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
551
|
+
_form_params: List[Tuple[str, str]] = []
|
|
552
|
+
_files: Dict[
|
|
553
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
554
|
+
] = {}
|
|
555
|
+
_body_params: Optional[bytes] = None
|
|
556
|
+
|
|
557
|
+
# process the path parameters
|
|
558
|
+
# process the query parameters
|
|
559
|
+
# process the header parameters
|
|
560
|
+
# process the form parameters
|
|
561
|
+
# process the body parameter
|
|
562
|
+
if api_collection_create_request is not None:
|
|
563
|
+
_body_params = api_collection_create_request
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
# set the HTTP header `Accept`
|
|
567
|
+
if 'Accept' not in _header_params:
|
|
568
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
569
|
+
[
|
|
570
|
+
'application/json'
|
|
571
|
+
]
|
|
572
|
+
)
|
|
573
|
+
|
|
574
|
+
# set the HTTP header `Content-Type`
|
|
575
|
+
if _content_type:
|
|
576
|
+
_header_params['Content-Type'] = _content_type
|
|
577
|
+
else:
|
|
578
|
+
_default_content_type = (
|
|
579
|
+
self.api_client.select_header_content_type(
|
|
580
|
+
[
|
|
581
|
+
'application/json'
|
|
582
|
+
]
|
|
583
|
+
)
|
|
584
|
+
)
|
|
585
|
+
if _default_content_type is not None:
|
|
586
|
+
_header_params['Content-Type'] = _default_content_type
|
|
587
|
+
|
|
588
|
+
# authentication setting
|
|
589
|
+
_auth_settings: List[str] = [
|
|
590
|
+
'BearerAuth'
|
|
591
|
+
]
|
|
592
|
+
|
|
593
|
+
return self.api_client.param_serialize(
|
|
594
|
+
method='POST',
|
|
595
|
+
resource_path='/api/api_collections',
|
|
596
|
+
path_params=_path_params,
|
|
597
|
+
query_params=_query_params,
|
|
598
|
+
header_params=_header_params,
|
|
599
|
+
body=_body_params,
|
|
600
|
+
post_params=_form_params,
|
|
601
|
+
files=_files,
|
|
602
|
+
auth_settings=_auth_settings,
|
|
603
|
+
collection_formats=_collection_formats,
|
|
604
|
+
_host=_host,
|
|
605
|
+
_request_auth=_request_auth
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
@validate_call
|
|
612
|
+
async def create_api_key(
|
|
613
|
+
self,
|
|
614
|
+
api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")],
|
|
615
|
+
api_key_create_request: ApiKeyCreateRequest,
|
|
616
|
+
_request_timeout: Union[
|
|
617
|
+
None,
|
|
618
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
619
|
+
Tuple[
|
|
620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
621
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
622
|
+
]
|
|
623
|
+
] = None,
|
|
624
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
625
|
+
_content_type: Optional[StrictStr] = None,
|
|
626
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
627
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
628
|
+
) -> ApiKeyResponse:
|
|
629
|
+
"""Create an API key
|
|
630
|
+
|
|
631
|
+
Create a new API key for an API client
|
|
632
|
+
|
|
633
|
+
:param api_client_id: Specify the ID of the API client to create the API key for (required)
|
|
634
|
+
:type api_client_id: int
|
|
635
|
+
:param api_key_create_request: (required)
|
|
636
|
+
:type api_key_create_request: ApiKeyCreateRequest
|
|
637
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
638
|
+
number provided, it will be total request
|
|
639
|
+
timeout. It can also be a pair (tuple) of
|
|
640
|
+
(connection, read) timeouts.
|
|
641
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
642
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
643
|
+
request; this effectively ignores the
|
|
644
|
+
authentication in the spec for a single request.
|
|
645
|
+
:type _request_auth: dict, optional
|
|
646
|
+
:param _content_type: force content-type for the request.
|
|
647
|
+
:type _content_type: str, Optional
|
|
648
|
+
:param _headers: set to override the headers for a single
|
|
649
|
+
request; this effectively ignores the headers
|
|
650
|
+
in the spec for a single request.
|
|
651
|
+
:type _headers: dict, optional
|
|
652
|
+
:param _host_index: set to override the host_index for a single
|
|
653
|
+
request; this effectively ignores the host_index
|
|
654
|
+
in the spec for a single request.
|
|
655
|
+
:type _host_index: int, optional
|
|
656
|
+
:return: Returns the result object.
|
|
657
|
+
""" # noqa: E501
|
|
658
|
+
|
|
659
|
+
_param = self._create_api_key_serialize(
|
|
660
|
+
api_client_id=api_client_id,
|
|
661
|
+
api_key_create_request=api_key_create_request,
|
|
662
|
+
_request_auth=_request_auth,
|
|
663
|
+
_content_type=_content_type,
|
|
664
|
+
_headers=_headers,
|
|
665
|
+
_host_index=_host_index
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
669
|
+
'200': "ApiKeyResponse",
|
|
670
|
+
'400': "ValidationError",
|
|
671
|
+
'401': "Error",
|
|
672
|
+
}
|
|
673
|
+
response_data = await self.api_client.call_api(
|
|
674
|
+
*_param,
|
|
675
|
+
_request_timeout=_request_timeout
|
|
676
|
+
)
|
|
677
|
+
await response_data.read()
|
|
678
|
+
return self.api_client.response_deserialize(
|
|
679
|
+
response_data=response_data,
|
|
680
|
+
response_types_map=_response_types_map,
|
|
681
|
+
).data
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
@validate_call
|
|
685
|
+
async def create_api_key_with_http_info(
|
|
686
|
+
self,
|
|
687
|
+
api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")],
|
|
688
|
+
api_key_create_request: ApiKeyCreateRequest,
|
|
689
|
+
_request_timeout: Union[
|
|
690
|
+
None,
|
|
691
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
692
|
+
Tuple[
|
|
693
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
694
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
695
|
+
]
|
|
696
|
+
] = None,
|
|
697
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
698
|
+
_content_type: Optional[StrictStr] = None,
|
|
699
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
700
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
701
|
+
) -> ApiResponse[ApiKeyResponse]:
|
|
702
|
+
"""Create an API key
|
|
703
|
+
|
|
704
|
+
Create a new API key for an API client
|
|
705
|
+
|
|
706
|
+
:param api_client_id: Specify the ID of the API client to create the API key for (required)
|
|
707
|
+
:type api_client_id: int
|
|
708
|
+
:param api_key_create_request: (required)
|
|
709
|
+
:type api_key_create_request: ApiKeyCreateRequest
|
|
710
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
711
|
+
number provided, it will be total request
|
|
712
|
+
timeout. It can also be a pair (tuple) of
|
|
713
|
+
(connection, read) timeouts.
|
|
714
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
715
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
716
|
+
request; this effectively ignores the
|
|
717
|
+
authentication in the spec for a single request.
|
|
718
|
+
:type _request_auth: dict, optional
|
|
719
|
+
:param _content_type: force content-type for the request.
|
|
720
|
+
:type _content_type: str, Optional
|
|
721
|
+
:param _headers: set to override the headers for a single
|
|
722
|
+
request; this effectively ignores the headers
|
|
723
|
+
in the spec for a single request.
|
|
724
|
+
:type _headers: dict, optional
|
|
725
|
+
:param _host_index: set to override the host_index for a single
|
|
726
|
+
request; this effectively ignores the host_index
|
|
727
|
+
in the spec for a single request.
|
|
728
|
+
:type _host_index: int, optional
|
|
729
|
+
:return: Returns the result object.
|
|
730
|
+
""" # noqa: E501
|
|
731
|
+
|
|
732
|
+
_param = self._create_api_key_serialize(
|
|
733
|
+
api_client_id=api_client_id,
|
|
734
|
+
api_key_create_request=api_key_create_request,
|
|
735
|
+
_request_auth=_request_auth,
|
|
736
|
+
_content_type=_content_type,
|
|
737
|
+
_headers=_headers,
|
|
738
|
+
_host_index=_host_index
|
|
739
|
+
)
|
|
740
|
+
|
|
741
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
742
|
+
'200': "ApiKeyResponse",
|
|
743
|
+
'400': "ValidationError",
|
|
744
|
+
'401': "Error",
|
|
745
|
+
}
|
|
746
|
+
response_data = await self.api_client.call_api(
|
|
747
|
+
*_param,
|
|
748
|
+
_request_timeout=_request_timeout
|
|
749
|
+
)
|
|
750
|
+
await response_data.read()
|
|
751
|
+
return self.api_client.response_deserialize(
|
|
752
|
+
response_data=response_data,
|
|
753
|
+
response_types_map=_response_types_map,
|
|
754
|
+
)
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
@validate_call
|
|
758
|
+
async def create_api_key_without_preload_content(
|
|
759
|
+
self,
|
|
760
|
+
api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")],
|
|
761
|
+
api_key_create_request: ApiKeyCreateRequest,
|
|
762
|
+
_request_timeout: Union[
|
|
763
|
+
None,
|
|
764
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
765
|
+
Tuple[
|
|
766
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
767
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
768
|
+
]
|
|
769
|
+
] = None,
|
|
770
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
771
|
+
_content_type: Optional[StrictStr] = None,
|
|
772
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
773
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
774
|
+
) -> RESTResponseType:
|
|
775
|
+
"""Create an API key
|
|
776
|
+
|
|
777
|
+
Create a new API key for an API client
|
|
778
|
+
|
|
779
|
+
:param api_client_id: Specify the ID of the API client to create the API key for (required)
|
|
780
|
+
:type api_client_id: int
|
|
781
|
+
:param api_key_create_request: (required)
|
|
782
|
+
:type api_key_create_request: ApiKeyCreateRequest
|
|
783
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
784
|
+
number provided, it will be total request
|
|
785
|
+
timeout. It can also be a pair (tuple) of
|
|
786
|
+
(connection, read) timeouts.
|
|
787
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
788
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
789
|
+
request; this effectively ignores the
|
|
790
|
+
authentication in the spec for a single request.
|
|
791
|
+
:type _request_auth: dict, optional
|
|
792
|
+
:param _content_type: force content-type for the request.
|
|
793
|
+
:type _content_type: str, Optional
|
|
794
|
+
:param _headers: set to override the headers for a single
|
|
795
|
+
request; this effectively ignores the headers
|
|
796
|
+
in the spec for a single request.
|
|
797
|
+
:type _headers: dict, optional
|
|
798
|
+
:param _host_index: set to override the host_index for a single
|
|
799
|
+
request; this effectively ignores the host_index
|
|
800
|
+
in the spec for a single request.
|
|
801
|
+
:type _host_index: int, optional
|
|
802
|
+
:return: Returns the result object.
|
|
803
|
+
""" # noqa: E501
|
|
804
|
+
|
|
805
|
+
_param = self._create_api_key_serialize(
|
|
806
|
+
api_client_id=api_client_id,
|
|
807
|
+
api_key_create_request=api_key_create_request,
|
|
808
|
+
_request_auth=_request_auth,
|
|
809
|
+
_content_type=_content_type,
|
|
810
|
+
_headers=_headers,
|
|
811
|
+
_host_index=_host_index
|
|
812
|
+
)
|
|
813
|
+
|
|
814
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
815
|
+
'200': "ApiKeyResponse",
|
|
816
|
+
'400': "ValidationError",
|
|
817
|
+
'401': "Error",
|
|
818
|
+
}
|
|
819
|
+
response_data = await self.api_client.call_api(
|
|
820
|
+
*_param,
|
|
821
|
+
_request_timeout=_request_timeout
|
|
822
|
+
)
|
|
823
|
+
return response_data.response
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
def _create_api_key_serialize(
|
|
827
|
+
self,
|
|
828
|
+
api_client_id,
|
|
829
|
+
api_key_create_request,
|
|
830
|
+
_request_auth,
|
|
831
|
+
_content_type,
|
|
832
|
+
_headers,
|
|
833
|
+
_host_index,
|
|
834
|
+
) -> RequestSerialized:
|
|
835
|
+
|
|
836
|
+
_host = None
|
|
837
|
+
|
|
838
|
+
_collection_formats: Dict[str, str] = {
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
_path_params: Dict[str, str] = {}
|
|
842
|
+
_query_params: List[Tuple[str, str]] = []
|
|
843
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
844
|
+
_form_params: List[Tuple[str, str]] = []
|
|
845
|
+
_files: Dict[
|
|
846
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
847
|
+
] = {}
|
|
848
|
+
_body_params: Optional[bytes] = None
|
|
849
|
+
|
|
850
|
+
# process the path parameters
|
|
851
|
+
if api_client_id is not None:
|
|
852
|
+
_path_params['api_client_id'] = api_client_id
|
|
853
|
+
# process the query parameters
|
|
854
|
+
# process the header parameters
|
|
855
|
+
# process the form parameters
|
|
856
|
+
# process the body parameter
|
|
857
|
+
if api_key_create_request is not None:
|
|
858
|
+
_body_params = api_key_create_request
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
# set the HTTP header `Accept`
|
|
862
|
+
if 'Accept' not in _header_params:
|
|
863
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
864
|
+
[
|
|
865
|
+
'application/json'
|
|
866
|
+
]
|
|
867
|
+
)
|
|
868
|
+
|
|
869
|
+
# set the HTTP header `Content-Type`
|
|
870
|
+
if _content_type:
|
|
871
|
+
_header_params['Content-Type'] = _content_type
|
|
872
|
+
else:
|
|
873
|
+
_default_content_type = (
|
|
874
|
+
self.api_client.select_header_content_type(
|
|
875
|
+
[
|
|
876
|
+
'application/json'
|
|
877
|
+
]
|
|
878
|
+
)
|
|
879
|
+
)
|
|
880
|
+
if _default_content_type is not None:
|
|
881
|
+
_header_params['Content-Type'] = _default_content_type
|
|
882
|
+
|
|
883
|
+
# authentication setting
|
|
884
|
+
_auth_settings: List[str] = [
|
|
885
|
+
'BearerAuth'
|
|
886
|
+
]
|
|
887
|
+
|
|
888
|
+
return self.api_client.param_serialize(
|
|
889
|
+
method='POST',
|
|
890
|
+
resource_path='/api/v2/api_clients/{api_client_id}/api_keys',
|
|
891
|
+
path_params=_path_params,
|
|
892
|
+
query_params=_query_params,
|
|
893
|
+
header_params=_header_params,
|
|
894
|
+
body=_body_params,
|
|
895
|
+
post_params=_form_params,
|
|
896
|
+
files=_files,
|
|
897
|
+
auth_settings=_auth_settings,
|
|
898
|
+
collection_formats=_collection_formats,
|
|
899
|
+
_host=_host,
|
|
900
|
+
_request_auth=_request_auth
|
|
901
|
+
)
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
@validate_call
|
|
907
|
+
async def disable_api_endpoint(
|
|
908
|
+
self,
|
|
909
|
+
api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")],
|
|
910
|
+
_request_timeout: Union[
|
|
911
|
+
None,
|
|
912
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
913
|
+
Tuple[
|
|
914
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
915
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
916
|
+
]
|
|
917
|
+
] = None,
|
|
918
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
919
|
+
_content_type: Optional[StrictStr] = None,
|
|
920
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
921
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
922
|
+
) -> SuccessResponse:
|
|
923
|
+
"""Disable an API endpoint
|
|
924
|
+
|
|
925
|
+
Disables an active API endpoint. The endpoint can no longer be called by a client.
|
|
926
|
+
|
|
927
|
+
:param api_endpoint_id: ID of the API endpoint (required)
|
|
928
|
+
:type api_endpoint_id: int
|
|
929
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
930
|
+
number provided, it will be total request
|
|
931
|
+
timeout. It can also be a pair (tuple) of
|
|
932
|
+
(connection, read) timeouts.
|
|
933
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
934
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
935
|
+
request; this effectively ignores the
|
|
936
|
+
authentication in the spec for a single request.
|
|
937
|
+
:type _request_auth: dict, optional
|
|
938
|
+
:param _content_type: force content-type for the request.
|
|
939
|
+
:type _content_type: str, Optional
|
|
940
|
+
:param _headers: set to override the headers for a single
|
|
941
|
+
request; this effectively ignores the headers
|
|
942
|
+
in the spec for a single request.
|
|
943
|
+
:type _headers: dict, optional
|
|
944
|
+
:param _host_index: set to override the host_index for a single
|
|
945
|
+
request; this effectively ignores the host_index
|
|
946
|
+
in the spec for a single request.
|
|
947
|
+
:type _host_index: int, optional
|
|
948
|
+
:return: Returns the result object.
|
|
949
|
+
""" # noqa: E501
|
|
950
|
+
|
|
951
|
+
_param = self._disable_api_endpoint_serialize(
|
|
952
|
+
api_endpoint_id=api_endpoint_id,
|
|
953
|
+
_request_auth=_request_auth,
|
|
954
|
+
_content_type=_content_type,
|
|
955
|
+
_headers=_headers,
|
|
956
|
+
_host_index=_host_index
|
|
957
|
+
)
|
|
958
|
+
|
|
959
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
960
|
+
'200': "SuccessResponse",
|
|
961
|
+
'401': "Error",
|
|
962
|
+
}
|
|
963
|
+
response_data = await self.api_client.call_api(
|
|
964
|
+
*_param,
|
|
965
|
+
_request_timeout=_request_timeout
|
|
966
|
+
)
|
|
967
|
+
await response_data.read()
|
|
968
|
+
return self.api_client.response_deserialize(
|
|
969
|
+
response_data=response_data,
|
|
970
|
+
response_types_map=_response_types_map,
|
|
971
|
+
).data
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
@validate_call
|
|
975
|
+
async def disable_api_endpoint_with_http_info(
|
|
976
|
+
self,
|
|
977
|
+
api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")],
|
|
978
|
+
_request_timeout: Union[
|
|
979
|
+
None,
|
|
980
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
981
|
+
Tuple[
|
|
982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
983
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
984
|
+
]
|
|
985
|
+
] = None,
|
|
986
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
987
|
+
_content_type: Optional[StrictStr] = None,
|
|
988
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
989
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
990
|
+
) -> ApiResponse[SuccessResponse]:
|
|
991
|
+
"""Disable an API endpoint
|
|
992
|
+
|
|
993
|
+
Disables an active API endpoint. The endpoint can no longer be called by a client.
|
|
994
|
+
|
|
995
|
+
:param api_endpoint_id: ID of the API endpoint (required)
|
|
996
|
+
:type api_endpoint_id: int
|
|
997
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
998
|
+
number provided, it will be total request
|
|
999
|
+
timeout. It can also be a pair (tuple) of
|
|
1000
|
+
(connection, read) timeouts.
|
|
1001
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1002
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1003
|
+
request; this effectively ignores the
|
|
1004
|
+
authentication in the spec for a single request.
|
|
1005
|
+
:type _request_auth: dict, optional
|
|
1006
|
+
:param _content_type: force content-type for the request.
|
|
1007
|
+
:type _content_type: str, Optional
|
|
1008
|
+
:param _headers: set to override the headers for a single
|
|
1009
|
+
request; this effectively ignores the headers
|
|
1010
|
+
in the spec for a single request.
|
|
1011
|
+
:type _headers: dict, optional
|
|
1012
|
+
:param _host_index: set to override the host_index for a single
|
|
1013
|
+
request; this effectively ignores the host_index
|
|
1014
|
+
in the spec for a single request.
|
|
1015
|
+
:type _host_index: int, optional
|
|
1016
|
+
:return: Returns the result object.
|
|
1017
|
+
""" # noqa: E501
|
|
1018
|
+
|
|
1019
|
+
_param = self._disable_api_endpoint_serialize(
|
|
1020
|
+
api_endpoint_id=api_endpoint_id,
|
|
1021
|
+
_request_auth=_request_auth,
|
|
1022
|
+
_content_type=_content_type,
|
|
1023
|
+
_headers=_headers,
|
|
1024
|
+
_host_index=_host_index
|
|
1025
|
+
)
|
|
1026
|
+
|
|
1027
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1028
|
+
'200': "SuccessResponse",
|
|
1029
|
+
'401': "Error",
|
|
1030
|
+
}
|
|
1031
|
+
response_data = await self.api_client.call_api(
|
|
1032
|
+
*_param,
|
|
1033
|
+
_request_timeout=_request_timeout
|
|
1034
|
+
)
|
|
1035
|
+
await response_data.read()
|
|
1036
|
+
return self.api_client.response_deserialize(
|
|
1037
|
+
response_data=response_data,
|
|
1038
|
+
response_types_map=_response_types_map,
|
|
1039
|
+
)
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
@validate_call
|
|
1043
|
+
async def disable_api_endpoint_without_preload_content(
|
|
1044
|
+
self,
|
|
1045
|
+
api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")],
|
|
1046
|
+
_request_timeout: Union[
|
|
1047
|
+
None,
|
|
1048
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1049
|
+
Tuple[
|
|
1050
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1051
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1052
|
+
]
|
|
1053
|
+
] = None,
|
|
1054
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1055
|
+
_content_type: Optional[StrictStr] = None,
|
|
1056
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1057
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1058
|
+
) -> RESTResponseType:
|
|
1059
|
+
"""Disable an API endpoint
|
|
1060
|
+
|
|
1061
|
+
Disables an active API endpoint. The endpoint can no longer be called by a client.
|
|
1062
|
+
|
|
1063
|
+
:param api_endpoint_id: ID of the API endpoint (required)
|
|
1064
|
+
:type api_endpoint_id: int
|
|
1065
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1066
|
+
number provided, it will be total request
|
|
1067
|
+
timeout. It can also be a pair (tuple) of
|
|
1068
|
+
(connection, read) timeouts.
|
|
1069
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1070
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1071
|
+
request; this effectively ignores the
|
|
1072
|
+
authentication in the spec for a single request.
|
|
1073
|
+
:type _request_auth: dict, optional
|
|
1074
|
+
:param _content_type: force content-type for the request.
|
|
1075
|
+
:type _content_type: str, Optional
|
|
1076
|
+
:param _headers: set to override the headers for a single
|
|
1077
|
+
request; this effectively ignores the headers
|
|
1078
|
+
in the spec for a single request.
|
|
1079
|
+
:type _headers: dict, optional
|
|
1080
|
+
:param _host_index: set to override the host_index for a single
|
|
1081
|
+
request; this effectively ignores the host_index
|
|
1082
|
+
in the spec for a single request.
|
|
1083
|
+
:type _host_index: int, optional
|
|
1084
|
+
:return: Returns the result object.
|
|
1085
|
+
""" # noqa: E501
|
|
1086
|
+
|
|
1087
|
+
_param = self._disable_api_endpoint_serialize(
|
|
1088
|
+
api_endpoint_id=api_endpoint_id,
|
|
1089
|
+
_request_auth=_request_auth,
|
|
1090
|
+
_content_type=_content_type,
|
|
1091
|
+
_headers=_headers,
|
|
1092
|
+
_host_index=_host_index
|
|
1093
|
+
)
|
|
1094
|
+
|
|
1095
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1096
|
+
'200': "SuccessResponse",
|
|
1097
|
+
'401': "Error",
|
|
1098
|
+
}
|
|
1099
|
+
response_data = await self.api_client.call_api(
|
|
1100
|
+
*_param,
|
|
1101
|
+
_request_timeout=_request_timeout
|
|
1102
|
+
)
|
|
1103
|
+
return response_data.response
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
def _disable_api_endpoint_serialize(
|
|
1107
|
+
self,
|
|
1108
|
+
api_endpoint_id,
|
|
1109
|
+
_request_auth,
|
|
1110
|
+
_content_type,
|
|
1111
|
+
_headers,
|
|
1112
|
+
_host_index,
|
|
1113
|
+
) -> RequestSerialized:
|
|
1114
|
+
|
|
1115
|
+
_host = None
|
|
1116
|
+
|
|
1117
|
+
_collection_formats: Dict[str, str] = {
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
_path_params: Dict[str, str] = {}
|
|
1121
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1122
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1123
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1124
|
+
_files: Dict[
|
|
1125
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1126
|
+
] = {}
|
|
1127
|
+
_body_params: Optional[bytes] = None
|
|
1128
|
+
|
|
1129
|
+
# process the path parameters
|
|
1130
|
+
if api_endpoint_id is not None:
|
|
1131
|
+
_path_params['api_endpoint_id'] = api_endpoint_id
|
|
1132
|
+
# process the query parameters
|
|
1133
|
+
# process the header parameters
|
|
1134
|
+
# process the form parameters
|
|
1135
|
+
# process the body parameter
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
# set the HTTP header `Accept`
|
|
1139
|
+
if 'Accept' not in _header_params:
|
|
1140
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1141
|
+
[
|
|
1142
|
+
'application/json'
|
|
1143
|
+
]
|
|
1144
|
+
)
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
# authentication setting
|
|
1148
|
+
_auth_settings: List[str] = [
|
|
1149
|
+
'BearerAuth'
|
|
1150
|
+
]
|
|
1151
|
+
|
|
1152
|
+
return self.api_client.param_serialize(
|
|
1153
|
+
method='PUT',
|
|
1154
|
+
resource_path='/api/api_endpoints/{api_endpoint_id}/disable',
|
|
1155
|
+
path_params=_path_params,
|
|
1156
|
+
query_params=_query_params,
|
|
1157
|
+
header_params=_header_params,
|
|
1158
|
+
body=_body_params,
|
|
1159
|
+
post_params=_form_params,
|
|
1160
|
+
files=_files,
|
|
1161
|
+
auth_settings=_auth_settings,
|
|
1162
|
+
collection_formats=_collection_formats,
|
|
1163
|
+
_host=_host,
|
|
1164
|
+
_request_auth=_request_auth
|
|
1165
|
+
)
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
@validate_call
|
|
1171
|
+
async def enable_api_endpoint(
|
|
1172
|
+
self,
|
|
1173
|
+
api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")],
|
|
1174
|
+
_request_timeout: Union[
|
|
1175
|
+
None,
|
|
1176
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1177
|
+
Tuple[
|
|
1178
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1179
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1180
|
+
]
|
|
1181
|
+
] = None,
|
|
1182
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1183
|
+
_content_type: Optional[StrictStr] = None,
|
|
1184
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1185
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1186
|
+
) -> SuccessResponse:
|
|
1187
|
+
"""Enable an API endpoint
|
|
1188
|
+
|
|
1189
|
+
Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully.
|
|
1190
|
+
|
|
1191
|
+
:param api_endpoint_id: ID of the API endpoint (required)
|
|
1192
|
+
:type api_endpoint_id: int
|
|
1193
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1194
|
+
number provided, it will be total request
|
|
1195
|
+
timeout. It can also be a pair (tuple) of
|
|
1196
|
+
(connection, read) timeouts.
|
|
1197
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1198
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1199
|
+
request; this effectively ignores the
|
|
1200
|
+
authentication in the spec for a single request.
|
|
1201
|
+
:type _request_auth: dict, optional
|
|
1202
|
+
:param _content_type: force content-type for the request.
|
|
1203
|
+
:type _content_type: str, Optional
|
|
1204
|
+
:param _headers: set to override the headers for a single
|
|
1205
|
+
request; this effectively ignores the headers
|
|
1206
|
+
in the spec for a single request.
|
|
1207
|
+
:type _headers: dict, optional
|
|
1208
|
+
:param _host_index: set to override the host_index for a single
|
|
1209
|
+
request; this effectively ignores the host_index
|
|
1210
|
+
in the spec for a single request.
|
|
1211
|
+
:type _host_index: int, optional
|
|
1212
|
+
:return: Returns the result object.
|
|
1213
|
+
""" # noqa: E501
|
|
1214
|
+
|
|
1215
|
+
_param = self._enable_api_endpoint_serialize(
|
|
1216
|
+
api_endpoint_id=api_endpoint_id,
|
|
1217
|
+
_request_auth=_request_auth,
|
|
1218
|
+
_content_type=_content_type,
|
|
1219
|
+
_headers=_headers,
|
|
1220
|
+
_host_index=_host_index
|
|
1221
|
+
)
|
|
1222
|
+
|
|
1223
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1224
|
+
'200': "SuccessResponse",
|
|
1225
|
+
'401': "Error",
|
|
1226
|
+
}
|
|
1227
|
+
response_data = await self.api_client.call_api(
|
|
1228
|
+
*_param,
|
|
1229
|
+
_request_timeout=_request_timeout
|
|
1230
|
+
)
|
|
1231
|
+
await response_data.read()
|
|
1232
|
+
return self.api_client.response_deserialize(
|
|
1233
|
+
response_data=response_data,
|
|
1234
|
+
response_types_map=_response_types_map,
|
|
1235
|
+
).data
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
@validate_call
|
|
1239
|
+
async def enable_api_endpoint_with_http_info(
|
|
1240
|
+
self,
|
|
1241
|
+
api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")],
|
|
1242
|
+
_request_timeout: Union[
|
|
1243
|
+
None,
|
|
1244
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1245
|
+
Tuple[
|
|
1246
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1248
|
+
]
|
|
1249
|
+
] = None,
|
|
1250
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1251
|
+
_content_type: Optional[StrictStr] = None,
|
|
1252
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1253
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1254
|
+
) -> ApiResponse[SuccessResponse]:
|
|
1255
|
+
"""Enable an API endpoint
|
|
1256
|
+
|
|
1257
|
+
Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully.
|
|
1258
|
+
|
|
1259
|
+
:param api_endpoint_id: ID of the API endpoint (required)
|
|
1260
|
+
:type api_endpoint_id: int
|
|
1261
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1262
|
+
number provided, it will be total request
|
|
1263
|
+
timeout. It can also be a pair (tuple) of
|
|
1264
|
+
(connection, read) timeouts.
|
|
1265
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1266
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1267
|
+
request; this effectively ignores the
|
|
1268
|
+
authentication in the spec for a single request.
|
|
1269
|
+
:type _request_auth: dict, optional
|
|
1270
|
+
:param _content_type: force content-type for the request.
|
|
1271
|
+
:type _content_type: str, Optional
|
|
1272
|
+
:param _headers: set to override the headers for a single
|
|
1273
|
+
request; this effectively ignores the headers
|
|
1274
|
+
in the spec for a single request.
|
|
1275
|
+
:type _headers: dict, optional
|
|
1276
|
+
:param _host_index: set to override the host_index for a single
|
|
1277
|
+
request; this effectively ignores the host_index
|
|
1278
|
+
in the spec for a single request.
|
|
1279
|
+
:type _host_index: int, optional
|
|
1280
|
+
:return: Returns the result object.
|
|
1281
|
+
""" # noqa: E501
|
|
1282
|
+
|
|
1283
|
+
_param = self._enable_api_endpoint_serialize(
|
|
1284
|
+
api_endpoint_id=api_endpoint_id,
|
|
1285
|
+
_request_auth=_request_auth,
|
|
1286
|
+
_content_type=_content_type,
|
|
1287
|
+
_headers=_headers,
|
|
1288
|
+
_host_index=_host_index
|
|
1289
|
+
)
|
|
1290
|
+
|
|
1291
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1292
|
+
'200': "SuccessResponse",
|
|
1293
|
+
'401': "Error",
|
|
1294
|
+
}
|
|
1295
|
+
response_data = await self.api_client.call_api(
|
|
1296
|
+
*_param,
|
|
1297
|
+
_request_timeout=_request_timeout
|
|
1298
|
+
)
|
|
1299
|
+
await response_data.read()
|
|
1300
|
+
return self.api_client.response_deserialize(
|
|
1301
|
+
response_data=response_data,
|
|
1302
|
+
response_types_map=_response_types_map,
|
|
1303
|
+
)
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
@validate_call
|
|
1307
|
+
async def enable_api_endpoint_without_preload_content(
|
|
1308
|
+
self,
|
|
1309
|
+
api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")],
|
|
1310
|
+
_request_timeout: Union[
|
|
1311
|
+
None,
|
|
1312
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1313
|
+
Tuple[
|
|
1314
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1315
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1316
|
+
]
|
|
1317
|
+
] = None,
|
|
1318
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1319
|
+
_content_type: Optional[StrictStr] = None,
|
|
1320
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1321
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1322
|
+
) -> RESTResponseType:
|
|
1323
|
+
"""Enable an API endpoint
|
|
1324
|
+
|
|
1325
|
+
Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully.
|
|
1326
|
+
|
|
1327
|
+
:param api_endpoint_id: ID of the API endpoint (required)
|
|
1328
|
+
:type api_endpoint_id: int
|
|
1329
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1330
|
+
number provided, it will be total request
|
|
1331
|
+
timeout. It can also be a pair (tuple) of
|
|
1332
|
+
(connection, read) timeouts.
|
|
1333
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1334
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1335
|
+
request; this effectively ignores the
|
|
1336
|
+
authentication in the spec for a single request.
|
|
1337
|
+
:type _request_auth: dict, optional
|
|
1338
|
+
:param _content_type: force content-type for the request.
|
|
1339
|
+
:type _content_type: str, Optional
|
|
1340
|
+
:param _headers: set to override the headers for a single
|
|
1341
|
+
request; this effectively ignores the headers
|
|
1342
|
+
in the spec for a single request.
|
|
1343
|
+
:type _headers: dict, optional
|
|
1344
|
+
:param _host_index: set to override the host_index for a single
|
|
1345
|
+
request; this effectively ignores the host_index
|
|
1346
|
+
in the spec for a single request.
|
|
1347
|
+
:type _host_index: int, optional
|
|
1348
|
+
:return: Returns the result object.
|
|
1349
|
+
""" # noqa: E501
|
|
1350
|
+
|
|
1351
|
+
_param = self._enable_api_endpoint_serialize(
|
|
1352
|
+
api_endpoint_id=api_endpoint_id,
|
|
1353
|
+
_request_auth=_request_auth,
|
|
1354
|
+
_content_type=_content_type,
|
|
1355
|
+
_headers=_headers,
|
|
1356
|
+
_host_index=_host_index
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1360
|
+
'200': "SuccessResponse",
|
|
1361
|
+
'401': "Error",
|
|
1362
|
+
}
|
|
1363
|
+
response_data = await self.api_client.call_api(
|
|
1364
|
+
*_param,
|
|
1365
|
+
_request_timeout=_request_timeout
|
|
1366
|
+
)
|
|
1367
|
+
return response_data.response
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
def _enable_api_endpoint_serialize(
|
|
1371
|
+
self,
|
|
1372
|
+
api_endpoint_id,
|
|
1373
|
+
_request_auth,
|
|
1374
|
+
_content_type,
|
|
1375
|
+
_headers,
|
|
1376
|
+
_host_index,
|
|
1377
|
+
) -> RequestSerialized:
|
|
1378
|
+
|
|
1379
|
+
_host = None
|
|
1380
|
+
|
|
1381
|
+
_collection_formats: Dict[str, str] = {
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
_path_params: Dict[str, str] = {}
|
|
1385
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1386
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1387
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1388
|
+
_files: Dict[
|
|
1389
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1390
|
+
] = {}
|
|
1391
|
+
_body_params: Optional[bytes] = None
|
|
1392
|
+
|
|
1393
|
+
# process the path parameters
|
|
1394
|
+
if api_endpoint_id is not None:
|
|
1395
|
+
_path_params['api_endpoint_id'] = api_endpoint_id
|
|
1396
|
+
# process the query parameters
|
|
1397
|
+
# process the header parameters
|
|
1398
|
+
# process the form parameters
|
|
1399
|
+
# process the body parameter
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
# set the HTTP header `Accept`
|
|
1403
|
+
if 'Accept' not in _header_params:
|
|
1404
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1405
|
+
[
|
|
1406
|
+
'application/json'
|
|
1407
|
+
]
|
|
1408
|
+
)
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
# authentication setting
|
|
1412
|
+
_auth_settings: List[str] = [
|
|
1413
|
+
'BearerAuth'
|
|
1414
|
+
]
|
|
1415
|
+
|
|
1416
|
+
return self.api_client.param_serialize(
|
|
1417
|
+
method='PUT',
|
|
1418
|
+
resource_path='/api/api_endpoints/{api_endpoint_id}/enable',
|
|
1419
|
+
path_params=_path_params,
|
|
1420
|
+
query_params=_query_params,
|
|
1421
|
+
header_params=_header_params,
|
|
1422
|
+
body=_body_params,
|
|
1423
|
+
post_params=_form_params,
|
|
1424
|
+
files=_files,
|
|
1425
|
+
auth_settings=_auth_settings,
|
|
1426
|
+
collection_formats=_collection_formats,
|
|
1427
|
+
_host=_host,
|
|
1428
|
+
_request_auth=_request_auth
|
|
1429
|
+
)
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
@validate_call
|
|
1435
|
+
async def list_api_clients(
|
|
1436
|
+
self,
|
|
1437
|
+
project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None,
|
|
1438
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1439
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None,
|
|
1440
|
+
cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None,
|
|
1441
|
+
_request_timeout: Union[
|
|
1442
|
+
None,
|
|
1443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1444
|
+
Tuple[
|
|
1445
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1446
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1447
|
+
]
|
|
1448
|
+
] = None,
|
|
1449
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1450
|
+
_content_type: Optional[StrictStr] = None,
|
|
1451
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1452
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1453
|
+
) -> ApiClientListResponse:
|
|
1454
|
+
"""List API clients (v2)
|
|
1455
|
+
|
|
1456
|
+
List all API clients. This endpoint includes the project_id of the API client in the response.
|
|
1457
|
+
|
|
1458
|
+
:param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint
|
|
1459
|
+
:type project_id: int
|
|
1460
|
+
:param page: Page number
|
|
1461
|
+
:type page: int
|
|
1462
|
+
:param per_page: Page size. The maximum page size is 100
|
|
1463
|
+
:type per_page: int
|
|
1464
|
+
:param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles
|
|
1465
|
+
:type cert_bundle_ids: List[int]
|
|
1466
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1467
|
+
number provided, it will be total request
|
|
1468
|
+
timeout. It can also be a pair (tuple) of
|
|
1469
|
+
(connection, read) timeouts.
|
|
1470
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1471
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1472
|
+
request; this effectively ignores the
|
|
1473
|
+
authentication in the spec for a single request.
|
|
1474
|
+
:type _request_auth: dict, optional
|
|
1475
|
+
:param _content_type: force content-type for the request.
|
|
1476
|
+
:type _content_type: str, Optional
|
|
1477
|
+
:param _headers: set to override the headers for a single
|
|
1478
|
+
request; this effectively ignores the headers
|
|
1479
|
+
in the spec for a single request.
|
|
1480
|
+
:type _headers: dict, optional
|
|
1481
|
+
:param _host_index: set to override the host_index for a single
|
|
1482
|
+
request; this effectively ignores the host_index
|
|
1483
|
+
in the spec for a single request.
|
|
1484
|
+
:type _host_index: int, optional
|
|
1485
|
+
:return: Returns the result object.
|
|
1486
|
+
""" # noqa: E501
|
|
1487
|
+
|
|
1488
|
+
_param = self._list_api_clients_serialize(
|
|
1489
|
+
project_id=project_id,
|
|
1490
|
+
page=page,
|
|
1491
|
+
per_page=per_page,
|
|
1492
|
+
cert_bundle_ids=cert_bundle_ids,
|
|
1493
|
+
_request_auth=_request_auth,
|
|
1494
|
+
_content_type=_content_type,
|
|
1495
|
+
_headers=_headers,
|
|
1496
|
+
_host_index=_host_index
|
|
1497
|
+
)
|
|
1498
|
+
|
|
1499
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1500
|
+
'200': "ApiClientListResponse",
|
|
1501
|
+
'401': "Error",
|
|
1502
|
+
}
|
|
1503
|
+
response_data = await self.api_client.call_api(
|
|
1504
|
+
*_param,
|
|
1505
|
+
_request_timeout=_request_timeout
|
|
1506
|
+
)
|
|
1507
|
+
await response_data.read()
|
|
1508
|
+
return self.api_client.response_deserialize(
|
|
1509
|
+
response_data=response_data,
|
|
1510
|
+
response_types_map=_response_types_map,
|
|
1511
|
+
).data
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
@validate_call
|
|
1515
|
+
async def list_api_clients_with_http_info(
|
|
1516
|
+
self,
|
|
1517
|
+
project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None,
|
|
1518
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1519
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None,
|
|
1520
|
+
cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None,
|
|
1521
|
+
_request_timeout: Union[
|
|
1522
|
+
None,
|
|
1523
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1524
|
+
Tuple[
|
|
1525
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1526
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1527
|
+
]
|
|
1528
|
+
] = None,
|
|
1529
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1530
|
+
_content_type: Optional[StrictStr] = None,
|
|
1531
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1532
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1533
|
+
) -> ApiResponse[ApiClientListResponse]:
|
|
1534
|
+
"""List API clients (v2)
|
|
1535
|
+
|
|
1536
|
+
List all API clients. This endpoint includes the project_id of the API client in the response.
|
|
1537
|
+
|
|
1538
|
+
:param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint
|
|
1539
|
+
:type project_id: int
|
|
1540
|
+
:param page: Page number
|
|
1541
|
+
:type page: int
|
|
1542
|
+
:param per_page: Page size. The maximum page size is 100
|
|
1543
|
+
:type per_page: int
|
|
1544
|
+
:param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles
|
|
1545
|
+
:type cert_bundle_ids: List[int]
|
|
1546
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1547
|
+
number provided, it will be total request
|
|
1548
|
+
timeout. It can also be a pair (tuple) of
|
|
1549
|
+
(connection, read) timeouts.
|
|
1550
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1551
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1552
|
+
request; this effectively ignores the
|
|
1553
|
+
authentication in the spec for a single request.
|
|
1554
|
+
:type _request_auth: dict, optional
|
|
1555
|
+
:param _content_type: force content-type for the request.
|
|
1556
|
+
:type _content_type: str, Optional
|
|
1557
|
+
:param _headers: set to override the headers for a single
|
|
1558
|
+
request; this effectively ignores the headers
|
|
1559
|
+
in the spec for a single request.
|
|
1560
|
+
:type _headers: dict, optional
|
|
1561
|
+
:param _host_index: set to override the host_index for a single
|
|
1562
|
+
request; this effectively ignores the host_index
|
|
1563
|
+
in the spec for a single request.
|
|
1564
|
+
:type _host_index: int, optional
|
|
1565
|
+
:return: Returns the result object.
|
|
1566
|
+
""" # noqa: E501
|
|
1567
|
+
|
|
1568
|
+
_param = self._list_api_clients_serialize(
|
|
1569
|
+
project_id=project_id,
|
|
1570
|
+
page=page,
|
|
1571
|
+
per_page=per_page,
|
|
1572
|
+
cert_bundle_ids=cert_bundle_ids,
|
|
1573
|
+
_request_auth=_request_auth,
|
|
1574
|
+
_content_type=_content_type,
|
|
1575
|
+
_headers=_headers,
|
|
1576
|
+
_host_index=_host_index
|
|
1577
|
+
)
|
|
1578
|
+
|
|
1579
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1580
|
+
'200': "ApiClientListResponse",
|
|
1581
|
+
'401': "Error",
|
|
1582
|
+
}
|
|
1583
|
+
response_data = await self.api_client.call_api(
|
|
1584
|
+
*_param,
|
|
1585
|
+
_request_timeout=_request_timeout
|
|
1586
|
+
)
|
|
1587
|
+
await response_data.read()
|
|
1588
|
+
return self.api_client.response_deserialize(
|
|
1589
|
+
response_data=response_data,
|
|
1590
|
+
response_types_map=_response_types_map,
|
|
1591
|
+
)
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
@validate_call
|
|
1595
|
+
async def list_api_clients_without_preload_content(
|
|
1596
|
+
self,
|
|
1597
|
+
project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None,
|
|
1598
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1599
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None,
|
|
1600
|
+
cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None,
|
|
1601
|
+
_request_timeout: Union[
|
|
1602
|
+
None,
|
|
1603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1604
|
+
Tuple[
|
|
1605
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1606
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1607
|
+
]
|
|
1608
|
+
] = None,
|
|
1609
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1610
|
+
_content_type: Optional[StrictStr] = None,
|
|
1611
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1612
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1613
|
+
) -> RESTResponseType:
|
|
1614
|
+
"""List API clients (v2)
|
|
1615
|
+
|
|
1616
|
+
List all API clients. This endpoint includes the project_id of the API client in the response.
|
|
1617
|
+
|
|
1618
|
+
:param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint
|
|
1619
|
+
:type project_id: int
|
|
1620
|
+
:param page: Page number
|
|
1621
|
+
:type page: int
|
|
1622
|
+
:param per_page: Page size. The maximum page size is 100
|
|
1623
|
+
:type per_page: int
|
|
1624
|
+
:param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles
|
|
1625
|
+
:type cert_bundle_ids: List[int]
|
|
1626
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1627
|
+
number provided, it will be total request
|
|
1628
|
+
timeout. It can also be a pair (tuple) of
|
|
1629
|
+
(connection, read) timeouts.
|
|
1630
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1631
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1632
|
+
request; this effectively ignores the
|
|
1633
|
+
authentication in the spec for a single request.
|
|
1634
|
+
:type _request_auth: dict, optional
|
|
1635
|
+
:param _content_type: force content-type for the request.
|
|
1636
|
+
:type _content_type: str, Optional
|
|
1637
|
+
:param _headers: set to override the headers for a single
|
|
1638
|
+
request; this effectively ignores the headers
|
|
1639
|
+
in the spec for a single request.
|
|
1640
|
+
:type _headers: dict, optional
|
|
1641
|
+
:param _host_index: set to override the host_index for a single
|
|
1642
|
+
request; this effectively ignores the host_index
|
|
1643
|
+
in the spec for a single request.
|
|
1644
|
+
:type _host_index: int, optional
|
|
1645
|
+
:return: Returns the result object.
|
|
1646
|
+
""" # noqa: E501
|
|
1647
|
+
|
|
1648
|
+
_param = self._list_api_clients_serialize(
|
|
1649
|
+
project_id=project_id,
|
|
1650
|
+
page=page,
|
|
1651
|
+
per_page=per_page,
|
|
1652
|
+
cert_bundle_ids=cert_bundle_ids,
|
|
1653
|
+
_request_auth=_request_auth,
|
|
1654
|
+
_content_type=_content_type,
|
|
1655
|
+
_headers=_headers,
|
|
1656
|
+
_host_index=_host_index
|
|
1657
|
+
)
|
|
1658
|
+
|
|
1659
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1660
|
+
'200': "ApiClientListResponse",
|
|
1661
|
+
'401': "Error",
|
|
1662
|
+
}
|
|
1663
|
+
response_data = await self.api_client.call_api(
|
|
1664
|
+
*_param,
|
|
1665
|
+
_request_timeout=_request_timeout
|
|
1666
|
+
)
|
|
1667
|
+
return response_data.response
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
def _list_api_clients_serialize(
|
|
1671
|
+
self,
|
|
1672
|
+
project_id,
|
|
1673
|
+
page,
|
|
1674
|
+
per_page,
|
|
1675
|
+
cert_bundle_ids,
|
|
1676
|
+
_request_auth,
|
|
1677
|
+
_content_type,
|
|
1678
|
+
_headers,
|
|
1679
|
+
_host_index,
|
|
1680
|
+
) -> RequestSerialized:
|
|
1681
|
+
|
|
1682
|
+
_host = None
|
|
1683
|
+
|
|
1684
|
+
_collection_formats: Dict[str, str] = {
|
|
1685
|
+
'cert_bundle_ids': 'multi',
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
_path_params: Dict[str, str] = {}
|
|
1689
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1690
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1691
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1692
|
+
_files: Dict[
|
|
1693
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1694
|
+
] = {}
|
|
1695
|
+
_body_params: Optional[bytes] = None
|
|
1696
|
+
|
|
1697
|
+
# process the path parameters
|
|
1698
|
+
# process the query parameters
|
|
1699
|
+
if project_id is not None:
|
|
1700
|
+
|
|
1701
|
+
_query_params.append(('project_id', project_id))
|
|
1702
|
+
|
|
1703
|
+
if page is not None:
|
|
1704
|
+
|
|
1705
|
+
_query_params.append(('page', page))
|
|
1706
|
+
|
|
1707
|
+
if per_page is not None:
|
|
1708
|
+
|
|
1709
|
+
_query_params.append(('per_page', per_page))
|
|
1710
|
+
|
|
1711
|
+
if cert_bundle_ids is not None:
|
|
1712
|
+
|
|
1713
|
+
_query_params.append(('cert_bundle_ids', cert_bundle_ids))
|
|
1714
|
+
|
|
1715
|
+
# process the header parameters
|
|
1716
|
+
# process the form parameters
|
|
1717
|
+
# process the body parameter
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
# set the HTTP header `Accept`
|
|
1721
|
+
if 'Accept' not in _header_params:
|
|
1722
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1723
|
+
[
|
|
1724
|
+
'application/json'
|
|
1725
|
+
]
|
|
1726
|
+
)
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
# authentication setting
|
|
1730
|
+
_auth_settings: List[str] = [
|
|
1731
|
+
'BearerAuth'
|
|
1732
|
+
]
|
|
1733
|
+
|
|
1734
|
+
return self.api_client.param_serialize(
|
|
1735
|
+
method='GET',
|
|
1736
|
+
resource_path='/api/v2/api_clients',
|
|
1737
|
+
path_params=_path_params,
|
|
1738
|
+
query_params=_query_params,
|
|
1739
|
+
header_params=_header_params,
|
|
1740
|
+
body=_body_params,
|
|
1741
|
+
post_params=_form_params,
|
|
1742
|
+
files=_files,
|
|
1743
|
+
auth_settings=_auth_settings,
|
|
1744
|
+
collection_formats=_collection_formats,
|
|
1745
|
+
_host=_host,
|
|
1746
|
+
_request_auth=_request_auth
|
|
1747
|
+
)
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
@validate_call
|
|
1753
|
+
async def list_api_collections(
|
|
1754
|
+
self,
|
|
1755
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None,
|
|
1756
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None,
|
|
1757
|
+
_request_timeout: Union[
|
|
1758
|
+
None,
|
|
1759
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1760
|
+
Tuple[
|
|
1761
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1762
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1763
|
+
]
|
|
1764
|
+
] = None,
|
|
1765
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1766
|
+
_content_type: Optional[StrictStr] = None,
|
|
1767
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1768
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1769
|
+
) -> List[ApiCollection]:
|
|
1770
|
+
"""List API collections
|
|
1771
|
+
|
|
1772
|
+
List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response.
|
|
1773
|
+
|
|
1774
|
+
:param per_page: Number of API collections to return in a single page
|
|
1775
|
+
:type per_page: int
|
|
1776
|
+
:param page: Page number of the API collections to fetch
|
|
1777
|
+
:type page: int
|
|
1778
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1779
|
+
number provided, it will be total request
|
|
1780
|
+
timeout. It can also be a pair (tuple) of
|
|
1781
|
+
(connection, read) timeouts.
|
|
1782
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1783
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1784
|
+
request; this effectively ignores the
|
|
1785
|
+
authentication in the spec for a single request.
|
|
1786
|
+
:type _request_auth: dict, optional
|
|
1787
|
+
:param _content_type: force content-type for the request.
|
|
1788
|
+
:type _content_type: str, Optional
|
|
1789
|
+
:param _headers: set to override the headers for a single
|
|
1790
|
+
request; this effectively ignores the headers
|
|
1791
|
+
in the spec for a single request.
|
|
1792
|
+
:type _headers: dict, optional
|
|
1793
|
+
:param _host_index: set to override the host_index for a single
|
|
1794
|
+
request; this effectively ignores the host_index
|
|
1795
|
+
in the spec for a single request.
|
|
1796
|
+
:type _host_index: int, optional
|
|
1797
|
+
:return: Returns the result object.
|
|
1798
|
+
""" # noqa: E501
|
|
1799
|
+
|
|
1800
|
+
_param = self._list_api_collections_serialize(
|
|
1801
|
+
per_page=per_page,
|
|
1802
|
+
page=page,
|
|
1803
|
+
_request_auth=_request_auth,
|
|
1804
|
+
_content_type=_content_type,
|
|
1805
|
+
_headers=_headers,
|
|
1806
|
+
_host_index=_host_index
|
|
1807
|
+
)
|
|
1808
|
+
|
|
1809
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1810
|
+
'200': "List[ApiCollection]",
|
|
1811
|
+
'401': "Error",
|
|
1812
|
+
}
|
|
1813
|
+
response_data = await self.api_client.call_api(
|
|
1814
|
+
*_param,
|
|
1815
|
+
_request_timeout=_request_timeout
|
|
1816
|
+
)
|
|
1817
|
+
await response_data.read()
|
|
1818
|
+
return self.api_client.response_deserialize(
|
|
1819
|
+
response_data=response_data,
|
|
1820
|
+
response_types_map=_response_types_map,
|
|
1821
|
+
).data
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
@validate_call
|
|
1825
|
+
async def list_api_collections_with_http_info(
|
|
1826
|
+
self,
|
|
1827
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None,
|
|
1828
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None,
|
|
1829
|
+
_request_timeout: Union[
|
|
1830
|
+
None,
|
|
1831
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1832
|
+
Tuple[
|
|
1833
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1834
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1835
|
+
]
|
|
1836
|
+
] = None,
|
|
1837
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1838
|
+
_content_type: Optional[StrictStr] = None,
|
|
1839
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1840
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1841
|
+
) -> ApiResponse[List[ApiCollection]]:
|
|
1842
|
+
"""List API collections
|
|
1843
|
+
|
|
1844
|
+
List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response.
|
|
1845
|
+
|
|
1846
|
+
:param per_page: Number of API collections to return in a single page
|
|
1847
|
+
:type per_page: int
|
|
1848
|
+
:param page: Page number of the API collections to fetch
|
|
1849
|
+
:type page: int
|
|
1850
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1851
|
+
number provided, it will be total request
|
|
1852
|
+
timeout. It can also be a pair (tuple) of
|
|
1853
|
+
(connection, read) timeouts.
|
|
1854
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1855
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1856
|
+
request; this effectively ignores the
|
|
1857
|
+
authentication in the spec for a single request.
|
|
1858
|
+
:type _request_auth: dict, optional
|
|
1859
|
+
:param _content_type: force content-type for the request.
|
|
1860
|
+
:type _content_type: str, Optional
|
|
1861
|
+
:param _headers: set to override the headers for a single
|
|
1862
|
+
request; this effectively ignores the headers
|
|
1863
|
+
in the spec for a single request.
|
|
1864
|
+
:type _headers: dict, optional
|
|
1865
|
+
:param _host_index: set to override the host_index for a single
|
|
1866
|
+
request; this effectively ignores the host_index
|
|
1867
|
+
in the spec for a single request.
|
|
1868
|
+
:type _host_index: int, optional
|
|
1869
|
+
:return: Returns the result object.
|
|
1870
|
+
""" # noqa: E501
|
|
1871
|
+
|
|
1872
|
+
_param = self._list_api_collections_serialize(
|
|
1873
|
+
per_page=per_page,
|
|
1874
|
+
page=page,
|
|
1875
|
+
_request_auth=_request_auth,
|
|
1876
|
+
_content_type=_content_type,
|
|
1877
|
+
_headers=_headers,
|
|
1878
|
+
_host_index=_host_index
|
|
1879
|
+
)
|
|
1880
|
+
|
|
1881
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1882
|
+
'200': "List[ApiCollection]",
|
|
1883
|
+
'401': "Error",
|
|
1884
|
+
}
|
|
1885
|
+
response_data = await self.api_client.call_api(
|
|
1886
|
+
*_param,
|
|
1887
|
+
_request_timeout=_request_timeout
|
|
1888
|
+
)
|
|
1889
|
+
await response_data.read()
|
|
1890
|
+
return self.api_client.response_deserialize(
|
|
1891
|
+
response_data=response_data,
|
|
1892
|
+
response_types_map=_response_types_map,
|
|
1893
|
+
)
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
@validate_call
|
|
1897
|
+
async def list_api_collections_without_preload_content(
|
|
1898
|
+
self,
|
|
1899
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None,
|
|
1900
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None,
|
|
1901
|
+
_request_timeout: Union[
|
|
1902
|
+
None,
|
|
1903
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1904
|
+
Tuple[
|
|
1905
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1906
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1907
|
+
]
|
|
1908
|
+
] = None,
|
|
1909
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1910
|
+
_content_type: Optional[StrictStr] = None,
|
|
1911
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1912
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1913
|
+
) -> RESTResponseType:
|
|
1914
|
+
"""List API collections
|
|
1915
|
+
|
|
1916
|
+
List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response.
|
|
1917
|
+
|
|
1918
|
+
:param per_page: Number of API collections to return in a single page
|
|
1919
|
+
:type per_page: int
|
|
1920
|
+
:param page: Page number of the API collections to fetch
|
|
1921
|
+
:type page: int
|
|
1922
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1923
|
+
number provided, it will be total request
|
|
1924
|
+
timeout. It can also be a pair (tuple) of
|
|
1925
|
+
(connection, read) timeouts.
|
|
1926
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1927
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1928
|
+
request; this effectively ignores the
|
|
1929
|
+
authentication in the spec for a single request.
|
|
1930
|
+
:type _request_auth: dict, optional
|
|
1931
|
+
:param _content_type: force content-type for the request.
|
|
1932
|
+
:type _content_type: str, Optional
|
|
1933
|
+
:param _headers: set to override the headers for a single
|
|
1934
|
+
request; this effectively ignores the headers
|
|
1935
|
+
in the spec for a single request.
|
|
1936
|
+
:type _headers: dict, optional
|
|
1937
|
+
:param _host_index: set to override the host_index for a single
|
|
1938
|
+
request; this effectively ignores the host_index
|
|
1939
|
+
in the spec for a single request.
|
|
1940
|
+
:type _host_index: int, optional
|
|
1941
|
+
:return: Returns the result object.
|
|
1942
|
+
""" # noqa: E501
|
|
1943
|
+
|
|
1944
|
+
_param = self._list_api_collections_serialize(
|
|
1945
|
+
per_page=per_page,
|
|
1946
|
+
page=page,
|
|
1947
|
+
_request_auth=_request_auth,
|
|
1948
|
+
_content_type=_content_type,
|
|
1949
|
+
_headers=_headers,
|
|
1950
|
+
_host_index=_host_index
|
|
1951
|
+
)
|
|
1952
|
+
|
|
1953
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1954
|
+
'200': "List[ApiCollection]",
|
|
1955
|
+
'401': "Error",
|
|
1956
|
+
}
|
|
1957
|
+
response_data = await self.api_client.call_api(
|
|
1958
|
+
*_param,
|
|
1959
|
+
_request_timeout=_request_timeout
|
|
1960
|
+
)
|
|
1961
|
+
return response_data.response
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
def _list_api_collections_serialize(
|
|
1965
|
+
self,
|
|
1966
|
+
per_page,
|
|
1967
|
+
page,
|
|
1968
|
+
_request_auth,
|
|
1969
|
+
_content_type,
|
|
1970
|
+
_headers,
|
|
1971
|
+
_host_index,
|
|
1972
|
+
) -> RequestSerialized:
|
|
1973
|
+
|
|
1974
|
+
_host = None
|
|
1975
|
+
|
|
1976
|
+
_collection_formats: Dict[str, str] = {
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
_path_params: Dict[str, str] = {}
|
|
1980
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1981
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1982
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1983
|
+
_files: Dict[
|
|
1984
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1985
|
+
] = {}
|
|
1986
|
+
_body_params: Optional[bytes] = None
|
|
1987
|
+
|
|
1988
|
+
# process the path parameters
|
|
1989
|
+
# process the query parameters
|
|
1990
|
+
if per_page is not None:
|
|
1991
|
+
|
|
1992
|
+
_query_params.append(('per_page', per_page))
|
|
1993
|
+
|
|
1994
|
+
if page is not None:
|
|
1995
|
+
|
|
1996
|
+
_query_params.append(('page', page))
|
|
1997
|
+
|
|
1998
|
+
# process the header parameters
|
|
1999
|
+
# process the form parameters
|
|
2000
|
+
# process the body parameter
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
# set the HTTP header `Accept`
|
|
2004
|
+
if 'Accept' not in _header_params:
|
|
2005
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2006
|
+
[
|
|
2007
|
+
'application/json'
|
|
2008
|
+
]
|
|
2009
|
+
)
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
# authentication setting
|
|
2013
|
+
_auth_settings: List[str] = [
|
|
2014
|
+
'BearerAuth'
|
|
2015
|
+
]
|
|
2016
|
+
|
|
2017
|
+
return self.api_client.param_serialize(
|
|
2018
|
+
method='GET',
|
|
2019
|
+
resource_path='/api/api_collections',
|
|
2020
|
+
path_params=_path_params,
|
|
2021
|
+
query_params=_query_params,
|
|
2022
|
+
header_params=_header_params,
|
|
2023
|
+
body=_body_params,
|
|
2024
|
+
post_params=_form_params,
|
|
2025
|
+
files=_files,
|
|
2026
|
+
auth_settings=_auth_settings,
|
|
2027
|
+
collection_formats=_collection_formats,
|
|
2028
|
+
_host=_host,
|
|
2029
|
+
_request_auth=_request_auth
|
|
2030
|
+
)
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
@validate_call
|
|
2036
|
+
async def list_api_endpoints(
|
|
2037
|
+
self,
|
|
2038
|
+
api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None,
|
|
2039
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None,
|
|
2040
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None,
|
|
2041
|
+
_request_timeout: Union[
|
|
2042
|
+
None,
|
|
2043
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2044
|
+
Tuple[
|
|
2045
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2046
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2047
|
+
]
|
|
2048
|
+
] = None,
|
|
2049
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2050
|
+
_content_type: Optional[StrictStr] = None,
|
|
2051
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2052
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2053
|
+
) -> List[ApiEndpoint]:
|
|
2054
|
+
"""List API endpoints
|
|
2055
|
+
|
|
2056
|
+
Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection.
|
|
2057
|
+
|
|
2058
|
+
:param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned
|
|
2059
|
+
:type api_collection_id: int
|
|
2060
|
+
:param per_page: Number of API endpoints to return in a single page
|
|
2061
|
+
:type per_page: int
|
|
2062
|
+
:param page: Page number of the API endpoints to fetch
|
|
2063
|
+
:type page: int
|
|
2064
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2065
|
+
number provided, it will be total request
|
|
2066
|
+
timeout. It can also be a pair (tuple) of
|
|
2067
|
+
(connection, read) timeouts.
|
|
2068
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2069
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2070
|
+
request; this effectively ignores the
|
|
2071
|
+
authentication in the spec for a single request.
|
|
2072
|
+
:type _request_auth: dict, optional
|
|
2073
|
+
:param _content_type: force content-type for the request.
|
|
2074
|
+
:type _content_type: str, Optional
|
|
2075
|
+
:param _headers: set to override the headers for a single
|
|
2076
|
+
request; this effectively ignores the headers
|
|
2077
|
+
in the spec for a single request.
|
|
2078
|
+
:type _headers: dict, optional
|
|
2079
|
+
:param _host_index: set to override the host_index for a single
|
|
2080
|
+
request; this effectively ignores the host_index
|
|
2081
|
+
in the spec for a single request.
|
|
2082
|
+
:type _host_index: int, optional
|
|
2083
|
+
:return: Returns the result object.
|
|
2084
|
+
""" # noqa: E501
|
|
2085
|
+
|
|
2086
|
+
_param = self._list_api_endpoints_serialize(
|
|
2087
|
+
api_collection_id=api_collection_id,
|
|
2088
|
+
per_page=per_page,
|
|
2089
|
+
page=page,
|
|
2090
|
+
_request_auth=_request_auth,
|
|
2091
|
+
_content_type=_content_type,
|
|
2092
|
+
_headers=_headers,
|
|
2093
|
+
_host_index=_host_index
|
|
2094
|
+
)
|
|
2095
|
+
|
|
2096
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2097
|
+
'200': "List[ApiEndpoint]",
|
|
2098
|
+
'401': "Error",
|
|
2099
|
+
}
|
|
2100
|
+
response_data = await self.api_client.call_api(
|
|
2101
|
+
*_param,
|
|
2102
|
+
_request_timeout=_request_timeout
|
|
2103
|
+
)
|
|
2104
|
+
await response_data.read()
|
|
2105
|
+
return self.api_client.response_deserialize(
|
|
2106
|
+
response_data=response_data,
|
|
2107
|
+
response_types_map=_response_types_map,
|
|
2108
|
+
).data
|
|
2109
|
+
|
|
2110
|
+
|
|
2111
|
+
@validate_call
|
|
2112
|
+
async def list_api_endpoints_with_http_info(
|
|
2113
|
+
self,
|
|
2114
|
+
api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None,
|
|
2115
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None,
|
|
2116
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None,
|
|
2117
|
+
_request_timeout: Union[
|
|
2118
|
+
None,
|
|
2119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2120
|
+
Tuple[
|
|
2121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2122
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2123
|
+
]
|
|
2124
|
+
] = None,
|
|
2125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2126
|
+
_content_type: Optional[StrictStr] = None,
|
|
2127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2129
|
+
) -> ApiResponse[List[ApiEndpoint]]:
|
|
2130
|
+
"""List API endpoints
|
|
2131
|
+
|
|
2132
|
+
Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection.
|
|
2133
|
+
|
|
2134
|
+
:param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned
|
|
2135
|
+
:type api_collection_id: int
|
|
2136
|
+
:param per_page: Number of API endpoints to return in a single page
|
|
2137
|
+
:type per_page: int
|
|
2138
|
+
:param page: Page number of the API endpoints to fetch
|
|
2139
|
+
:type page: int
|
|
2140
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2141
|
+
number provided, it will be total request
|
|
2142
|
+
timeout. It can also be a pair (tuple) of
|
|
2143
|
+
(connection, read) timeouts.
|
|
2144
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2145
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2146
|
+
request; this effectively ignores the
|
|
2147
|
+
authentication in the spec for a single request.
|
|
2148
|
+
:type _request_auth: dict, optional
|
|
2149
|
+
:param _content_type: force content-type for the request.
|
|
2150
|
+
:type _content_type: str, Optional
|
|
2151
|
+
:param _headers: set to override the headers for a single
|
|
2152
|
+
request; this effectively ignores the headers
|
|
2153
|
+
in the spec for a single request.
|
|
2154
|
+
:type _headers: dict, optional
|
|
2155
|
+
:param _host_index: set to override the host_index for a single
|
|
2156
|
+
request; this effectively ignores the host_index
|
|
2157
|
+
in the spec for a single request.
|
|
2158
|
+
:type _host_index: int, optional
|
|
2159
|
+
:return: Returns the result object.
|
|
2160
|
+
""" # noqa: E501
|
|
2161
|
+
|
|
2162
|
+
_param = self._list_api_endpoints_serialize(
|
|
2163
|
+
api_collection_id=api_collection_id,
|
|
2164
|
+
per_page=per_page,
|
|
2165
|
+
page=page,
|
|
2166
|
+
_request_auth=_request_auth,
|
|
2167
|
+
_content_type=_content_type,
|
|
2168
|
+
_headers=_headers,
|
|
2169
|
+
_host_index=_host_index
|
|
2170
|
+
)
|
|
2171
|
+
|
|
2172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2173
|
+
'200': "List[ApiEndpoint]",
|
|
2174
|
+
'401': "Error",
|
|
2175
|
+
}
|
|
2176
|
+
response_data = await self.api_client.call_api(
|
|
2177
|
+
*_param,
|
|
2178
|
+
_request_timeout=_request_timeout
|
|
2179
|
+
)
|
|
2180
|
+
await response_data.read()
|
|
2181
|
+
return self.api_client.response_deserialize(
|
|
2182
|
+
response_data=response_data,
|
|
2183
|
+
response_types_map=_response_types_map,
|
|
2184
|
+
)
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
@validate_call
|
|
2188
|
+
async def list_api_endpoints_without_preload_content(
|
|
2189
|
+
self,
|
|
2190
|
+
api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None,
|
|
2191
|
+
per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None,
|
|
2192
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None,
|
|
2193
|
+
_request_timeout: Union[
|
|
2194
|
+
None,
|
|
2195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2196
|
+
Tuple[
|
|
2197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2198
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2199
|
+
]
|
|
2200
|
+
] = None,
|
|
2201
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2202
|
+
_content_type: Optional[StrictStr] = None,
|
|
2203
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2204
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2205
|
+
) -> RESTResponseType:
|
|
2206
|
+
"""List API endpoints
|
|
2207
|
+
|
|
2208
|
+
Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection.
|
|
2209
|
+
|
|
2210
|
+
:param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned
|
|
2211
|
+
:type api_collection_id: int
|
|
2212
|
+
:param per_page: Number of API endpoints to return in a single page
|
|
2213
|
+
:type per_page: int
|
|
2214
|
+
:param page: Page number of the API endpoints to fetch
|
|
2215
|
+
:type page: int
|
|
2216
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2217
|
+
number provided, it will be total request
|
|
2218
|
+
timeout. It can also be a pair (tuple) of
|
|
2219
|
+
(connection, read) timeouts.
|
|
2220
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2221
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2222
|
+
request; this effectively ignores the
|
|
2223
|
+
authentication in the spec for a single request.
|
|
2224
|
+
:type _request_auth: dict, optional
|
|
2225
|
+
:param _content_type: force content-type for the request.
|
|
2226
|
+
:type _content_type: str, Optional
|
|
2227
|
+
:param _headers: set to override the headers for a single
|
|
2228
|
+
request; this effectively ignores the headers
|
|
2229
|
+
in the spec for a single request.
|
|
2230
|
+
:type _headers: dict, optional
|
|
2231
|
+
:param _host_index: set to override the host_index for a single
|
|
2232
|
+
request; this effectively ignores the host_index
|
|
2233
|
+
in the spec for a single request.
|
|
2234
|
+
:type _host_index: int, optional
|
|
2235
|
+
:return: Returns the result object.
|
|
2236
|
+
""" # noqa: E501
|
|
2237
|
+
|
|
2238
|
+
_param = self._list_api_endpoints_serialize(
|
|
2239
|
+
api_collection_id=api_collection_id,
|
|
2240
|
+
per_page=per_page,
|
|
2241
|
+
page=page,
|
|
2242
|
+
_request_auth=_request_auth,
|
|
2243
|
+
_content_type=_content_type,
|
|
2244
|
+
_headers=_headers,
|
|
2245
|
+
_host_index=_host_index
|
|
2246
|
+
)
|
|
2247
|
+
|
|
2248
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2249
|
+
'200': "List[ApiEndpoint]",
|
|
2250
|
+
'401': "Error",
|
|
2251
|
+
}
|
|
2252
|
+
response_data = await self.api_client.call_api(
|
|
2253
|
+
*_param,
|
|
2254
|
+
_request_timeout=_request_timeout
|
|
2255
|
+
)
|
|
2256
|
+
return response_data.response
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
def _list_api_endpoints_serialize(
|
|
2260
|
+
self,
|
|
2261
|
+
api_collection_id,
|
|
2262
|
+
per_page,
|
|
2263
|
+
page,
|
|
2264
|
+
_request_auth,
|
|
2265
|
+
_content_type,
|
|
2266
|
+
_headers,
|
|
2267
|
+
_host_index,
|
|
2268
|
+
) -> RequestSerialized:
|
|
2269
|
+
|
|
2270
|
+
_host = None
|
|
2271
|
+
|
|
2272
|
+
_collection_formats: Dict[str, str] = {
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
_path_params: Dict[str, str] = {}
|
|
2276
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2277
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2278
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2279
|
+
_files: Dict[
|
|
2280
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2281
|
+
] = {}
|
|
2282
|
+
_body_params: Optional[bytes] = None
|
|
2283
|
+
|
|
2284
|
+
# process the path parameters
|
|
2285
|
+
# process the query parameters
|
|
2286
|
+
if api_collection_id is not None:
|
|
2287
|
+
|
|
2288
|
+
_query_params.append(('api_collection_id', api_collection_id))
|
|
2289
|
+
|
|
2290
|
+
if per_page is not None:
|
|
2291
|
+
|
|
2292
|
+
_query_params.append(('per_page', per_page))
|
|
2293
|
+
|
|
2294
|
+
if page is not None:
|
|
2295
|
+
|
|
2296
|
+
_query_params.append(('page', page))
|
|
2297
|
+
|
|
2298
|
+
# process the header parameters
|
|
2299
|
+
# process the form parameters
|
|
2300
|
+
# process the body parameter
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
# set the HTTP header `Accept`
|
|
2304
|
+
if 'Accept' not in _header_params:
|
|
2305
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2306
|
+
[
|
|
2307
|
+
'application/json'
|
|
2308
|
+
]
|
|
2309
|
+
)
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
# authentication setting
|
|
2313
|
+
_auth_settings: List[str] = [
|
|
2314
|
+
'BearerAuth'
|
|
2315
|
+
]
|
|
2316
|
+
|
|
2317
|
+
return self.api_client.param_serialize(
|
|
2318
|
+
method='GET',
|
|
2319
|
+
resource_path='/api/api_endpoints',
|
|
2320
|
+
path_params=_path_params,
|
|
2321
|
+
query_params=_query_params,
|
|
2322
|
+
header_params=_header_params,
|
|
2323
|
+
body=_body_params,
|
|
2324
|
+
post_params=_form_params,
|
|
2325
|
+
files=_files,
|
|
2326
|
+
auth_settings=_auth_settings,
|
|
2327
|
+
collection_formats=_collection_formats,
|
|
2328
|
+
_host=_host,
|
|
2329
|
+
_request_auth=_request_auth
|
|
2330
|
+
)
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
@validate_call
|
|
2336
|
+
async def list_api_keys(
|
|
2337
|
+
self,
|
|
2338
|
+
api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")],
|
|
2339
|
+
_request_timeout: Union[
|
|
2340
|
+
None,
|
|
2341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2342
|
+
Tuple[
|
|
2343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2344
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2345
|
+
]
|
|
2346
|
+
] = None,
|
|
2347
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2348
|
+
_content_type: Optional[StrictStr] = None,
|
|
2349
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2350
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2351
|
+
) -> ApiKeyListResponse:
|
|
2352
|
+
"""List API keys
|
|
2353
|
+
|
|
2354
|
+
Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client.
|
|
2355
|
+
|
|
2356
|
+
:param api_client_id: Filter API keys for a specific API client (required)
|
|
2357
|
+
:type api_client_id: int
|
|
2358
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2359
|
+
number provided, it will be total request
|
|
2360
|
+
timeout. It can also be a pair (tuple) of
|
|
2361
|
+
(connection, read) timeouts.
|
|
2362
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2363
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2364
|
+
request; this effectively ignores the
|
|
2365
|
+
authentication in the spec for a single request.
|
|
2366
|
+
:type _request_auth: dict, optional
|
|
2367
|
+
:param _content_type: force content-type for the request.
|
|
2368
|
+
:type _content_type: str, Optional
|
|
2369
|
+
:param _headers: set to override the headers for a single
|
|
2370
|
+
request; this effectively ignores the headers
|
|
2371
|
+
in the spec for a single request.
|
|
2372
|
+
:type _headers: dict, optional
|
|
2373
|
+
:param _host_index: set to override the host_index for a single
|
|
2374
|
+
request; this effectively ignores the host_index
|
|
2375
|
+
in the spec for a single request.
|
|
2376
|
+
:type _host_index: int, optional
|
|
2377
|
+
:return: Returns the result object.
|
|
2378
|
+
""" # noqa: E501
|
|
2379
|
+
|
|
2380
|
+
_param = self._list_api_keys_serialize(
|
|
2381
|
+
api_client_id=api_client_id,
|
|
2382
|
+
_request_auth=_request_auth,
|
|
2383
|
+
_content_type=_content_type,
|
|
2384
|
+
_headers=_headers,
|
|
2385
|
+
_host_index=_host_index
|
|
2386
|
+
)
|
|
2387
|
+
|
|
2388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2389
|
+
'200': "ApiKeyListResponse",
|
|
2390
|
+
'401': "Error",
|
|
2391
|
+
}
|
|
2392
|
+
response_data = await self.api_client.call_api(
|
|
2393
|
+
*_param,
|
|
2394
|
+
_request_timeout=_request_timeout
|
|
2395
|
+
)
|
|
2396
|
+
await response_data.read()
|
|
2397
|
+
return self.api_client.response_deserialize(
|
|
2398
|
+
response_data=response_data,
|
|
2399
|
+
response_types_map=_response_types_map,
|
|
2400
|
+
).data
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
@validate_call
|
|
2404
|
+
async def list_api_keys_with_http_info(
|
|
2405
|
+
self,
|
|
2406
|
+
api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")],
|
|
2407
|
+
_request_timeout: Union[
|
|
2408
|
+
None,
|
|
2409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2410
|
+
Tuple[
|
|
2411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2412
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2413
|
+
]
|
|
2414
|
+
] = None,
|
|
2415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2416
|
+
_content_type: Optional[StrictStr] = None,
|
|
2417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2419
|
+
) -> ApiResponse[ApiKeyListResponse]:
|
|
2420
|
+
"""List API keys
|
|
2421
|
+
|
|
2422
|
+
Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client.
|
|
2423
|
+
|
|
2424
|
+
:param api_client_id: Filter API keys for a specific API client (required)
|
|
2425
|
+
:type api_client_id: int
|
|
2426
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2427
|
+
number provided, it will be total request
|
|
2428
|
+
timeout. It can also be a pair (tuple) of
|
|
2429
|
+
(connection, read) timeouts.
|
|
2430
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2431
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2432
|
+
request; this effectively ignores the
|
|
2433
|
+
authentication in the spec for a single request.
|
|
2434
|
+
:type _request_auth: dict, optional
|
|
2435
|
+
:param _content_type: force content-type for the request.
|
|
2436
|
+
:type _content_type: str, Optional
|
|
2437
|
+
:param _headers: set to override the headers for a single
|
|
2438
|
+
request; this effectively ignores the headers
|
|
2439
|
+
in the spec for a single request.
|
|
2440
|
+
:type _headers: dict, optional
|
|
2441
|
+
:param _host_index: set to override the host_index for a single
|
|
2442
|
+
request; this effectively ignores the host_index
|
|
2443
|
+
in the spec for a single request.
|
|
2444
|
+
:type _host_index: int, optional
|
|
2445
|
+
:return: Returns the result object.
|
|
2446
|
+
""" # noqa: E501
|
|
2447
|
+
|
|
2448
|
+
_param = self._list_api_keys_serialize(
|
|
2449
|
+
api_client_id=api_client_id,
|
|
2450
|
+
_request_auth=_request_auth,
|
|
2451
|
+
_content_type=_content_type,
|
|
2452
|
+
_headers=_headers,
|
|
2453
|
+
_host_index=_host_index
|
|
2454
|
+
)
|
|
2455
|
+
|
|
2456
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2457
|
+
'200': "ApiKeyListResponse",
|
|
2458
|
+
'401': "Error",
|
|
2459
|
+
}
|
|
2460
|
+
response_data = await self.api_client.call_api(
|
|
2461
|
+
*_param,
|
|
2462
|
+
_request_timeout=_request_timeout
|
|
2463
|
+
)
|
|
2464
|
+
await response_data.read()
|
|
2465
|
+
return self.api_client.response_deserialize(
|
|
2466
|
+
response_data=response_data,
|
|
2467
|
+
response_types_map=_response_types_map,
|
|
2468
|
+
)
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
@validate_call
|
|
2472
|
+
async def list_api_keys_without_preload_content(
|
|
2473
|
+
self,
|
|
2474
|
+
api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")],
|
|
2475
|
+
_request_timeout: Union[
|
|
2476
|
+
None,
|
|
2477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2478
|
+
Tuple[
|
|
2479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2481
|
+
]
|
|
2482
|
+
] = None,
|
|
2483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2484
|
+
_content_type: Optional[StrictStr] = None,
|
|
2485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2487
|
+
) -> RESTResponseType:
|
|
2488
|
+
"""List API keys
|
|
2489
|
+
|
|
2490
|
+
Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client.
|
|
2491
|
+
|
|
2492
|
+
:param api_client_id: Filter API keys for a specific API client (required)
|
|
2493
|
+
:type api_client_id: int
|
|
2494
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2495
|
+
number provided, it will be total request
|
|
2496
|
+
timeout. It can also be a pair (tuple) of
|
|
2497
|
+
(connection, read) timeouts.
|
|
2498
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2499
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2500
|
+
request; this effectively ignores the
|
|
2501
|
+
authentication in the spec for a single request.
|
|
2502
|
+
:type _request_auth: dict, optional
|
|
2503
|
+
:param _content_type: force content-type for the request.
|
|
2504
|
+
:type _content_type: str, Optional
|
|
2505
|
+
:param _headers: set to override the headers for a single
|
|
2506
|
+
request; this effectively ignores the headers
|
|
2507
|
+
in the spec for a single request.
|
|
2508
|
+
:type _headers: dict, optional
|
|
2509
|
+
:param _host_index: set to override the host_index for a single
|
|
2510
|
+
request; this effectively ignores the host_index
|
|
2511
|
+
in the spec for a single request.
|
|
2512
|
+
:type _host_index: int, optional
|
|
2513
|
+
:return: Returns the result object.
|
|
2514
|
+
""" # noqa: E501
|
|
2515
|
+
|
|
2516
|
+
_param = self._list_api_keys_serialize(
|
|
2517
|
+
api_client_id=api_client_id,
|
|
2518
|
+
_request_auth=_request_auth,
|
|
2519
|
+
_content_type=_content_type,
|
|
2520
|
+
_headers=_headers,
|
|
2521
|
+
_host_index=_host_index
|
|
2522
|
+
)
|
|
2523
|
+
|
|
2524
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2525
|
+
'200': "ApiKeyListResponse",
|
|
2526
|
+
'401': "Error",
|
|
2527
|
+
}
|
|
2528
|
+
response_data = await self.api_client.call_api(
|
|
2529
|
+
*_param,
|
|
2530
|
+
_request_timeout=_request_timeout
|
|
2531
|
+
)
|
|
2532
|
+
return response_data.response
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
def _list_api_keys_serialize(
|
|
2536
|
+
self,
|
|
2537
|
+
api_client_id,
|
|
2538
|
+
_request_auth,
|
|
2539
|
+
_content_type,
|
|
2540
|
+
_headers,
|
|
2541
|
+
_host_index,
|
|
2542
|
+
) -> RequestSerialized:
|
|
2543
|
+
|
|
2544
|
+
_host = None
|
|
2545
|
+
|
|
2546
|
+
_collection_formats: Dict[str, str] = {
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
_path_params: Dict[str, str] = {}
|
|
2550
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2551
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2552
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2553
|
+
_files: Dict[
|
|
2554
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2555
|
+
] = {}
|
|
2556
|
+
_body_params: Optional[bytes] = None
|
|
2557
|
+
|
|
2558
|
+
# process the path parameters
|
|
2559
|
+
if api_client_id is not None:
|
|
2560
|
+
_path_params['api_client_id'] = api_client_id
|
|
2561
|
+
# process the query parameters
|
|
2562
|
+
# process the header parameters
|
|
2563
|
+
# process the form parameters
|
|
2564
|
+
# process the body parameter
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
# set the HTTP header `Accept`
|
|
2568
|
+
if 'Accept' not in _header_params:
|
|
2569
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2570
|
+
[
|
|
2571
|
+
'application/json'
|
|
2572
|
+
]
|
|
2573
|
+
)
|
|
2574
|
+
|
|
2575
|
+
|
|
2576
|
+
# authentication setting
|
|
2577
|
+
_auth_settings: List[str] = [
|
|
2578
|
+
'BearerAuth'
|
|
2579
|
+
]
|
|
2580
|
+
|
|
2581
|
+
return self.api_client.param_serialize(
|
|
2582
|
+
method='GET',
|
|
2583
|
+
resource_path='/api/v2/api_clients/{api_client_id}/api_keys',
|
|
2584
|
+
path_params=_path_params,
|
|
2585
|
+
query_params=_query_params,
|
|
2586
|
+
header_params=_header_params,
|
|
2587
|
+
body=_body_params,
|
|
2588
|
+
post_params=_form_params,
|
|
2589
|
+
files=_files,
|
|
2590
|
+
auth_settings=_auth_settings,
|
|
2591
|
+
collection_formats=_collection_formats,
|
|
2592
|
+
_host=_host,
|
|
2593
|
+
_request_auth=_request_auth
|
|
2594
|
+
)
|
|
2595
|
+
|
|
2596
|
+
|
|
2597
|
+
|
|
2598
|
+
|
|
2599
|
+
@validate_call
|
|
2600
|
+
async def refresh_api_key_secret(
|
|
2601
|
+
self,
|
|
2602
|
+
api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")],
|
|
2603
|
+
api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")],
|
|
2604
|
+
_request_timeout: Union[
|
|
2605
|
+
None,
|
|
2606
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2607
|
+
Tuple[
|
|
2608
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2609
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2610
|
+
]
|
|
2611
|
+
] = None,
|
|
2612
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2613
|
+
_content_type: Optional[StrictStr] = None,
|
|
2614
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2615
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2616
|
+
) -> ApiKeyResponse:
|
|
2617
|
+
"""Refresh API key secret
|
|
2618
|
+
|
|
2619
|
+
Refresh the authentication token or OAuth 2.0 client secret for an API key.
|
|
2620
|
+
|
|
2621
|
+
:param api_client_id: ID of the API client that owns the API key (required)
|
|
2622
|
+
:type api_client_id: int
|
|
2623
|
+
:param api_key_id: ID of the API key to refresh (required)
|
|
2624
|
+
:type api_key_id: int
|
|
2625
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2626
|
+
number provided, it will be total request
|
|
2627
|
+
timeout. It can also be a pair (tuple) of
|
|
2628
|
+
(connection, read) timeouts.
|
|
2629
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2630
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2631
|
+
request; this effectively ignores the
|
|
2632
|
+
authentication in the spec for a single request.
|
|
2633
|
+
:type _request_auth: dict, optional
|
|
2634
|
+
:param _content_type: force content-type for the request.
|
|
2635
|
+
:type _content_type: str, Optional
|
|
2636
|
+
:param _headers: set to override the headers for a single
|
|
2637
|
+
request; this effectively ignores the headers
|
|
2638
|
+
in the spec for a single request.
|
|
2639
|
+
:type _headers: dict, optional
|
|
2640
|
+
:param _host_index: set to override the host_index for a single
|
|
2641
|
+
request; this effectively ignores the host_index
|
|
2642
|
+
in the spec for a single request.
|
|
2643
|
+
:type _host_index: int, optional
|
|
2644
|
+
:return: Returns the result object.
|
|
2645
|
+
""" # noqa: E501
|
|
2646
|
+
|
|
2647
|
+
_param = self._refresh_api_key_secret_serialize(
|
|
2648
|
+
api_client_id=api_client_id,
|
|
2649
|
+
api_key_id=api_key_id,
|
|
2650
|
+
_request_auth=_request_auth,
|
|
2651
|
+
_content_type=_content_type,
|
|
2652
|
+
_headers=_headers,
|
|
2653
|
+
_host_index=_host_index
|
|
2654
|
+
)
|
|
2655
|
+
|
|
2656
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2657
|
+
'200': "ApiKeyResponse",
|
|
2658
|
+
'401': "Error",
|
|
2659
|
+
}
|
|
2660
|
+
response_data = await self.api_client.call_api(
|
|
2661
|
+
*_param,
|
|
2662
|
+
_request_timeout=_request_timeout
|
|
2663
|
+
)
|
|
2664
|
+
await response_data.read()
|
|
2665
|
+
return self.api_client.response_deserialize(
|
|
2666
|
+
response_data=response_data,
|
|
2667
|
+
response_types_map=_response_types_map,
|
|
2668
|
+
).data
|
|
2669
|
+
|
|
2670
|
+
|
|
2671
|
+
@validate_call
|
|
2672
|
+
async def refresh_api_key_secret_with_http_info(
|
|
2673
|
+
self,
|
|
2674
|
+
api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")],
|
|
2675
|
+
api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")],
|
|
2676
|
+
_request_timeout: Union[
|
|
2677
|
+
None,
|
|
2678
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2679
|
+
Tuple[
|
|
2680
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2681
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2682
|
+
]
|
|
2683
|
+
] = None,
|
|
2684
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2685
|
+
_content_type: Optional[StrictStr] = None,
|
|
2686
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2687
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2688
|
+
) -> ApiResponse[ApiKeyResponse]:
|
|
2689
|
+
"""Refresh API key secret
|
|
2690
|
+
|
|
2691
|
+
Refresh the authentication token or OAuth 2.0 client secret for an API key.
|
|
2692
|
+
|
|
2693
|
+
:param api_client_id: ID of the API client that owns the API key (required)
|
|
2694
|
+
:type api_client_id: int
|
|
2695
|
+
:param api_key_id: ID of the API key to refresh (required)
|
|
2696
|
+
:type api_key_id: int
|
|
2697
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2698
|
+
number provided, it will be total request
|
|
2699
|
+
timeout. It can also be a pair (tuple) of
|
|
2700
|
+
(connection, read) timeouts.
|
|
2701
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2702
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2703
|
+
request; this effectively ignores the
|
|
2704
|
+
authentication in the spec for a single request.
|
|
2705
|
+
:type _request_auth: dict, optional
|
|
2706
|
+
:param _content_type: force content-type for the request.
|
|
2707
|
+
:type _content_type: str, Optional
|
|
2708
|
+
:param _headers: set to override the headers for a single
|
|
2709
|
+
request; this effectively ignores the headers
|
|
2710
|
+
in the spec for a single request.
|
|
2711
|
+
:type _headers: dict, optional
|
|
2712
|
+
:param _host_index: set to override the host_index for a single
|
|
2713
|
+
request; this effectively ignores the host_index
|
|
2714
|
+
in the spec for a single request.
|
|
2715
|
+
:type _host_index: int, optional
|
|
2716
|
+
:return: Returns the result object.
|
|
2717
|
+
""" # noqa: E501
|
|
2718
|
+
|
|
2719
|
+
_param = self._refresh_api_key_secret_serialize(
|
|
2720
|
+
api_client_id=api_client_id,
|
|
2721
|
+
api_key_id=api_key_id,
|
|
2722
|
+
_request_auth=_request_auth,
|
|
2723
|
+
_content_type=_content_type,
|
|
2724
|
+
_headers=_headers,
|
|
2725
|
+
_host_index=_host_index
|
|
2726
|
+
)
|
|
2727
|
+
|
|
2728
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2729
|
+
'200': "ApiKeyResponse",
|
|
2730
|
+
'401': "Error",
|
|
2731
|
+
}
|
|
2732
|
+
response_data = await self.api_client.call_api(
|
|
2733
|
+
*_param,
|
|
2734
|
+
_request_timeout=_request_timeout
|
|
2735
|
+
)
|
|
2736
|
+
await response_data.read()
|
|
2737
|
+
return self.api_client.response_deserialize(
|
|
2738
|
+
response_data=response_data,
|
|
2739
|
+
response_types_map=_response_types_map,
|
|
2740
|
+
)
|
|
2741
|
+
|
|
2742
|
+
|
|
2743
|
+
@validate_call
|
|
2744
|
+
async def refresh_api_key_secret_without_preload_content(
|
|
2745
|
+
self,
|
|
2746
|
+
api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")],
|
|
2747
|
+
api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")],
|
|
2748
|
+
_request_timeout: Union[
|
|
2749
|
+
None,
|
|
2750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2751
|
+
Tuple[
|
|
2752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2753
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2754
|
+
]
|
|
2755
|
+
] = None,
|
|
2756
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2757
|
+
_content_type: Optional[StrictStr] = None,
|
|
2758
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2759
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2760
|
+
) -> RESTResponseType:
|
|
2761
|
+
"""Refresh API key secret
|
|
2762
|
+
|
|
2763
|
+
Refresh the authentication token or OAuth 2.0 client secret for an API key.
|
|
2764
|
+
|
|
2765
|
+
:param api_client_id: ID of the API client that owns the API key (required)
|
|
2766
|
+
:type api_client_id: int
|
|
2767
|
+
:param api_key_id: ID of the API key to refresh (required)
|
|
2768
|
+
:type api_key_id: int
|
|
2769
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2770
|
+
number provided, it will be total request
|
|
2771
|
+
timeout. It can also be a pair (tuple) of
|
|
2772
|
+
(connection, read) timeouts.
|
|
2773
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2774
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2775
|
+
request; this effectively ignores the
|
|
2776
|
+
authentication in the spec for a single request.
|
|
2777
|
+
:type _request_auth: dict, optional
|
|
2778
|
+
:param _content_type: force content-type for the request.
|
|
2779
|
+
:type _content_type: str, Optional
|
|
2780
|
+
:param _headers: set to override the headers for a single
|
|
2781
|
+
request; this effectively ignores the headers
|
|
2782
|
+
in the spec for a single request.
|
|
2783
|
+
:type _headers: dict, optional
|
|
2784
|
+
:param _host_index: set to override the host_index for a single
|
|
2785
|
+
request; this effectively ignores the host_index
|
|
2786
|
+
in the spec for a single request.
|
|
2787
|
+
:type _host_index: int, optional
|
|
2788
|
+
:return: Returns the result object.
|
|
2789
|
+
""" # noqa: E501
|
|
2790
|
+
|
|
2791
|
+
_param = self._refresh_api_key_secret_serialize(
|
|
2792
|
+
api_client_id=api_client_id,
|
|
2793
|
+
api_key_id=api_key_id,
|
|
2794
|
+
_request_auth=_request_auth,
|
|
2795
|
+
_content_type=_content_type,
|
|
2796
|
+
_headers=_headers,
|
|
2797
|
+
_host_index=_host_index
|
|
2798
|
+
)
|
|
2799
|
+
|
|
2800
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2801
|
+
'200': "ApiKeyResponse",
|
|
2802
|
+
'401': "Error",
|
|
2803
|
+
}
|
|
2804
|
+
response_data = await self.api_client.call_api(
|
|
2805
|
+
*_param,
|
|
2806
|
+
_request_timeout=_request_timeout
|
|
2807
|
+
)
|
|
2808
|
+
return response_data.response
|
|
2809
|
+
|
|
2810
|
+
|
|
2811
|
+
def _refresh_api_key_secret_serialize(
|
|
2812
|
+
self,
|
|
2813
|
+
api_client_id,
|
|
2814
|
+
api_key_id,
|
|
2815
|
+
_request_auth,
|
|
2816
|
+
_content_type,
|
|
2817
|
+
_headers,
|
|
2818
|
+
_host_index,
|
|
2819
|
+
) -> RequestSerialized:
|
|
2820
|
+
|
|
2821
|
+
_host = None
|
|
2822
|
+
|
|
2823
|
+
_collection_formats: Dict[str, str] = {
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
_path_params: Dict[str, str] = {}
|
|
2827
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2828
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2829
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2830
|
+
_files: Dict[
|
|
2831
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2832
|
+
] = {}
|
|
2833
|
+
_body_params: Optional[bytes] = None
|
|
2834
|
+
|
|
2835
|
+
# process the path parameters
|
|
2836
|
+
if api_client_id is not None:
|
|
2837
|
+
_path_params['api_client_id'] = api_client_id
|
|
2838
|
+
if api_key_id is not None:
|
|
2839
|
+
_path_params['api_key_id'] = api_key_id
|
|
2840
|
+
# process the query parameters
|
|
2841
|
+
# process the header parameters
|
|
2842
|
+
# process the form parameters
|
|
2843
|
+
# process the body parameter
|
|
2844
|
+
|
|
2845
|
+
|
|
2846
|
+
# set the HTTP header `Accept`
|
|
2847
|
+
if 'Accept' not in _header_params:
|
|
2848
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2849
|
+
[
|
|
2850
|
+
'application/json'
|
|
2851
|
+
]
|
|
2852
|
+
)
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
# authentication setting
|
|
2856
|
+
_auth_settings: List[str] = [
|
|
2857
|
+
'BearerAuth'
|
|
2858
|
+
]
|
|
2859
|
+
|
|
2860
|
+
return self.api_client.param_serialize(
|
|
2861
|
+
method='PUT',
|
|
2862
|
+
resource_path='/api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret',
|
|
2863
|
+
path_params=_path_params,
|
|
2864
|
+
query_params=_query_params,
|
|
2865
|
+
header_params=_header_params,
|
|
2866
|
+
body=_body_params,
|
|
2867
|
+
post_params=_form_params,
|
|
2868
|
+
files=_files,
|
|
2869
|
+
auth_settings=_auth_settings,
|
|
2870
|
+
collection_formats=_collection_formats,
|
|
2871
|
+
_host=_host,
|
|
2872
|
+
_request_auth=_request_auth
|
|
2873
|
+
)
|
|
2874
|
+
|
|
2875
|
+
|