Stack
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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Fetch();FetchAsync
The Get a single stack call fetches comprehensive details of a specific stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").FetchAsync();GetAll
The Get all stacks call fetches the list of all stacks owned by and shared with a particular user account.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack().GetAll();GetAllAsync
The Get all stacks call fetches the list of all stacks owned by and shared with a particular user account.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack().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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
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.
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.
| Name | Type | Description |
|---|---|---|
| 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.
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.
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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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.
| Name | Type | Description |
|---|---|---|
| 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>");