cs-icon.svg

Contentstack - .Net Management SDK

.NET SDK for Contentstack's Content Management API

Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favourite languages. Build your application frontend, and Contentstack will take care of the rest.

For more information, you can check out the GitHub page of our .NET Management SDK.

Prerequisites

To get started with C#, you will need:

  • .Net platform 3.1 and later
  • IDE (Visual Studio)
  • NuGet.

SDK installation and setup

The .Net SDK provided by contentstack.io is available for Xamarin, Windows Phone and legacy .Net applications. You can integrate contentstack with your application by following these steps.

Open the terminal and install the contentstack module via 'Package Manager' command

PM> NuGet\Install-Package contentstack.management.csharp

And via ‘.Net CLI’

dotnet add package contentstack.management.csharp 

To import the SDK, use the following code:

using Contentstack.Management.Core;
ContentstackClient client = new ContentstackClient();

Or

using Contentstack.Management.Core;
ContentstackClientOptions options = new ContentstackClientOptions();
ContentstackClient client = new ContentstackClient(new OptionsWrapper<ContentstackClientOptions>(options));

Quickstart in 5 mins

Initializing Your SDK

To use the .NET CMA SDK, you need to first initialize it. To do this, use the following code:

using Contentstack.Management.Core;
ContentstackClient client = new ContentstackClient("AUTHTOKEN");

Authentication

To use this SDK, you need to authenticate your users by using the Authtoken, credentials, or Management Token (stack-level token).

Authtoken
An Authtoken is a read-write token used to make authorized CMA requests, and it is a user-specific token.

ContentstackClientOptions options = new ContentstackClientOptions() {
   Authtoken: ‘AUTHTOKEN’
};
ContentstackClient client = new ContentstackClient(new OptionsWrapper<ContentstackClientOptions>(options));

Login

To log in to Contentstack, provide your credentials as shown below.

NetworkCredential credentials = new NetworkCredential("EMAIL", "PASSWORD");
ContentstackClient client = new ContentstackClient();
try
{
    ContentstackResponse contentstackResponse = client.Login(credentials);
} catch (Exception e)
{
}

Management Token

Management tokens are stack-level tokens with no users attached to them.

ContentstackClient client = new ContentstackClient();
client.Stack("API_KEY", "MANAGEMENT_TOKEN");

Early Access Header

Integrating EarlyAccess headers into the ContentstackClientOptions grants access to features included in the early access program

var contentstackClient = new ContentstackClient(new ContentstackClientOptions()
{
    Authtoken = "token",
    EarlyAccess = new string[] { "ea1", "ea2" }
});

Proxy Configuration

Contentstack allows you to define HTTP proxy for your requests with the .NET Management SDK. A proxied request allows you to anonymously access public URLs even from within a corporate firewall through a proxy server. Here is the basic syntax of the proxy settings that you can pass within fetchOptions of the .NET Management SDK:

var contentstackConfig = new ContentstackClientOptions();
contentstackConfig.ProxyHost = "http://127.0.0.1"
contentstackConfig.ProxyPort = 9000;
contentstackConfig.ProxyCredentials = new NetworkCredential(userName: "username", password: "password");
ContentstackClient client = new ContentstackClient(new
OptionsWrapper<ContentstackClientOptions>(options));

Fetch Stack Details

To fetch your stack details through the SDK, use the following code:

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("AUTHTOKEN");
Stack stack = client.Stack("API_KEY");
ContentstackResponse contentstackResponse = stack.Fetch();
var response = contentstackResponse.OpenJObjectResponse();

Create an Entry

You can use the following code to create an entry in a specific content type of a stack through the SDK:

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
EntryModel entry = new EntryModel() {
 Title: 'Sample Entry',
 Url: '/sampleEntry'
}
ContentstackClient client = new ContentstackClient("AUTHTOKEN");
Stack stack = client.Stack("API_KEY");
ContentstackResponse contentstackResponse = stack.ContentType(“CONTENT_TYPE_UID”).Entry().Create(entry);

Upload Assets

Use the following code snippet to upload assets to your stack through the SDK:

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("AUTHTOKEN");
Stack stack = client.Stack("API_KEY");
var path = Path.Combine(Environment.CurrentDirectory, "path/to/file");
AssetModel asset = new AssetModel("Asset Title", path, "application/json");
ContentstackResponse response = stack.Asset().Create(asset);

ContentstackClient

Contentstack Client for interacting with Contentstack Management API.
NameTypeDescription

SerializerSettings

JsonSerializerSettings

Get and Set method for de-serialization.

ContentstackClient

Initializes new instance of the Contentstack.Management.Core.ContentstackClient class.

Returns:
Type
ContentstackClient
NameTypeDescription

contentstackOptions (required)

ContentstackClientOptions

Contentstack configuration options.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
var options = new ContentstackClientOptions()
{
      Host = "<API_HOST>",
      Authtoken = "<AUTHTOKEN>"
}
ContentstackClient client = new ContentstackClient(options);
Returns:
Type
ContentstackClient
NameTypeDescription

contentstackOptions

IOptions<ContentstackClientOptions>

Contentstack configuration options.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
var options = new ContentstackClientOptions()
{
      Host = "<API_HOST>",
      Authtoken = "<AUTHTOKEN>"
}
ContentstackClient client = new ContentstackClient(new OptionsWrapper<ContentstackClientOptions
(options));

Returns:
Type
ContentstackClient
NameTypeDescription

authtoken

string

The optional Authtoken for making CMA call

host

string

The optional host name for the API.

Default: api.contentstack.io

port

int

The optional port for the API

Default: 443

version

string

The optional version for the API

Default: v3

disableLogging

bool

The optional to disable or enable logs.

Default: false

maxResponseContentBufferSize

long

The optional maximum number of bytes to buffer when reading the response content

Default: 1073741824L

timeout

int

The optional timespan to wait before the request times out.

Default: 30 sec

retryOnError

bool

The optional retry condition for retrying on error.

Default: true

proxyHost

string

Host to use with a proxy.

proxyPort

int

Port to use with a proxy.

Default: -1

proxyCredentials

ICredentials

Credentials to use with a proxy.

EarlyAccess

string

Optional array of header strings for early access features.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("AUTHTOKEN");

GetUser

The Get user call returns comprehensive information of an existing user account.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection (required)

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.GetUser();

GetUserAsync

The Get user call returns comprehensive information of an existing user account.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection (required)

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.GetUserAsync();

Login

The Log in to your account request is used to sign in to your Contentstack account and obtain the authtoken.

Returns:
Type
ContentstackResponse
NameTypeDescription

credentials (required)

ICredentials

User credentials for login.

token

string

The optional 2FA token.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient();
NetworkCredential credentials = new NetworkCredential("<EMAIL>", "<PASSWORD>");
ContentstackResponse contentstackResponse = client.Login(credentials);

LoginAsync

The Log in to your account request is used to sign in to your Contentstack account and obtain the authtoken.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

credentials (required)

ICredentials

User credentials for login.

token

string

The optional 2FA token.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient();
NetworkCredential credentials = new NetworkCredential("<EMAIL>", "<PASSWORD>");
ContentstackResponse contentstackResponse = await client.LoginAsync(credentials);

Logout

The Log out of your account call is used to sign out the user of Contentstack account

Returns:
Type
ContentstackResponse
NameTypeDescription

authtoken

string

The optional authroken in case user want to logout.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Logout();

LogoutAsync

The Log out of your account call is used to sign out the user of Contentstack account

Returns:
Type
ContentstackResponse
NameTypeDescription

authtoken

string

The optional authroken in case user want to logout.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.LogoutAsync();

Organization

Organization the top-level entity in the hierarchy of Contentstack, consisting of stacks and stack resources, and users. Organization allows easy management of projects as well as users within the Organization.

Returns:
Type
Organization
NameTypeDescription

uid

string

Organization uid for specific org.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Organization organization = client.Organization();

Stack

Stack is a space that stores the content of a project (a web or mobile property). Within a stack, you can create content structures, content entries, users, etc. related to the project.

Returns:
Type
Stack
NameTypeDescription

apiKey

string

Stack API Key.

managementToken

string

Stack Management token

branchUid

string

Branch uid for querying specific branch of stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Stack Stack = client.Stack("<API_KEY>");

User

User session consists of calls that will help you to update user of your Contentstack account.

Returns:
Type
User
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
User user = client.User();

ContentstackClientOptions

ContentstackClientOptions class is base class for Contentstack Configuration.

NameTypeDescription

Authtoken

string

An Authtoken is a read-write token used to make authorized CMA requests.

DisableLogging

bool

Gets or sets the DisableLogging. When set to true, the logging of the client is disabled. The default value is false.

Host

string

The Host used to set host url for the Contentstack Management API.

Default: api.contentstack.io

MaxResponseContentBufferSize

long

Gets or sets the maximum number of bytes to buffer when reading the response content.

Default: 1 gigabytes

Port

int

The Host used to set host url for the Contentstack Management API.

ProxyCredentials

ICredentials

Credentials to use with a proxy.

ProxyHost

string

Host for the Proxy.

ProxyPort

int

Port for the Proxy.

RetryDelay

TimeSpan

Returns the flag indicating delay in retrying HTTP requests.

Default: 300ms

RetryLimit

int

Returns the flag indicating how many retry HTTP requests an SDK should make for a single SDK operation invocation before giving up.

Default: 5 sec

RetryOnError

bool

When set to true, the client will retry requests. When set to false, the client will not retry request.

Default: true

RetryPolicy

RetryPolicy

The retry policy which specifies when a retry should be performed.

Timeout

TimeSpan

Gets or sets the timespan to wait before the request times out.

Default: 30 sec

Version

string

The Host used to set host url for the Contentstack Management API.

Default: v3

GetUri

Returns a Uri instance configured in the configuration.

Returns:
Type
Uri

GetWebProxy

Returns a WebProxy instance configured to match the proxy settings in the configuration.

Returns:
Type
IWebProxy

ContentstackClientOptions

Abstract class for Response objects.

NameTypeDescription

ContentLength

long

Returns the content length of the HTTP response.

ContentType

string

Gets the property ContentType.

IsSuccessStatusCode

bool

Gets a value that indicates whether the HTTP response was successful.

