From 952d97d0d33f2a02b883532736275b9ab59bf4c7 Mon Sep 17 00:00:00 2001 From: Jan Cerman Date: Tue, 3 Dec 2024 10:54:04 +0100 Subject: [PATCH] Replace ProjectId with EnvironmentId --- net/apply-asset-renditions/apply_asset_renditions.cs | 2 +- net/delivery-api/delivery_api_get_element.cs | 2 +- net/delivery-api/delivery_api_get_item.cs | 2 +- net/delivery-api/delivery_api_get_item_preview.cs | 2 +- net/delivery-api/delivery_api_get_items.cs | 2 +- net/delivery-api/delivery_api_get_items_feed.cs | 2 +- net/delivery-api/delivery_api_get_languages.cs | 2 +- net/delivery-api/delivery_api_get_taxonomy_group.cs | 2 +- net/delivery-api/delivery_api_get_taxonomy_groups.cs | 2 +- net/delivery-api/delivery_api_get_type.cs | 2 +- net/delivery-api/delivery_api_get_types.cs | 2 +- net/get-content/getting_content_filter_items.cs | 2 +- net/get-content/getting_content_get_items.cs | 2 +- net/get-content/getting_content_order_items.cs | 2 +- .../getting_localized_content_language.cs | 2 +- .../getting_localized_content_url_slug.cs | 2 +- net/get-localized-content/language_fallbacks_ignore.cs | 2 +- net/import-assets/importing_assets_create_asset.cs | 2 +- net/import-assets/importing_assets_upload_file.cs | 2 +- net/import-assets/importing_assets_use_asset.cs | 2 +- net/import-assets/importing_assets_use_asset_rich_text.cs | 2 +- net/import-content-items/importing_create_item.cs | 2 +- net/import-content-items/importing_create_type.cs | 2 +- net/import-content-items/importing_upsert_variant.cs | 2 +- net/import-content-model/import_model_create_snippet.cs | 2 +- net/import-content-model/import_model_create_taxonomy.cs | 2 +- net/import-content-model/import_model_create_type.cs | 2 +- net/import-linked-content/import_linked_create_item.cs | 2 +- .../import_linked_create_sec_item.cs | 2 +- .../import_linked_upsert_Sec_variant.cs | 2 +- net/import-linked-content/import_linked_upsert_variant.cs | 2 +- net/import-rich-text/import_rich_create_button_type.cs | 2 +- net/import-rich-text/import_rich_create_item.cs | 2 +- net/import-rich-text/import_rich_create_simple_type.cs | 2 +- net/import-rich-text/import_rich_upsert_variant.cs | 2 +- .../managing_navigation_articles_slugs.cs | 2 +- net/management-api-v2/cm_api_v2_clone_environment.cs | 2 +- net/management-api-v2/cm_api_v2_delete_asset.cs | 2 +- net/management-api-v2/cm_api_v2_delete_custom_app.cs | 4 +--- net/management-api-v2/cm_api_v2_delete_environment.cs | 2 +- net/management-api-v2/cm_api_v2_delete_item.cs | 2 +- net/management-api-v2/cm_api_v2_delete_legacy_webhook.cs | 2 +- net/management-api-v2/cm_api_v2_delete_snippet.cs | 2 +- net/management-api-v2/cm_api_v2_delete_space.cs | 2 +- net/management-api-v2/cm_api_v2_delete_taxonomy_group.cs | 2 +- net/management-api-v2/cm_api_v2_delete_type.cs | 2 +- net/management-api-v2/cm_api_v2_delete_variant.cs | 2 +- net/management-api-v2/cm_api_v2_delete_webhook.cs | 2 +- net/management-api-v2/cm_api_v2_delete_workflow.cs | 2 +- net/management-api-v2/cm_api_v2_get_asset.cs | 2 +- net/management-api-v2/cm_api_v2_get_asset_folders.cs | 2 +- net/management-api-v2/cm_api_v2_get_assets.cs | 2 +- net/management-api-v2/cm_api_v2_get_components_of_type.cs | 2 +- .../cm_api_v2_get_content_collections.cs | 2 +- net/management-api-v2/cm_api_v2_get_custom_app.cs | 4 +--- net/management-api-v2/cm_api_v2_get_custom_apps.cs | 8 +++----- .../cm_api_v2_get_environment_information.cs | 2 +- net/management-api-v2/cm_api_v2_get_environment_status.cs | 2 +- net/management-api-v2/cm_api_v2_get_item.cs | 2 +- net/management-api-v2/cm_api_v2_get_items.cs | 2 +- net/management-api-v2/cm_api_v2_get_language.cs | 2 +- net/management-api-v2/cm_api_v2_get_languages.cs | 2 +- net/management-api-v2/cm_api_v2_get_legacy_webhook.cs | 2 +- net/management-api-v2/cm_api_v2_get_legacy_webhooks.cs | 2 +- .../cm_api_v2_get_preview_configuration.cs | 2 +- net/management-api-v2/cm_api_v2_get_published_variant.cs | 2 +- net/management-api-v2/cm_api_v2_get_rendition.cs | 2 +- net/management-api-v2/cm_api_v2_get_renditions.cs | 2 +- net/management-api-v2/cm_api_v2_get_role.cs | 2 +- net/management-api-v2/cm_api_v2_get_roles.cs | 2 +- net/management-api-v2/cm_api_v2_get_snippet.cs | 2 +- net/management-api-v2/cm_api_v2_get_snippets.cs | 2 +- net/management-api-v2/cm_api_v2_get_space.cs | 2 +- net/management-api-v2/cm_api_v2_get_spaces.cs | 2 +- .../cm_api_v2_get_subscription_projects.cs | 2 +- net/management-api-v2/cm_api_v2_get_subscription_user.cs | 2 +- net/management-api-v2/cm_api_v2_get_subscription_users.cs | 2 +- net/management-api-v2/cm_api_v2_get_taxonomy_group.cs | 2 +- net/management-api-v2/cm_api_v2_get_taxonomy_groups.cs | 2 +- net/management-api-v2/cm_api_v2_get_type.cs | 2 +- net/management-api-v2/cm_api_v2_get_types.cs | 2 +- net/management-api-v2/cm_api_v2_get_variant.cs | 2 +- net/management-api-v2/cm_api_v2_get_variants.cs | 2 +- .../cm_api_v2_get_variants_by_collection.cs | 2 +- net/management-api-v2/cm_api_v2_get_variants_by_space.cs | 2 +- net/management-api-v2/cm_api_v2_get_variants_of_type.cs | 2 +- net/management-api-v2/cm_api_v2_get_webhook.cs | 2 +- net/management-api-v2/cm_api_v2_get_webhooks.cs | 2 +- net/management-api-v2/cm_api_v2_get_workflow_steps.cs | 2 +- net/management-api-v2/cm_api_v2_get_workflows.cs | 2 +- .../cm_api_v2_mark_environment_as_production.cs | 2 +- net/management-api-v2/cm_api_v2_patch_asset_folders.cs | 2 +- .../cm_api_v2_patch_content_collections.cs | 2 +- net/management-api-v2/cm_api_v2_patch_environment.cs | 2 +- net/management-api-v2/cm_api_v2_patch_language.cs | 2 +- .../cm_api_v2_patch_modify_custom_app.cs | 8 +++----- net/management-api-v2/cm_api_v2_patch_snippet.cs | 2 +- net/management-api-v2/cm_api_v2_patch_space.cs | 2 +- net/management-api-v2/cm_api_v2_patch_taxonomy_group.cs | 2 +- net/management-api-v2/cm_api_v2_patch_type.cs | 2 +- net/management-api-v2/cm_api_v2_post_asset.cs | 2 +- net/management-api-v2/cm_api_v2_post_asset_folders.cs | 2 +- net/management-api-v2/cm_api_v2_post_create_custom_app.cs | 8 +++----- net/management-api-v2/cm_api_v2_post_file.cs | 2 +- net/management-api-v2/cm_api_v2_post_item.cs | 2 +- net/management-api-v2/cm_api_v2_post_language.cs | 2 +- net/management-api-v2/cm_api_v2_post_legacy_webhook.cs | 2 +- net/management-api-v2/cm_api_v2_post_rendition.cs | 2 +- net/management-api-v2/cm_api_v2_post_snippet.cs | 2 +- net/management-api-v2/cm_api_v2_post_space.cs | 2 +- net/management-api-v2/cm_api_v2_post_taxonomy_group.cs | 2 +- net/management-api-v2/cm_api_v2_post_type.cs | 2 +- net/management-api-v2/cm_api_v2_post_user.cs | 2 +- net/management-api-v2/cm_api_v2_post_validate.cs | 2 +- net/management-api-v2/cm_api_v2_post_webhook.cs | 2 +- net/management-api-v2/cm_api_v2_post_workflow.cs | 2 +- net/management-api-v2/cm_api_v2_put_asset.cs | 2 +- net/management-api-v2/cm_api_v2_put_item.cs | 2 +- .../cm_api_v2_put_preview_configuration.cs | 2 +- net/management-api-v2/cm_api_v2_put_rendition.cs | 2 +- .../cm_api_v2_put_subscription_user_activate.cs | 2 +- .../cm_api_v2_put_subscription_user_deactivate.cs | 2 +- net/management-api-v2/cm_api_v2_put_user.cs | 2 +- .../cm_api_v2_put_var_cancel_sched_unpublish.cs | 2 +- net/management-api-v2/cm_api_v2_put_variant.cs | 2 +- .../cm_api_v2_put_variant_cancel_schedule.cs | 2 +- .../cm_api_v2_put_variant_create_new_version.cs | 2 +- .../cm_api_v2_put_variant_publish_or_schedule.cs | 2 +- .../cm_api_v2_put_variant_unpublish_archive.cs | 2 +- .../cm_api_v2_put_variant_workflow_step.cs | 2 +- net/management-api-v2/cm_api_v2_put_workflow.cs | 2 +- net/management-api-v2/mapi_v2_disable_legacy_webhook.cs | 2 +- net/management-api-v2/mapi_v2_disable_webhook.cs | 2 +- net/management-api-v2/mapi_v2_enable_legacy_webhook.cs | 2 +- net/management-api-v2/mapi_v2_enable_webhook.cs | 2 +- net/management-api-v2/mapi_v2_get_validation_issues.cs | 2 +- net/management-api-v2/mapi_v2_get_validation_task.cs | 2 +- net/management-api-v2/mapi_v2_get_web_spotlight_status.cs | 2 +- net/management-api-v2/mapi_v2_post_validate_async.cs | 2 +- .../mapi_v2_put_web_spotlight_activate.cs | 2 +- .../mapi_v2_put_web_spotlight_deactivate.cs | 2 +- net/preview-content/preview_content_get_article.cs | 2 +- .../linked_content_get_article_with_author.cs | 2 +- .../linked_content_get_page_with_subpages.cs | 2 +- .../securing_public_access_get_article.cs | 2 +- .../strongly_typed_models_retrieve.cs | 2 +- .../structure_in_rte_register_link_resolver.cs | 2 +- .../structure_in_rte_register_resolver.cs | 2 +- net/sync-api/sync_api_initialize_sync.cs | 7 +++---- net/sync-api/sync_api_synchronize_changes.cs | 7 +++---- net/using-webhooks/using_webhooks_get_latest_content.cs | 2 +- 151 files changed, 161 insertions(+), 173 deletions(-) diff --git a/net/apply-asset-renditions/apply_asset_renditions.cs b/net/apply-asset-renditions/apply_asset_renditions.cs index b704f051..c8609206 100644 --- a/net/apply-asset-renditions/apply_asset_renditions.cs +++ b/net/apply-asset-renditions/apply_asset_renditions.cs @@ -1,7 +1,7 @@ // Initializes a Delivery client _client = DeliveryClientBuilder .WithOptions(builder => builder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .UseProductionApi() .Build()) .Build(); diff --git a/net/delivery-api/delivery_api_get_element.cs b/net/delivery-api/delivery_api_get_element.cs index c42325d1..81e2a374 100644 --- a/net/delivery-api/delivery_api_get_element.cs +++ b/net/delivery-api/delivery_api_get_element.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets the model of specific element within a specific content type diff --git a/net/delivery-api/delivery_api_get_item.cs b/net/delivery-api/delivery_api_get_item.cs index 284860fa..a8132b13 100644 --- a/net/delivery-api/delivery_api_get_item.cs +++ b/net/delivery-api/delivery_api_get_item.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets specific elements of an article diff --git a/net/delivery-api/delivery_api_get_item_preview.cs b/net/delivery-api/delivery_api_get_item_preview.cs index 11e71a3d..c9fe8b77 100644 --- a/net/delivery-api/delivery_api_get_item_preview.cs +++ b/net/delivery-api/delivery_api_get_item_preview.cs @@ -4,7 +4,7 @@ // Initializes a delivery client for previewing content IDeliveryClient client = DeliveryClientBuilder .WithOptions(builder => builder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .UsePreviewApi("") .Build()) .Build(); diff --git a/net/delivery-api/delivery_api_get_items.cs b/net/delivery-api/delivery_api_get_items.cs index 489291b8..3fb85bf2 100644 --- a/net/delivery-api/delivery_api_get_items.cs +++ b/net/delivery-api/delivery_api_get_items.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets specific elements of 3 articles ordered by the "Post date" element diff --git a/net/delivery-api/delivery_api_get_items_feed.cs b/net/delivery-api/delivery_api_get_items_feed.cs index 1e4be81d..6ce86daa 100644 --- a/net/delivery-api/delivery_api_get_items_feed.cs +++ b/net/delivery-api/delivery_api_get_items_feed.cs @@ -3,7 +3,7 @@ // Creates an instance of the delivery client; see https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets feed of all articles in the project diff --git a/net/delivery-api/delivery_api_get_languages.cs b/net/delivery-api/delivery_api_get_languages.cs index 33689123..f9b9e1c6 100644 --- a/net/delivery-api/delivery_api_get_languages.cs +++ b/net/delivery-api/delivery_api_get_languages.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets 3 languages diff --git a/net/delivery-api/delivery_api_get_taxonomy_group.cs b/net/delivery-api/delivery_api_get_taxonomy_group.cs index f6e39b8a..720ae22e 100644 --- a/net/delivery-api/delivery_api_get_taxonomy_group.cs +++ b/net/delivery-api/delivery_api_get_taxonomy_group.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets a specific taxonomy group diff --git a/net/delivery-api/delivery_api_get_taxonomy_groups.cs b/net/delivery-api/delivery_api_get_taxonomy_groups.cs index 14730497..77291ee7 100644 --- a/net/delivery-api/delivery_api_get_taxonomy_groups.cs +++ b/net/delivery-api/delivery_api_get_taxonomy_groups.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets 3 taxonomy groups diff --git a/net/delivery-api/delivery_api_get_type.cs b/net/delivery-api/delivery_api_get_type.cs index 5a213845..3df8cb92 100644 --- a/net/delivery-api/delivery_api_get_type.cs +++ b/net/delivery-api/delivery_api_get_type.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets a specific content type diff --git a/net/delivery-api/delivery_api_get_types.cs b/net/delivery-api/delivery_api_get_types.cs index ddaaca25..3d246ef9 100644 --- a/net/delivery-api/delivery_api_get_types.cs +++ b/net/delivery-api/delivery_api_get_types.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets 3 content types diff --git a/net/get-content/getting_content_filter_items.cs b/net/get-content/getting_content_filter_items.cs index 44524d97..29fc4b84 100644 --- a/net/get-content/getting_content_filter_items.cs +++ b/net/get-content/getting_content_filter_items.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets all articles diff --git a/net/get-content/getting_content_get_items.cs b/net/get-content/getting_content_get_items.cs index 0d28b2e4..f771244d 100644 --- a/net/get-content/getting_content_get_items.cs +++ b/net/get-content/getting_content_get_items.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets all content items diff --git a/net/get-content/getting_content_order_items.cs b/net/get-content/getting_content_order_items.cs index 0b2257d7..2aa4ad25 100644 --- a/net/get-content/getting_content_order_items.cs +++ b/net/get-content/getting_content_order_items.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets the 3 latest articles ordered by their last modified time diff --git a/net/get-localized-content/getting_localized_content_language.cs b/net/get-localized-content/getting_localized_content_language.cs index 687261fc..a94b2302 100644 --- a/net/get-localized-content/getting_localized_content_language.cs +++ b/net/get-localized-content/getting_localized_content_language.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Tip: Create strongly typed models according to https://kontent.ai/learn/net-strong-types diff --git a/net/get-localized-content/getting_localized_content_url_slug.cs b/net/get-localized-content/getting_localized_content_url_slug.cs index 9ebef514..6f6b1880 100644 --- a/net/get-localized-content/getting_localized_content_url_slug.cs +++ b/net/get-localized-content/getting_localized_content_url_slug.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Tip: Create strongly typed models according to https://kontent.ai/learn/net-strong-types diff --git a/net/get-localized-content/language_fallbacks_ignore.cs b/net/get-localized-content/language_fallbacks_ignore.cs index e3acc811..1dcbb4e0 100644 --- a/net/get-localized-content/language_fallbacks_ignore.cs +++ b/net/get-localized-content/language_fallbacks_ignore.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("975bf280-fd91-488c-994c-2f04416e5ee3") + .WithEnvironmentId("975bf280-fd91-488c-994c-2f04416e5ee3") .Build(); // Gets content items in Spanish without following language fallbacks diff --git a/net/import-assets/importing_assets_create_asset.cs b/net/import-assets/importing_assets_create_asset.cs index 2bbcd06d..39c1a4a5 100644 --- a/net/import-assets/importing_assets_create_asset.cs +++ b/net/import-assets/importing_assets_create_asset.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Uses the file reference object obtained in step 1 diff --git a/net/import-assets/importing_assets_upload_file.cs b/net/import-assets/importing_assets_upload_file.cs index 2b5485b3..05e978d2 100644 --- a/net/import-assets/importing_assets_upload_file.cs +++ b/net/import-assets/importing_assets_upload_file.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var filePath = Path.Combine(Environment.CurrentDirectory, "Data", "brno-cafe-1080px.jpg"); diff --git a/net/import-assets/importing_assets_use_asset.cs b/net/import-assets/importing_assets_use_asset.cs index ea749463..de42f489 100644 --- a/net/import-assets/importing_assets_use_asset.cs +++ b/net/import-assets/importing_assets_use_asset.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("ext-cafe-brno"), Reference.ByCodename("en-US")); diff --git a/net/import-assets/importing_assets_use_asset_rich_text.cs b/net/import-assets/importing_assets_use_asset_rich_text.cs index 751b322e..c4a23f66 100644 --- a/net/import-assets/importing_assets_use_asset_rich_text.cs +++ b/net/import-assets/importing_assets_use_asset_rich_text.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("new-cafes"), Reference.ByCodename("en-US")); diff --git a/net/import-content-items/importing_create_item.cs b/net/import-content-items/importing_create_item.cs index b69cb7ac..9f55f327 100644 --- a/net/import-content-items/importing_create_item.cs +++ b/net/import-content-items/importing_create_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.UpsertContentItemAsync( diff --git a/net/import-content-items/importing_create_type.cs b/net/import-content-items/importing_create_type.cs index ee522c95..8cfad7f0 100644 --- a/net/import-content-items/importing_create_type.cs +++ b/net/import-content-items/importing_create_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeAsync(new ContentTypeCreateModel diff --git a/net/import-content-items/importing_upsert_variant.cs b/net/import-content-items/importing_upsert_variant.cs index 9e86dbb3..21db8461 100644 --- a/net/import-content-items/importing_upsert_variant.cs +++ b/net/import-content-items/importing_upsert_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.UpsertLanguageVariantAsync(identifier, new LanguageVariantUpsertModel diff --git a/net/import-content-model/import_model_create_snippet.cs b/net/import-content-model/import_model_create_snippet.cs index 8855b00e..c60fb5b0 100644 --- a/net/import-content-model/import_model_create_snippet.cs +++ b/net/import-content-model/import_model_create_snippet.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeSnippetAsync(new ContentTypeSnippetCreateModel diff --git a/net/import-content-model/import_model_create_taxonomy.cs b/net/import-content-model/import_model_create_taxonomy.cs index 73d1b320..06d40f52 100644 --- a/net/import-content-model/import_model_create_taxonomy.cs +++ b/net/import-content-model/import_model_create_taxonomy.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateTaxonomyGroupAsync(new TaxonomyGroupCreateModel diff --git a/net/import-content-model/import_model_create_type.cs b/net/import-content-model/import_model_create_type.cs index 8ae47c65..323530bc 100644 --- a/net/import-content-model/import_model_create_type.cs +++ b/net/import-content-model/import_model_create_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeAsync(new ContentTypeCreateModel diff --git a/net/import-linked-content/import_linked_create_item.cs b/net/import-linked-content/import_linked_create_item.cs index 5ecc9e6c..5f24df8f 100644 --- a/net/import-linked-content/import_linked_create_item.cs +++ b/net/import-linked-content/import_linked_create_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.UpsertContentItemAsync( diff --git a/net/import-linked-content/import_linked_create_sec_item.cs b/net/import-linked-content/import_linked_create_sec_item.cs index cdfd02f6..5dde96e6 100644 --- a/net/import-linked-content/import_linked_create_sec_item.cs +++ b/net/import-linked-content/import_linked_create_sec_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.UpsertContentItemAsync( diff --git a/net/import-linked-content/import_linked_upsert_Sec_variant.cs b/net/import-linked-content/import_linked_upsert_Sec_variant.cs index 07c972e3..610be037 100644 --- a/net/import-linked-content/import_linked_upsert_Sec_variant.cs +++ b/net/import-linked-content/import_linked_upsert_Sec_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("456"), Reference.ByCodename("en-US")); diff --git a/net/import-linked-content/import_linked_upsert_variant.cs b/net/import-linked-content/import_linked_upsert_variant.cs index 02dc8e10..f6479d17 100644 --- a/net/import-linked-content/import_linked_upsert_variant.cs +++ b/net/import-linked-content/import_linked_upsert_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("123"), Reference.ByCodename("en-US")); diff --git a/net/import-rich-text/import_rich_create_button_type.cs b/net/import-rich-text/import_rich_create_button_type.cs index e17ca6af..6434bcf3 100644 --- a/net/import-rich-text/import_rich_create_button_type.cs +++ b/net/import-rich-text/import_rich_create_button_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeAsync(new ContentTypeCreateModel diff --git a/net/import-rich-text/import_rich_create_item.cs b/net/import-rich-text/import_rich_create_item.cs index ec87266c..3f6415fe 100644 --- a/net/import-rich-text/import_rich_create_item.cs +++ b/net/import-rich-text/import_rich_create_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.UpsertContentItemAsync(Reference.ByExternalId("simple-example"), new ContentItemUpsertModel diff --git a/net/import-rich-text/import_rich_create_simple_type.cs b/net/import-rich-text/import_rich_create_simple_type.cs index 9e8a18ba..55e29535 100644 --- a/net/import-rich-text/import_rich_create_simple_type.cs +++ b/net/import-rich-text/import_rich_create_simple_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeAsync(new ContentTypeCreateModel diff --git a/net/import-rich-text/import_rich_upsert_variant.cs b/net/import-rich-text/import_rich_upsert_variant.cs index 51875a95..359a20b0 100644 --- a/net/import-rich-text/import_rich_upsert_variant.cs +++ b/net/import-rich-text/import_rich_upsert_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("simple-example"), Reference.ById(Guid.Parse("00000000-0000-0000-0000-000000000000"))); diff --git a/net/manage-navigation/managing_navigation_articles_slugs.cs b/net/manage-navigation/managing_navigation_articles_slugs.cs index 93dd8d27..35cfb0de 100644 --- a/net/manage-navigation/managing_navigation_articles_slugs.cs +++ b/net/manage-navigation/managing_navigation_articles_slugs.cs @@ -3,7 +3,7 @@ // Tip: Use DI for this in your apps https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets navigation items and their linked items diff --git a/net/management-api-v2/cm_api_v2_clone_environment.cs b/net/management-api-v2/cm_api_v2_clone_environment.cs index 36ea5762..b7bff774 100644 --- a/net/management-api-v2/cm_api_v2_clone_environment.cs +++ b/net/management-api-v2/cm_api_v2_clone_environment.cs @@ -5,7 +5,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CloneEnvironmentAsync(new EnvironmentCloneModel diff --git a/net/management-api-v2/cm_api_v2_delete_asset.cs b/net/management-api-v2/cm_api_v2_delete_asset.cs index 0d3d5a47..0156690e 100644 --- a/net/management-api-v2/cm_api_v2_delete_asset.cs +++ b/net/management-api-v2/cm_api_v2_delete_asset.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); diff --git a/net/management-api-v2/cm_api_v2_delete_custom_app.cs b/net/management-api-v2/cm_api_v2_delete_custom_app.cs index b6033f32..1ccc4c2b 100644 --- a/net/management-api-v2/cm_api_v2_delete_custom_app.cs +++ b/net/management-api-v2/cm_api_v2_delete_custom_app.cs @@ -1,4 +1,3 @@ -// DocSection: cm_api_v2_delete_custom_app // Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Management; @@ -11,5 +10,4 @@ var identifier = Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")); //var identifier = Reference.ByCodename("my_custom_app"); -var response = await client.DeleteCustomAppAsync(identifier); -// EndDocSection \ No newline at end of file +var response = await client.DeleteCustomAppAsync(identifier); \ No newline at end of file diff --git a/net/management-api-v2/cm_api_v2_delete_environment.cs b/net/management-api-v2/cm_api_v2_delete_environment.cs index 1c9c06ba..eef7af35 100644 --- a/net/management-api-v2/cm_api_v2_delete_environment.cs +++ b/net/management-api-v2/cm_api_v2_delete_environment.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.DeleteEnvironmentAsync(); diff --git a/net/management-api-v2/cm_api_v2_delete_item.cs b/net/management-api-v2/cm_api_v2_delete_item.cs index 6ae40792..e2f5983c 100644 --- a/net/management-api-v2/cm_api_v2_delete_item.cs +++ b/net/management-api-v2/cm_api_v2_delete_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")); diff --git a/net/management-api-v2/cm_api_v2_delete_legacy_webhook.cs b/net/management-api-v2/cm_api_v2_delete_legacy_webhook.cs index 152c06b3..28c5fa87 100644 --- a/net/management-api-v2/cm_api_v2_delete_legacy_webhook.cs +++ b/net/management-api-v2/cm_api_v2_delete_legacy_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("d53360f7-79e1-42f4-a524-1b53a417d03e")); diff --git a/net/management-api-v2/cm_api_v2_delete_snippet.cs b/net/management-api-v2/cm_api_v2_delete_snippet.cs index eb839edb..47d3f6be 100644 --- a/net/management-api-v2/cm_api_v2_delete_snippet.cs +++ b/net/management-api-v2/cm_api_v2_delete_snippet.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("baf884be-531f-441f-ae88-64205efdd0f6")); diff --git a/net/management-api-v2/cm_api_v2_delete_space.cs b/net/management-api-v2/cm_api_v2_delete_space.cs index 5dbdfc7b..d1898f7e 100644 --- a/net/management-api-v2/cm_api_v2_delete_space.cs +++ b/net/management-api-v2/cm_api_v2_delete_space.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("6291c693-f6e4-4a6b-ac67-5c31c32f9388")); diff --git a/net/management-api-v2/cm_api_v2_delete_taxonomy_group.cs b/net/management-api-v2/cm_api_v2_delete_taxonomy_group.cs index 9cd7f7ce..729b47b7 100644 --- a/net/management-api-v2/cm_api_v2_delete_taxonomy_group.cs +++ b/net/management-api-v2/cm_api_v2_delete_taxonomy_group.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); diff --git a/net/management-api-v2/cm_api_v2_delete_type.cs b/net/management-api-v2/cm_api_v2_delete_type.cs index f6f30ade..2252522b 100644 --- a/net/management-api-v2/cm_api_v2_delete_type.cs +++ b/net/management-api-v2/cm_api_v2_delete_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("269202ad-1d9d-47fd-b3e8-bdb05b3e3cf0")); diff --git a/net/management-api-v2/cm_api_v2_delete_variant.cs b/net/management-api-v2/cm_api_v2_delete_variant.cs index dcbe8710..e2c712ae 100644 --- a/net/management-api-v2/cm_api_v2_delete_variant.cs +++ b/net/management-api-v2/cm_api_v2_delete_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_delete_webhook.cs b/net/management-api-v2/cm_api_v2_delete_webhook.cs index 824dd2af..95096e64 100644 --- a/net/management-api-v2/cm_api_v2_delete_webhook.cs +++ b/net/management-api-v2/cm_api_v2_delete_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("d53360f7-79e1-42f4-a524-1b53a417d03e")); diff --git a/net/management-api-v2/cm_api_v2_delete_workflow.cs b/net/management-api-v2/cm_api_v2_delete_workflow.cs index 472db4a1..2c4d93a3 100644 --- a/net/management-api-v2/cm_api_v2_delete_workflow.cs +++ b/net/management-api-v2/cm_api_v2_delete_workflow.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("f9f28df0-9dec-4ee3-b087-c501e4b75347")); diff --git a/net/management-api-v2/cm_api_v2_get_asset.cs b/net/management-api-v2/cm_api_v2_get_asset.cs index 0a01157a..8d43230d 100644 --- a/net/management-api-v2/cm_api_v2_get_asset.cs +++ b/net/management-api-v2/cm_api_v2_get_asset.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); diff --git a/net/management-api-v2/cm_api_v2_get_asset_folders.cs b/net/management-api-v2/cm_api_v2_get_asset_folders.cs index c6cc4142..acf8cb61 100644 --- a/net/management-api-v2/cm_api_v2_get_asset_folders.cs +++ b/net/management-api-v2/cm_api_v2_get_asset_folders.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.GetAssetFoldersAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_assets.cs b/net/management-api-v2/cm_api_v2_get_assets.cs index 229e9a72..0561e7d3 100644 --- a/net/management-api-v2/cm_api_v2_get_assets.cs +++ b/net/management-api-v2/cm_api_v2_get_assets.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Gets the first page of results diff --git a/net/management-api-v2/cm_api_v2_get_components_of_type.cs b/net/management-api-v2/cm_api_v2_get_components_of_type.cs index cdf72709..56937f04 100644 --- a/net/management-api-v2/cm_api_v2_get_components_of_type.cs +++ b/net/management-api-v2/cm_api_v2_get_components_of_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("6434e475-5a29-4866-9fd1-6d1ca873f5be")); diff --git a/net/management-api-v2/cm_api_v2_get_content_collections.cs b/net/management-api-v2/cm_api_v2_get_content_collections.cs index 0efecab3..43255c49 100644 --- a/net/management-api-v2/cm_api_v2_get_content_collections.cs +++ b/net/management-api-v2/cm_api_v2_get_content_collections.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListCollectionsAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_custom_app.cs b/net/management-api-v2/cm_api_v2_get_custom_app.cs index 01792ff5..86d2d325 100644 --- a/net/management-api-v2/cm_api_v2_get_custom_app.cs +++ b/net/management-api-v2/cm_api_v2_get_custom_app.cs @@ -1,4 +1,3 @@ -// DocSection: cm_api_v2_get_custom_app // Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Management; @@ -11,5 +10,4 @@ var identifier = Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")); //var identifier = Reference.ByCodename("my_custom_app"); -var response = await client.GetCustomAppAsync(identifier); -// EndDocSection \ No newline at end of file +var response = await client.GetCustomAppAsync(identifier); \ No newline at end of file diff --git a/net/management-api-v2/cm_api_v2_get_custom_apps.cs b/net/management-api-v2/cm_api_v2_get_custom_apps.cs index b79ce5f6..fe07fd5e 100644 --- a/net/management-api-v2/cm_api_v2_get_custom_apps.cs +++ b/net/management-api-v2/cm_api_v2_get_custom_apps.cs @@ -1,12 +1,10 @@ -// DocSection: cm_api_v2_get_custom_apps // Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Management; var client = new ManagementClient(new ManagementOptions { - ApiKey = "", - ProjectId = "" + ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); -var response = await client.ListCustomAppsAsync(); -// EndDocSection \ No newline at end of file +var response = await client.ListCustomAppsAsync(); \ No newline at end of file diff --git a/net/management-api-v2/cm_api_v2_get_environment_information.cs b/net/management-api-v2/cm_api_v2_get_environment_information.cs index 5e96da55..aad9f884 100644 --- a/net/management-api-v2/cm_api_v2_get_environment_information.cs +++ b/net/management-api-v2/cm_api_v2_get_environment_information.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.GetEnvironmentInformationAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_environment_status.cs b/net/management-api-v2/cm_api_v2_get_environment_status.cs index 44b22ce2..af1bd68a 100644 --- a/net/management-api-v2/cm_api_v2_get_environment_status.cs +++ b/net/management-api-v2/cm_api_v2_get_environment_status.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.GetEnvironmentCloningStateAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_item.cs b/net/management-api-v2/cm_api_v2_get_item.cs index 7165d169..317eb15c 100644 --- a/net/management-api-v2/cm_api_v2_get_item.cs +++ b/net/management-api-v2/cm_api_v2_get_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")); diff --git a/net/management-api-v2/cm_api_v2_get_items.cs b/net/management-api-v2/cm_api_v2_get_items.cs index 4eee68a2..4440b352 100644 --- a/net/management-api-v2/cm_api_v2_get_items.cs +++ b/net/management-api-v2/cm_api_v2_get_items.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Gets the first page of results diff --git a/net/management-api-v2/cm_api_v2_get_language.cs b/net/management-api-v2/cm_api_v2_get_language.cs index 0710c6fb..09d412f6 100644 --- a/net/management-api-v2/cm_api_v2_get_language.cs +++ b/net/management-api-v2/cm_api_v2_get_language.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("2ea66788-d3b8-5ff5-b37e-258502e4fd5d")); diff --git a/net/management-api-v2/cm_api_v2_get_languages.cs b/net/management-api-v2/cm_api_v2_get_languages.cs index 280e319a..c001dad6 100644 --- a/net/management-api-v2/cm_api_v2_get_languages.cs +++ b/net/management-api-v2/cm_api_v2_get_languages.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Gets the first page of results diff --git a/net/management-api-v2/cm_api_v2_get_legacy_webhook.cs b/net/management-api-v2/cm_api_v2_get_legacy_webhook.cs index da34022b..f5ef0a40 100644 --- a/net/management-api-v2/cm_api_v2_get_legacy_webhook.cs +++ b/net/management-api-v2/cm_api_v2_get_legacy_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("5df74e27-1213-484e-b9ae-bcbe90bd5990")); diff --git a/net/management-api-v2/cm_api_v2_get_legacy_webhooks.cs b/net/management-api-v2/cm_api_v2_get_legacy_webhooks.cs index ab2b62b9..28484aaa 100644 --- a/net/management-api-v2/cm_api_v2_get_legacy_webhooks.cs +++ b/net/management-api-v2/cm_api_v2_get_legacy_webhooks.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListLegacyWebhooksAsync(); \ No newline at end of file diff --git a/net/management-api-v2/cm_api_v2_get_preview_configuration.cs b/net/management-api-v2/cm_api_v2_get_preview_configuration.cs index b9170f9a..fe7f2133 100644 --- a/net/management-api-v2/cm_api_v2_get_preview_configuration.cs +++ b/net/management-api-v2/cm_api_v2_get_preview_configuration.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.GetPreviewConfigurationAsync() diff --git a/net/management-api-v2/cm_api_v2_get_published_variant.cs b/net/management-api-v2/cm_api_v2_get_published_variant.cs index 1fceda30..23be4f99 100644 --- a/net/management-api-v2/cm_api_v2_get_published_variant.cs +++ b/net/management-api-v2/cm_api_v2_get_published_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_get_rendition.cs b/net/management-api-v2/cm_api_v2_get_rendition.cs index e4f088f8..28107e1d 100644 --- a/net/management-api-v2/cm_api_v2_get_rendition.cs +++ b/net/management-api-v2/cm_api_v2_get_rendition.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var assetReference = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); diff --git a/net/management-api-v2/cm_api_v2_get_renditions.cs b/net/management-api-v2/cm_api_v2_get_renditions.cs index c5f419ba..3eab5f97 100644 --- a/net/management-api-v2/cm_api_v2_get_renditions.cs +++ b/net/management-api-v2/cm_api_v2_get_renditions.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var assetReference = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); diff --git a/net/management-api-v2/cm_api_v2_get_role.cs b/net/management-api-v2/cm_api_v2_get_role.cs index 49ac8cb9..e4f60fdd 100644 --- a/net/management-api-v2/cm_api_v2_get_role.cs +++ b/net/management-api-v2/cm_api_v2_get_role.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("a23d3727-3b16-4d94-9eb0-85225d29cfef")); diff --git a/net/management-api-v2/cm_api_v2_get_roles.cs b/net/management-api-v2/cm_api_v2_get_roles.cs index c4f8c96e..7fe30bc6 100644 --- a/net/management-api-v2/cm_api_v2_get_roles.cs +++ b/net/management-api-v2/cm_api_v2_get_roles.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListProjectRolesAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_snippet.cs b/net/management-api-v2/cm_api_v2_get_snippet.cs index 08471f37..733cd50a 100644 --- a/net/management-api-v2/cm_api_v2_get_snippet.cs +++ b/net/management-api-v2/cm_api_v2_get_snippet.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("baf884be-531f-441f-ae88-64205efdd0f6")); diff --git a/net/management-api-v2/cm_api_v2_get_snippets.cs b/net/management-api-v2/cm_api_v2_get_snippets.cs index 651a00c7..bbb99b39 100644 --- a/net/management-api-v2/cm_api_v2_get_snippets.cs +++ b/net/management-api-v2/cm_api_v2_get_snippets.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Gets the first page of results diff --git a/net/management-api-v2/cm_api_v2_get_space.cs b/net/management-api-v2/cm_api_v2_get_space.cs index 967582ce..de21373d 100644 --- a/net/management-api-v2/cm_api_v2_get_space.cs +++ b/net/management-api-v2/cm_api_v2_get_space.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("6291c693-f6e4-4a6b-ac67-5c31c32f9388")); diff --git a/net/management-api-v2/cm_api_v2_get_spaces.cs b/net/management-api-v2/cm_api_v2_get_spaces.cs index ddf74bf5..3bfe245a 100644 --- a/net/management-api-v2/cm_api_v2_get_spaces.cs +++ b/net/management-api-v2/cm_api_v2_get_spaces.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListSpacesAsync(identifier); diff --git a/net/management-api-v2/cm_api_v2_get_subscription_projects.cs b/net/management-api-v2/cm_api_v2_get_subscription_projects.cs index 0ce8b412..81c97e1d 100644 --- a/net/management-api-v2/cm_api_v2_get_subscription_projects.cs +++ b/net/management-api-v2/cm_api_v2_get_subscription_projects.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var client = _fileSystemFixture.CreateMockClientWithResponse("SubscriptionUsers.json"); diff --git a/net/management-api-v2/cm_api_v2_get_subscription_user.cs b/net/management-api-v2/cm_api_v2_get_subscription_user.cs index 7954ff84..9739fc95 100644 --- a/net/management-api-v2/cm_api_v2_get_subscription_user.cs +++ b/net/management-api-v2/cm_api_v2_get_subscription_user.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = UserIdentifier.ByEmail("Joe.Joe@kontent.ai"); diff --git a/net/management-api-v2/cm_api_v2_get_subscription_users.cs b/net/management-api-v2/cm_api_v2_get_subscription_users.cs index 81c33b48..321039fa 100644 --- a/net/management-api-v2/cm_api_v2_get_subscription_users.cs +++ b/net/management-api-v2/cm_api_v2_get_subscription_users.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListSubscriptionUsersAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_taxonomy_group.cs b/net/management-api-v2/cm_api_v2_get_taxonomy_group.cs index 837d0098..dd20d6f5 100644 --- a/net/management-api-v2/cm_api_v2_get_taxonomy_group.cs +++ b/net/management-api-v2/cm_api_v2_get_taxonomy_group.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("0be13600-e57c-577d-8108-c8d860330985")); diff --git a/net/management-api-v2/cm_api_v2_get_taxonomy_groups.cs b/net/management-api-v2/cm_api_v2_get_taxonomy_groups.cs index f2615b3e..97c851e0 100644 --- a/net/management-api-v2/cm_api_v2_get_taxonomy_groups.cs +++ b/net/management-api-v2/cm_api_v2_get_taxonomy_groups.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Gets the first page of results diff --git a/net/management-api-v2/cm_api_v2_get_type.cs b/net/management-api-v2/cm_api_v2_get_type.cs index 3aaefc8b..5a3a49d9 100644 --- a/net/management-api-v2/cm_api_v2_get_type.cs +++ b/net/management-api-v2/cm_api_v2_get_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("269202ad-1d9d-47fd-b3e8-bdb05b3e3cf0")); diff --git a/net/management-api-v2/cm_api_v2_get_types.cs b/net/management-api-v2/cm_api_v2_get_types.cs index 2a085362..d0f71dad 100644 --- a/net/management-api-v2/cm_api_v2_get_types.cs +++ b/net/management-api-v2/cm_api_v2_get_types.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); // Gets the first page of results diff --git a/net/management-api-v2/cm_api_v2_get_variant.cs b/net/management-api-v2/cm_api_v2_get_variant.cs index 93797dfa..1b195271 100644 --- a/net/management-api-v2/cm_api_v2_get_variant.cs +++ b/net/management-api-v2/cm_api_v2_get_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_get_variants.cs b/net/management-api-v2/cm_api_v2_get_variants.cs index 17604b60..9471754b 100644 --- a/net/management-api-v2/cm_api_v2_get_variants.cs +++ b/net/management-api-v2/cm_api_v2_get_variants.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")); diff --git a/net/management-api-v2/cm_api_v2_get_variants_by_collection.cs b/net/management-api-v2/cm_api_v2_get_variants_by_collection.cs index 0047bf81..4ea6abb3 100644 --- a/net/management-api-v2/cm_api_v2_get_variants_by_collection.cs +++ b/net/management-api-v2/cm_api_v2_get_variants_by_collection.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("3c70b0cc-d9d8-4c9d-a01f-47a2d677fdd5")); diff --git a/net/management-api-v2/cm_api_v2_get_variants_by_space.cs b/net/management-api-v2/cm_api_v2_get_variants_by_space.cs index e79632f5..1288a0dd 100644 --- a/net/management-api-v2/cm_api_v2_get_variants_by_space.cs +++ b/net/management-api-v2/cm_api_v2_get_variants_by_space.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("6291c693-f6e4-4a6b-ac67-5c31c32f9388")); diff --git a/net/management-api-v2/cm_api_v2_get_variants_of_type.cs b/net/management-api-v2/cm_api_v2_get_variants_of_type.cs index 7f8e9493..8a424338 100644 --- a/net/management-api-v2/cm_api_v2_get_variants_of_type.cs +++ b/net/management-api-v2/cm_api_v2_get_variants_of_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("b7aa4a53-d9b1-48cf-b7a6-ed0b182c4b89")); diff --git a/net/management-api-v2/cm_api_v2_get_webhook.cs b/net/management-api-v2/cm_api_v2_get_webhook.cs index 35f2bae3..95c4438d 100644 --- a/net/management-api-v2/cm_api_v2_get_webhook.cs +++ b/net/management-api-v2/cm_api_v2_get_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("5df74e27-1213-484e-b9ae-bcbe90bd5990")); diff --git a/net/management-api-v2/cm_api_v2_get_webhooks.cs b/net/management-api-v2/cm_api_v2_get_webhooks.cs index 83f71361..9d877ab0 100644 --- a/net/management-api-v2/cm_api_v2_get_webhooks.cs +++ b/net/management-api-v2/cm_api_v2_get_webhooks.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListWebhooksAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_workflow_steps.cs b/net/management-api-v2/cm_api_v2_get_workflow_steps.cs index 874a7706..268e96e1 100644 --- a/net/management-api-v2/cm_api_v2_get_workflow_steps.cs +++ b/net/management-api-v2/cm_api_v2_get_workflow_steps.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListWorkflowsAsync(); diff --git a/net/management-api-v2/cm_api_v2_get_workflows.cs b/net/management-api-v2/cm_api_v2_get_workflows.cs index f608bd7b..e8d29904 100644 --- a/net/management-api-v2/cm_api_v2_get_workflows.cs +++ b/net/management-api-v2/cm_api_v2_get_workflows.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListWorkflowsAsync(); diff --git a/net/management-api-v2/cm_api_v2_mark_environment_as_production.cs b/net/management-api-v2/cm_api_v2_mark_environment_as_production.cs index b31d177c..b3d854f4 100644 --- a/net/management-api-v2/cm_api_v2_mark_environment_as_production.cs +++ b/net/management-api-v2/cm_api_v2_mark_environment_as_production.cs @@ -5,7 +5,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.MarkEnvironmentAsProductionAsync(new MarkAsProductionModel diff --git a/net/management-api-v2/cm_api_v2_patch_asset_folders.cs b/net/management-api-v2/cm_api_v2_patch_asset_folders.cs index 00552604..e142a99e 100644 --- a/net/management-api-v2/cm_api_v2_patch_asset_folders.cs +++ b/net/management-api-v2/cm_api_v2_patch_asset_folders.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ModifyAssetFoldersAsync(new AssetFolderOperationBaseModel[] diff --git a/net/management-api-v2/cm_api_v2_patch_content_collections.cs b/net/management-api-v2/cm_api_v2_patch_content_collections.cs index bc2004f3..6ca73bf9 100644 --- a/net/management-api-v2/cm_api_v2_patch_content_collections.cs +++ b/net/management-api-v2/cm_api_v2_patch_content_collections.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ModifyCollectionAsync(new CollectionOperationBaseModel[] diff --git a/net/management-api-v2/cm_api_v2_patch_environment.cs b/net/management-api-v2/cm_api_v2_patch_environment.cs index c346885f..1ff933da 100644 --- a/net/management-api-v2/cm_api_v2_patch_environment.cs +++ b/net/management-api-v2/cm_api_v2_patch_environment.cs @@ -5,7 +5,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ModifyEnvironmentAsync(new[] diff --git a/net/management-api-v2/cm_api_v2_patch_language.cs b/net/management-api-v2/cm_api_v2_patch_language.cs index 365c17db..75ebfab9 100644 --- a/net/management-api-v2/cm_api_v2_patch_language.cs +++ b/net/management-api-v2/cm_api_v2_patch_language.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("2ea66788-d3b8-5ff5-b37e-258502e4fd5d")); diff --git a/net/management-api-v2/cm_api_v2_patch_modify_custom_app.cs b/net/management-api-v2/cm_api_v2_patch_modify_custom_app.cs index de16c26a..ae9a0f54 100644 --- a/net/management-api-v2/cm_api_v2_patch_modify_custom_app.cs +++ b/net/management-api-v2/cm_api_v2_patch_modify_custom_app.cs @@ -1,11 +1,10 @@ -// DocSection: cm_api_v2_patch_modify_custom_app // Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Management; var client = new ManagementClient(new ManagementOptions { - ApiKey = "", - ProjectId = "" + ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var changes = new CustomAppOperationBaseModel[] @@ -57,5 +56,4 @@ } }; -var response = await client.ModifyCustomAppAsync(customAppCreateModel); -// EndDocSection \ No newline at end of file +var response = await client.ModifyCustomAppAsync(customAppCreateModel); \ No newline at end of file diff --git a/net/management-api-v2/cm_api_v2_patch_snippet.cs b/net/management-api-v2/cm_api_v2_patch_snippet.cs index 7b08cdfc..492921a6 100644 --- a/net/management-api-v2/cm_api_v2_patch_snippet.cs +++ b/net/management-api-v2/cm_api_v2_patch_snippet.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("baf884be-531f-441f-ae88-64205efdd0f6")); diff --git a/net/management-api-v2/cm_api_v2_patch_space.cs b/net/management-api-v2/cm_api_v2_patch_space.cs index 44a9aabf..67b0b775 100644 --- a/net/management-api-v2/cm_api_v2_patch_space.cs +++ b/net/management-api-v2/cm_api_v2_patch_space.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("6291c693-f6e4-4a6b-ac67-5c31c32f9388")); diff --git a/net/management-api-v2/cm_api_v2_patch_taxonomy_group.cs b/net/management-api-v2/cm_api_v2_patch_taxonomy_group.cs index a9a9d023..678d2c10 100644 --- a/net/management-api-v2/cm_api_v2_patch_taxonomy_group.cs +++ b/net/management-api-v2/cm_api_v2_patch_taxonomy_group.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("0be13600-e57c-577d-8108-c8d860330985")); diff --git a/net/management-api-v2/cm_api_v2_patch_type.cs b/net/management-api-v2/cm_api_v2_patch_type.cs index 57a1ae31..bf3b60be 100644 --- a/net/management-api-v2/cm_api_v2_patch_type.cs +++ b/net/management-api-v2/cm_api_v2_patch_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ById(Guid.Parse("0be13600-e57c-577d-8108-c8d860330985")); diff --git a/net/management-api-v2/cm_api_v2_post_asset.cs b/net/management-api-v2/cm_api_v2_post_asset.cs index 6cef40f2..ee490b66 100644 --- a/net/management-api-v2/cm_api_v2_post_asset.cs +++ b/net/management-api-v2/cm_api_v2_post_asset.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateAssetAsync(new AssetCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_asset_folders.cs b/net/management-api-v2/cm_api_v2_post_asset_folders.cs index a1dcd560..75ff121a 100644 --- a/net/management-api-v2/cm_api_v2_post_asset_folders.cs +++ b/net/management-api-v2/cm_api_v2_post_asset_folders.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateAssetFoldersAsync(new AssetFolderCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_create_custom_app.cs b/net/management-api-v2/cm_api_v2_post_create_custom_app.cs index 8f6d9fa2..14963fb4 100644 --- a/net/management-api-v2/cm_api_v2_post_create_custom_app.cs +++ b/net/management-api-v2/cm_api_v2_post_create_custom_app.cs @@ -1,11 +1,10 @@ -// DocSection: cm_api_v2_post_create_sutom_app // Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Management; var client = new ManagementClient(new ManagementOptions { - ApiKey = "", - ProjectId = "" + ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var customAppCreateModel = new CustomAppCreateModel @@ -20,5 +19,4 @@ ] }; -var response = await client.GetCustomAppAsync(customAppCreateModel); -// EndDocSection \ No newline at end of file +var response = await client.GetCustomAppAsync(customAppCreateModel); \ No newline at end of file diff --git a/net/management-api-v2/cm_api_v2_post_file.cs b/net/management-api-v2/cm_api_v2_post_file.cs index 932aba96..5ce19b14 100644 --- a/net/management-api-v2/cm_api_v2_post_file.cs +++ b/net/management-api-v2/cm_api_v2_post_file.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var filePath = Path.Combine(Environment.CurrentDirectory, "Data", "which-brewing-fits-you-1080px.jpg"); diff --git a/net/management-api-v2/cm_api_v2_post_item.cs b/net/management-api-v2/cm_api_v2_post_item.cs index 754ba2ec..c060e714 100644 --- a/net/management-api-v2/cm_api_v2_post_item.cs +++ b/net/management-api-v2/cm_api_v2_post_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentItemAsync(new ContentItemCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_language.cs b/net/management-api-v2/cm_api_v2_post_language.cs index 7545df88..63dd67ba 100644 --- a/net/management-api-v2/cm_api_v2_post_language.cs +++ b/net/management-api-v2/cm_api_v2_post_language.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateLanguageAsync(new LanguageCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_legacy_webhook.cs b/net/management-api-v2/cm_api_v2_post_legacy_webhook.cs index d32a254a..1dafb573 100644 --- a/net/management-api-v2/cm_api_v2_post_legacy_webhook.cs +++ b/net/management-api-v2/cm_api_v2_post_legacy_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateLegacyWebhookAsync(new LegacyWebhookCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_rendition.cs b/net/management-api-v2/cm_api_v2_post_rendition.cs index 4dedf747..f098e9dc 100644 --- a/net/management-api-v2/cm_api_v2_post_rendition.cs +++ b/net/management-api-v2/cm_api_v2_post_rendition.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var assetReference = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); diff --git a/net/management-api-v2/cm_api_v2_post_snippet.cs b/net/management-api-v2/cm_api_v2_post_snippet.cs index 20b4eabc..d5acad65 100644 --- a/net/management-api-v2/cm_api_v2_post_snippet.cs +++ b/net/management-api-v2/cm_api_v2_post_snippet.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeSnippetAsync(new ContentTypeSnippetCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_space.cs b/net/management-api-v2/cm_api_v2_post_space.cs index d6e81c5c..6a014ab0 100644 --- a/net/management-api-v2/cm_api_v2_post_space.cs +++ b/net/management-api-v2/cm_api_v2_post_space.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateSpaceAsync(new SpaceCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_taxonomy_group.cs b/net/management-api-v2/cm_api_v2_post_taxonomy_group.cs index cc58810c..d51759bb 100644 --- a/net/management-api-v2/cm_api_v2_post_taxonomy_group.cs +++ b/net/management-api-v2/cm_api_v2_post_taxonomy_group.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateTaxonomyGroupAsync(new TaxonomyGroupCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_type.cs b/net/management-api-v2/cm_api_v2_post_type.cs index c9b9dda1..4c5151f2 100644 --- a/net/management-api-v2/cm_api_v2_post_type.cs +++ b/net/management-api-v2/cm_api_v2_post_type.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateContentTypeAsync(new ContentTypeCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_user.cs b/net/management-api-v2/cm_api_v2_post_user.cs index 9cc24f7d..12a54f02 100644 --- a/net/management-api-v2/cm_api_v2_post_user.cs +++ b/net/management-api-v2/cm_api_v2_post_user.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.InviteUserIntoProjectAsync(new UserInviteModel diff --git a/net/management-api-v2/cm_api_v2_post_validate.cs b/net/management-api-v2/cm_api_v2_post_validate.cs index c0940d70..b368f91a 100644 --- a/net/management-api-v2/cm_api_v2_post_validate.cs +++ b/net/management-api-v2/cm_api_v2_post_validate.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ValidateProjectAsync(); diff --git a/net/management-api-v2/cm_api_v2_post_webhook.cs b/net/management-api-v2/cm_api_v2_post_webhook.cs index 43973a12..eb58e939 100644 --- a/net/management-api-v2/cm_api_v2_post_webhook.cs +++ b/net/management-api-v2/cm_api_v2_post_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.CreateWebhookAsync(new WebhookCreateModel diff --git a/net/management-api-v2/cm_api_v2_post_workflow.cs b/net/management-api-v2/cm_api_v2_post_workflow.cs index e148a351..8bc09b13 100644 --- a/net/management-api-v2/cm_api_v2_post_workflow.cs +++ b/net/management-api-v2/cm_api_v2_post_workflow.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var secondStep = new WorkflowStepUpsertModel { diff --git a/net/management-api-v2/cm_api_v2_put_asset.cs b/net/management-api-v2/cm_api_v2_put_asset.cs index 21b7b4e1..c9b01653 100644 --- a/net/management-api-v2/cm_api_v2_put_asset.cs +++ b/net/management-api-v2/cm_api_v2_put_asset.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ByExternalId("which-brewing-fits-you"); diff --git a/net/management-api-v2/cm_api_v2_put_item.cs b/net/management-api-v2/cm_api_v2_put_item.cs index 5230e595..824152de 100644 --- a/net/management-api-v2/cm_api_v2_put_item.cs +++ b/net/management-api-v2/cm_api_v2_put_item.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = Reference.ByExternalId("59713"); diff --git a/net/management-api-v2/cm_api_v2_put_preview_configuration.cs b/net/management-api-v2/cm_api_v2_put_preview_configuration.cs index 0590adbd..2cb76529 100644 --- a/net/management-api-v2/cm_api_v2_put_preview_configuration.cs +++ b/net/management-api-v2/cm_api_v2_put_preview_configuration.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.UpdatePreviewConfigurationAsync(new PreviewConfigurationModel() diff --git a/net/management-api-v2/cm_api_v2_put_rendition.cs b/net/management-api-v2/cm_api_v2_put_rendition.cs index 403693b0..97c0d948 100644 --- a/net/management-api-v2/cm_api_v2_put_rendition.cs +++ b/net/management-api-v2/cm_api_v2_put_rendition.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var assetReference = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); diff --git a/net/management-api-v2/cm_api_v2_put_subscription_user_activate.cs b/net/management-api-v2/cm_api_v2_put_subscription_user_activate.cs index 6dbeff26..ce0cbe42 100644 --- a/net/management-api-v2/cm_api_v2_put_subscription_user_activate.cs +++ b/net/management-api-v2/cm_api_v2_put_subscription_user_activate.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = UserIdentifier.ByEmail("user@kontent.ai"); diff --git a/net/management-api-v2/cm_api_v2_put_subscription_user_deactivate.cs b/net/management-api-v2/cm_api_v2_put_subscription_user_deactivate.cs index 19b3d18c..bc372c74 100644 --- a/net/management-api-v2/cm_api_v2_put_subscription_user_deactivate.cs +++ b/net/management-api-v2/cm_api_v2_put_subscription_user_deactivate.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = UserIdentifier.ByEmail("user@kontent.ai"); diff --git a/net/management-api-v2/cm_api_v2_put_user.cs b/net/management-api-v2/cm_api_v2_put_user.cs index a1496646..835a345d 100644 --- a/net/management-api-v2/cm_api_v2_put_user.cs +++ b/net/management-api-v2/cm_api_v2_put_user.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = UserIdentifier.ByEmail("user@kontent.ai"); diff --git a/net/management-api-v2/cm_api_v2_put_var_cancel_sched_unpublish.cs b/net/management-api-v2/cm_api_v2_put_var_cancel_sched_unpublish.cs index 91abcc69..ca01f28a 100644 --- a/net/management-api-v2/cm_api_v2_put_var_cancel_sched_unpublish.cs +++ b/net/management-api-v2/cm_api_v2_put_var_cancel_sched_unpublish.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_put_variant.cs b/net/management-api-v2/cm_api_v2_put_variant.cs index b0525761..3b4fd203 100644 --- a/net/management-api-v2/cm_api_v2_put_variant.cs +++ b/net/management-api-v2/cm_api_v2_put_variant.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_put_variant_cancel_schedule.cs b/net/management-api-v2/cm_api_v2_put_variant_cancel_schedule.cs index 464b5207..3189f46d 100644 --- a/net/management-api-v2/cm_api_v2_put_variant_cancel_schedule.cs +++ b/net/management-api-v2/cm_api_v2_put_variant_cancel_schedule.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_put_variant_create_new_version.cs b/net/management-api-v2/cm_api_v2_put_variant_create_new_version.cs index ff2399ce..4a3fc19a 100644 --- a/net/management-api-v2/cm_api_v2_put_variant_create_new_version.cs +++ b/net/management-api-v2/cm_api_v2_put_variant_create_new_version.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_put_variant_publish_or_schedule.cs b/net/management-api-v2/cm_api_v2_put_variant_publish_or_schedule.cs index bc0d8a21..1f55fe52 100644 --- a/net/management-api-v2/cm_api_v2_put_variant_publish_or_schedule.cs +++ b/net/management-api-v2/cm_api_v2_put_variant_publish_or_schedule.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_put_variant_unpublish_archive.cs b/net/management-api-v2/cm_api_v2_put_variant_unpublish_archive.cs index 82964e22..584cdbfe 100644 --- a/net/management-api-v2/cm_api_v2_put_variant_unpublish_archive.cs +++ b/net/management-api-v2/cm_api_v2_put_variant_unpublish_archive.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8"))); diff --git a/net/management-api-v2/cm_api_v2_put_variant_workflow_step.cs b/net/management-api-v2/cm_api_v2_put_variant_workflow_step.cs index 2890ebbd..49237d94 100644 --- a/net/management-api-v2/cm_api_v2_put_variant_workflow_step.cs +++ b/net/management-api-v2/cm_api_v2_put_variant_workflow_step.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var itemIdentifier = Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")); diff --git a/net/management-api-v2/cm_api_v2_put_workflow.cs b/net/management-api-v2/cm_api_v2_put_workflow.cs index 84668461..2285060d 100644 --- a/net/management-api-v2/cm_api_v2_put_workflow.cs +++ b/net/management-api-v2/cm_api_v2_put_workflow.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var secondStep = new WorkflowStepUpsertModel { diff --git a/net/management-api-v2/mapi_v2_disable_legacy_webhook.cs b/net/management-api-v2/mapi_v2_disable_legacy_webhook.cs index 81e36b0d..3666bf68 100644 --- a/net/management-api-v2/mapi_v2_disable_legacy_webhook.cs +++ b/net/management-api-v2/mapi_v2_disable_legacy_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.DisableLegacyWebhookAsync(Reference.ById(Guid.Parse("5df74e27-1213-484e-b9ae-bcbe90bd5990"))); \ No newline at end of file diff --git a/net/management-api-v2/mapi_v2_disable_webhook.cs b/net/management-api-v2/mapi_v2_disable_webhook.cs index c3392fee..886f13be 100644 --- a/net/management-api-v2/mapi_v2_disable_webhook.cs +++ b/net/management-api-v2/mapi_v2_disable_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.DisableWebhookAsync(Reference.ById(Guid.Parse("5df74e27-1213-484e-b9ae-bcbe90bd5990"))); diff --git a/net/management-api-v2/mapi_v2_enable_legacy_webhook.cs b/net/management-api-v2/mapi_v2_enable_legacy_webhook.cs index 6da2548e..ce4f3874 100644 --- a/net/management-api-v2/mapi_v2_enable_legacy_webhook.cs +++ b/net/management-api-v2/mapi_v2_enable_legacy_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.EnableLegacyWebhookAsync(Reference.ById(Guid.Parse("5df74e27-1213-484e-b9ae-bcbe90bd5990"))); \ No newline at end of file diff --git a/net/management-api-v2/mapi_v2_enable_webhook.cs b/net/management-api-v2/mapi_v2_enable_webhook.cs index c5ebd3a2..b6dfb4e3 100644 --- a/net/management-api-v2/mapi_v2_enable_webhook.cs +++ b/net/management-api-v2/mapi_v2_enable_webhook.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); await client.EnableWebhookAsync(Reference.ById(Guid.Parse("5df74e27-1213-484e-b9ae-bcbe90bd5990"))); diff --git a/net/management-api-v2/mapi_v2_get_validation_issues.cs b/net/management-api-v2/mapi_v2_get_validation_issues.cs index 3b7e91be..f3b4806a 100644 --- a/net/management-api-v2/mapi_v2_get_validation_issues.cs +++ b/net/management-api-v2/mapi_v2_get_validation_issues.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.ListAsyncValidationTaskIssuesAsync(Guid.Parse("88d94fed-4899-4944-9b4b-c919b11a9db0")); diff --git a/net/management-api-v2/mapi_v2_get_validation_task.cs b/net/management-api-v2/mapi_v2_get_validation_task.cs index 1d640ea9..da1d5002 100644 --- a/net/management-api-v2/mapi_v2_get_validation_task.cs +++ b/net/management-api-v2/mapi_v2_get_validation_task.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.GetAsyncValidationTaskAsync(Guid.Parse("88d94fed-4899-4944-9b4b-c919b11a9db0")); diff --git a/net/management-api-v2/mapi_v2_get_web_spotlight_status.cs b/net/management-api-v2/mapi_v2_get_web_spotlight_status.cs index 3a69746a..d2875cc6 100644 --- a/net/management-api-v2/mapi_v2_get_web_spotlight_status.cs +++ b/net/management-api-v2/mapi_v2_get_web_spotlight_status.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.GetWebSpotlightStatusAsync(); \ No newline at end of file diff --git a/net/management-api-v2/mapi_v2_post_validate_async.cs b/net/management-api-v2/mapi_v2_post_validate_async.cs index c491a2d6..7006a165 100644 --- a/net/management-api-v2/mapi_v2_post_validate_async.cs +++ b/net/management-api-v2/mapi_v2_post_validate_async.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.InitiateProjectAsyncValidationTaskAsync(); diff --git a/net/management-api-v2/mapi_v2_put_web_spotlight_activate.cs b/net/management-api-v2/mapi_v2_put_web_spotlight_activate.cs index f576773e..b6099495 100644 --- a/net/management-api-v2/mapi_v2_put_web_spotlight_activate.cs +++ b/net/management-api-v2/mapi_v2_put_web_spotlight_activate.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var reference = Reference.ByCodename("custom_web_spotlight_root"); diff --git a/net/management-api-v2/mapi_v2_put_web_spotlight_deactivate.cs b/net/management-api-v2/mapi_v2_put_web_spotlight_deactivate.cs index de6bd888..a7f96cdb 100644 --- a/net/management-api-v2/mapi_v2_put_web_spotlight_deactivate.cs +++ b/net/management-api-v2/mapi_v2_put_web_spotlight_deactivate.cs @@ -4,7 +4,7 @@ var client = new ManagementClient(new ManagementOptions { ApiKey = "", - ProjectId = "" + EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID" }); var response = await client.DeactivateWebSpotlightAsync(); \ No newline at end of file diff --git a/net/preview-content/preview_content_get_article.cs b/net/preview-content/preview_content_get_article.cs index 71824db3..276497c6 100644 --- a/net/preview-content/preview_content_get_article.cs +++ b/net/preview-content/preview_content_get_article.cs @@ -4,7 +4,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithOptions(builder => builder - .WithProjectId("975bf280-fd91-488c-994c-2f04416e5ee3") + .WithEnvironmentId("975bf280-fd91-488c-994c-2f04416e5ee3") .UsePreviewApi("") .Build()) .Build(); diff --git a/net/retrieve-linked-content/linked_content_get_article_with_author.cs b/net/retrieve-linked-content/linked_content_get_article_with_author.cs index b4b87947..031dfe2b 100644 --- a/net/retrieve-linked-content/linked_content_get_article_with_author.cs +++ b/net/retrieve-linked-content/linked_content_get_article_with_author.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets a specific article and its linked items diff --git a/net/retrieve-linked-content/linked_content_get_page_with_subpages.cs b/net/retrieve-linked-content/linked_content_get_page_with_subpages.cs index 838dcf5b..a5434ba4 100644 --- a/net/retrieve-linked-content/linked_content_get_page_with_subpages.cs +++ b/net/retrieve-linked-content/linked_content_get_page_with_subpages.cs @@ -3,7 +3,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets a specific page, its subpages, and linked items diff --git a/net/secure-public-access/securing_public_access_get_article.cs b/net/secure-public-access/securing_public_access_get_article.cs index bad80270..8fb2b655 100644 --- a/net/secure-public-access/securing_public_access_get_article.cs +++ b/net/secure-public-access/securing_public_access_get_article.cs @@ -4,7 +4,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithOptions(builder => builder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .UseProductionApi("") .Build()) .Build(); diff --git a/net/strongly-typed-models/strongly_typed_models_retrieve.cs b/net/strongly-typed-models/strongly_typed_models_retrieve.cs index bbc24072..da26c889 100644 --- a/net/strongly-typed-models/strongly_typed_models_retrieve.cs +++ b/net/strongly-typed-models/strongly_typed_models_retrieve.cs @@ -4,7 +4,7 @@ // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") + .WithEnvironmentId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets a content item by codename and maps it to the item's strongly typed model diff --git a/net/structure-in-rte/structure_in_rte_register_link_resolver.cs b/net/structure-in-rte/structure_in_rte_register_link_resolver.cs index 8c3c8569..768c12ce 100644 --- a/net/structure-in-rte/structure_in_rte_register_link_resolver.cs +++ b/net/structure-in-rte/structure_in_rte_register_link_resolver.cs @@ -2,7 +2,7 @@ using Kontent.Ai.Delivery; IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") // Registers the resolver .WithContentLinkUrlResolver(new CustomContentLinkUrlResolver()) .Build(); diff --git a/net/structure-in-rte/structure_in_rte_register_resolver.cs b/net/structure-in-rte/structure_in_rte_register_resolver.cs index c9e3ea16..ca197556 100644 --- a/net/structure-in-rte/structure_in_rte_register_resolver.cs +++ b/net/structure-in-rte/structure_in_rte_register_resolver.cs @@ -4,7 +4,7 @@ using Kontent.Ai.Delivery.InlineContentItems; IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") // Registers a content item resolver for tweets .WithInlineContentItemsResolver(new TweetResolver()) // Registers the generated strongly typed models diff --git a/net/sync-api/sync_api_initialize_sync.cs b/net/sync-api/sync_api_initialize_sync.cs index 0aada102..890aff00 100644 --- a/net/sync-api/sync_api_initialize_sync.cs +++ b/net/sync-api/sync_api_initialize_sync.cs @@ -1,10 +1,9 @@ -// DocSection: sync_api_initialize_sync -// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net +// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Delivery; // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets the continuation token based on the given parameters @@ -13,4 +12,4 @@ new EqualsFilter("system.type", "article"), new NotEqualsFilter("system.collection", "default")); -string continuationToken = response.ApiResponse.ContinuationToken; +string continuationToken = response.ApiResponse.ContinuationToken; \ No newline at end of file diff --git a/net/sync-api/sync_api_synchronize_changes.cs b/net/sync-api/sync_api_synchronize_changes.cs index 22814fdb..b064eb28 100644 --- a/net/sync-api/sync_api_synchronize_changes.cs +++ b/net/sync-api/sync_api_synchronize_changes.cs @@ -1,13 +1,12 @@ -// DocSection: sync_api_synchronize_changes -// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net +// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kontent.Ai.Delivery; // Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client IDeliveryClient client = DeliveryClientBuilder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .Build(); // Gets a list of recently changed content items IDeliverySyncResponse response = await client.GetSyncAsync(""); IList syncItems = response.SyncItems; -await client.GetSyncAsync("token"); +await client.GetSyncAsync("token"); \ No newline at end of file diff --git a/net/using-webhooks/using_webhooks_get_latest_content.cs b/net/using-webhooks/using_webhooks_get_latest_content.cs index f1a0640c..cc582682 100644 --- a/net/using-webhooks/using_webhooks_get_latest_content.cs +++ b/net/using-webhooks/using_webhooks_get_latest_content.cs @@ -4,7 +4,7 @@ // Initializes a client that retrieves the latest version of published content IDeliveryClient client = DeliveryClientBuilder .WithOptions(builder => builder - .WithProjectId("") + .WithEnvironmentId("KONTENT_AI_ENVIRONMENT_ID") .UseProductionApi .WaitForLoadingNewContent .Build())