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.
Contentstack - .Net Management SDK
.NET SDK for Contentstack's Content Management API
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");
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
Name | Type | Description |
---|---|---|
SerializerSettings | JsonSerializerSettings | Get and Set method for de-serialization. |
ContentstackClient
Initializes new instance of the Contentstack.Management.Core.ContentstackClient class.
Name | Type | Description |
---|---|---|
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);
Name | Type | Description |
---|---|---|
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));
Name | Type | Description |
---|---|---|
authtoken | string | The optional Authtoken for making CMA call |
host | string | The optional host name for the API. |
port | int | The optional port for the API |
version | string | The optional version for the API |
disableLogging | bool | The optional to disable or enable logs. |
maxResponseContentBufferSize | long | The optional maximum number of bytes to buffer when reading the response content |
timeout | int | The optional timespan to wait before the request times out. |
retryOnError | bool | The optional retry condition for retrying on error. |
proxyHost | string | Host to use with a proxy. |
proxyPort | int | Port to use with a proxy. |
proxyCredentials | ICredentials | Credentials to use with a proxy. |
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
Name | Type | Description |
---|---|---|
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. |
MaxResponseContentBufferSize | long | Gets or sets the maximum number of bytes to buffer when reading the response content. |
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. |
RetryLimit | int | Returns the flag indicating how many retry HTTP requests an SDK should make for a single SDK operation invocation before giving up. |
RetryOnError | bool | When set to true, the client will retry requests. When set to false, the client will not retry request. |
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. |
Version | string | The Host used to set host url for the Contentstack Management API. |
GetUri
Returns a Uri instance configured in the configuration.
GetWebProxy
Returns a WebProxy instance configured to match the proxy settings in the configuration.
ContentstackClientOptions
Abstract class for Response objects.
Name | Type | Description |
---|---|---|
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.
GetHeaderValue
Gets the value for the header name from HTTP response headers.
Name | Type | Description |
---|---|---|
headerName (required) | string | Header name for which value is needed. |
IsHeaderPresent
Return true if header name present in HTTP response headers.
Name | Type | Description |
---|---|---|
headerName (required) | string | Header name to check if its present. |
OpenJObjectResponse
Json Object format response.
OpenResponse
String format response.
OpenTResponse
Type response to serialize the response.
ContentstackException
A base exception for Contentstack API.
ContentstackException
Gets the header names from HTTP response headers.
Name | Type | Description |
---|---|---|
message | string | The message for the exception to be created. |
innerException | Exception | Inner exception |
ContentstackErrorException
A base exception for Contentstack API.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
Roles | List<string> | List of roles for the approval |
Users | List<string> | List of users for the approval. |
AssetRules
Rules for setting on Assets.
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
Name | string | Role name. |
Uid | string | Unique id for the role. |
AssignUser
User details for assigning for the organization/stack
Name | Type | Description |
---|---|---|
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.
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>").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.
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>").AuditLog("<AUDITLOG_UID>").FetchAsync();
FindAll
The Get audit log request is used to retrieve the audit log of a 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>").AuditLog().FindAll();
FindAllAsync
The Get audit log request is used to retrieve the audit log of a 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>").AuditLog().FindAllAsync();
BranchAliasRules
Rules for setting on branch alias.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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>");
ContentTypeModel model = new ContentTypeModel();
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.
Name | Type | Description |
---|---|---|
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>");
ContentTypeModel model = new ContentTypeModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType().CreateAsync(model);
Delete
The Delete Content Type call deletes an existing content type and all the entries within it.
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>").ContentType("<CONTENT_TYPE_UID>").Delete();
DeleteAsync
The Delete Content Type call deletes an existing content type and all the entries within it.
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>").ContentType("<CONTENT_TYPE_UID>").DeleteAsync();
Fetch
The Fetch a single content type call returns information of a specific content type.
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>").ContentType("<CONTENT_TYPE_UID>").Fetch();
FetchAsync
The Fetch a single content type call returns information of a specific content type.
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>").ContentType("<CONTENT_TYPE_UID>").FetchAsync();
Entry
Entry is the actual piece of content created using one of the defined content types.
Name | Type | Description |
---|---|---|
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.
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.
Name | Type | Description |
---|---|---|
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>");
ContentTypeModel model = new ContentTypeModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Update(model);
UpdateAsync
The Update Content Type call is used to update the schema of an existing content type.
Name | Type | Description |
---|---|---|
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>");
ContentTypeModel model = new ContentTypeModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").UpdateAsync(model);
ContentTypeRules
Rules for setting on content type.
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
model (required) | IEntry | IEntry for createing 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>").Create(model);
CreateAsync
The Create an entry call creates a new entry for the selected content type.
Name | Type | Description |
---|---|---|
model (required) | IEntry | IEntry for createing 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 = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").CreateAsync(model);
Delete
The Delete Entry call deletes an existing entry and all the entries within it.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
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.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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 content type.
Name | Type | Description |
---|---|---|
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 content type.
Name | Type | Description |
---|---|---|
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 = 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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Environment("<EXTENSION_UID>").Delete();
DeleteAsync
The Delete function will delete an existing publishing environment from your stack.
Name | Type | Description |
---|---|---|
collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment("<EXTENSION_UID>").DeleteAsync();
FetchAsync
The Fetch function returns more details about the specified environment of a 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>").Environment("<EXTENSION_UID>").Fetch();
FetchAsync
The Fetch function returns more details about the specified environment of a 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>").Environment("<EXTENSION_UID>").FetchAsync();
Query
The Query on Environment function fetches the list of all environments available in a stack.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
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.
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>").Extension("<EXTENSION_UID>").Fetch();
FetchAsync
The Get an extension call returns comprehensive information about a specific extension of a 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>").Extension("<EXTENSION_UID>").FetchAsync();
Query
The Query on Extension will allow to fetch details of all Extensions.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").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.
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>").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.
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>").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.
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>").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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").GlobalField("<GLOBAL_FIELD_UID>").Delete();
DeleteAsync
The Delete Content Type call deletes an existing global field and all the entries within it.
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>").GlobalField("<GLOBAL_FIELD_UID>").DeleteAsync();
Fetch
The Fetch a single global fieldcall returns information of a specific global field.
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>").GlobalField("<GLOBAL_FIELD_UID>").Fetch();
FetchAsync
The Fetch a single global fieldcall returns information of a specific global field.
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>").GlobalField("<GLOBAL_FIELD_UID>").FetchAsync();
Query
The Query on Global Field will allow to fetch details of all or specific Content Type.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Label("<LABEL_UID>").Delete();
DeleteAsync
The Delete label call is used to delete a specific label.
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>").Label("<LABEL_UID>").DeleteAsync();
Fetch
The Fetch a single label call returns information about a particular label of a 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>").Label("<LABEL_UID>").Fetch();
FetchAsync
The Fetch a single label call returns information about a particular label of a 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>").Label("<LABEL_UID>").FetchAsync();
Query
The Query on Label This call fetches all the existing labels of the stack.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Label().Query();
Update
The Update label call is used to update an existing label.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Locale("<LOCALE_CODE>").Delete();
DeleteAsync
The Delete language call deletes an existing language from your stack.
Name | Type | Description |
---|---|---|
collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale("<LOCALE_CODE>").DeleteAsync();
Fetch
The Get a language call returns information about a specific language available on the 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>").Locale("<LOCALE_CODE>").Fetch();
FetchAsync
The Get a language call returns information about a specific language available on the 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>").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.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
Locale | string | |
Url | string |
Option
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.Organization("<ORG_UID>").GetInvitations();
GetInvitationsAsync
The Get all organization invitations call gives you a list of all the Organization invitations.
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.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.
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.Organization().GetOrganizations();
GetOrganizationsAsync
The Get all/single organizations call lists all organizations related to the system user in the order that they were created.
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.Organization().GetOrganizationsAsync();
GetStacks
The get Stacks call gets all the Stack within the Organization.
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.Organization("<ORG_UID>").GetStacks();
GetStacksAsync
The get Stacks call gets all the Stack within the Organization.
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.Organization("<ORG_UID>").GetStacksAsync();
RemoveUser
The Remove users from organization request allows you to remove existing users from your organization.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.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.
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.Organization("<ORG_UID>").RolesAsync();
TransferOwnership
The Transfer organization ownership call transfers the ownership of an Organization to another user.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").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.
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>").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.
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>").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.
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>").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.
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>").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.
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>").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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Delete();
DeleteAsync
The Delete Publish Rules request allows you to delete an existing publish rule.
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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").DeleteAsync();
Fetch
The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.
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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Fetch();
FetchAsync
The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.
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>").Workflow().PublishRule("<PUBLISH_RULE_UID>").FetchAsync();
FindAll
The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.
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>").Workflow().PublishRule().FindAll();
FindAllAsync
The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.
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>").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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Release("<RELEASE_UID>").Delete();
DeleteAsync
The Delete request allows you to delete a specific Release from a 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>").Release("<RELEASE_UID>").DeleteAsync();
Deploy
The Fetch request gets the details of a specific Release in a stack.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Release("<RELEASE_UID>").Fetch();
FetchAsync
The Fetch request gets the details of a specific Release in a 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>").Release("<RELEASE_UID>").FetchAsync();
Item
The list of all items (entries and assets) that are part of a specific Release.
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.
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’.
Name | Type | Description |
---|---|---|
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’.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").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.
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>").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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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
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>").Role("<ROLE_UID>").Delete();
DeleteAsync
The Delete call deletes an existing role from your stack
Name | Type | Description |
---|---|---|
collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").DeleteAsync();
Fetch
The Fetch request returns comprehensive information on a specific role.
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>").Role("<ROLE_UID>").Fetch();
FetchAsync
The Fetch request returns comprehensive information on a specific role.
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>").Role("<ROLE_UID>").FetchAsync();
Query
The Query on Role request returns comprehensive information about all roles created in a stack.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
ACL | string | ACL for the rule |
Restrict | bool | Set true to restrict rule. |
Server
Server for the webhook
Name | Type | Description |
---|---|---|
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.
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>");
StackSettings
Stack settings for adding custom settings.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").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.
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>").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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Webhook("<WEBHOOK_UID>").Delete();
DeleteAsync
The Delete webhook call deletes an existing webhook from a 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>").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.
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>").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.
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>").Webhook("<WEBHOOK_UID>").ExecutionsAsync();
Fetch
The Fetch webhook request returns comprehensive information on a specific webhook.
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>").Webhook("<WEBHOOK_UID>").Fetch();
FetchAsync
The Fetch webhook request returns comprehensive information on a specific webhook.
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>").Webhook("<WEBHOOK_UID>").FetchAsync();
Logs
This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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>").Workflow("<WORKFLOW_UID>").Delete();
DeleteAsync
The Delete Workflow request allows you to delete a workflow.
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>").Workflow("<WORKFLOW_UID>").DeleteAsync();
Disable
The Disable Workflow request allows you to disable a workflow.
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.
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.
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.
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.
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>").Workflow("<WORKFLOW_UID>").Fetch();
FetchAsync
The fetch Workflow request retrieves the comprehensive details of a specific Workflow of a 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>").Workflow("<WORKFLOW_UID>").FetchAsync();
FindAll
The Get all Workflows request retrieves the details of all the Workflows of a 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>").Workflow().FindAll();
FindAllAsync
The Get all Workflows request retrieves the details of all the Workflows of a 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>").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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
Title | string | Title for the custom field. |
ContentType | string | File content type. |
Tags | string | Tags for the custom field. |
CustomFieldModel
CustomFieldModel constructor
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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.
CustomWidgetModel
CustomWidgetModel class for custom widget.
Name | Type | Description |
---|---|---|
Title | string | Title for the custom widget. |
ContentType | string | File content type. |
Tags | string | Tags for the custom widget. |
CustomWidgetModel
CustomWidgetModel constructor
Name | Type | Description |
---|---|---|
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 |
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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.
DashboardWidgetModel
DashboardWidgetModel class for dashboard widget.
Name | Type | Description |
---|---|---|
Title | string | Title for the dashboard widget. |
ContentType | string | File content type. |
Tags | string | Tags for the dashboard widget. |
DashboardWidgetModel
DashboardWidgetModel constructor
Name | Type | Description |
---|---|---|
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 |
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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. |
Name | Type | Description |
---|---|---|
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.
DateField
DateField class for date field.
Name | Type | Description |
---|---|---|
StartDate | string | Start date for the date field. |
EndDate | string | End date for date field |
ExtensionField
Extension class for extension field.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
state | string | Action state for the field. |
TargetField | string | Target field for the action. |
Condition
Condition class for setting condition for the field.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
Extensions | List<string> | List of extension allowed in file field. |
GroupField
Group field class for adding group field in content type.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
blocks | List<Block> | List of blocks in modular block field. |
ReferenceField
Reference field class for adding reference field to content type.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
Enum | SelectEnum | Select enum for field type. |
TextboxField
Text box field class for text input field
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
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 = await client.Stack("<API_KEY>").ManagementToken("<MANAGEMENT_TOKEN_UID>").CreateAsync(model);
Delete
The Delete request deletes a specific management token.
Name | Type | Description |
---|---|---|
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>").ManagementToken("<MANAGEMENT_TOKEN_UID>").Delete();
DeleteAsync
The Delete request deletes a specific management token.
Name | Type | Description |
---|---|---|
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>").ManagementToken("<MANAGEMENT_TOKEN_UID>").DeleteAsync();
Fetch
The Fetch request returns the details of a specific management token generated in a stack.
Name | Type | Description |
---|---|---|
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>").ManagementToken("<MANAGEMENT_TOKEN_UID>").Fetch();
FetchAsync
The Fetch request returns the details of a specific management token generated in a stack.
Name | Type | Description |
---|---|---|
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>").ManagementToken("<MANAGEMENT_TOKEN_UID>").FetchAsync();
Query
The Query on ManagementToken request returns the details of all the management tokens generated in a stack.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Tokens;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").ManagementToken().Query();
Update
The Update request lets you update the details of a management token. You can change the name and description of the token, update the stack-level permissions assigned to the token, and change the expiry date of the token (if set).
Name | Type | Description |
---|---|---|
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>").Update(model);
UpdateAsync
The Update request lets you update the details of a management token. You can change the name and description of the token, update the stack-level permissions assigned to the token, and change the expiry date of the token (if set).
Name | Type | Description |
---|---|---|
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 = await client.Stack("<API_KEY>").ManagementToken("<MANAGEMENT_TOKEN_UID>").UpdateAsync(model);
DeliveryTokenModel
Delivery token scope for the token to be accessible.
Name | Type | Description |
---|---|---|
Name | string | Name for the delivery token to be created or updated. |
Description | string | Description for the delivery token to be created or updated. |
Scope | List<DeliveryTokenScope> | List of token scope for stack-level permissions you need to assign to the token. |
DeliveryTokenScope
Delivery token scope for setting the environment for the token to be accessible.
Name | Type | Description |
---|---|---|
Environments | List<string> | List of environment for the token to be accessible. |
ManagementTokenModel
Name | Type | Description |
---|---|---|
Name | string | Name for the management token. |
Description | string | Description for the management token. |
ExpiresOn | string | Expiration date of the token in UTC time |
IsEmailNotificationEnabled | bool | Enable notification for the token expiration before seven days. |
Scope | List<TokenScope> | List of token scope for stack-level permissions you need to assign to the token. |
TokenScope
Name | Type | Description |
---|---|---|
ACL | Dictionary<string, string> | ACL permissions determine what actions the user or group can perform on a token, such as reading, writing, or executing a file. |
Branches | List<string> | Branches on which token scope should be defined. |
Module | string | Module scope for the token. |
BoolParameterValue
Bool parameter value.
Name | Type | Description |
---|---|---|
Value | bool | Boolean value of the parameter. |
BoolParameterValue
Constructs ParameterValue for a boolean.
Name | Type | Description |
---|---|---|
value | bool | Value for the query parameter. |
DoubleListParameterValue
Double list parameter value.
Name | Type | Description |
---|---|---|
Value | List<double> | Double value of the parameter. |
DoubleListParameterValue
Constructs ParameterValue for a list of double.
Name | Type | Description |
---|---|---|
value | List<Double> | Value for the query parameter. |
DoubleParameterValue
Double parameter value.
Name | Type | Description |
---|---|---|
Value | double | Double value of the parameter. |
DoubleParameterValue
Constructs ParameterValue for a double.
Name | Type | Description |
---|---|---|
value | double | Value for the query parameter. |
ParameterCollection
Add
Adds a parameter with a boolean value.
Name | Type | Description |
---|---|---|
key (required) | string | Parameter key to be added. |
value (required) | bool | Parameter value to be added |
Add
Adds a parameter with a list-of-doubles value.
Name | Type | Description |
---|---|---|
key (required) | string | Parameter key to be added. |
value (required) | List<double> | Parameter value to be added |
Add
Adds a parameter with a list-of-strings value.
Name | Type | Description |
---|---|---|
key (required) | string | Parameter key to be added. |
value (required) | List<String> | Parameter value to be added |
Add
Adds a parameter with a double value.
Name | Type | Description |
---|---|---|
key (required) | string | Parameter key to be added. |
value (required) | double | Parameter value to be added |
Add
Adds a parameter with a string value.
Name | Type | Description |
---|---|---|
key (required) | string | Parameter key to be added. |
value (required) | string | Parameter value to be added |
GetSortedParametersList
Converts the current parameters into a list of key-value pairs.
Query
Find
The Find all object call fetches the list of all objects owned by a particular user account.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack().Query().Limit(5).Find();
FindAsync
The Find all object call fetches the list of all objects owned by a particular user account.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack().Query().Limit(5).FindAsync();
IncludeCount
The ‘include_count’ parameter returns the total number of object related to the user.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack().Query().IncludeCount();
Limit
The ‘limit’ parameter will return a specific number of Objects in the output.
Name | Type | Description |
---|---|---|
value (required) | Double | Number of object in limit. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack().Query().Limit(5);
Skip
The ‘skip’ parameter will skip a specific number of Object in the output.
Name | Type | Description |
---|---|---|
value (required) | Double | Number of object to skip |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack().Query().Skip(5);
StringListParameterValue
String list parameter value.
Name | Type | Description |
---|---|---|
Value | List<string> | List of strings value of the parameter. |
StringListParameterValue
Constructs ParameterValue for a list of strings.
Name | Type | Description |
---|---|---|
values | List<String> | List of string value for the query parameter. |
StringParameterValue
String parameter value.
Name | Type | Description |
---|---|---|
Value | string | String value of the parameter. |
StringParameterValue
Constructs ParameterValue for a single string.
Name | Type | Description |
---|---|---|
value | string | Value for the query parameter. |