ResponseBody

HttpResponseMessage

The entire response body from the HTTP response.

StatusCode

HttpStatusCode

The HTTP status code from the HTTP response.

GetHeaderNames

Gets the header names from HTTP response headers.

Returns:
Type
string[]

GetHeaderValue

Gets the value for the header name from HTTP response headers.

Returns:
Type
string
NameTypeDescription

headerName (required)

string

Header name for which value is needed.

IsHeaderPresent

Return true if header name present in HTTP response headers.

Returns:
Type
bool
NameTypeDescription

headerName (required)

string

Header name to check if its present.

OpenJObjectResponse

Json Object format response.

Returns:
Type
JObject

OpenResponse

String format response.

Returns:
Type
string

OpenTResponse

Type response to serialize the response.

Returns:
Type
TResponse

ContentstackException

A base exception for Contentstack API.

ContentstackException

Gets the header names from HTTP response headers.

Returns:
Type
ContentstackException
NameTypeDescription

message

string

The message for the exception to be created.

innerException

Exception

Inner exception

ContentstackErrorException

A base exception for Contentstack API.

NameTypeDescription

ErrorCode

int

This is error code.

ErrorMessage

string

This is error message.

Errors

Dictionary<string, object>

Set of errors in detail.

Header

HttpResponseHeaders

This is http response Header of REST request to Contentstack.

Message

string

This is error message.

ReasonPhrase

string

This is http response phrase code of REST request to Contentstack.

StatusCode

HttpStatusCode

This is http response status code of REST request to Contentstack.

Asset

Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.

Create

The Upload asset request uploads an asset file to your stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

AssetModel

Asset Model with details.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Create(model);

CreateAsync

The Upload asset request uploads an asset file to your stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

AssetModel

Asset Model with details.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().CreateAsync(model);

Delete

The Delete asset call will delete an existing asset from the stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>")..Asset("<ASSET_UID>").Delete();

DeleteAsync

The Delete asset call will delete an existing asset from the stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>")..Asset("<ASSET_UID>").DeleteAsync();

Fetch

The Get an asset call returns comprehensive information about a specific version of an asset of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>")..Asset("<ASSET_UID>").Fetch();

FetchAsync

The Get an asset call returns comprehensive information about a specific version of an asset of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>")..Asset("<ASSET_UID>").FetchAsync();

Folder

The Folder allows to fetch and create folders in assets.

Returns:
Type
Folder
NameTypeDescription

uid

string

Optional folder unique id.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Folder folder = client.Stack("<API_KEY>").Asset().Folder();

Publish

The Publish an asset call is used to publish a specific version of an asset on the desired environment either immediately or at a later date/time.

Returns:
Type
ContentstackResponse
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for publishing asset.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Publish(new PublishUnpublishDetails());

PublishAsync

The Publish an asset call is used to publish a specific version of an asset on the desired environment either immediately or at a later date/time.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for publishing asset.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").PublishAsync(new PublishUnpublishDetails());

Query

The Query on Asset will allow to fetch details of all Assets.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Asset().Query();

Unpublish

The Unpublish an asset call is used to unpublish a specific version of an asset from a desired environment.

Returns:
Type
ContentstackResponse
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for un-publishing asset.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Unpublish(new PublishUnpublishDetails());

UnpublishAsync

The Unpublish an asset call is used to unpublish a specific version of an asset from a desired environment.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for un-publishing asset.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").UnpublishAsync(new PublishUnpublishDetails());

Update

The Replace asset call will replace an existing asset with another file on the stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

AssetModel

Asset Model with details.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Update(model);

UpdateAsync

The Replace asset call will replace an existing asset with another file on the stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

AssetModel

Asset Model with details.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").UpdateAsync(model);

Version

The Versioning on Asset will allow to fetch all version, delete specific version or naming the asset version.

Returns:
Type
Version
NameTypeDescription

versionNumber

int

Version number for the asset.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Version version = await client.Stack("<API_KEY>")..Asset("<ASSET_UID>").Version();

Approvals

List of roles and list of user for the approval.

NameTypeDescription

Roles

List<string>

List of roles for the approval

Users

List<string>

List of users for the approval.

AssetRules

Rules for setting on Assets.

NameTypeDescription

Assets

List<string>

List of asset for adding into rule.

Module

string

Modules for the rules to be applied.

AssignRole

Roles for assigning for the organization/stack

NameTypeDescription

Name

string

Role name.

Uid

string

Unique id for the role.

AssignUser

User details for assigning for the organization/stack

NameTypeDescription

Email

string

User email address.

Name

string

User name.

Uid

string

Unique id for the user.

AuditLog

Audit log displays a record of all the activities performed in a stack and helps you keep a track of all published items, updates, deletes, and current status of the existing content.

Fetch

The Get audit log item request is used to retrieve a specific item from the audit log of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").AuditLog("<AUDITLOG_UID>").Fetch();

FetchAsync

The Get audit log item request is used to retrieve a specific item from the audit log of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").AuditLog("<AUDITLOG_UID>").FetchAsync();

FindAll

The Get audit log request is used to retrieve the audit log of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").AuditLog().FindAll();

FindAllAsync

The Get audit log request is used to retrieve the audit log of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").AuditLog().FindAllAsync();

BranchAliasRules

Rules for setting on branch alias.

NameTypeDescription

BranchAlias

List<string>

List of branch alias for adding into rule.

Module

string

Modules for the rules to be applied.

BrancheRules

Rules for setting on branch.

NameTypeDescription

Branches

List<string>

List of branch for adding into rule.

Module

string

Modules for the rules to be applied.

ContentModelling

ContentModelling for creating/updating ContentTypes.

ContentModelling model = new ContentModelling(){
    Title = " This is title ",
    Uid = "The uid",
    Schema = new List<Field>(){
              new Field();
             };
};
NameTypeDescription

Uid

string

UID for the content type.

Title

string

Title for the content type.

FieldRules

List<FieldRules>

List of field rules for the content type fields.

Options

Option

Option for the content types

Schema

List<Field>

Schema is list of the field you want to create within content type

ContentType

Content type defines the structure or schema of a page or a section of your web or mobile property. To create content for your application, you are required to first create a content type, and then create entries using the content type.

Create

The Create a content type call creates a new content type in a particular stack of your Contentstack account.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ContentModelling

ContentModelling for creating Content Type.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);

CreateAsync

The Create a content type call creates a new content type in a particular stack of your Contentstack account.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ContentModelling

ContentModelling for creating Content Type.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);

Delete

The Delete Content Type call deletes an existing content type and all the entries within it.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").ContentType("<CONTENT_TYPE_UID>").Delete();

DeleteAsync

The Delete Content Type call deletes an existing content type and all the entries within it.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").ContentType("<CONTENT_TYPE_UID>").DeleteAsync();

Fetch

The Fetch a single content type call returns information of a specific content type.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").ContentType("<CONTENT_TYPE_UID>").Fetch();

FetchAsync

The Fetch a single content type call returns information of a specific content type.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").ContentType("<CONTENT_TYPE_UID>").FetchAsync();

Entry

Entry is the actual piece of content created using one of the defined content types.

Returns:
Type
Entry
NameTypeDescription

uid

string

Optional entry uid for performing entry specific operation.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry();

Query

The Query on Content Type will allow to fetch details of all or specific Content Type.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").ContentType().Query();

Update

The Update Content Type call is used to update the schema of an existing content type.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ContentModelling

ContentModelling for updating Content Type.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);

UpdateAsync

The Update Content Type call is used to update the schema of an existing content type.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ContentModelling

ContentModelling for updating Content Type.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);

ContentTypeRules

Rules for setting on content type.

NameTypeDescription

ContentTypes

List<string>

List of content types for adding into rule.

Module

string

Modules for the rules to be applied.

DeployModel

Assets/Entries deploy model

NameTypeDescription

Action

string

Deploy action the the entry.

Environments

List<string>

Environment on which deploy assets/entries.

Locales

List<string>

List of locales for deployment.

ScheduledAt

string

Set date for future deployment.

Entry

An entry is an actual piece of content that you want to publish. You can create entries only for content types that have already been created.

Create

The Create an entry call creates a new entry for the selected content type.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

IEntry

IEntry for creating entry.

collection

ParameterCollection

Query parameter collection

To create an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:

using Contentstack.Management.Core.Abstractions;
using Newtonsoft.Json;
namespace TestModels
{
	public class EntryModel : IEntry
    {
		public EntryModel()
		{
		}
        [JsonProperty(propertyName: "title")]
        public string Title { get; set; }
        [JsonProperty(propertyName: "url")]
        public string URL { get; set; }
        [JsonProperty(propertyName: "uid")]
        public string Uid { get; set; }
    }
}

Next, you need to set the data to the model. Here’s how you can do that:

EntryModel entryModel = new EntryModel()
{
    Title = "Your Entry Title",
    URL = "path/yoururl.com/example",
};

The code below illustrates how to create an entry:

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().Create(model);

CreateAsync

The Create an entry call creates a new entry for the selected content type.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

IEntry

IEntry for creating entry.

collection

ParameterCollection

Query parameter collection

To create an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:

using Contentstack.Management.Core.Abstractions;
using Newtonsoft.Json;
namespace TestModels
{
	public class EntryModel : IEntry
    {
		public EntryModel()
		{
		}
        [JsonProperty(propertyName: "title")]
        public string Title { get; set; }
        [JsonProperty(propertyName: "url")]
        public string URL { get; set; }
        [JsonProperty(propertyName: "uid")]
        public string Uid { get; set; }
    }
}

Next, you need to set the data to the model. Here’s how you can do that:

EntryModel entryModel = new EntryModel()
{
    Title = "Your Entry Title",
    URL = "path/yoururl.com/example",
};

The code below illustrates how to update an entry

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().CreateAsync(model);

Delete

The Delete Entry call deletes an existing entry and all the entries within it.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Delete();

DeleteAsync

The Delete Entry call deletes an existing entry and all the entries within it.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").DeleteAsync();

DeleteMultipleLocal

The Delete Locale will delete specific localized entries by passing the locale codes.

Returns:
Type
ContentstackResponse
NameTypeDescription

locales

List<string>

Enter the code of the language to unlocalize the entry of that particular language.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> locales = new List<string>(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").DeleteMultipleLocal(locales);

DeleteMultipleLocalAsync

The Delete Locale will delete specific localized entries by passing the locale codes.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

locales

List<string>

Enter the code of the language to unlocalize the entry of that particular language.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> locales = new List<string>(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").DeleteMultipleLocalAsync(locales);

Export

The Export an entry call is used to export an entry. The exported entry data is saved in a downloadable JSON file.

Returns:
Type
ContentstackResponse
NameTypeDescription

filePath (required)

string

Path to file you want to export entry.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Export("PATH/TO/FILE");

Fetch

The Fetch a single entry call returns information of a specific content type.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Fetch();

FetchAsync

The Fetch a single entry call returns information of a specific content type.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").FetchAsync();

Import

The Import an entry call is used to import an entry. To import an entry, you need to upload a JSON file that has entry data in the format that fits the schema of the content type it is being imported to.

Returns:
Type
ContentstackResponse
NameTypeDescription

filePath (required)

string

Path to file you want to import.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Import("PATH/TO/FILE");

ImportAsync

The Import an entry call is used to import an entry. To import an entry, you need to upload a JSON file that has entry data in the format that fits the schema of the content type it is being imported to.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

filePath (required)

string

Path to file you want to import.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").ImportAsync("PATH/TO/FILE");

Locales

The Get languages of an entry call returns the details of all the languages that an entry exists in.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Locales();

LocalesAsync

The Get languages of an entry call returns the details of all the languages that an entry exists in.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").LocalesAsync();

Localize

The Localize an entry request allows you to localize an entry i.e., the entry will cease to fetch data from its fallback language and possess independent content specific to the selected locale.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

IEntry

Localized IEntry model.

locale

string

Enter the code of the language to unlocalize the entry of that particular language.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Localize(model, "hi-in");

LocalizeAsync

The Localize an entry request allows you to localize an entry i.e., the entry will cease to fetch data from its fallback language and possess independent content specific to the selected locale.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

IEntry

Localized IEntry model.

locale

string

Enter the code of the language to unlocalize the entry of that particular language.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").LocalizeAsync(model, "hi-in");

Publish

The Publish an entry request lets you publish an entry either immediately or schedule it for a later date/time.

Returns:
Type
ContentstackResponse
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for publishing entry.

locale

string

Locale for which entry to be published.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Publish(details, "en-us");

PublishAsync

The Publish an entry request lets you publish an entry either immediately or schedule it for a later date/time.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for publishing entry.

locale

string

Locale for which entry to be published.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").PublishAsync(details, "en-us");

PublishRequest

This multipurpose request allows you to either send a publish request or accept/reject a received publish request.

Returns:
Type
ContentstackResponse
NameTypeDescription

action (required)

EntryPublishAction

EntryPublishAction for setting entry to publish request.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryPublishAction model = new EntryPublishAction();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").PublishRequest(model);

PublishRequestAsync

This multipurpose request allows you to either send a publish request or accept/reject a received publish request.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

action (required)

EntryPublishAction

EntryPublishAction for setting entry to publish request.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryPublishAction model = new EntryPublishAction();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").PublishRequestAsync(model);

Query

The Query on Entry will allow to fetch details of all or specific Content Type.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().Query();

References

The Get references of an entry call returns all the entries of content types that are referenced by a particular entry.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").References();

ReferencesAsync

The Get references of an entry call returns all the entries of content types that are referenced by a particular entry.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").ReferencesAsync();

SetWorkflow

The Set Entry Workflow Stage request allows you to either set a particular workflow stage of an entry or update the workflow stage details of an entry.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

EntryWorkflowStage

EntryWorkflowStage object for setting entry to workflow stage.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryWorkflowStage model = new EntryWorkflowStage();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").SetWorkflow(model);

SetWorkflowAsync

The Set Entry Workflow Stage request allows you to either set a particular workflow stage of an entry or update the workflow stage details of an entry.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

EntryWorkflowStage

EntryWorkflowStage object for setting entry to workflow stage.

collection

ParameterCollection

Query parameter.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryWorkflowStage model = new EntryWorkflowStage();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").SetWorkflowAsync(model);

Unlocalize

The Unlocalize an entry request is used to unlocalize an existing entry.

Returns:
Type
ContentstackResponse
NameTypeDescription

locale

string

Enter the code of the language to unlocalize the entry of that particular language.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Unlocalize("hi-in");

UnlocalizeAsync

The Unlocalize an entry request is used to unlocalize an existing entry.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

locale

string

Enter the code of the language to unlocalize the entry of that particular language.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").UnlocalizeAsync("hi-in");

Unpublish

The Unpublish an entry call will unpublish an entry at once, and also, gives you the provision to unpublish an entry automatically at a later date/time.

Returns:
Type
ContentstackResponse
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for un-publishing entry.

locale

string

Locale for which entry to be un-published.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Unpublish(details, "en-us");

UnpublishAsync

The Unpublish an entry call will unpublish an entry at once, and also, gives you the provision to unpublish an entry automatically at a later date/time.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

details (required)

PublishUnpublishDetails

Publish details for un-publishing entry.

locale

string

Locale for which entry to be un-published.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").UnpublishAsync(details, "en-us");

Update

The Update Entry call is used to update the schema of an existing entry.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

IEntry

IEntry for updating entry.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("ENTRY_UID").Update(model);

UpdateAsync

The Update Entry call is used to update the schema of an existing entry.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

IEntry

IEntry for updating entry.

collection

ParameterCollection

Query parameter collection

To update an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:

using Contentstack.Management.Core.Abstractions;
using Newtonsoft.Json;
namespace TestModels
{
	public class EntryModel : IEntry
    {
		public EntryModel()
		{
		}
        [JsonProperty(propertyName: "title")]
        public string Title { get; set; }
        [JsonProperty(propertyName: "url")]
        public string URL { get; set; }
        [JsonProperty(propertyName: "uid")]
        public string Uid { get; set; }
    }
}

Next, you need to set the data to the model. Here’s how you can do that:

EntryModel entryModel = new EntryModel()
{
    Title = "Your Entry Title",
    URL = "path/yoururl.com/example",
};

The code below illustrates how to update an entry

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("ENTRY_UID").UpdateAsync(model);

Version

The Version on Entry will allow to fetch all version, delete specific version or naming the asset version.

Returns:
Type
Version
NameTypeDescription

versionNumber

int

Version number for the entry.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Version version = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().Version();

EntryPublishAction

Publish action for the entry release.

NameTypeDescription

Action

string

Publish action the the entry.

Comment

string

Comment for the publish action.

Status

int

Status for the publish action.

Notify

bool

Set true to notify the action details.

Uid

string

Publish action uid.

EntryWorkflowStage

A workflow lets you manage the stages through which your content will move in the content creation process.

NameTypeDescription

AssignedByRoles

List<AssignRole>

List of assigned roles for the workflow stage.

AssignedTo

List<AssignUser>

List of users assigned to the workflow stage.

Comment

string

Comment for the workflow stage.

DueDate

string

Due date for the workflow stage.

Notify

bool

Set true to notify the workflow users.

Uid

string

Workflow stage uid.

Environment

An environment allows users to publish their content on the destination URL. After you create an entry, you will publish it on an environment. After publishing, you will see the content on your website’s URL (specified in the environment). Being not limited to a single environment, you can publish content on multiple environments too.

Create

The Create function will add a publishing environment for a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

EnvironmentModel

Environment model for updating the environment.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Environment().Create(model);

CreateAsync

The Create function will add a publishing environment for a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

EnvironmentModel

Environment model for updating the environment.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment().CreateAsync(model);

Delete

The Delete function will delete an existing publishing environment from your stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Environment("<EXTENSION_UID>").Delete();

DeleteAsync

The Delete function will delete an existing publishing environment from your stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Environment("<EXTENSION_UID>").DeleteAsync();

FetchAsync

The Fetch function returns more details about the specified environment of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Environment("<EXTENSION_UID>").Fetch();

FetchAsync

The Fetch function returns more details about the specified environment of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Environment("<EXTENSION_UID>").FetchAsync();

Query

The Query on Environment function fetches the list of all environments available in a stack.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Environment().Query();

Update

The Update function will update the details of an existing publishing environment for a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

EnvironmentModel

Environment model for updating the environment.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Environment("<ENVIRONMENT_UID>").Update(model);

UpdateAsync

The Update function will update the details of an existing publishing environment for a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

EnvironmentModel

Environment model for updating the environment.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment("<ENVIRONMENT_UID>").UpdateAsync(model);

EnvironmentModel

Environment model for creating or updating the environment.

NameTypeDescription

DeployContent

bool

Set true to deploying the content for the environment.

Name

string

Name for the environment.

Servers

List<Server>

List of servers for the Environment.

Urls

List<LocalesUrl>

List of locale urls for the environment.

EnvironmentRules

Rules for assigning to the environment.

NameTypeDescription

Environments

List<string>

List of environment for adding the rule.

Module

string

Module for the rules.

Extension

Extensions let you create custom fields and custom widgets that lets you customize Contentstack default UI and behavior.

Create

The Create is used to create a custom field, custom-widget, dashboard widget to the Stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ExtensionModel

Extension model for creating the Extension.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ExtensionModel model = new ExtensionModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension().Create(model);

CreateAsync

The Create is used to create a custom field, custom-widget, dashboard widget to the Stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ExtensionModel

Extension model for creating the Extension.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ExtensionModel model = new ExtensionModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension().CreateAsync(model);

Delete

The Delete extension call will delete an existing extension from the stack.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension("<EXTENSION_UID>").Delete();

DeleteAsync

The Delete extension call will delete an existing extension from the stack.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension("<EXTENSION_UID>").DeleteAsync();

Fetch

The Get an extension call returns comprehensive information about a specific extension of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Extension("<EXTENSION_UID>").Fetch();

FetchAsync

The Get an extension call returns comprehensive information about a specific extension of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Extension("<EXTENSION_UID>").FetchAsync();

Query

The Query on Extension will allow to fetch details of all Extensions.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Extension().Query();

Update

The Update extension call will update an existing extension on the stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ExtensionModel

Extension model for updating the Extension.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ExtensionModel model = new ExtensionModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension("<EXTENSION_UID>").Update(model);

UpdateAsync

The Update extension call will update an existing extension on the stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ExtensionModel

Extension model for updating the Extension.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ExtensionModel model = new ExtensionModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension("<EXTENSION_UID>").UpdateAsync(model);

Upload

The Upload request is used to upload a new custom-field, custom-widget, dashboard widget to the Stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

IExtensionInterface

IExtensionInterface with details for uploading the extension.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
CustomFieldModel model = new CustomFieldModel("FILE_PATH", "FILE_CONTENT_TYPE", "TITLE", "DATA_TYPE");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension().Upload(model);

UploadAsync

The Upload request is used to upload a new custom-field, custom-widget, dashboard widget to the Stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

IExtensionInterface

IExtensionInterface with details for uploading the extension.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
CustomFieldModel model = new CustomFieldModel("FILE_PATH", "FILE_CONTENT_TYPE", "TITLE", "DATA_TYPE");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension().UploadAsync(model);

ExtensionModel

Extension model for creating or updating extensions.

NameTypeDescription

Config (required)

string

Config for the extension.

DataType

string

DataType for the extension.

Multiple

bool

Set true for multiple extension.

Scope

ExtensionScope

Scope for the extension.

Src

string

Source code for the extension.

Srcdoc

string

Doc for the extension.

Tags

List<string>

List of tags to be added to extension.

Title

string

Extension title for giving name to extension.

Type

string

Extension type like custom field, widget, or dashboard.

ExtensionScope

Scope model for adding scope to the extensions.

NameTypeDescription

ContentTypes (required)

List<string>

List of content type for extension scope

Folder

Model to create or update label.

Create

The Create a folder call is used to create an asset folder and/or add a parent folder to it.

Returns:
Type
ContentstackResponse
NameTypeDescription

name (required)

string

Name for folder to be updated to.

parentUid

string

Parent uid for the folder to be moved.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Folder().Create("<FOLDER_NAME>");

CreateAsync

The Create a folder call is used to create an asset folder and/or add a parent folder to it.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

name (required)

string

Name for folder to be updated to.

parentUid

string

Parent uid for the folder to be moved.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().Folder().CreateAsync("<FOLDER_NAME>");

Delete

The Delete a folder call is used to delete an asset folder along with all the assets within that folder.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Asset().Folder("<ASSET_UID>").Delete(model);

DeleteAsync

The Delete a folder call is used to delete an asset folder along with all the assets within that folder.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Asset().Folder("<ASSET_UID>").DeleteAsync(model);

Fetch

The Get a single folder call gets the comprehensive details of a specific asset folder by means of folder UID.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Asset().Folder("<ASSET_UID>").Fetch(model);

FetchAsync

The Get a single folder call gets the comprehensive details of a specific asset folder by means of folder UID.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Asset().Folder("<ASSET_UID>").FetchAsync(model);

Update

The Update or move folder request can be used either to update the details of a folder or set the parent folder if you want to move a folder under another folder.

Returns:
Type
ContentstackResponse
NameTypeDescription

name (required)

string

Name for folder to be updated to.

parentUid

string

Parent uid for the folder to be moved.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").Update("<FOLDER_NAME>");

UpdateAsync

The Update or move folder request can be used either to update the details of a folder or set the parent folder if you want to move a folder under another folder.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

name (required)

string

Name for folder to be updated to.

parentUid

string

Parent uid for the folder to be moved.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").UpdateAsync("<FOLDER_NAME>");

FolderRules

Model to create or update label.

NameTypeDescription

Folders

List<string>

List of folders for adding rules.

Module

string

GlobalField

You can define a Global Field as a reusable field (or a group of fields) that you define once and use in any content type within your stack.

Create

The Create global field with JSON RTE request shows you how to add a JSON RTE field while creating a global field.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ContentModelling

Content Model for updating GlobalField.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModeling model = new ContentModeling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").GlobalField().Create(model);

CreateAsync

The Create global field with JSON RTE request shows you how to add a JSON RTE field while creating a global field.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ContentModelling

Content Model for updating GlobalField.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModeling model = new ContentModeling();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").GlobalField().CreateAsync(model);

Delete

The Delete Content Type call deletes an existing global field and all the entries within it.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").GlobalField("<GLOBAL_FIELD_UID>").Delete();

DeleteAsync

The Delete Content Type call deletes an existing global field and all the entries within it.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").GlobalField("<GLOBAL_FIELD_UID>").DeleteAsync();

Fetch

The Fetch a single global fieldcall returns information of a specific global field.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").GlobalField("<GLOBAL_FIELD_UID>").Fetch();

FetchAsync

The Fetch a single global fieldcall returns information of a specific global field.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").GlobalField("<GLOBAL_FIELD_UID>").FetchAsync();

Query

The Query on Global Field will allow to fetch details of all or specific Content Type.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").GlobalField().Query();

Update

The Update Content Type call is used to update the schema of an existing global field.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ContentModelling

Content Model for updating GlobalField.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModeling model = new ContentModeling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").GlobalField("<GLOBAL_FIELD_UID>").Update(model);

UpdateAsync

The Update Content Type call is used to update the schema of an existing global field.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ContentModelling

Content Model for updating GlobalField.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModeling model = new ContentModeling();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").GlobalField("<GLOBAL_FIELD_UID>").UpdateAsync(model);

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.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

LabelMode

Label Model for updating label.

collection

ParameterCollection

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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

LabelMode

Label Model for updating label.

collection

ParameterCollection

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.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Label("<LABEL_UID>").Delete();

DeleteAsync

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

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Label("<LABEL_UID>").DeleteAsync();

Fetch

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

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Label("<LABEL_UID>").Fetch();

FetchAsync

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

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Label("<LABEL_UID>").FetchAsync();

Query

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

Returns:
Type
Query
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.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

LabelMode

Label Model for updating label.

collection

ParameterCollection

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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

LabelMode

Label Model for updating label.

collection

ParameterCollection

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);

LabelModel

Model to create or update label.

NameTypeDescription

ContentTypes (required)

List<string>

List of content type to be added in label.

Name

string

Name for the Label to be created/updated.

Parent

List<string>

Locale

CreateAsync

This call lets you add a new language to your stack. You can either add a supported language or a custom language of your choice.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

LocaleModel

Locale Model for creating locale.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale().CreateAsync(model);

Delete

The Delete language call deletes an existing language from your stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Locale("<LOCALE_CODE>").Delete();

DeleteAsync

The Delete language call deletes an existing language from your stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Locale("<LOCALE_CODE>").DeleteAsync();

Fetch

The Get a language call returns information about a specific language available on the stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Locale("<LOCALE_CODE>").Fetch();

FetchAsync

The Get a language call returns information about a specific language available on the stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Locale("<LOCALE_CODE>").FetchAsync();

Query

The Query on locale allow to get the list of all languages (along with the language codes) available for a stack.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Locale().Query();

Update

The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

LocaleModel

Locale Model for creating locale.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Locale("LOCALE_CODE>").Update(model);

UpdateAsync

The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

LocaleModel

Locale Model for creating locale.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale("LOCALE_CODE>").UpdateAsync(model);

LocaleModel

NameTypeDescription

Name

string

Locale Name

Code

string

Locale code for creating or updating the locale

FallbackLocale

string

Fallback locale to fallback when entry is not present in current locale

LocalesUrl

NameTypeDescription

Locale

string

Url

string

Option

NameTypeDescription

IsPage

bool

Singleton

bool

SubTitle

List<string>

Title

string

UrlPattern

string

UrlPrefix

string

Organization

Organization is the top-most entity in the hierarchy of entities in Contentstack. Users, stacks—and consequently, the resources within the stacks—are part of an Organization. As a result, an Organization lets you manage users and stacks from one administrative panel.

AddUser

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

Returns:
Type
ContentstackResponse
NameTypeDescription

orgInvite (required)

List<UserInvitation>

List of User invitation.

stackInvite

Dictionary<string, List<UserInvitation>>

Stack Uid with user invitation details.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>")
.AddUser(
new System.Collections.Generic.List<UserInvitation>()
    {
        invitation
    },
 new Dictionary<string, List<UserInvitation>> ()
    {
          "<STACK_UID>"= invitation
    }
 );

AddUserAsync

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

orgInvite (required)

List<UserInvitation>

List of User invitation.

stackInvite

Dictionary<string, List<UserInvitation>>

Stack Uid with user invitation details.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>")
.AddUserAsync(
new System.Collections.Generic.List<UserInvitation>()
    {
        invitation
    },
 new Dictionary<string, List<UserInvitation>> ()
    {
          "<STACK_UID>"= invitation
    }
 );

GetInvitations

The Get all organization invitations call gives you a list of all the Organization invitations.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").GetInvitations();

GetInvitationsAsync

The Get all organization invitations call gives you a list of all the Organization invitations.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").GetInvitationsAsync();

GetOrganizations

The Get all/single organizations call lists all organizations related to the system user in the order that they were created.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization().GetOrganizations();

GetOrganizationsAsync

The Get all/single organizations call lists all organizations related to the system user in the order that they were created.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization().GetOrganizationsAsync();

GetStacks

The get Stacks call gets all the Stack within the Organization.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").GetStacks();

GetStacksAsync

The get Stacks call gets all the Stack within the Organization.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").GetStacksAsync();

RemoveUser

The Remove users from organization request allows you to remove existing users from your organization.

Returns:
Type
ContentstackResponse
NameTypeDescription

emails

List<string>

List of emails to be remove from the Organization.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").RemoveUser(new List() { "<EMAIL>" });

RemoveUserAsync

The Remove users from organization request allows you to remove existing users from your organization.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

emails

List<string>

List of emails to be remove from the Organization.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").RemoveUserAsync(new List() { "<EMAIL>" });

ResendInvitation

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation. Only the owner or the admin of the Organization can resend the invitation to add users to an Organization.

Returns:
Type
ContentstackResponse
NameTypeDescription

shareUid

string

Uid for share invitation send to user.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").ResendInvitation("<SHARE_UID>");

ResendInvitationAsync

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation. Only the owner or the admin of the Organization can resend the invitation to add users to an Organization.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

shareUid

string

Uid for share invitation send to user.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").ResendInvitationAsync("<SHARE_UID>");

Roles

The Get all roles in an organization call gives the details of all the roles that are set to users in an Organization.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").Roles();

RolesAsync

The Get all roles in an organization call gives the details of all the roles that are set to users in an Organization.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query Parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").RolesAsync();

TransferOwnership

The Transfer organization ownership call transfers the ownership of an Organization to another user.

Returns:
Type
ContentstackResponse
NameTypeDescription

email

string

The email id of user for transfer.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").TransferOwnership("<EMAIL>");

TransferOwnershipAsync

The Transfer organization ownership call transfers the ownership of an Organization to another user.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

email

string

The email id of user for transfer.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").TransferOwnershipAsync("<EMAIL>");

PublishQueue

When the Content Manager publishes an entry and/or asset, the system puts the action into a publish queue. Publish/unpublish activities in this queue are performed one at a time, almost at a high speed.

Cancel

The Cancel Scheduled Action request will allow you to cancel any scheduled publishing or unpublishing activity of entries and/or assets and also cancel the deployment of releases.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").PublishQueue("<PUBLISH_QUEUE_UID>").Cancel();

CancelAsync

The Cancel Scheduled Action request will allow you to cancel any scheduled publishing or unpublishing activity of entries and/or assets and also cancel the deployment of releases.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").PublishQueue("<PUBLISH_QUEUE_UID>").CancelAsync();

Fetch

The Get publish queue activity request returns comprehensive information on a specific publish, unpublish, or delete action that was performed on an entry and/or asset. You can also retrieve details of a specific release deployment.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").PublishQueue("<PUBLISH_QUEUE_UID>").Fetch();

FetchAsync

The Get publish queue activity request returns comprehensive information on a specific publish, unpublish, or delete action that was performed on an entry and/or asset. You can also retrieve details of a specific release deployment.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").PublishQueue("<PUBLISH_QUEUE_UID>").FetchAsync();

FindAll

The Get publish queue request returns comprehensive information on activities such as publish, unpublish, and delete that have performed on entries and/or assets. This request also includes the details of the release deployments in the response body.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").PublishQueue().FindAll();

FindAllAsync

The Get publish queue request returns comprehensive information on activities such as publish, unpublish, and delete that have performed on entries and/or assets. This request also includes the details of the release deployments in the response body.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").PublishQueue().FindAllAsync();

PublishRule

Publish Rules are conditions that you define for your content publishing. It allows you to govern whether entries can be published with or without someone’s approval or only when the content is at a particular stage.

Create

The Create Publish Rules request allows you to create publish rules for the workflow of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

PublishRuleModel

PublishRule Model for creating rule.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule().CreateAsync(model);

CreateAsync

The Create Publish Rules request allows you to create publish rules for the workflow of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

PublishRuleModel

PublishRule Model for creating rule.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule().CreateAsync(model);

Delete

The Delete Publish Rules request allows you to delete an existing publish rule.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Delete();

DeleteAsync

The Delete Publish Rules request allows you to delete an existing publish rule.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").DeleteAsync();

Fetch

The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Fetch();

FetchAsync

The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").FetchAsync();

FindAll

The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Workflow().PublishRule().FindAll();

FindAllAsync

The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Workflow().PublishRule().FindAllAsync();

Update

The Update Publish Rules request allows you to add a publish rule or update the details of the existing publish rules of a workflow.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

PublishRuleModel

PublishRule Model for updating Content Type.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Update(model);

UpdateAsync

The Update Publish Rules request allows you to add a publish rule or update the details of the existing publish rules of a workflow.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

PublishRuleModel

PublishRule Model for updating Content Type.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").UpdateAsync(model);

PublishRuleModel

Set rules for publishing entry/asset.

NameTypeDescription

Actions (required)

List<string>

Set list action for publishing rules.

Approvers (required)

Approvals

Approval details for publish rule

Branches

List<string>

List of branches for the publish rule to be applied.

ContentTypes

List<string>

List of content types the publish rule to be applied.

DisableApproval

bool

Set true to disable approvals.

Environment

string

Set environment for the publish rule

Locale

string

Set locale for the publish rules.

WorkflowStageUid

string

Set workflow stage uid for the publish rules.

WorkflowUid

string

Set workflow uid for the publish rules.

PublishUnpublishDetails

Publish rule details for publish or un-publish entry or asset

NameTypeDescription

Environments (required)

List<string>

List of environment for publishing/un-publishing entry/asset.

Locales (required)

List<string>

List of locales for the publish details.

ScheduledAt

string

Set date time for scheduling the publish/un-publish.

Version

string

Set specific version for publish/un-publish.

Release

You can define a “Release” as a set of entries and assets that needs to be deployed (published or unpublished) all at once to a particular environment.

Clone

The Clone request allows you to clone (make a copy of) a specific Release in a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

name (required)

string

Name for the release to be cloned.

description

string

Description for the release to be cloned.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Clone("<NAME>", "<DESCRIPTION>");

CloneAsync

The Clone request allows you to clone (make a copy of) a specific Release in a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

name (required)

string

Name for the release to be cloned.

description

string

Description for the release to be cloned.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").CloneAsync("<NAME>", "<DESCRIPTION>");

Create

The Create request allows you to create a new Release in your stack. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ReleaseModel

Release Model for creating ReleaseModel.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseModel model = new ReleaseModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release().Create(model);

CreateAsync

The Create request allows you to create a new Release in your stack. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ReleaseModel

Release Model for creating ReleaseModel.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseModel model = new ReleaseModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release().CreateAsync(model);

Delete

The Delete request allows you to delete a specific Release from a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Release("<RELEASE_UID>").Delete();

DeleteAsync

The Delete request allows you to delete a specific Release from a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Release("<RELEASE_UID>").DeleteAsync();

Deploy

The Fetch request gets the details of a specific Release in a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model

DeployModel

DeployModel details to deploy the release.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeployModel model = new DeployModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Deploy(model);;

DeployAsync

The Fetch request gets the details of a specific Release in a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model

DeployModel

DeployModel details to deploy the release.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeployModel model = new DeployModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").DeployAsync(model);;

Fetch

The Fetch request gets the details of a specific Release in a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Release("<RELEASE_UID>").Fetch();

FetchAsync

The Fetch request gets the details of a specific Release in a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Release("<RELEASE_UID>").FetchAsync();

Item

The list of all items (entries and assets) that are part of a specific Release.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItem item = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item();

Query

The Query on ReleaseModel request retrieves a list of all Releases of a stack along with details of each Release.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Release().Query();

Update

The Update call allows you to update the details of a Release, i.e., the ‘name’ and ‘description’.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ReleaseModel

Release Model for creating ReleaseModel.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseModel model = new ReleaseModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Update(model);

UpdateAsync

The Update call allows you to update the details of a Release, i.e., the ‘name’ and ‘description’.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ReleaseModel

Release Model for creating ReleaseModel.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseModel model = new ReleaseModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").UpdateAsync(model);

ReleaseItemModel

ReleaseItem for create or update release items.

Create

The Create request allows you to add an item (entry or asset) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ReleaseItemModel

ReleaseItem Model for creating ReleaseItem.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().Create(model);

CreateAsync

The Create request allows you to add an item (entry or asset) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

ReleaseItemModel

ReleaseItem Model for creating ReleaseItem.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().CreateAsync(model);

CreateMultiple

The Create request allows you to add multiple items (entries and/or assets) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

Returns:
Type
ContentstackResponse
NameTypeDescription

models (required)

List<ReleaseItemModel>

List of ReleaseItem Model for creating ReleaseItem.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().CreateMultiple(models);

CreateMultipleAsync

The Create request allows you to add multiple items (entries and/or assets) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

models (required)

List<ReleaseItemModel>

List of ReleaseItem Model for creating ReleaseItem.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().CreateMultipleAsync(models);

Delete

The Delete request deletes one or more items (entries and/or assets) from a specific Release.

Returns:
Type
ContentstackResponse
NameTypeDescription

models (required)

List<ReleaseItemModel>

List of ReleaseItemModel to be deleted.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item("<RELEASE_ITEM_UID>").Delete(models);

DeleteAsync

The Delete request deletes one or more items (entries and/or assets) from a specific Release.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

models (required)

List<ReleaseItemModel>

List of ReleaseItemModel to be deleted.

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item("<RELEASE_ITEM_UID>").DeleteAsync(models);

GetAll

The Get all request retrieves a list of all items (entries and assets) that are part of a specific Release.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Release("<RELEASE_UID>").Item().GetAll();

GetAllAsync

The Get all request retrieves a list of all items (entries and assets) that are part of a specific Release.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Release("<RELEASE_UID>").Item().GetAllAsync();

UpdateReleaseItem

The Update Release items to their latest versions request let you update all the release items (entries and assets) to their latest versions before deployment.

Returns:
Type
ContentstackResponse
NameTypeDescription

items (required)

List<String>

Release items to update or "$all" for updating all release items.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> items = new List<string>(){
  "<$all>"
}
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().UpdateReleaseItem(model);

UpdateReleaseItemAsync

The Update Release items to their latest versions request let you update all the release items (entries and assets) to their latest versions before deployment.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

items (required)

List<String>

Release items to update or "$all" for updating all release items.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> items = new List<string>(){
  "<$all>"
}
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().UpdateReleaseItemAsync(items);

ReleaseItemModel

ReleaseItemModel for create or update release.

NameTypeDescription

Uid

string

Entry or asset uid.

Action

string

Release item action.

ContentTypeUID

string

Entry content type uid

Locale

string

Entry locale

Version

string

Entry version to be release.

ReleaseModel

ReleaseModel for create or update release.

NameTypeDescription

Name

string

Release name to be set.

Description

string

Release description to be set.

Archived

bool

Set true to archive release

Locked

bool

Set true to lock the release content.

Role

A Role is a collection of permissions that applies to all the users who are assigned to it. Using Roles, you can assign permissions to a group of users rather than assigning permissions individually.

Create

The Create request creates a new role in a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

RoleModel

Role Model for creating Role.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").Create(model);

CreateAsync

The Create request creates a new role in a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

RoleModel

Role Model for creating Role.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").CreateAsync(model);

Delete

The Delete call deletes an existing role from your stack

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Role("<ROLE_UID>").Delete();

DeleteAsync

The Delete call deletes an existing role from your stack

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Role("<ROLE_UID>").DeleteAsync();

Fetch

The Fetch request returns comprehensive information on a specific role.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Role("<ROLE_UID>").Fetch();

FetchAsync

The Fetch request returns comprehensive information on a specific role.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Role("<ROLE_UID>").FetchAsync();

Query

The Query on Role request returns comprehensive information about all roles created in a stack.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Role().Query();

Update

The Update request creates a new role in a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

RoleModel

Role Model for creating Role.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);

