Follow

Get Folder ID

The Get Folder ID command allows you to find the ID of a folder by its path.  The command requires the following arguments: Command, Realm, Password, Folder Path, and Folder Type.

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

The command is ‘getfolderidbypath’, the realm is ‘myrealm’ and the password is ‘mypass’. Based on the type, the ID of the single level folder named 'oldtemplates' will be returned.

Example

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

api_web?r=myrealm&p=mypass&c=getfolderidbypath&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 Get Folder ID command outputs either a SUCCESS or a FAILURE message. 

SUCCESS

The Get Folder ID command returns the id of the last folder in the specified path.  The result format is:

SUCCESS: [folder_id]

FAILURE

A Get Folder ID command will fail for several reasons, such as if the folder does not exist.  The result format is:

FAILURE: [Reason]  

Arguments

The Get Folder ID command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=getfolderidbypath

c=getfolderidbypath

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 folder path to search and return ID for last folder in the path.  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] 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk