Language variants represent localized variants of content items. For example, when you have 2 active languages, each content item can have up to 2 variants.Every language variant is tied to a specific content item and language. This means you need to specify a language identifier when you request the variant, even if your environment contains only one language.To manage language variants via Management API, send requests to URLs based on the following patterns:
Item ID + Language ID: <base_URL>/items/<content_item_id>/variants/<language_id>
Item ID + Language codename: <base_URL>/items/<content_item_id>/variants/codename/<language_codename>
Item codename + Language ID: <base_URL>/items/codename/<content_item_codename>/variants/<language_id>
Item codename + Language codename: <base_URL>/items/codename/<content_item_codename>/variants/codename/<language_codename>
Item external ID + Language ID: <base_URL>/items/external-id/<content_item_external_id>/variants/<language_id>
Item external ID + Language codename: <base_URL>/items/external-id/<content_item_external_id>/variants/codename/<language_codename>
These endpoints accept GET, PUT, and DELETE requests, allowing you to retrieve, upsert, and delete language variants. You can mix and match the identifiers of content items and languages when requesting language variants.
The currently published language variant of the specified content item.
Retrieve a list of language variants of a content item.If you want to retrieve metadata information about the parent content item, see how to Retrieve a content item.
Array of language variants for the specified content item.
Retrieve a dynamically paginated list of language variants for a specified content type.
A dynamically paginated list of language variants based on the specified content type.
Retrieve a dynamically paginated list of language variants that contain components specified by a content type.The returned language variants may be based on any content type as long as the variants contain at least one component of the specified type. You may want to get language variants with specific components when migrating content based on a specific content type.
A dynamically paginated list of language variants that contain components based on the specified content type.
Retrieve a dynamically paginated list of language variants for a specified collection.
A dynamically paginated list of language variants that belong to the specified collection.
Retrieve a dynamically paginated list of language variants for a specified space.Language variants are not directly connected to spaces. Rather, the parent content item of each language variant is assigned to a specific collection. Each collection can be linked to zero, one, or more spaces.
A dynamically paginated list of language variants that belong to the specified space.
Filter content items and their language variants using advanced criteria such as search phrases, contributors, workflow steps, taxonomies, and more.The endpoint returns a paginated list of content items and their language variants that match the specified filters. All filters are optional and can be omitted or set to null.
A dynamically paginated list of content items and their language variants matchng the specified filters.
Create a new version of a published language variant while keeping the original version published and available via Delivery API. This is the same as creating new versions in the UI.You can only create new versions of published language variants that don't already have an existing Draft (unpublished) version.
A new version of the specified published language variant was created.
Add content to a language variant in an active language or update an existing language variant. You cannot update an existing language variant if its workflow step is set to Archived, Published, or Scheduled.When creating a new variant:
The content item for the variant must already exist. The item isn't created automatically on variant upsert.
When updating an existing variant, only the elements specified in the request body will be modified.When copying variants, you can take the variant object returned by a GET request and use it as-is in the body of this request. If you need to migrate variants to another environment or project, see how to
The updated language variant.
Move the specified variant to the specified workflow and workflow step. This is the same as updating the workflow in the UI.
The workflow step of a published language variant cannot be changed. You need to unpublish or create a new version first.
to move the specified variant to the Archived step.
The API follows the workflow transition limitations present in the UI. This means you can change the workflow step of the language variant only to the workflow steps you have permissions to.
to move the specified variant to the Archived step.
The API follows the workflow transition limitations present in the UI. This means you can change the workflow step of the language variant only to the workflow steps you have permissions to.
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
List of elements as defined in the item's content type. To recreate the order from the UI, use the order from the content type response, sorted by the content group.
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
List of elements as defined in the item's content type. To recreate the order from the UI, use the order from the content type response, sorted by the content group.
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
List of language variants.
List of elements as defined in the item's content type. To recreate the order from the UI, use the order from the content type response, sorted by the content group.
Identifies the content type by internal ID (e.g., 269202ad-1d9d-47fd-b3e8-bdb05b3e3cf0), external ID (e.g., external-id/Content-Type-123), or codename (e.g., codename/hosted_video).
Determines the page of results to retrieve.To get the next page of results, check the pagination object in the API response and set the x-continuation header parameter to the value of the continuation_token property.
Identifies the content type by internal ID (e.g., 269202ad-1d9d-47fd-b3e8-bdb05b3e3cf0), external ID (e.g., external-id/Content-Type-123), or codename (e.g., codename/hosted_video).
Determines the page of results to retrieve.To get the next page of results, check the pagination object in the API response and set the x-continuation header parameter to the value of the continuation_token property.
Identifies the content collection by its internal ID (e.g., b7aa4a53-d9b1-48cf-b7a6-ed0b182c4b89), codename (e.g., codename/global_collection), or external ID (e.g., external-id/my-collection-id).
Determines the page of results to retrieve.To get the next page of results, check the pagination object in the API response and set the x-continuation header parameter to the value of the continuation_token property.
List of language variants in the specified collection.
Identifies a space by it's internal ID (eg., 6291c693-f6e4-4a6b-ac67-5c31c32f9388) or codename (eg., codename/space_1)
Determines the page of results to retrieve.To get the next page of results, check the pagination object in the API response and set the x-continuation header parameter to the value of the continuation_token property.
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
List of elements as defined in the item's content type. To recreate the order from the UI, use the order from the content type response, sorted by the content group.
List of elements as defined in the item's content type. To recreate the order from the UI, use the order from the content type response, sorted by the content group.
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
Identifies a content item by its internal ID (e.g., 335d17ac-b6ba-4c6a-ae31-23c1193215cb), external ID (e.g., external-id/custom-identifier-for-my-article), or codename (e.g., codename/my_article).
Identifies the language by its internal ID (e.g., d1f95fde-af02-b3b5-bd9e-f232311ccab8) or codename (e.g., codename/es-ES).
Reference to a specific object in the environment.
The value of asset elements is an array of Reference objects, each representing a single asset. Every asset can be referenced only once. You can also reference the asset's renditions by the renditions property. Renditions are specific to images only.When retrieving asset elements, the Management API will always reference assets with their internal IDs. When updating asset elements via the API, you can reference an asset by its internal ID or external ID. Also, you can reference a rendition by its internal ID or external ID.
ISO-8601 formatted date and time of the last change of content.
Specifies the variant's scheduled publishing and unpublishing dates.
Specifies the users assigned as contributors to this variant.When updating language variants, you can specify users by their email address or internal ID.
Specifies the variant's due date information.
Adds additional instructions or notes for content creators.
Reference to a specific object in the environment.
The value of asset elements is an array of Reference objects, each representing a single asset. Every asset can be referenced only once. You can also reference the asset's renditions by the renditions property. Renditions are specific to images only.When retrieving asset elements, the Management API will always reference assets with their internal IDs. When updating asset elements via the API, you can reference an asset by its internal ID or external ID. Also, you can reference a rendition by its internal ID or external ID.
ISO-8601 formatted date and time of the last change of content.
Specifies the variant's scheduled publishing and unpublishing dates.
Specifies the users assigned as contributors to this variant.When updating language variants, you can specify users by their email address or internal ID.
Specifies the variant's due date information.
Adds additional instructions or notes for content creators.
Reference to a specific object in the environment.
The value of asset elements is an array of Reference objects, each representing a single asset. Every asset can be referenced only once. You can also reference the asset's renditions by the renditions property. Renditions are specific to images only.When retrieving asset elements, the Management API will always reference assets with their internal IDs. When updating asset elements via the API, you can reference an asset by its internal ID or external ID. Also, you can reference a rendition by its internal ID or external ID.
ISO-8601 formatted date and time of the last change of content.
Specifies the variant's scheduled publishing and unpublishing dates.
The scheduled publish date and time formatted in ISO-8601.To change the variant's scheduled publish time, use the Publish or schedule endpoint.
Specifies the users assigned as contributors to this variant.When updating language variants, you can specify users by their email address or internal ID.
The user's internal ID.
The user's email address.
Specifies the variant's due date information.
ISO-8601 formatted date and time of the variant's due date.If you need to remove the variant's due date, set the value to null.
Adds additional instructions or notes for content creators.
Information about the next page of results.
Information about the next page of results.
Information about the next page of results.
Information about the next page of results.
The sorting criteria for the results.
Determines whether to also include the variant’s element values in the response. By default, only system attributes are returned.
Information about the next page of results.
Reference to a specific object in the environment.
Specifies the variant's current workflow and workflow step.
Specifies the users assigned as contributors to this variant.When updating language variants, you can specify users by their email address or internal ID.
Specifies the variant's due date information.
Adds additional instructions or notes for content creators.
Reference to a specific object in the environment.
The value of asset elements is an array of Reference objects, each representing a single asset. Every asset can be referenced only once. You can also reference the asset's renditions by the renditions property. Renditions are specific to images only.When retrieving asset elements, the Management API will always reference assets with their internal IDs. When updating asset elements via the API, you can reference an asset by its internal ID or external ID. Also, you can reference a rendition by its internal ID or external ID.
ISO-8601 formatted date and time of the last change of content.
Specifies the variant's scheduled publishing and unpublishing dates.
Specifies the users assigned as contributors to this variant.When updating language variants, you can specify users by their email address or internal ID.
Specifies the variant's due date information.
Adds additional instructions or notes for content creators.
Identifies the workflow step by its internal ID (e.g., 13145328-b946-4e47-9c9d-6f40c7aaeaef) or codename (e.g., codename/draft).
If a language is deactivated, the respective content item variants cannot be retrieved via Management API and the API returns a 404 not found error.
Language variants | Kontent.ai Learn
The referenced object's internal ID.
The asset's renditions. Renditions are different editions of the original image used in Kontent.When you update a rendition via the API, it gets changed across all assets using this rendition. But when you do the same in the UI, for example, by duplicating an item that contains a rendition, changes to the rendition are not applied across the items.To remove a rendition, leave the array empty.
The asset's renditions. Renditions are different editions of the original image used in Kontent.When you update a rendition via the API, it gets changed across all assets using this rendition. But when you do the same in the UI, for example, by duplicating an item that contains a rendition, changes to the rendition are not applied across the items.To remove a rendition, leave the array empty.
The asset's renditions. Renditions are different editions of the original image used in Kontent.When you update a rendition via the API, it gets changed across all assets using this rendition. But when you do the same in the UI, for example, by duplicating an item that contains a rendition, changes to the rendition are not applied across the items.To remove a rendition, leave the array empty.
The IANA time zone name used to display the time offset of the scheduled publish date in the UI.The time zone doesn't modify the scheduled publish date specified in the publish_time property.If omitted, the scheduled publish date is displayed in a local time zone.
The scheduled unpublish date and time formatted in ISO-8601.To change the variant's scheduled unpublish time, use the Unpublish or schedule endpoint.
IANA time zone name used to display the time offset of the scheduled unpublish date in the UI.The time zone doesn't modify the schedule unpublish date specified in the unpublish_time property.If omitted, the scheduled unpublish date is displayed in a local time zone.
The value of asset elements is an array of Reference objects, each representing a single asset. Every asset can be referenced only once. You can also reference the asset's renditions by the renditions property. Renditions are specific to images only.When retrieving asset elements, the Management API will always reference assets with their internal IDs. When updating asset elements via the API, you can reference an asset by its internal ID or external ID. Also, you can reference a rendition by its internal ID or external ID.
The asset's renditions. Renditions are different editions of the original image used in Kontent.When you update a rendition via the API, it gets changed across all assets using this rendition. But when you do the same in the UI, for example, by duplicating an item that contains a rendition, changes to the rendition are not applied across the items.To remove a rendition, leave the array empty.
The referenced object’s external ID. The value of the external_id property must not contain the following characters: /, ., ;.
The asset's renditions. Renditions are different editions of the original image used in Kontent.When you update a rendition via the API, it gets changed across all assets using this rendition. But when you do the same in the UI, for example, by duplicating an item that contains a rendition, changes to the rendition are not applied across the items.To remove a rendition, leave the array empty.
List of elements as defined in the item's content type. To recreate the order from the UI, use the order from the content type response, sorted by the content group.
Reference to a specific object in the environment.
Specifies the variant's current workflow and workflow step.
ISO-8601 formatted date and time of the last change of content.
Specifies the variant's scheduled publishing and unpublishing dates.
Specifies the users assigned as contributors to this variant.When updating language variants, you can specify users by their email address or internal ID.
Specifies the variant's due date information.
Adds additional instructions or notes for content creators.
The value of asset elements is an array of Reference objects, each representing a single asset. Every asset can be referenced only once. You can also reference the asset's renditions by the renditions property. Renditions are specific to images only.When retrieving asset elements, the Management API will always reference assets with their internal IDs. When updating asset elements via the API, you can reference an asset by its internal ID or external ID. Also, you can reference a rendition by its internal ID or external ID.
The referenced object's codename. The value of the codename property must meet the conditions defined in rules for codenames.
The referenced object’s external ID. The value of the external_id property must not contain the following characters: /, ., ;.
The referenced object's codename. The value of the codename property must meet the conditions defined in rules for codenames.
The referenced object’s external ID. The value of the external_id property must not contain the following characters: /, ., ;.
The referenced object’s external ID. The value of the external_id property must not contain the following characters: /, ., ;.
The asset's renditions. Renditions are different editions of the original image used in Kontent.When you update a rendition via the API, it gets changed across all assets using this rendition. But when you do the same in the UI, for example, by duplicating an item that contains a rendition, changes to the rendition are not applied across the items.To remove a rendition, leave the array empty.
When retrieving variants, the API returns their latest versions. For example, if the variant contains both the draft and published versions, the API returns the draft version because it's considered the latest.
When retrieving variants, the API returns their latest versions. For example, if the variant contains both the draft and published versions, the API returns the draft version because it's considered the latest.
When retrieving variants, the API returns their latest versions. For example, if the variant contains both the draft and published versions, the API returns the draft version because it's considered the latest.
When retrieving variants, the API returns their latest versions. For example, if the variant contains both the draft and published versions, the API returns the draft version because it's considered the latest.
When retrieving variants, the API returns their latest versions. For example, if the variant contains both the draft and published versions, the API returns the draft version because it's considered the latest.
When retrieving variants, the API returns their latest versions. For example, if the variant contains both the draft and published versions, the API returns the draft version because it's considered the latest.
404
{ "request_id": "00000000-0000-0000-c813-0080000000c3", "error_code": 103, "message": "The requested content item variant was not found."}
Early accessThis endpoint is still evolving, and its URL, parameters, and response structure may be subject to change. To ensure future compatibility, avoid hard dependencies on the exact endpoint path or response shape.Try the functionality and share your experience with us to help improve it.
When you delete the last variant of a content item, the whole content item is deleted.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
The default language will always have the ID of 00000000-0000-0000-0000-000000000000.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
The default language will always have the ID of 00000000-0000-0000-0000-000000000000.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
The default language will always have the ID of 00000000-0000-0000-0000-000000000000.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
The default language will always have the ID of 00000000-0000-0000-0000-000000000000.
The renditions property is optional, but once you specify a rendition for the asset, you need to specify the renditions for all the other referenced assets in the element as well. This is due to the backward compatibility of the API.
The renditions property is optional, but once you specify a rendition for the asset, you need to specify the renditions for all the other referenced assets in the element as well. This is due to the backward compatibility of the API.
The renditions property is optional, but once you specify a rendition for the asset, you need to specify the renditions for all the other referenced assets in the element as well. This is due to the backward compatibility of the API.
The renditions property is optional, but once you specify a rendition for the asset, you need to specify the renditions for all the other referenced assets in the element as well. This is due to the backward compatibility of the API.
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/netusing Kontent.Ai.Management;var client = new ManagementClient(new ManagementOptions{ ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", 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")));// var identifier = new LanguageVariantIdentifier(Reference.ById(Guid.Parse("f4b3fc05-e988-4dae-9ac1-a94aba566474")), Reference.ByCodename("es-ES"));// var identifier = new LanguageVariantIdentifier(Reference.ByCodename("on_roasts"), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8")));// var identifier = new LanguageVariantIdentifier(Reference.ByCodename("on_roasts"), Reference.ByCodename("es-ES"));// var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("59713"), Reference.ById(Guid.Parse("d1f95fde-af02-b3b5-bd9e-f232311ccab8")));// var identifier = new LanguageVariantIdentifier(Reference.ByExternalId("59713"), Reference.ByCodename("es-ES"));var response = await client.GetPublishedLanguageVariantAsync(identifier);
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/netusing Kontent.Ai.Management;var client = new ManagementClient(new ManagementOptions{ ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID"});var identifier = Reference.ById(Guid.Parse("6291c693-f6e4-4a6b-ac67-5c31c32f9388"));// var identifier = Reference.ByCodename("space_1");// Gets the first page of resultsvar response = await client.ListLanguageVariantsBySpaceAsync(identifier);
TypeScript
C#
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});// Some SDK queries are available under the `earlyAccess` namespace.// This endpoint is in early access and may evolve before general availability.// Use with caution in production environments.// Filters variants by search phrase and includes element contentconst response = await client.earlyAccess .filterLanguageVariants() .withData({ filters: { search_phrase: 'home', }, order: { by: 'last_modified', direction: 'desc', }, include_content: true, }) .toPromise(); // or `toAllPromise()`
{ "request_id": "550c4c30-1b9c-4fe4-8140-a9cda5cd7c11", "error_code": 214, "message": "Cannot create a new version of a language variant that is not published."}
{ "request_id": "385bc5fe-cc64-4924-bee1-78f271d4bbc5", "error_code": 215, "message": "Cannot change workflow step to Published. If you want to publish a language variant via the Management API, use the '/publish' endpoint instead."}
400
404
{ "request_id": "385bc5fe-cc64-4924-bee1-78f271d4bbc5", "error_code": 215, "message": "Cannot change workflow step to Published. If you want to publish a language variant via the Management API, use the '/publish' endpoint instead."}
The renditions property is optional, but once you specify a rendition for the asset, you need to specify the renditions for all the other referenced assets in the element as well. This is due to the backward compatibility of the API.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
The default language will always have the ID of 00000000-0000-0000-0000-000000000000.
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});const response = await client .viewLanguageVariant() .byItemId('f4b3fc05-e988-4dae-9ac1-a94aba566474') // .byItemCodename('my_article') // .byItemExternalId('59713') .byLanguageId('d1f95fde-af02-b3b5-bd9e-f232311ccab8') // .byLanguageCodename('es-ES') .toPromise();
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});const response = await client .listLanguageVariantsOfItem() .byItemId('f4b3fc05-e988-4dae-9ac1-a94aba566474') // .byItemCodename('my_article') // .byItemExternalId('59713') .toPromise();
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});// Gets the first page of resultsconst response = await client .listLanguageVariantsOfContentType() .byTypeCodename('article') .toPromise();// Gets all pages of results// const response = await client.listLanguageVariantsOfContentType()// .byTypeCodename('article')// .toAllPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});// Gets the first page of resultsconst response = await client .listLanguageVariantsOfContentTypeWithComponents() .byTypeID('6434e475-5a29-4866-9fd1-6d1ca873f5be') // .byTypeCodename('article') .toPromise();// Gets all pages of results// const response = await client.listLanguageVariantsOfContentTypeWithComponents()// .byTypeCodename('article')// .toAllPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});// Gets the first page of resultsconst response = await client .listLanguageVariantsByCollection() .byCollectionCodename('important_collection') .toPromise();// Gets all pages of results// const response = await client.listLanguageVariantsByCollection()// .byCollectionCodename('important_collection')// .toAllPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});const response = await client .createNewVersionOfLanguageVariant() .byItemId('f4b3fc05-e988-4dae-9ac1-a94aba566474') // .byItemCodename('my_article') // .byItemExternalId('59713') .byLanguageId('d1f95fde-af02-b3b5-bd9e-f232311ccab8') // .byLanguageCodename('es-ES') .toPromise();
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});const response = await client .changeWorkflowStepOfLanguageVariant() .byItemId('f4b3fc05-e988-4dae-9ac1-a94aba566474') // .byItemCodename('my_article') // .byItemExternalId('59713') .byLanguageId('d1f95fde-af02-b3b5-bd9e-f232311ccab8') // .byLanguageCodename('es-ES') .byWorkflowStepId('16221cc2-bd22-4414-a513-f3e555c0fc93') .toPromise();
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { ManagementClient } from '@kontent-ai/management-sdk';const client = new ManagementClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID', apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',});const response = await client .deleteLanguageVariant() .byItemId('f4b3fc05-e988-4dae-9ac1-a94aba566474') // .byItemCodename('my_article') // .byItemExternalId('59713') .byLanguageId('d1f95fde-af02-b3b5-bd9e-f232311ccab8') // .byLanguageCodename('es-ES') .toPromise();
The renditions property is optional, but once you specify a rendition for the asset, you need to specify the renditions for all the other referenced assets in the element as well. This is due to the backward compatibility of the API.