Follow

Create Folder

Table of Contents
  1. 1. Overview
  2. 2. Arguments
      1. 2.1.1. Example
    1. 2.2. Results
      1. 2.2.1. SUCCESS
      2. 2.2.2. FAILURE
  3. 3. Related

Overview

The Create Folder command allows you to create organizational folders for Lists, Templates, Articles, and Segmentation Rules.  

Arguments

The Create Folder command requires the following arguments: Command, Realm, Password, Folder Path, and Folder Type.

api_web?r=myrealm&p=mypass&c=createfolderpath&folder_path=/oldtemplates&folder_type=2

The command is ‘createfolderpath’, the realm is ‘myrealm’ and the password is ‘mypass’. Based on the type, a single level folder named 'oldtemplates' will be created to store templates.

The Create Folder command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=createfolderpath

c=createfolderpath

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Folder Path   Name of the folders to create.  A multi level folder path can be created using '/' between folder names. folder_path=[folder_path]

Folder Type

 

Feature specific folder definition. A folder of the same name can exist for each type.
 
1 = Segmentation
2 = Template
3 = List
4 = Article
folder_type=[1,2,3,4]

 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=createfolderpath&folder_path=/2012Lists/March/Week1&folder_type=3

Successful results return the folder ID of the last folder in the path (named 'Week1'):

SUCCESS: 66

Results

The Create Folder command outputs either a SUCCESS or a FAILURE message. 

SUCCESS

The Create Folder command command success message returns the id of the new folder.  The result format is:

SUCCESS: [folder_id]

FAILURE

A Create Folder command will fail for several reasons, such as if the folder already exists.  The result format is:

FAILURE: [Reason]  

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk