Create Directory¶
Create a directory.
Prerequisite¶
The user must belong to the organization (OU) of the parent directory of the directory to be created.
Request Format¶
POST https://{apigw-address}/batch-processing-service/v2.1/directories
Request Parameters (URI)¶
| Name | Location (Path/Query) | Mandatory/Optional | Data Type | Description | 
|---|---|---|---|---|
| userId | Query | Mandatory | String | The user ID. How to get userId>> | 
| orgId | Query | Mandatory | String | The organization ID which the user belongs to. How to get orgId>> | 
| action | Query | Mandatory | String | Fixed value: create | 
Request Parameters (Body)¶
| Name | Mandatory/Optional | Data Type | Description | 
|---|---|---|---|
| parentId | Mandatory | String | The ID of the parent directory. | 
| dirName | Mandatory | String | The name of the directory to be created. | 
Response Parameters¶
| Name | Data Type | Description | 
|---|---|---|
| data | DirectoryId Struct | A struct that contains the ID of the created directory. For more information, see DirectoryId Struct | 
DirectoryId Struct¶
Sample¶
{
  "dirId": "249a33bd419a4710b1567f5088f8955b"
}
Parameters¶
| Name | Data Type | Description | 
|---|---|---|
| dirId | String | The ID of the created directory. | 
Error Code¶
| Code | Message | Description | 
|---|---|---|
| 62102 | One of the following messages may be returned: 
 | Invalid parameter | 
| 62109 | Internal server exception | Internal server exception. | 
For other error codes, see Common Error Codes.
Samples¶
Request Sample¶
url: https://{apigw-address}/batch-processing-service/v2.1/directories?action=create&userId=yourUserId&orgId=yourOrgId
method: POST
requestBody:
{
  "dirName": "directory_name",
  "parentId": "249a33bd419a4710b1567f5088f8955b"
}
Return Sample¶
{
  "code": 0,
  "msg": "OK",
  "data": {
    "dirId": "62e3038840514caf9af60ad36878851e"
  }
}