UpdateAsync

The Update request creates a new role in a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

RoleModel

Role Model for creating Role.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);

RoleModel

RoleModel for create or update roles.

NameTypeDescription

Name

string

Role name to be set.

Description

string

Role description to be set.

Rules

List<Rule>

List of rules added to the role.

DeployContent

bool

Set true to deploy the rule content.

Rule

Base class for all rules in stack.

NameTypeDescription

ACL

string

ACL for the rule

Restrict

bool

Set true to restrict rule.

Server

Server for the webhook

NameTypeDescription

Name

string

Server name.

Stack

A stack is a repository or a container that holds all the content/assets of your site. It allows multiple users to create, edit, approve, and publish their content within a single space.

NameTypeDescription

APIKey

string

Stack API key.

Branch

string

Stack branch if present.

ManagementToken

string

Stack management token.

AddSettings

The Add stack settings request lets you add additional settings for your existing stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

settings (required)

StackSettings

Stack settings details.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>")
.AddSettings(settings);

AddSettingsAsync

The Add stack settings request lets you add additional settings for your existing stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

settings (required)

StackSettings

Stack settings details.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>")
.AddSettingsAsync(settings);

Asset

Asset refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.

Returns:
Type
Asset
NameTypeDescription

uid

string

Optional, asset uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Asset asset = client.stack("<API_KEY>").Asset("<UID>");

