VariantGroups
VariantGroups
Find
The Find Variant Groups returns a list of all variant groups linked to your stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").VariantGroups().Find();FindAsync
The FindAsync Variant Groups returns a list of all variant groups linked to your stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").VariantGroups().Find();LinkContentTypes
The LinkContentTypes method allows you to link content types to your variant group.
| Name | Type | Description |
|---|---|---|
| contentTypeUids (required) | List<string> | List of content type UIDs to be linked to the variant group |
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").LinkContentTypes(contentTypeUids);LinkContentTypesAsync
The LinkContentTypesAsync method allows you to link content types to your variant group.
| Name | Type | Description |
|---|---|---|
| contentTypeUids (required) | List<string> | List of content type UIDs to be linked to the variant group |
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").LinkContentTypesAsync(contentTypeUids);UnlinkContentTypes
The UnlinkContentTypes method allows you to unlink content types to your variant group.
| Name | Type | Description |
|---|---|---|
| contentTypeUids (required) | List<string> | List of content type UIDs to be linked to the variant group |
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").UnlinkContentTypes(contentTypeUids);UnlinkContentTypesAsync
The UnlinkContentTypesAsync method allows you to unlink content types to your variant group.
| Name | Type | Description |
|---|---|---|
| contentTypeUids (required) | List<string> | List of content type UIDs to be linked to the variant group |
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").UnlinkContentTypesAsync(contentTypeUids);