Extension

View as Markdown

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.

NameTypeDescription
model (required)ExtensionModel

Extension model for creating the Extension.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


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

ExtensionModel model = new ExtensionModel();

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

CreateAsync

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

NameTypeDescription
model (required)ExtensionModel

Extension model for creating the Extension.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


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

ExtensionModel model = new ExtensionModel();

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

Delete

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

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.

NameTypeDescription
collectionParameterCollection

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.

NameTypeDescription
collectionParameterCollection

Query parameter collection.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


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

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").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.

NameTypeDescription
model (required)ExtensionModel

Extension model for updating the Extension.

collectionParameterCollection

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.

NameTypeDescription
model (required)ExtensionModel

Extension model for updating the Extension.

collectionParameterCollection

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.

NameTypeDescription
model (required)IExtensionInterface

IExtensionInterface with details for uploading the extension.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


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

CustomFieldModel model = new CustomFieldModel("FILE_PATH", "FILE_CONTENT_TYPE", "TITLE", "DATA_TYPE");

ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension().Upload(model);

UploadAsync

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

NameTypeDescription
model (required)IExtensionInterface

IExtensionInterface with details for uploading the extension.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


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

CustomFieldModel model = new CustomFieldModel("FILE_PATH", "FILE_CONTENT_TYPE", "TITLE", "DATA_TYPE");

ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension().UploadAsync(model);