AuditLog

A AuditLog displays a record of all the activities performed in a stack and helps you keep a track of all published items, updates, deletes, and current status of the existing content.

Returns:
Type
AuditLog
NameTypeDescription

uid

string

Optional, content type uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AuditLog auditLog = client.stack("<API_KEY>").AuditLog("<UID>");

ContentType

ContentType defines the structure or schema of a page or a section of your web or mobile property. To create content for your application, you are required to first create a content type, and then create entries using the content type.

Returns:
Type
ContentType
NameTypeDescription

uid

string

Optional, content type uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentType contentType = client.stack("<API_KEY>").ContentType("<UID>");

Create

The Create stack call creates a new stack in your Contentstack account.

Returns:
Type
ContentstackResponse
NameTypeDescription

name (required)

string

The name for Stack.

masterLocale (required)

string

The Master Locale for Stack

organisationUid (required)

string

The Organization Uid in which you want to create Stack.

description

string

The description for the Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Create("<STACK_NAME>", "<LOCALE>", "<ORG_UID>", "<DESCRIPTION>");

CreateAsync

The Create stack call creates a new stack in your Contentstack account.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

name (required)

string

The name for Stack.

masterLocale (required)

string

The Master Locale for Stack

organisationUid (required)

string

The Organization Uid in which you want to create Stack.

