DeliveryToken

View as Markdown

DeliveryToken

Delivery Tokens are tokens that provide you with read-only access to the associated environments. It is a credential—used along with the stack API key—to make authorized Content Delivery API requests for retrieving the published content of an environment.

Create

The Create request is used to create a delivery token in the stack.

NameTypeDescription
model (required)DeliveryTokenModel

Delivery Token Model for creating delivery token.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

DeliveryTokenModel model = new DeliveryTokenModel();

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

CreateAsync

The Create request is used to create a delivery token in the stack.

NameTypeDescription
model (required)DeliveryTokenModel

Delivery Token Model for creating delivery token.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

DeliveryTokenModel model = new DeliveryTokenModel();

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

Delete

The Delete request deletes a specific delivery token.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").Delete();

DeleteAsync

The Delete request deletes a specific delivery token.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").DeleteAsync();

Fetch

The Fetch function returns the details of all the delivery tokens created in a stack.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").Fetch();

FetchAsync

The Fetch function returns the details of all the delivery tokens created in a stack.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").FetchAsync();

Query

The Query on DeliveryToken returns the details of all the delivery tokens created in a stack.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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


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

Update

The Update request lets you update the details of a delivery token.

NameTypeDescription
model (required)DeliveryTokenModel

Delivery Token Model for creating delivery token.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

DeliveryTokenModel model = new DeliveryTokenModel();

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").Update(model);

UpdateAsync

The Update request lets you update the details of a delivery token.

NameTypeDescription
model (required)DeliveryTokenModel

Delivery Token Model for creating delivery token.

collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;

using Contentstack.Management.Core.Models.Tokens;


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

DeliveryTokenModel model = new DeliveryTokenModel();

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