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)

Required/Optional

Data Type

Description

userId

Query

Required

String

The user ID. How to get userId>>

orgId

Query

Required

String

The organization ID which the user belongs to. How to get orgId>>

action

Query

Required

String

Fixed value: create

Request Parameters (Body)

Name

Required/Optional

Data Type

Description

parentId

Required

String

The ID of the parent directory.(can be obtained via the List Workflow Directories API) |

dirName

Required

String

The name of the directory to be created.

Response Parameters

DirectoryId Struct

Sample

{
  "dirId": "newDirId"
}

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:

  • param: dirName cannot be empty

  • param: parentId cannot be empty

  • parentId not found

  • A directory of the same name already exists

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": "parent_directory_id"
}

Return Sample

{
  "code": 0,
  "msg": "OK",
  "data": {
    "dirId": "newDirId"
  }
}