description

string

The description for the Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.CreateAsync("<STACK_NAME>", "<LOCALE>", "<ORG_UID>", "<DESCRIPTION>");

DeliveryToken

You can use DeliveryToken to authenticate Content Delivery API (CDA) requests and retrieve the published content of an environment.

Returns:
Type
Environment
NameTypeDescription

uid

string

Optional, delivery token uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeliveryToken deliveryToken = client.stack("<API_KEY>").DeliveryToken("<UID>");

Environment

A publishing Environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published.

Returns:
Type
Environment
NameTypeDescription

uid

string

Optional, extension uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Environment environment = client.stack("<API_KEY>").Environment("<UID>");

Extension

Extension let you create custom fields and custom widgets that lets you customize Contentstack's default UI and behavior.

Returns:
Type
Extension
NameTypeDescription

uid

string

Optional, extension uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Extension extension = client.stack("<API_KEY>").Extension("<UID>");

Fetch

The Get a single stack call fetches comprehensive details of a specific stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Fetch();

FetchAsync

The Get a single stack call fetches comprehensive details of a specific stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").FetchAsync();

GetAll

The Get all stacks call fetches the list of all stacks owned by and shared with a particular user account.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack().GetAll();

GetAllAsync

The Get all stacks call fetches the list of all stacks owned by and shared with a particular user account.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

Query parameter collection

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack().GetAllAsync();

GlobalField

A GlobalField is a reusable field (or group of fields) that you can define once and reuse in any content type within your stack. This eliminates the need (and thereby time and efforts) to create the same set of fields repeatedly in multiple content types.

Returns:
Type
GlobalField
NameTypeDescription

uid

string

Optional, global field uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
GlobalField globalField = client.stack("<API_KEY>").GlobalField("<UID>");

Label

Label allow you to group a collection of content within a stack. Using labels you can group content types that need to work together.

Returns:
Type
Label
NameTypeDescription

uid

string

Optional, label uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Label label = client.stack("<API_KEY>").Label("<UID>");

Locale

Contentstack has a sophisticated multilingual capability. It allows you to create and publish entries in any language.

Returns:
Type
Locale
NameTypeDescription

code

string

Optional, locale code.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Locale locale = client.stack("<API_KEY>").Locale("<CODE>");

ManagementTokens

You can use ManagementToken to authenticate Content Management API (CMA) requests over your stack content.

Returns:
Type
ManagementToken
NameTypeDescription

uid

string

Optional, management uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ManagementToken managementTokens = client.stack("<API_KEY>").ManagementTokens("<UID>");

PublishQueue

A PublishQueue displays the historical and current details of activities such as publish, unpublish, or delete that can be performed on entries and/or assets. It also shows details of Release deployments. These details include time, entry, content type, version, language, user, environment, and status.

Returns:
Type
PublishQueue
NameTypeDescription

uid

string

Optional, publish queue uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishQueue PublishQueue = client.stack("<API_KEY>").PublishQueue("<UID>");

Release

A Release is a set of entries and assets that needs to be deployed (published or unpublished) all at once to a particular environment.

Returns:
Type
Release
NameTypeDescription

uid

string

Optional, release uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Release release = client.stack("<API_KEY>").Release("<UID>");

ResetSettings

The Reset stack settings call resets your stack to default settings, and additionally, lets you add parameters to or modify the settings of an existing stack.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.ResetSettings();

ResetSettingsAsync

The Reset stack settings call resets your stack to default settings, and additionally, lets you add parameters to or modify the settings of an existing stack.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.ResetSettingsAsync();

Role

A Role collection of permissions that will be applicable to all the users who are assigned this role.

Returns:
Type
Role
NameTypeDescription

uid

string

Optional, role uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Role role = client.stack("<API_KEY>").Role("<WORKFLOW_UID>");

Settings

The Get stack settings call retrieves the configuration settings of an existing stack.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Settings();

SettingsAsync

The Get stack settings call retrieves the configuration settings of an existing stack.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.SettingsAsync();

Share

The Share a stack call shares a stack with the specified user to collaborate on the stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

email (required)

string

User email to be shared stack access.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Share(
  new List() {
      invitation
  }
);

ShareAsync

The Share a stack call shares a stack with the specified user to collaborate on the stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

invitations (required)

List<UserInvitation>

List of user email with roles to be assign from Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.ShareAsync(
  new List() {
      invitation
  }
);

TransferOwnership

The Transfer stack ownership to other users call sends the specified user an email invitation for accepting the ownership of a particular stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

email (required)

string

User email to transfer the stack ownership.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.TransferOwnership("<EMAIL>");

TransferOwnershipAsync

The Transfer stack ownership to other users call sends the specified user an email invitation for accepting the ownership of a particular stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

email (required)

string

User email to transfer the stack ownership.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.TransferOwnershipAsync("<EMAIL>");

UnShare

The Unshare a stack call unshares a stack with a user and removes the user account from the list of collaborators.

Returns:
Type
ContentstackResponse
NameTypeDescription

email (required)

string

User email to be removed from stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.UnShare("<EMAIL>");

UnShareAsync

The Unshare a stack call unshares a stack with a user and removes the user account from the list of collaborators.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

email (required)

string

User email to be removed from stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.UnShareAsync("<EMAIL>");

Update

The Update stack call lets you update the name and description of an existing stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

name (required)

string

The name for Stack.

description

string

The description for the Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Update("<STACK_NAME>", "<DESCRIPTION>");

UpdateAsync

The Update stack call lets you update the name and description of an existing stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

name (required)

string

The name for Stack.

description

string

The description for the Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.UpdateAsync("<STACK_NAME>", "<DESCRIPTION>");

UpdateUserRole

The Update User Role API Request updates the roles of an existing user account.

Returns:
Type
ContentstackResponse
NameTypeDescription

usersRole (required)

List<UserInvitation>

List of user and roles to be assigned in Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Uid = "<USER_ID>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.UpdateUserRole(
  new List<UserInvitation>() {
     invitation
  }
);

UpdateUserRoleAsync

The Update User Role API Request updates the roles of an existing user account.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

usersRole (required)

List<UserInvitation>

List of user and roles to be assigned in Stack.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Uid = "<USER_ID>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.UpdateUserRoleAsync(
  new List<UserInvitation>() {
     invitation
  }
);

Webhook

A Webhook a mechanism that sends real-time information to any third-party app or service to keep your application in sync with your Contentstack account.

Returns:
Type
Webhook
NameTypeDescription

uid

string

Optional, webhook uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Webhook webhook = client.stack("<API_KEY>").Webhook("<UID>");

Workflow

A Workflow is a tool that allows you to streamline the process of content creation and publishing, and lets you manage the content lifecycle of your project smoothly.

Returns:
Type
Workflow
NameTypeDescription

uid

string

Optional, workflow uid.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Workflow workflow = client.stack("<API_KEY>").Workflow("<WORKFLOW_UID>");

StackSettings

Stack settings for adding custom settings.

NameTypeDescription

DiscreteVariables

Dictionary<string, object>

DiscreteVariables to add in stack settings

