{"id":19924378,"url":"https://github.com/kontent-ai/management-sdk-net","last_synced_at":"2025-10-06T00:29:14.843Z","repository":{"id":27523825,"uuid":"111784517","full_name":"kontent-ai/management-sdk-net","owner":"kontent-ai","description":"Kontent.ai Management .NET SDK","archived":false,"fork":false,"pushed_at":"2025-02-11T09:41:46.000Z","size":8933,"stargazers_count":7,"open_issues_count":12,"forks_count":31,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-28T19:09:56.177Z","etag":null,"topics":["content-management","dotnet","dotnet-core","dotnet-standard","export","hacktoberfest","headless-cms","import","kontent-ai","kontent-ai-tool","nuget","sdk"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Kontent.Ai.Management","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kontent-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-23T08:41:02.000Z","updated_at":"2025-02-11T09:33:47.000Z","dependencies_parsed_at":"2024-01-15T10:31:55.185Z","dependency_job_id":"0c666a18-0811-4a2e-84d3-8b671cbb8471","html_url":"https://github.com/kontent-ai/management-sdk-net","commit_stats":{"total_commits":625,"total_committers":58,"mean_commits":"10.775862068965518","dds":0.832,"last_synced_commit":"3e558c478d90f393dc6b1934cde289a8ac228929"},"previous_names":["kentico/content-management-sdk-net"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fmanagement-sdk-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fmanagement-sdk-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fmanagement-sdk-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fmanagement-sdk-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kontent-ai","download_url":"https://codeload.github.com/kontent-ai/management-sdk-net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242680,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["content-management","dotnet","dotnet-core","dotnet-standard","export","hacktoberfest","headless-cms","import","kontent-ai","kontent-ai-tool","nuget","sdk"],"created_at":"2024-11-12T22:17:12.096Z","updated_at":"2025-10-06T00:29:14.728Z","avatar_url":"https://github.com/kontent-ai.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kontent.ai Management .NET SDK\n\n[![Build \u0026 Test](https://github.com/kontent-ai/management-sdk-net/actions/workflows/integrate.yml/badge.svg)](https://github.com/kontent-ai/management-sdk-net/actions/workflows/integrate.yml)\n[![codecov](https://codecov.io/gh/kontent-ai/management-sdk-net/branch/master/graph/badge.svg?token=xhM2JrUuA4)](https://codecov.io/gh/kontent-ai/management-sdk-net)\n[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow\u0026logoColor=white)](https://stackoverflow.com/tags/kontent-ai)\n[![Discord](https://img.shields.io/discord/821885171984891914?color=%237289DA\u0026label=Kontent.ai%20Discord\u0026logo=discord)](https://discord.gg/SKCxwPtevJ)\n\n| Package                       |                                                                    Version                                                                    |                                                                  Downloads                                                                  |                        Compatibility                         |           Documentation           |\n| ----------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------: | :-------------------------------: |\n| Management SDK                |         [![NuGet](https://img.shields.io/nuget/vpre/Kontent.Ai.Management.svg)](https://www.nuget.org/packages/Kontent.Ai.Management)         |         [![NuGet](https://img.shields.io/nuget/dt/Kontent.Ai.Management.svg)](https://www.nuget.org/packages/Kontent.Ai.Management)         | [`net8.0`](https://dotnet.microsoft.com/download/dotnet/8.0) | [📖](#using-the-managementclient) |\n| Content Item Edit-URL Builder | [![NuGet](https://img.shields.io/nuget/vpre/Kontent.Ai.Management.Helpers.svg)](https://www.nuget.org/packages/Kontent.Ai.Management.Helpers) | [![NuGet](https://img.shields.io/nuget/dt/Kontent.Ai.Management.Helpers.svg)](https://www.nuget.org/packages/Kontent.Ai.Management.Helpers) | [`net8.0`](https://dotnet.microsoft.com/download/dotnet/8.0) |       [📖](#helper-methods)       |\n\n## Summary\n\nThe Kontent.ai Management .NET SDK is a client library used for managing content in Kontent.ai. It provides read/write access to your Kontent.ai projects and environments.\n\nYou can use the SDK in the form of a [NuGet package](https://www.nuget.org/packages/Kontent.Ai.Management) to migrate existing content into your Kontent.ai project or update your content model.\n\nThe Management SDK does not provide any content filtering options and is not optimized for content delivery. If you need to deliver larger amounts of content we recommend using the [Delivery SDK](https://github.com/kontent-ai/delivery-sdk-net) instead.\n\n💡 If you want to see all .NET related resources including REST API reference with .NET code samples for every endpoint, check out the [\"Develop .NET apps\" overview page](https://kontent.ai/learn/develop/develop-with-kontent-ai/net).\n\n## Prerequisites\n\nTo manage content in a Kontent.ai project via the Management API, you first need to activate it for the project environment in question. See our documentation on how you can [activate the Management API](https://kontent.ai/learn/docs/apis/openapi/management-api-v2/#section/Making-requests).\n\n## Using the ManagementClient\n\nThe `ManagementClient` class is the main class of the SDK. Using it, you can import, update, view and delete content items, language variants, and other objects in your Kontent.ai environments.\n\nTo create an instance of the class, you need to provide:\n\n- [EnvironmentId](https://kontent.ai/learn/docs/environments#a-get-your-environment-id): the ID of your Kontent.ai environment. This parameter must always be set.\n- [SubscriptionId](https://kontent.ai/learn/docs/apis/openapi/subscription-api/): the ID of your subscription. Set it up if you need to manage users and their permissions.\n- [ApiKey](https://kontent.ai/learn/docs/apis/openapi/subscription-api/): either Management or Subscription API key.\n  - Subscription API key can be used for all endpoints but is limited to subscription admins\n  - Management API key can be used with environment-specific endpoints and is limited to users with the Manage APIs permission.\n\n```csharp\n// Initializes an instance of the ManagementClient client with specified options.\nvar client = new ManagementClient(new ManagementOptions\n{\n    EnvironmentId = \"cbbe2d5c-17c6-0128-be26-e997ba7c1619\",\n    SubscriptionId = \"a27b9841-fc99-48a7-a46d-65b2549d6c0\"\n    ApiKey = \"ew0...1eo\"\n});\n```\n\nOnce you create a `ManagementClient`, you can start managing content in your environment by calling methods on the client instance.\n\n### Codename vs. ID vs. External ID\n\nThe SDK uses an _Reference_ object representation identifying an entity you want to perform the given operation on. There are 3 types of identification you can use to create the identifier:\n\n```csharp\nvar codenameIdentifier = Reference.ByCodename(\"on_roasts\");\nvar idIdentifier = Reference.ById(Guid.Parse(\"9539c671-d578-4fd3-aa5c-b2d8e486c9b8\"));\nvar externalIdIdentifier = Reference.ByExternalId(\"Ext-Item-456-Brno\");\n```\n\n- **Codenames** are generated automatically by Kontent.ai based on the object's name. They can make your code more readable but are not guaranteed to be unique. Use them only when there is no chance of naming conflicts.\n  - Unless set while creating a content item, the codename is initially generated from the item's name. When updating an item without specifying its codename, the codename gets autogenerated based on the name's value.\n- (internal) **IDs** are random [GUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) assigned to objects by Kontent.ai at the moment of import/creation. They are unique and generated by the system for existing objects. This means you cannot use them to refer to content that is not imported yet. **This identification is used for all responses from Management API**\n- **External IDs** are string-based custom identifiers defined by you. Use them when importing a batch of cross-referencing content. See [Import content items guide](https://kontent.ai/learn/tutorials/set-up-kontent-ai/import-content/content-items/?tech=dotnet) for more details.\n\n\u003e The set of identification types varies based on the entity. The SDK does not check whether, for example, webhooks allows only ID for identification. This is being handled by the API itself. To check what identification types are allowed for a given entity, see the [API documentation](https://kontent.ai/learn/reference/management-api-v2/).\n\n### User identifier\n\nThe SDK also supports endpoints that require either user ID or email. _UserIdentifier_ object represents identification of a user. See the following example for more detail:\n\n```csharp\nUserIdentifier identifier = UserIdentifier.ById(\"usr_0vKjTCH2TkO687K3y3bKNS\");\nUserIdentifier identifier = UserIdentifier.ByEmail(\"user@email.com\");\n```\n\n### Handling Kontent.ai **errors**\n\nYou can catch Kontent.ai errors (more in [error section in Management API reference](https://kontent.ai/learn/reference/management-api-v2#section/Errors)) by using `try-catch` block and catching `Kontent.Ai.Management.Exceptions.ManagementException`.\n\n```csharp\ntry\n{\n    var response = await client.UpsertLanguageVariantAsync(identifier, elements);\n}\ncatch (ManagementException ex)\n{\n    Console.WriteLine(ex.StatusCode);\n    Console.WriteLine(ex.Message);\n}\n```\n\n### Working with language variants\n\nThe `ManagementClient` supports working with strongly-typed models. You can generate strongly-typed models from your content types using the Kontent.ai [model generator utility](https://github.com/kontent-ai/model-generator-net) and then be able to retrieve the data in a strongly typed form.\n\n```csharp\n// Retrieve strongly-typed content item\nvar itemIdentifier = Reference.ById(Guid.Parse(\"9539c671-d578-4fd3-aa5c-b2d8e486c9b8\"));\nvar languageIdentifier = Reference.ByCodename(\"en-US\");\nvar identifier = new LanguageVariantIdentifier(itemIdentifier, languageIdentifier);\n\nvar response = await client.GetLanguageVariantAsync\u003cArticleModel\u003e(identifier);\n\nresponse.Elements.Title = new TextElement() { Value = \"On Roasts - changed\" };\nresponse.Elements.PostDate = new DateTimeElement() { Value = new DateTime(2018, 7, 4) };\n\nvar responseVariant = await client.UpsertLanguageVariantAsync(identifier, response.Elements);\n```\n\nYou can also construct an instance of strongly type model and provide values for the elements you want to change, without the necessity to retrieve the data from Kontent.ai. If a property is not initialized (is `null`) the SDK won't include it in the payload.\n\n```csharp\n// Defines the content elements to update\nvar stronglyTypedElements = new ArticleModel\n{\n    Title = new TextElement() { Value = \"On Roasts - changed\" },\n    PostDate = new DateTimeElement() { Value = new DateTime(2018, 7, 4) },\n};\n\n// Specifies the content item and the language variant\nvar itemIdentifier = Reference.ByCodename(\"on_roasts\");\nvar languageIdentifier = Reference.ByCodename(\"en-US\");\nvar identifier = new LanguageVariantIdentifier(itemIdentifier, languageIdentifier);\n\n// Upserts a language variant of a content item\nvar response = await client.UpsertLanguageVariantAsync(identifier, stronglyTypedElements);\n```\n\nYou can also use anonymous dynamic objects to work with language variants. For upsert operations, you need to provide element identification - `element.id`/`element.codename` (optionally load element's ID or codename from generated content model):\n\n```csharp\nvar itemIdentifier = Reference.ById(Guid.Parse(\"9539c671-d578-4fd3-aa5c-b2d8e486c9b8\"));\nvar languageIdentifier = Reference.ByCodename(\"en-US\");\nvar identifier = new LanguageVariantIdentifier(itemIdentifier, languageIdentifier);\n\n// Elements to update\nvar elements = new dynamic[]\n{\n    new\n    {\n        element = new\n        {\n            // You can use `Reference.ById` if you don't have the model\n            id = typeof(ArticleModel).GetProperty(nameof(ArticleModel.Title)).GetKontentElementId()\n        },\n        value = \"On Roasts - changed\",\n    },\n    new\n    {\n        element = new\n        {\n            // You can use `Reference.ByCodename` if you don't have the model\n            codename = typeof(ArticleModel).GetProperty(nameof(ArticleModel.PostDate)).GetKontentElementCodename()\n        },\n        value = new DateTime(2018, 7, 4),\n    }\n};\n\nvar upsertModel = new LanguageVariantUpsertModel() { Elements = elements };\n\n// Upserts a language variant of a content item\nvar response = await client.UpsertLanguageVariantAsync(identifier, upsertModel);\n```\n\nYou can also build your dynamic object representations of the elements from strongly typed elements models with `ElementBuilder`. That is **recommended approach when you don't need to work with strongly typed models** because it ensures you provided the element identification - `element.id`/`element.codename`.\n\n```csharp\nvar itemIdentifier = Reference.ById(Guid.Parse(\"9539c671-d578-4fd3-aa5c-b2d8e486c9b8\"));\nvar languageIdentifier = Reference.ByCodename(\"en-US\");\nvar identifier = new LanguageVariantIdentifier(itemIdentifier, languageIdentifier);\n\n// Elements to update\nvar elements = ElementBuilder.GetElementsAsDynamic(new BaseElement[]\n{\n    new TextElement()\n    {\n        // You can use `Reference.ById` if you don't have the model\n        Element = Reference.ById(typeof(ArticleModel).GetProperty(nameof(ArticleModel.Title)).GetKontentElementId()),\n        Value = \"On Roasts - changed\"\n    },\n    new DateTimeElement()\n    {\n        // You can use `Reference.ByCodename` if you don't have the model\n        Element = Reference.ByCodename(typeof(ArticleModel).GetProperty(nameof(ArticleModel.PostDate)).GetKontentElementCodename()),\n        Value = new DateTime(2018, 7, 4)\n    },\n});\n\nvar upsertModel = new LanguageVariantUpsertModel() { Elements = elements };\n\n// Upserts a language variant of a content item\nvar response = await client.UpsertLanguageVariantAsync(identifier, upsertModel);\n```\n\n### Working with assets\n\nThe Kontent.ai [model generator utility](https://github.com/kontent-ai/model-generators-net) currently does not support generating a strongly-typed model from your asset type, however, you can construct an instance of a strongly-typed model yourself. Simply provide the elements you want to change:\n\n```csharp\nvar stream = new MemoryStream(Encoding.UTF8.GetBytes(\"Hello world from CM API .NET SDK\"));\nvar fileName = \"Hello.txt\";\nvar contentType = \"text/plain\";\n\n// Returns a reference that you can later use to create an asset\nvar fileResult = await client.UploadFileAsync(new FileContentSource(stream, fileName, contentType));\n\n// Defines the content elements to create\nvar stronglyTypedTaxonomyElements = new AssetMetadataModel\n{\n    TaxonomyCategories = new TaxonomyElement()\n    {\n        Value = new[] { \"hello\", \"SDK\" }.Select(Reference.ByCodename)\n    },\n};\n\n// Defines the asset to create\nvar asset = new AssetCreateModel\u003cAssetMetadataModel\u003e\n{\n    FileReference = fileResult,\n    Elements = stronglyTypedTaxonomyElements\n};\n\n// Creates an asset\nvar response = await client.CreateAssetAsync(asset);\n```\n\nYou can also build your dynamic object representations of the elements from strongly typed elements models with `ElementBuilder`. This is a **recommended approach when you don't need to work with strongly typed models** because it ensures you provided the element identification - `element.id`/`element.codename`.\n\n```csharp\n // Elements to update\nvar taxonomyElements = ElementBuilder.GetElementsAsDynamic(\n    new TaxonomyElement\n    {\n        Element = Reference.ByCodename(\"taxonomy-categories\"),\n        Value = new[]\n        {\n            Reference.ByCodename(\"hello\"),\n            Reference.ByCodename(\"SDK\"),\n        }\n    });\n\n// Defines the asset to update\nvar asset = new AssetUpsertModel\n{\n    Elements = taxonomyElements\n};\n\nvar assetReference = Reference.ById(Guid.Parse(\"6d1c8ee9-76bc-474f-b09f-8a54a98f06ea\"));\n\n// Updates asset metadata\nvar response = await client.UpsertAssetAsync(assetReference, asset);\n```\n\nYou can also use anonymous dynamic objects to work with assets, same as with language variants.\n\n## Quick start\n\n### Retrieving content items\n\nResponses from Kontent.ai API are paginated. To retrieve all of content items, you need to go page by page. Here's how:\n\n```csharp\nvar items = new List\u003cContentItemModel\u003e();\n\nvar response = await _client.ListContentItemsAsync();\n\nwhile (true)\n{\n    items.AddRange(response);\n\n    if (!response.HasNextPage())\n    {\n        break;\n    }\n\n    response = await response.GetNextPage();\n}\n```\n\nIf you need all content items you can use `GetAllAsync`:\n\n```csharp\nvar response = await _client.ListContentItemsAsync().GetAllAsync();\n```\n\n### Importing content items\n\nImporting content items is a 2-step process, using 2 separate methods:\n\n1. Creating an empty content item which serves as a wrapper for your content.\n1. Adding content into a language variant of the content item.\n\nEach content item can consist of several localized variants. **The content itself is always part of a specific language variant, even if your environment only uses one language**. See our tutorial on [Importing to Kontent.ai](https://kontent.ai/learn/tutorials/set-up-kontent/import-content/overview) for a more detailed explanation.\n\n#### 1. Creating a content item\n\n```csharp\n// Creates an instance of the ManagementClient\nvar client = new ManagementClient(options);\n\nvar item = new ContentItemCreateModel\n{\n    Codename = \"on_roasts\",\n    Name = \"On Roasts\",\n    Type = Reference.ByCodename(\"article\")\n};\n\nvar responseItem = await client.CreateContentItemAsync(item);\n```\n\nKontent.ai will generate an internal ID for the (new and empty) content item and include it in the response. If you do not specify a codename, it will be generated based on name. In the next step, we will add the actual (localized) content.\n\n#### 2. Adding language variants\n\nTo add localized content, you have to specify:\n\n- The content item you are importing into.\n- The language variant of the content item.\n- The language variant elements you want to add or update. Omitted elements will remain unchanged.\n\n```csharp\nvar componentId = \"04bc8d32-97ab-431a-abaa-83102fc4c198\";\nvar contentTypeCodename = \"article\";\nvar relatedArticle1Guid = Guid.Parse(\"b4e7bfaa-593c-4ae4-a231-5136b10757b8\");\nvar relatedArticle2Guid = Guid.Parse(\"6d1c8ee9-76bc-474f-b09f-8a54a98f06ea\");\nvar taxonomyTermGuid1 = Guid.Parse(\"5c060bf3-ed38-4c77-acfa-9868e6e2b5dd\");\nvar taxonomyTermGuid2 = Guid.Parse(\"5c060bf3-ed38-4c77-acfa-9868e6e2b5dd\");\n\n// Defines the content elements to update\nvar stronglyTypedElements = new ArticleModel\n{\n    Title = new TextElement() { Value = \"On Roasts\" },\n    PostDate = new DateTimeElement() { Value = new DateTime(2017, 7, 4) },\n    BodyCopy = new RichTextElement\n    {\n        Value = $\"\u003cp\u003eRich Text\u003c/p\u003e\u003cobject type=\\\"application/kenticocloud\\\" data-type=\\\"component\\\" data-id=\\\"{componentId}\\\"\u003e\u003c/object\u003e\",\n        Components = new ComponentModel[]\n        {\n            new ComponentModel\n            {\n                Id = Guid.Parse(componentId),\n                Type = Reference.ByCodename(contentTypeCodename),\n                Elements = new dynamic[]\n                {\n                    new\n                    {\n                        element = new\n                        {\n                            id = typeof(ArticleModel).GetProperty(nameof(ArticleModel.Title)).GetKontentElementId()\n                        },\n                        value = \"Article component title\",\n                    }\n                }\n            }\n        }\n    },\n    RelatedArticles = new LinkedItemsElement\n    {\n        Value = new[] { relatedArticle1Guid, relatedArticle2Guid }.Select(Reference.ById)\n    },\n    Personas = new TaxonomyElement\n    {\n        Value = new[] { taxonomyTermGuid1, taxonomyTermGuid2 }.Select(Reference.ById)\n    },\n    UrlPattern = new UrlSlugElement { Value = \"on-roasts\", Mode = \"custom\" },\n};\n\n// Specifies the content item and the language variant\nvar itemIdentifier = Reference.ByCodename(\"on_roasts\");\nvar languageIdentifier = Reference.ByCodename(\"en-US\");\nvar identifier = new LanguageVariantIdentifier(itemIdentifier, languageIdentifier);\n\n// Upserts a language variant of your content item\nvar response = await client.UpsertLanguageVariantAsync\u003cArticleModel\u003e(identifier, stronglyTypedElements);\n```\n\n### Helper Methods\n\nMethods for building links to content items and their elements in Kontent.ai. Available as a [separate NuGet package](https://www.nuget.org/packages/Kontent.Ai.Management.Helpers/).\n\n#### Getting an edit link for a content item\n\n```csharp\nvar options = new ManagementHelpersOptions\n{\n    EnvironmentId = \"bb6882a0-3088-405c-a6ac-4a0da46810b0\",\n};\n\nstring itemId = \"8ceeb2d8-9676-48ae-887d-47ccb0f54a79\";\nstring languageCodename = \"en-US\";\n\nvar linkBuilder = new EditLinkBuilder(options);\nvar result = linkBuilder.BuildEditItemUrl(languageCodename, itemId);\n\n// Result is \"https://app.kontent.ai/goto/edit-item/project/bb6882a0-3088-405c-a6ac-4a0da46810b0/\n// variant-codename/en-US/item/8ceeb2d8-9676-48ae-887d-47ccb0f54a79\"\n```\n\n#### Getting an edit link for a specific content element\n\n```csharp\nvar options = new ManagementHelpersOptions\n{\n    EnvironmentId = \"bb6882a0-3088-405c-a6ac-4a0da46810b0\",\n};\n\nstring itemId = \"8ceeb2d8-9676-48ae-887d-47ccb0f54a79\";\nstring languageCodename = \"en-US\";\nvar elementIdentifier = new ElementIdentifier(itemId, \"single-Element-Codename\");\n\nvar linkBuilder = new EditLinkBuilder(options);\nvar result = linkBuilder.BuildEditItemUrl(languageCodename, elementIdentifier);\n\n// Result is \"https://app.kontent.ai/goto/edit-item/project/bb6882a0-3088-405c-a6ac-4a0da46810b0/\n// variant-codename/en-US/item/8ceeb2d8-9676-48ae-887d-47ccb0f54a79/element/single-Element-Codename\"\n```\n\n#### Getting an edit link for multiple content elements\n\n```csharp\nvar options = new ManagementHelpersOptions\n{\n    EnvironmentId = \"bb6882a0-3088-405c-a6ac-4a0da46810b0\",\n};\n\nstring languageCodename = \"en-US\";\nvar elements = new ElementIdentifier[]\n{\n    new ElementIdentifier(\"76c06b74-bae9-4732-b629-1a59395e893d\", \"some-Element-Codename-1\"),\n    new ElementIdentifier(\"326c63aa-ae71-40b7-a6a8-56455b0b9751\", \"some-Element-Codename-2\"),\n    new ElementIdentifier(\"ffcd0436-8274-40ee-aaae-86fee1966fce\", \"some-Element-Codename-3\"),\n    new ElementIdentifier(\"d31d27cf-ddf6-4040-ab67-2f70edc0d46b\", \"some-Element-Codename-4\"),\n};\n\nvar linkBuilder = new EditLinkBuilder(options);\nvar result = linkBuilder.BuildEditItemUrl(languageCodename, elements);\n\n// Result is \"https://app.kontent.ai/goto/edit-item/\"\n//    project/bb6882a0-3088-405c-a6ac-4a0da46810b0/variant-codename/en-US/\n//    item/76c06b74-bae9-4732-b629-1a59395e893d/element/some-Element-Codename-1/\n//    item/326c63aa-ae71-40b7-a6a8-56455b0b9751/element/some-Element-Codename-2/\n//    item/ffcd0436-8274-40ee-aaae-86fee1966fce/element/some-Element-Codename-3/\n//    item/d31d27cf-ddf6-4040-ab67-2f70edc0d46b/element/some-Element-Codename-4\"\n```\n\n## Add source tracking header \n\nAre you developing a plugin or a tool based on this SDK? Great! Then please include the source tracking header in your code. This way, we'll be able to identify that the traffic to Kontent.ai APIs is originating from your plugin and share its statistics with you!\n\nYou can either attach it to the **AssemblyInfo.cs**\n```c#\n[assembly: SourceTrackingHeaderAttribute()]\n```\n\nOr to the **.csproj**:\n\n```xml\n  \u003cItemGroup\u003e\n    \u003cAssemblyAttribute Include=\"Kontent.Ai.Management.Attributes.SourceTrackingHeader\" /\u003e\n  \u003c/ItemGroup\u003e\n```\n\nBy default, it will load the necessary info (package name + version) from your assembly. If you want to customize it, please use one of the constructors:\n\n```c#\n// You specify the name, the version is extracted from the assembly\npublic SourceTrackingHeaderAttribute(string packageName)\n\n// Or you specify the name and the version\npublic SourceTrackingHeaderAttribute(string packageName, int majorVersion, int minorVersion, int patchVersion, string preReleaseLabel = null)\n```\n\nIf you use the **.csproj**:\n```xml\n\u003cAssemblyAttribute Include=\"Kontent.Ai.Management.Attributes.SourceTrackingHeader\"\u003e\n\t\u003c_Parameter1\u003eMy.Module\u003c/_Parameter1\u003e\n\t\u003c_Parameter2\u003e1\u003c/_Parameter2\u003e\n\t\u003c_Parameter2_IsLiteral\u003etrue\u003c/_Parameter2_IsLiteral\u003e\n\t\u003c_Parameter3\u003e2\u003c/_Parameter3\u003e\n\t\u003c_Parameter3_IsLiteral\u003etrue\u003c/_Parameter3_IsLiteral\u003e\n\t\u003c_Parameter4\u003e3\u003c/_Parameter4\u003e\n\t\u003c_Parameter4_IsLiteral\u003etrue\u003c/_Parameter4_IsLiteral\u003e\n\t\u003c_Parameter5\u003ebeta\u003c/_Parameter5\u003e\n\u003c/AssemblyAttribute\u003e\n```\n\n## How to use [SourceLink](https://github.com/dotnet/sourcelink/) for debugging\n\nThis repository is configured to generate SourceLink tag in the Nuget package, allowing to debug its source code when it is referenced as a Nuget package. Source code is downloaded directly from github to Visual Studio.\n\n### How to configure SourceLink\n\n1. Open a solution with a project referencing the Kontent.Ai.Management Nuget package.\n1. Open Tools -\u003e Options -\u003e Debugging -\u003e General.\n\n   - Clear **Enable Just My Code**.\n   - Select **Enable Source Link Support**.\n   - (Optional) Clear **Require source files to exactly match the original version**.\n\n1. Build your solution.\n1. [Add a symbol server `https://symbols.nuget.org/download/symbols`](https://blog.nuget.org/20181116/Improved-debugging-experience-with-the-NuGet-org-symbol-server-and-snupkg.html)\n\n   - ![Add a symbol server in VS](/.github/assets/vs-nuget-symbol-server.PNG)\n\n1. Run a debugging session and try to step into the Kontent.Ai.Management code.\n1. Allow Visual Studio to download the source code from GitHub.\n\n- ![SourceLink confirmation dialog](/.github/assets/allow_sourcelink_download.png)\n\n**Now you are able to debug the source code of our library without having to download it manually!**\n\n## Further information\n\nFor more developer resources, visit the [overview of .NET tools](https://kontent.ai/learn/tutorials/develop-apps/overview?tech=dotnet) and [API references](https://kontent.ai/learn/reference) at Kontent.ai Learn.\n\n### Building the sources\n\nPrerequisites:\n\n**Required:**\n[.NET](https://dotnet.microsoft.com/en-us/download/dotnet).\n\nOptional:\n\n- [Visual Studio](https://visualstudio.microsoft.com/vs/) for full experience\n- or [Visual Studio Code](https://code.visualstudio.com/)\n\n### Creating a new release\n\n- [**Release \u0026 version management**](https://github.com/kontent-ai/kontent-ai.github.io/blob/main/docs/articles/Release-%26-version-management-of-.NET-projects.md)\n- [Kontent.ai's best practices for .csproj files](https://github.com/kontent-ai/kontent-ai.github.io/blob/main/docs/articles/Kontent.ai-best-practices-for-.csproj-files.md)\n\n## Feedback \u0026 Contributing\n\nCheck out the [contributing](./CONTRIBUTING.md) page to see the best places to file issues, start discussions, and begin contributing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkontent-ai%2Fmanagement-sdk-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkontent-ai%2Fmanagement-sdk-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkontent-ai%2Fmanagement-sdk-net/lists"}