Label

View as Markdown

Label

Labels are similar to folders that allow increased flexibility over your Content Types. Labels allow you to categorize and organize the existing content types of your stack.

Create

The Create used to create a label.

NameTypeDescription
model (required)LabelMode

Label Model for updating label.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

LabelMode model = new LabelMode();

ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Label().Create(model);

CreateAsync

The Create used to create a label.

NameTypeDescription
model (required)LabelMode

Label Model for updating label.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

LabelMode model = new LabelMode();

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label().CreateAsync(model);

Delete

The Delete label call is used to delete a specific label.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").Delete();

DeleteAsync

The Delete label call is used to delete a specific label.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").DeleteAsync();

Fetch

The Fetch a single label call returns information about a particular label of a stack.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").Fetch();

FetchAsync

The Fetch a single label call returns information about a particular label of a stack.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").FetchAsync();

Query

The Query on Label This call fetches all the existing labels of the stack.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

Query query = client.Stack("<API_KEY>").Label().Query();

Update

The Update label call is used to update an existing label.

NameTypeDescription
model (required)LabelMode

Label Model for updating label.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

LabelMode model = new LabelMode();

ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Label("<LABEL_UID>").Update(model);

UpdateAsync

The Update label call is used to update an existing label.

NameTypeDescription
model (required)LabelMode

Label Model for updating label.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

LabelMode model = new LabelMode();

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").UpdateAsync(model);