Rte

Dictionary<string, object>

StackVariables

Dictionary<string, object>

Stack variables for adding into stack

User

User session consists of calls that will help you to sign in and sign out of your Contentstack account.

ForgotPassword

The Forgot password call sends a request for a temporary password to log in to an account in case a user has forgotten the login password.

Returns:
Type
ContentstackResponse
NameTypeDescription

email (required)

string

The email for the account that user has forgotten the login password

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.ForgotPassword("<EMAIL>");

ForgotPasswordAsync

The Forgot password call sends a request for a temporary password to log in to an account in case a user has forgotten the login password.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

email (required)

string

The email for the account that user has forgotten the login password

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.ForgotPasswordAsync("<EMAIL>");

ResetPassword

The Reset password call sends a request for resetting the password of your Contentstack account.

Returns:
Type
ContentstackResponse
NameTypeDescription

resetToken (required)

string

The reset password token send to email.

password (required)

string

The password for the account.

confirmPassword (required)

string

The confirm password for the account.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.ResetPassword("<RESET_TOKEN>", "<PASSWORD>", "<CONFIRM_PASSWORD>");

ResetPasswordAsync

The Reset password call sends a request for resetting the password of your Contentstack account.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

resetToken (required)

string

The reset password token send to email.

password (required)

string

The password for the account.

confirmPassword (required)

string

The confirm password for the account.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.ResetPasswordAsync("<RESET_TOKEN>", "<PASSWORD>", "<CONFIRM_PASSWORD>");

UserInvitation

User invitation model to invite user to stacks or organisations.

NameTypeDescription

Email

string

User email for invitation to be sent.

Roles

List<string>

Roles from stack/organization to be assigned to user.

Version

Version naming allows you to assign a name to a version of an entry/asset for easy identification.

Delete

The Delete Version Name of Entry/Asset request allows you to delete the name assigned to a specific version of an entry/asset. This request resets the name of the entry/asset version to the version number.

Returns:
Type
ContentstackResponse
NameTypeDescription

locale

string

Locale for the entry version to be deleted

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").Delete();

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").Delete();

DeleteAsync

The Delete Version Name of Entry/Asset request allows you to delete the name assigned to a specific version of an entry/asset. This request resets the name of the entry/asset version to the version number.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

locale

string

Locale for the entry version to be deleted

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").DeleteAsync();

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").DeleteAsync();

GetAll

The Get Details of All Versions of an Entry request allows you to retrieve the details of all the versions of an entry.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").GetAll();

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").GetAll();

GetAllAsync

The Get Details of All Versions of an Entry request allows you to retrieve the details of all the versions of an entry.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").GetAllAsync();

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").GetAllAsync();

SetName

The Set Version Name for Entry/Asset request allows you to assign a name to a specific version of an entry/asset.

Returns:
Type
ContentstackResponse
NameTypeDescription

name

string

Version name to be assigned to entry/asset.

locale

string

Locale for the version.

force

bool

Set true to force update the version name of the master entry.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").SetName("<VERSION_NAME>");

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").SetName("<VERSION_NAME>");

SetNameAsync

The Set Version Name for Entry/Asset request allows you to assign a name to a specific version of an entry/asset.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

name

string

Version name to be assigned to entry/asset.

locale

string

Locale for the version.

force

bool

Set true to force update the version name of the master entry.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").SetNameAsync("<VERSION_NAME>");

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").SetNameAsync("<VERSION_NAME>");

Workflow

A webhook is a user-defined HTTP callback. It is a mechanism that sends real-time information to any third-party app or service.

Create

The Create a webhook request allows you to create a new webhook in a specific stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

WebhookModel

Webhook Model for creating Webhook.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Create(model);

CreateAsync

The Create a webhook request allows you to create a new webhook in a specific stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

WebhookModel

Webhook Model for creating Webhook.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").CreateAsync(model);

Delete

The Delete webhook call deletes an existing webhook from a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Webhook("<WEBHOOK_UID>").Delete();

DeleteAsync

The Delete webhook call deletes an existing webhook from a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Webhook("<WEBHOOK_UID>").DeleteAsync();

Executions

The Get executions of a webhook request allows you to fetch the execution details of a specific webhook, which includes the execution UID.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Webhook("<WEBHOOK_UID>").Executions();

ExecutionsAsync

The Get executions of a webhook request allows you to fetch the execution details of a specific webhook, which includes the execution UID.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Webhook("<WEBHOOK_UID>").ExecutionsAsync();

Fetch

The Fetch webhook request returns comprehensive information on a specific webhook.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Webhook("<WEBHOOK_UID>").Fetch();

FetchAsync

The Fetch webhook request returns comprehensive information on a specific webhook.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Webhook("<WEBHOOK_UID>").FetchAsync();

Logs

This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.

Returns:
Type
ContentstackResponse
NameTypeDescription

executionUid

string

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Logs("<EXECUTION_UID>");

LogsAsync

This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

executionUid

string

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").LogsAsync("<EXECUTION_UID>");

Query

The Query Webhooks request returns comprehensive information on all the available webhooks in the specified stack.

Returns:
Type
Query
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Webhook().Query();

Retry

This call makes a manual attempt to execute a webhook after the webhook has finished executing its automatic attempts.

Returns:
Type
ContentstackResponse
NameTypeDescription

executionUid

string

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Retry("<EXECUTION_UID>");

RetryAsync

This call makes a manual attempt to execute a webhook after the webhook has finished executing its automatic attempts.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

executionUid

string

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").RetryAsync("<EXECUTION_UID>");

Update

The Update webhook request allows you to update the details of an existing webhook in the stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

WebhookModel

Webhook Model for creating Webhook.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Update(model);

UpdateAsync

The Update webhook request allows you to update the details of an existing webhook in the stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

WebhookModel

Webhook Model for creating Webhook.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").UpdateAsync(model);

WebhookModel

WebhookModel for creating or updating webhook.

NameTypeDescription

Name

string

Name for the webhook.

Branches

List<string>

List of branches to be added for the webhook.

Channels

List<string>

List of channels on which webhook to be triggerd.

ConcisePayload

bool

Set true if required concise payload.

destinations

List<WebhookTarget>

List of webhook target to be triggerd.

Disabled

bool

Set true for disabling the webhook.

RetryPolicy

string

Set retry policy to perform retry on when webhook is failed.

WebhookTarget

WebhookTarget for creating or updating webhook.

NameTypeDescription

CustomHeader

List<Dictionary<string, object>>

List of custom header to be added in webhook.

HttpBasicAuth

string

Basic auth for the http request.

HttpBasicPassword

string

Http Password if required to authorize target.

TargetUrl

string

Target url for the request to be triggered.

Workflow

A workflow is an order of steps to define the roadmap for a process. This enables users to maintain a systematic approach for reviewing and approving content.

Create

The Create Workflow request allows you to create a Workflow.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

WorkflowModel

Workflow Model for updating Content Type.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WorkflowModel model = new WorkflowModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().Create(model);

CreateAsync

The Create Workflow request allows you to create a Workflow.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

WorkflowModel

Workflow Model for updating Content Type.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WorkflowModel model = new WorkflowModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().CreateAsync(model);

Delete

The Delete Workflow request allows you to delete a workflow.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Workflow("<WORKFLOW_UID>").Delete();

DeleteAsync

The Delete Workflow request allows you to delete a workflow.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Workflow("<WORKFLOW_UID>").DeleteAsync();

Disable

The Disable Workflow request allows you to disable a workflow.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").Disable();

DisableAsync

The Disable Workflow request allows you to disable a workflow.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").DisableAsync();

Enable

The Enable Workflow request allows you to enable a workflow.

Returns:
Type
ContentstackResponse
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").Enable();

EnableAsync

The Enable Workflow request allows you to enable a workflow.

Returns:
Type
Task<ContentstackResponse>
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").EnableAsync();

Fetch

The fetch Workflow request retrieves the comprehensive details of a specific Workflow of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Workflow("<WORKFLOW_UID>").Fetch();

FetchAsync

The fetch Workflow request retrieves the comprehensive details of a specific Workflow of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Workflow("<WORKFLOW_UID>").FetchAsync();

FindAll

The Get all Workflows request retrieves the details of all the Workflows of a stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

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>").Workflow().FindAll();

FindAllAsync

The Get all Workflows request retrieves the details of all the Workflows of a stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

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>").Workflow().FindAllAsync();

GetPublishRule

The Get Publish Rules by Content Types request allows you to retrieve details of a Publish Rule applied to a specific content type of your stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

contentType (required)

string

ContentType for getting publish rules.

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>").Workflow().GetPublishRule("CONTENT_TYPE_UID")

GetPublishRuleAsync

The Get Publish Rules by Content Types request allows you to retrieve details of a Publish Rule applied to a specific content type of your stack.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

contentType (required)

string

ContentType for getting publish rules.

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>").Workflow().GetPublishRuleAsync("CONTENT_TYPE_UID")

PublishRule

PublishRule is a tool that allows you to streamline the process of content creation and publishing, and lets you manage the content lifecycle of your project smoothly.

Returns:
Type
PublishRule
NameTypeDescription

uid

string

Optional Publish rule uid for performing rule specific operation

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<ENTRY_UID>")

Update

The Update Workflow request allows you to add a workflow stage or update the details of the existing stages of a workflow.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

WorkflowModel

Workflow Model for updating Content Type.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WorkflowModel model = new WorkflowModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").Update(model);

UpdateAsync

The Update Workflow request allows you to add a workflow stage or update the details of the existing stages of a workflow.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

WorkflowModel

Workflow Model for updating Content Type.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WorkflowModel model = new WorkflowModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").UpdateAsync(model);

WorkflowModel

WorkflowModel for creating or updating workflow.

NameTypeDescription

Name

string

Name for the workflow.

AdminUsers

Dictionary<string, object>

Admin user for the workflow.

Branches

List<string>

List of branches for the workflow accessible.

ContentTypes

List<string>

List of content types for the workflow.

Enabled

bool

Set true to enable workflow.

WorkflowStages

List<WorkflowStage>

List of workflow stage for the workflow.

WorkflowStage

WorkflowStage model for creating or updating workflow stages.

NameTypeDescription

Uid

string

Uid for workflow stage.

