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