Folder resource

Add folder

OVERVIEW

This API supports creation of a new folder given the folderid. A site’s root folderid can be obtained by using the “site list” API endpoint.

Request

POST       /api/1/folders?parentfolderid={parentfolderid}

Query Parameters

Parameter Name Value Description
parentfolderid Int The ID for the folder in question

 

Request body

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<folder>

         <name>Demofolder</name>

         <description>This is a description for Demofolder</description>

         <accessInherited>1</accessInherited>

        {optional DMS settings}

         <dms>
              <dmsfolderid></dmsfolderid>
              <dmscreateddate></dmscreateddate>
              <dmsmodifiedBy></dmsmodifiedBy>
              <dmsdatabasename></dmsdatabasename>
              <dmsParentFolderID></dmsParentFolderID>                               
         </dms>

</folder>

 

Parameter Name Value Description
name string Name of the new folder to be created in the system
description string Description of the newly created document
accessInherited int Possible values are 0 and 1. Value of 1 means that the access permissions are inherited for this folder from the root folder. Value of 0 means that the access permissions are not inherited. The default value is 0.

 

Additional fields available to register DMS details for an folder created from a DMS system. These parameter are used to store information about an external DMS solution like worksite. So that the information required for a two way sync can be managed. 

Form Parameters
 

Parameter Name Value Description
dmsfolderid String Folder ID as specified in the external DMS solution. 
dmscreateddate date (Acceptable formats: "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS", "EEE, dd MMM yyyy HH:mm:ss zzz", "yyyy-MM-dd") Date of creation of the document in the DMS system
dmsdatabasename string (A XML CDATA field) The name of the database where the document resides. This field is used to uniquely determine the location of the file in the DMS system
dmsParentFolderID int An integer ID of the parent folder in which the document resides 
 

 

 

Response

If successful this method returns the details of folder resource in the response body.

<folder>

     <id>3619</id>

     <link>https://domain.com/api/1/folders/3619</link>

</folder>

 

Parameter Name Value Description
Id Int The ID for the newly created folder in question
link string A link to the folder resource, to get details of the folder

 

Example request:

POST  http://clientinstance.highq.com/clientinstance/api/1/folders/1234

XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 

<folder>
          <id>131</id>
          <link>https://collaborate.highq.com/sitepoint/api/1/folders/131</link>
</folder>
 

JSON:

{
   "name": null,
   "description": null,
   "parentFolderID": null,
   "accessInherited": null,
   "batchID": null,
   "dms": null,
   "id": 61,
   "link": "https://domain.com/api/1/folders/61",
   "createddate": null,
   "modifieddate": null,
   "permission": null,
   "child": null,
   "createdby": null,
   "modifiedby": null
}

Error Response

In case of an error an error object in returned in the response body.

XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<error>              
<link> https://ankitjava.local.com/ankit_3_3_0/api/1/error/2125 </link>              
<ref>41</ref>               
<summary>                 
    Can not create new folder inside deleted folder 'Folder2Json'     
</summary>         
</error>

JSON:
1)

{

"summary": "Can not create new folder inside deleted folder - 'Folder2Json' ",

"ref": "41",

"link": "https://ankitjava.local.com/ankit_3_3_0/api/1/error/2124"

}
2)

{     

"summary": "Access denied",     

"ref": "130",     "link": null

}

Add folder

Comments


4 Comments

Last Updated: Nov 08,2024