Name

string

Name for the workflow stage.

Color

string

Color for the workflow stage.

NextAvailableStages

List<string>

List of next workflow stages.

AllStages

bool

Set true if required all stages

AllUsers

bool

Set true for all users.

EntryLock

string

SpecificStages

bool

SpecificUsers

bool

SystemACL

Dictionary<string, object>

CustomFieldModel

CustomFieldModel class for custom field.

NameTypeDescription

Title

string

Title for the custom field.

ContentType

string

File content type.

Tags

string

Tags for the custom field.

CustomFieldModel

CustomFieldModel constructor

Returns:
Type
CustomFieldModel
NameTypeDescription

filePath (required)

String

File path to upload custom field.

contentType (required)

string

Content type for the file to be uploaded.

title (required)

string

Title for the custom field.

tags

string

Tags for the custom field.

Returns:
Type
CustomFieldModel
NameTypeDescription

stream (required)

Stream

File stream for the custom field to be upload.

contentType (required)

string

Content type for the file stream.

title (required)

string

Title for the custom field.

tag

string

Tags for the custom field.

Returns:
Type
CustomFieldModel
NameTypeDescription

bytes (required)

byte[]

Bytes for the file to be uploaded.

contentType (required)

string

Content type for the file bytes.

title (required)

string

Title for the custom field.

tags

string

Tags for the custom field.

Returns:
Type
CustomFieldModel
NameTypeDescription

byteArray (required)

ByteArrayContent

Byte array content of file to be uploaded.

contentType (required)

string

Content type for the file byte content

title (required)

string

Title for the custom field.

tags

string

Tags for the custom field

GetHttpContent

Get http content returns the request body content.

Returns:
Type
HttpContent

CustomWidgetModel

CustomWidgetModel class for custom widget.

NameTypeDescription

Title

string

Title for the custom widget.

ContentType

string

File content type.

Tags

string

Tags for the custom widget.

CustomWidgetModel

CustomWidgetModel constructor

Returns:
Type
CustomWidgetModel
NameTypeDescription

filePath (required)

String

File path to upload custom widget.

contentType (required)

string

Content type for the file to be uploaded.

title (required)

string

Title for the custom widget.

tags

string

Tags for the widget

Returns:
Type
CustomWidgetModel
NameTypeDescription

stream (required)

Stream

File stream for the custom widget to be upload.

contentType (required)

string

Content type for the file stream.

title (required)

string

Title for the custom widget.

tag

string

Tags for the custom widget.

Returns:
Type
CustomWidgetModel
NameTypeDescription

bytes (required)

byte[]

Bytes for the file to be uploaded.

contentType (required)

string

Content type for the file bytes.

title (required)

string

Title for the custom widget.

tags

string

Tags for the custom widget.

Returns:
Type
CustomWidgetModel
NameTypeDescription

byteArray (required)

ByteArrayContent

Byte array content of file to be uploaded.

contentType (required)

string

Content type for the file byte content

title (required)

string

Title for the custom widget.

tags

string

Tags for the custom widget

GetHttpContent

Get http content returns the request body content.

Returns:
Type
HttpContent

DashboardWidgetModel

DashboardWidgetModel class for dashboard widget.

NameTypeDescription

Title

string

Title for the dashboard widget.

ContentType

string

File content type.

Tags

string

Tags for the dashboard widget.

DashboardWidgetModel

DashboardWidgetModel constructor

Returns:
Type
DashboardWidgetModel
NameTypeDescription

filePath (required)

String

File path to upload dashboard widget.

contentType (required)

string

Content type for the file to be uploaded.

title (required)

string

Title for the dashboard widget.

tags

string

Tags for the widget

Returns:
Type
DashboardWidgetModel
NameTypeDescription

stream (required)

Stream

File stream for the dashboard widget to be upload.

contentType (required)

string

Content type for the file stream.

title (required)

string

Title for the dashboard widget.

tag

string

Tags for the dashboard widget.

Returns:
Type
DashboardWidgetModel
NameTypeDescription

bytes (required)

byte[]

Bytes for the file to be uploaded.

contentType (required)

string

Content type for the file bytes.

title (required)

string

Title for the dashboard widget.

tags

string

Tags for the dashboard widget.

Returns:
Type
DashboardWidgetModel
NameTypeDescription

byteArray (required)

ByteArrayContent

Byte array content of file to be uploaded.

contentType (required)

string

Content type for the file byte content

title (required)

string

Title for the dashboard widget.

tags

string

Tags for the dashboard widget

GetHttpContent

Get http content returns the request body content.

Returns:
Type
HttpContent

DateField

DateField class for date field.

NameTypeDescription

StartDate

string

Start date for the date field.

EndDate

string

End date for date field

ExtensionField

Extension class for extension field.

NameTypeDescription

config

Dictionary<string, object>

Configuration for the extension field.

extension_uid

string

Extension field unique id.

Field

Action class for setting action for the field.

NameTypeDescription

DataType

string

Determines what value can be provided to the Title field.

DisplayName

string

Determines the display name of a field. It is a mandatory field.

FieldMetadata

FieldMetadata

Allows you to enter additional data about a field. Also, you can add additional values under ‘field_metadata’.

Mandatory

bool

Set true if field is mandatory.

Multiple

bool

Set true if field value to be multiple.

Uid

string

Represents the unique ID of each field. It is a mandatory field.

Unique

bool

Set true if field value to be unique

FieldMetadata

Metadata details for the field.

NameTypeDescription

AllowRichText

bool

Determines whether the editor will support rich text, and is set to ‘true’ by default for Rich Text Editors.

Default

string

Allows you to set default fields for content types.

DefaultValue

object

Allows you to set a default value for a field.

Description

string

Allows you to provide the content for the Rich text editor field.

Instruction

string

Allows you to add instructions for the content managers while entering values for a field. The instructional text appears below the field.

Markdown

bool

Lets you assign a field to be a markdown by setting its value to ‘true’.

Multiline

bool

Provides multi-line capabilities to the Rich text editor.

Options

List<string>

If you choose the Custom editor, then the options key lets you specify the formatting options you prefer for your RTE toolbar, e.g., "options": ["h3", "blockquote", "sup"]

Placeholder

string

Allows you to provide a hint text about the values that need to be entered in an input field, e.g., Single Line Textbox. This text can be seen inside the field until you enter a value.

RefMultiple

bool

Allows you to set single or multiple reference to Reference field.

RichTextType

string

Lets you enable either the basic, custom, or advanced editor to enter your content.

Version

int

This key determines whether you are using the older version of the Rich Text Editor or the latest version. The value of 1 denotes that it is an older version of the editor, while 3 denotes that it is the latest version of the editor.

Action

Action class for setting action for the field.

NameTypeDescription

state

string

Action state for the field.

TargetField

string

Target field for the action.

Condition

Condition class for setting condition for the field.

NameTypeDescription

DataType

string

Condition for the datatype.

OperandField

string

Operand for the condition.

Operator

string

Operator for condition.

Value

string

Value for the field condition.

FieldRules

Rule for the field in content type.

NameTypeDescription

Actions

List<Action>

List of action for the field rules.

conditions

List<Condition>

List of conditions for the field rules.

MatchType

string

Match type for the field.

FileField

File field class for adding file field in content type.

NameTypeDescription

Extensions

List<string>

List of extension allowed in file field.

GroupField

Group field class for adding group field in content type.

NameTypeDescription

Format

string

Format for the group field.

MaxInstance

int

Max instance for the group filed to be allowed.

Schema

List<Field>

Schema details for the group field.

Block

Block class for adding blocks in modular block field.

NameTypeDescription

Uid

string

UID for the block field.

Title

string

Title for the block field

AutoEdit

bool

Enable auto edit for the block.

BlockType

bool

Set true if block type.

Schema

List<Field>

Schema details for the block field.

ModularBlockField

ModularBlock field class for adding modular block field to content type.

NameTypeDescription

blocks

List<Block>

List of blocks in modular block field.

ReferenceField

Reference field class for adding reference field to content type.

NameTypeDescription

Plugins

List<string>

List of plugins to be added in reference field.

ReferenceTo

object

Set of content type to be added as reference in this field.

SelectEnum

Select field enum types.

NameTypeDescription

Advanced

bool

Set true to select input type of advance.

Choices

List<Dictionary<string, object>>

List of choice to be added in selection of select field.

TextboxField

Select field class for select input field

NameTypeDescription

Enum

SelectEnum

Select enum for field type.

TextboxField

Text box field class for text input field

NameTypeDescription

ErrorMessages

Dictionary<string, string>

Error messages for the field

Format

string

Text field format.

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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

DeliveryTokenModel

Delivery Token Model for creating delivery token.

collection

ParameterCollection

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("<DELIVERY_TOKEN_UID>").Create(model);

CreateAsync

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

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

DeliveryTokenModel

Delivery Token Model for creating delivery token.

collection

ParameterCollection

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>").CreateAsync(model);

Delete

The Delete request deletes a specific delivery token.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

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.

Returns:
Type
ContentstackResponse
NameTypeDescription

collection

ParameterCollection

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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

collection

ParameterCollection

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.

Returns:
Type
Query
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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

DeliveryTokenModel

Delivery Token Model for creating delivery token.

collection

ParameterCollection

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.

Returns:
Type
Task<ContentstackResponse>
NameTypeDescription

model (required)

DeliveryTokenModel

Delivery Token Model for creating delivery token.

collection

ParameterCollection

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);

ManagementToken

Management Tokens are tokens that provide you with read-write access to the content of your stack. It is a credential—used along with the stack API key—to make authorized Content Management API (CMA) requests for managing content of your stack.

Create

The Create request is used to create a management token in a stack. This token provides you with read-write access to the content of your stack.

Returns:
Type
ContentstackResponse
NameTypeDescription

model (required)

ManagementTokenModel

ManagementToken Model for creating ManagementToken.

collection

ParameterCollection

Query parameter collection.

using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Tokens;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ManagementTokenModel model = new ManagementTokenModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ManagementToken("<MANAGEMENT_TOKEN_UID>").Create(model);

CreateAsync

The Create request is used to create a management token in a stack. This token provides you with read-write access to the content of your stack.

Returns:
Type
Task<ContentstackResponse>
<