Queries the task flows corresponding to a specific business scenario in a workspace in Data Management (DMS).

  • Before you call this operation, make sure that you have the access permissions on the workspace. If you do not have the access permissions on the workspace, you can contact a DMS administrator, database administrator (DBA), or workspace administrator to add you as a member of the workspace. The AddLhMembers operation can be called to add a workspace member.
  • If you are a DMS administrator or a workspace administrator, you can query the business scenarios and task flows related to a user in a workspace based on the user ID.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListLhTaskFlowAndScenario

The operation that you want to perform. Set the value to ListLhTaskFlowAndScenario.

SpaceId Long Yes 24

The ID of the workspace. You can call the GetLhSpaceByName operation to obtain the workspace ID.

UserId Long No 51****

The ID of the user. You can call the ListUsers or GetUser operation to obtain the user ID.

Tid Long No 3***

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

RegionId String No cn-hangzhou

The ID of the region in which DMS is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
RawDAGList Array of Dag

The task flows in the default business scenario.

Dag
Id Long 134137****

The ID of the task flow.

CreatorId String 51****

The ID of the user who creates the task flow.

IsDeleted Boolean false

Indicates whether the task flow is deleted. Valid values:

  • true: deleted
  • false: not deleted
DemoId String -

The extended field. No meaning is specified for this field.

DeployId Long 12**

The ID of the latest deployment record.

DataFlowId Long -

The extended field. No meaning is specified for this field.

ScenarioId Long 2**

The ID of the business scenario.

SpaceId Long 1

The ID of the workspace.

CreatorNickName String Creator_Name

The name of the user who creates the workspace.

DagOwnerNickName String Owner_Name

The name of the task flow owner.

CanEdit Boolean true

Indicates whether the task flow can be modified. Valid values:

  • true: The task flow can be modified.
  • false: The task flow cannot be modified.
Status Integer 2

The status of the task flow. Valid values:

  • 0: invalid
  • 1: scheduling disabled
  • 2: waiting to be scheduled
LatestInstanceStatus Integer 0

The status of the latest execution. Valid values:

  • 0: invalid
  • 1: scheduling disabled
  • 2: waiting to be scheduled
LatestInstanceTime Integer 2022-4-14

The time when the latest execution record was generated.

DagName String Dag_Name

The name of the task flow.

DagOwnerId String 51****

The user ID of the task flow owner.

ScenarioDAGList Array of ScenarioDAG

The task flows in other business scenarios.

ScenarioDAG
Scenario Object

The information about the business scenario.

ScenarioName String Scenario_2

The name of the business scenario.

CreatorId String 51****

The ID of the user who creates the business scenario.

Description String test

The description of the business scenario.

DagList Array of Dag

The list of task flows.

Dag
Id Long 9***

The ID of the task flow.

CreatorId String 51****

The ID of the user who creates the task flow.

IsDeleted Boolean false

Indicates whether the task flow is deleted. Valid values:

  • true: deleted
  • false: not deleted
DemoId String -

The extended field. No meaning is specified for this field.

DeployId Long 12**

The ID of the latest deployment record.

DataFlowId Long -

The extended field. No meaning is specified for this field.

ScenarioId Long 2**

The ID of the business scenario.

SpaceId Long 1

The ID of the workspace.

CreatorNickName String Creator_Name

The name of the user who creates the workspace.

DagOwnerNickName String Owner_Name

The name of the task flow owner.

CanEdit Boolean true

Indicates whether the task flow can be modified. Valid values:

  • true: The task flow can be modified.
  • false: The task flow cannot be modified.
Status Integer 1

The status of the task flow. Valid values:

  • 0: invalid
  • 1: scheduling disabled
  • 2: waiting to be scheduled
LatestInstanceStatus Integer 1

The status of the latest execution. Valid values:

  • 0: invalid
  • 1: scheduling disabled
  • 2: waiting to be scheduled
LatestInstanceTime Integer 2022-4-14

The time when the latest execution record was generated.

DagName String Dag_Name

The name of the task flow.

DagOwnerId String 51****

The user ID of the task flow owner.

RequestId String 48602B78-0DDF-414C-8688-70CAB6070115

The ID of the request.

ErrorCode String UnknownError

The error code returned if the request fails.

ErrorMessage String UnknownError

The error message returned if the request fails.

Success Boolean true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=ListLhTaskFlowAndScenario
&SpaceId=24
&UserId=51****
&Tid=3***
&Common request parameters

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListLhTaskFlowAndScenarioResponse>
    <RawDAGList>
        <CreatorId>51****</CreatorId>
        <IsDeleted>false</IsDeleted>
        <DemoId>-</DemoId>
        <SpaceId>1</SpaceId>
        <CreatorNickName>Creator_Name</CreatorNickName>
        <DagOwnerNickName>Owner_Name</DagOwnerNickName>
        <CanEdit>true</CanEdit>
        <Status>2</Status>
        <LatestInstanceStatus>0</LatestInstanceStatus>
        <DagName>Dag_Name</DagName>
        <DagOwnerId>51****</DagOwnerId>
    </RawDAGList>
    <ScenarioDAGList>
        <Scenario>
            <ScenarioName>Scenario_2</ScenarioName>
            <CreatorId>51****</CreatorId>
            <Description>test</Description>
        </Scenario>
        <DagList>
            <CreatorId>51****</CreatorId>
            <IsDeleted>false</IsDeleted>
            <DemoId>-</DemoId>
            <SpaceId>1</SpaceId>
            <CreatorNickName>Creator_Name</CreatorNickName>
            <DagOwnerNickName>Owner_Name</DagOwnerNickName>
            <CanEdit>true</CanEdit>
            <Status>1</Status>
            <LatestInstanceStatus>1</LatestInstanceStatus>
            <DagName>Dag_Name</DagName>
            <DagOwnerId>51****</DagOwnerId>
        </DagList>
    </ScenarioDAGList>
    <RequestId>48602B78-0DDF-414C-8688-70CAB6070115</RequestId>
    <Success>true</Success>
</ListLhTaskFlowAndScenarioResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RawDAGList" : [ {
    "CreatorId" : "51****",
    "IsDeleted" : false,
    "DemoId" : "-",
    "SpaceId" : 1,
    "CreatorNickName" : "Creator_Name",
    "DagOwnerNickName" : "Owner_Name",
    "CanEdit" : true,
    "Status" : 2,
    "LatestInstanceStatus" : 0,
    "DagName" : "Dag_Name",
    "DagOwnerId" : "51****"
  } ],
  "ScenarioDAGList" : [ {
    "Scenario" : {
      "ScenarioName" : "Scenario_2",
      "CreatorId" : "51****",
      "Description" : "test"
    },
    "DagList" : [ {
      "CreatorId" : "51****",
      "IsDeleted" : false,
      "DemoId" : "-",
      "SpaceId" : 1,
      "CreatorNickName" : "Creator_Name",
      "DagOwnerNickName" : "Owner_Name",
      "CanEdit" : true,
      "Status" : 1,
      "LatestInstanceStatus" : 1,
      "DagName" : "Dag_Name",
      "DagOwnerId" : "51****"
    } ]
  } ],
  "RequestId" : "48602B78-0DDF-414C-8688-70CAB6070115",
  "Success" : true
}

Error code

For a list of error codes, visit the Error Center.