List Workflow Directories

Get all the content in the workflow directory of the current organization (OU), including workflow files and sub-directories.

Prerequisite

The user must belong to the OU which the target directories belong to.

Request Format

GET https://{apigw-address}/batch-processing-service/v2.1/directories?action=listWorkFlowDirs

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>>

Response Parameters

WorkFlowDir Struct

Sample

{
  "children": [],
  "title":"newdir",
  "type": 1,
  "key": "dirId",
  "isDirectory": true
}

Parameters

Name

Data Type

Description

children

Array of WorkFlowDir Structs

The list of the files or sub-directories.

title

String

The name of the files or sub-directories.

type

String

The type of directory.

  • 0: Data Integration

  • 1: Workflow

  • 2: Data Resource

  • 3: Hql

  • 4: Common Resource

key

String

The directory ID.

isDirectory

Boolean

  • true = directory

  • false = file

WorkFlowFile Struct

Sample

{
  "editable": true,
  "title":"newdir",
  "type": 1,
  "key": 3381.0,
  "isDirectory"false
}

Parameters

Name

Data Type

Description

editable

Boolean

Whether the file is editable.

title

String

The filename.

type

Float

File type identifier. There are five types:(0:Data Integration;1.0:Workflow;2.0:Data Resource;3.0:Hql;4.0:Common Resource)

key

Float

The workflow ID (converted to Float type).

isDirectory

Boolean

  • true = Directory

  • false = File

Error Code

Code

Message

Description

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=listWorkFlowDirs&userId=yourUserId&orgId=yourOrgId
method: GET

Return Sample

  "code": 0,
  "msg": "OK",
  "data": [
    {
      "children": [
        {
          "children": [],
          "title": "String1",
          "type": 1,
          "key": "***************",
          "isDirectory": true
        },
        {
          "children": [
            {
              "editable": true,
              "title": "workflow1",
              "type": 1,
              "key": 2512,
              "isDirectory": false
            }
          ],
          "title": "ffdir",
          "type": 1,
          "key": "**************",
          "isDirectory": true
        },
        {
          "children": [],
          "title": "dirt",
          "type": 1,
          "key": "************",
          "isDirectory": true
        }
      ],
      "title": "Workflow",
      "type": 1,
      "key": "***************",
      "isDirectory": true
    }
  ]
}