Creating a Synchronization Directory
Function
Create a synchronization directory.
Authorization Information
No identity policy-based permission required for calling this API.
URI
POST /koodrive/ose/v1/syncDir/create
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
container |
Yes |
String |
Space ID. |
|
fileName |
No |
String |
Name of the synchronization directory. Note: After this parameter is transferred, the system checks whether a directory with the same name exists in the root directory. If yes, the directory is set as the synchronization directory. If no, the synchronization directory is created in the root directory based on fileName. This parameter is mutually exclusive with fileId. This parameter is optional when fileId is transferred. Otherwise, this parameter is mandatory. |
|
hidden |
No |
Boolean |
Whether it is hidden. The default value is false. |
|
parentFolder |
No |
String |
Parent directory ID. The root directory (root or sbox) cannot be transferred. If no directory is transferred, the directory is created in the root directory by default. Note: This field is mutually exclusive with fileId. |
|
fileId |
No |
String |
ID of the directory to be set as the synchronization directory. After this parameter is transferred, the directory is set as the synchronization directory. This parameter is mutually exclusive with fileName, hidden, and parentFolder. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
container |
String |
Space ID. |
|
fileId |
String |
File ID. |
|
fileName |
String |
Name of the synchronization directory. |
|
exist |
Boolean |
Whether the synchronization directory exists. This field is returned only when the synchronization directory already exists. |
Example Requests
Example request for creating a synchronization directory.
POST /koodrive/ose/v1/syncDir/create
Authorization:Bearer+10f88*********4791e9ff
{
"container": "K*****",
"fileName": "K*****",
"parentFolder": "K*****",
"fileId": "K*****",
"hidden": true
}
Example Responses
Status code: 200
Response to the request for creating and associating a synchronization directory.
{
"container" : "K*****",
"fileName" : "K*****",
"fileId" : "K*****",
"exist" : true
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response to the request for creating and associating a synchronization directory. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot