POST createFolderByPath

POST createFolderByPath

Method Description

This function allows you to create a new file in SharePoint.

ReturnsDirectory Item
Limitations
None

Usage

For notes on how to authenticate see NetSuite documentation.
General usage notes see: File Sync REST API

Since

FileSync 0.6.0

Request Parameters

ParameterTypeRequiredDescriptionSince
options.script
stringrequiredStatic value that has to equal customscript_b4cd_fileapi_rl0.6.0
options.deploy

string

required

Static value that has to equal customdeploy_b4cd_fileapi_rl

0.6.0

Request Body

Note: The options parameter is a JavaScript object.

ParameterTypeRequiredDescriptionSince
options.action
stringrequired 

Value must equal "createFolderByPath"
This value represents the method that is called.

0.6.0
options.folderName
stringrequiredThe name of the new Folder which we are creating. 0.6.0
options.parentFolderPath
stringrequiredThe path of the parent-folder for which the new folder will be created under. This value is generally retrieved by making a call to the getRecordFolderContents or the getFolderContentsById method.0.6.0
options.recordTypeConfigId

integer

required

Internal ID of the FileSync Record Type Configuration record (customrecord_b4cd_record_type_config).

0.6.0

Returns Directory Item

PropertyTypeDescriptionSince
DirectoryItem.name

string

The file or folder name

0.6.0

DirectoryItem.uniqueId
stringThe unique ID of the file or folder as assigned by the file hosting service. 0.6.0
DirectoryItem.type
stringPossible Values: "file", "folder"0.6.0
DirectoryItem.fileSize
integerFile size in bytes.0.6.0
DirectoryItem.apiUri
stringThe URI used to access the file or folder via the API. 0.6.0
DirectoryItem.filePath
stringThe relative file or folder path on the file hosting service starting from the base directory. 0.6.0
DirectoryItem.uri
stringThe user-navigable URI for the folder or file on the file hosting platform. This can be used to construct hyperlinks for users to reach the file or folder externally. 0.6.0
DirectoryItem.fileContent
stringfile contents as encoded Base64 content0.6.0
DirectoryItem.parentFolderName
stringIf options.includeSubfolders is true this value will return the parent folder name of the directory item.0.6.0
DirectoryItem.parentFolderUniqueId
stringIf options.includeSubfolders is true this value will return the parent folder unique ID of the directory item.0.6.0

Errors

Error CodeDetails
SSS_MISSING_REQD_ARGUMENT

A required argument is missing or undefined.

Example Request Body

{
    "folderName":"postmanFolder",
    "parentFolderPath": "/sites/FilesConnectorSite/Shared Documents/Vendor Bill/20703",
    "recordTypeConfigId":3,
    "action":"createFolderByPath"
}

Was this article helpful?