ListTrafficControlTasks

Updated at:

Queries traffic control tasks that meet specified conditions.

Operation description

Operation description

  • This operation retrieves a list of traffic control nodes that meet specific conditional criteria.

  • You can filter the returned node list and perform sorting by providing different query parameters.

  • Paged query is supported. You can also choose to return all data at once without paging.

  • Note: InstanceId is required. Other parameters are options. Specify them as needed to obtain more accurate results.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

pairec:ListTrafficControlTasks

list

*All Resource

*

None None

Request syntax

GET /api/v1/trafficcontroltasks HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The name of the traffic control task.

task_1

TrafficControlTaskId

string

No

The ID of the traffic control task.

1

SceneId

string

No

The ID of the scene. You can obtain the ID by calling the ListScenes operation.

1

Environment

string

No

The runtime environment. Valid values:

  • Daily: daily environment.

  • Pre: staging environment.

  • Prod: production environment.

Pre

Status

string

No

The status. Valid values:

  • NotRunning: not running

  • Ready: pending

  • Running: running

  • Finished: finished

Running

Version

string

No

The version. Valid values:

  • Latest: the latest version. This is the default value.

  • Released: the released version.

Latest

ControlTargetFilter

string

No

The filter for traffic control targets. Valid values:

  • All: all targets.

  • Valid: valid targets with an enabling status within the start and end time period.

  • None: no targets.

All

SortBy

string

No

The sort criterion. Valid values:

  • GmtCreateTime: creation time.

  • GmtModifiedTime: update time.

GmtCreateTime

Order

string

No

The sort order. Valid values:

  • ASC: ascending order.

  • DESC: descending order.

ASC

PageNumber

string

No

The page number. Pages start from 1. Default value: 1.

1

PageSize

string

No

The number of entries per page. Default value: 10.

10

All

boolean

No

Specifies whether to return all data without pagination.

false

InstanceId

string

No

Instance ID of the instance. You can obtain instance ID by calling the ListInstances operation.

pairec-cn-********

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

3AAA45F6-0798-5461-9360-81D133823CE7

TotalCount

string

The total number of elements in the list.

20

TrafficControlTasks

array<object>

The list of traffic control tasks.

array<object>

The details of the traffic control task.

TrafficControlTaskId

string

The ID of the traffic control task.

1

Name

string

The name of the traffic control.

task_1

Description

string

The description of the traffic control.

this is a test task

SceneId

string

The ID of the scene. You can call the ListScenes operation to obtain the ID.

4

SceneName

string

The name of the scene.

home_feed

ProductStatus

string

The status in the production environment.

Runnning

PrepubStatus

string

The status in the staging environment.

Runnning

ExecutionTime

string

The execution time.

  • Permanent: Executes permanently.

  • TimeRange: Specifies a time range. If you select this value, you must specify StartTime and EndTime.

Permanent

StartTime

string

The start time. The format is YYYY-MM-DD.

2024-03-25

EndTime

string

The end time. The format is YYYY-MM-DD.

2024-04-25

BehaviorTableMetaId

string

The ID of the behavior table.

1

UserTableMetaId

string

The ID of the user table.

2

ItemTableMetaId

string

The ID of the item table.

3

UserConditionType

string

The condition type of the target audience.

Array

UserConditionArray

string

The array-format conditions for the target audience.

[{"field":"gender","option":"=","value":"male"}]

UserConditionExpress

string

The expression-format conditions for the target audience.

age<=30&&(3<=level<=6)&&gender=male

StatisBehaviorConditionType

string

The condition type for behavior statistics.

Array

StatisBehaviorConditionArray

string

The array-format conditions for behavior statistics.

[{"field":"click","option":"<=","value":"30"}]

StatisBahaviorConditionExpress

string

The expression format for behavior statistics.

event=click

ControlType

string

The control type.

Percent

ControlGranularity

string

The control granularity.

Global

ControlLogic

string

The control logic.

Guaranteed

ItemConditionType

string

The condition type for items.

Array

ItemConditionArray

string

The array-format conditions for items.

[{"field":"status","option":"=","value":"1"}]

ItemConditionExpress

string

The expression-format conditions for items.

status=1

GmtCreateTime

string

The creation time. The format is ISO 8601, with Z indicating the UTC time zone.

2024-03-25T06:04:28.441Z

GmtModifiedTime

string

The update time. The format is ISO 8601, with Z indicating the UTC time zone.

2024-03-25T06:04:28.441Z

TrafficControlTargets

array<object>

The list of traffic control targets.

array<object>

The details of the traffic control target.

TrafficControlTargetId

string

The ID of the traffic control target.

1

Name

string

The control target.

target-1

StartTime

string

The start time. The format is YYYY-MM-DD.

2024-03-25

EndTime

string

The end time. The format is YYYY-MM-DD.

2024-04-25

ItemConditionType

string

The condition type for items.

Array

ItemConditionArray

string

The array-format conditions for items.

[{"field":"status","option":"=","value":"1"}]

ItemConditionExpress

string

The expression-format conditions for items.

status=1

Event

string

The event of the control target.

click

Value

number

The value of the control target.

30

StatisPeriod

string

The statistical period.

Daily

ToleranceValue

integer

The tolerance range of the control target.

10

RecallName

string

The recall policy name.

recall-1

Status

string

The status.

Opened

GmtCreateTime

string

The creation time. The format is ISO 8601 and includes the time zone offset.

2025-06-03T15:08:10.58+08:00

GmtModifiedTime

string

The update time. The format is ISO 8601 and includes the time zone offset.

2025-11-21T16:26:58.57+08:00

SplitParts

object

The details of the split points.

TimePoints

array

The list of time split points.

[0,30]

integer

The time point.

10

SetValues

array

The list of target value split points.

[1,3,6]

integer

The specific value of the target value split point.

3

NewProductRegulation

boolean

Indicates whether the recall is for new products.

false

TrafficControlTaskId

string

The ID of the traffic control task.

1

EverPublished

boolean

Indicates whether it has been published.

false

ServiceId

string

The service ID.

1

PreExperimentIds

string

The list of staging experiment IDs.

1,2

ProdExperimentIds

string

The list of production experiments.

6,7

FlinkResourceId

string

The Flink resource ID.

resource-xxx

FlinkResourceName

string

The name of the Flink resource.

flink_test

StatisBehaviorConditionExpress

string

The behavior expression.

event=exposure

FlinkJobs

string

The Flink job information.

{""}

FlinkJobOutdated

string

The expiration information of the Flink job in each environment.

{""}

EffectiveSceneIds

array

The list of valid service IDs.

[3,4]

integer

The valid service ID.

4

EffectiveSceneNames

array

The list of effective scene names.

[2,3]

integer

The effective scene name.

3

ServiceIds

array

The list of bound engine service IDs.

[1,2]

string

The engine service ID.

4

EffectiveSceneNameList

array

The list of effective scenes.

["a","b"]

string

The effective scene.

home_feed

ServiceIdList

array

The list of service IDs.

[1,3]

integer

The service ID.

3

Examples

Success response

JSON format

{
  "RequestId": "3AAA45F6-0798-5461-9360-81D133823CE7",
  "TotalCount": "20",
  "TrafficControlTasks": [
    {
      "TrafficControlTaskId": "1",
      "Name": "task_1",
      "Description": "this is a test task",
      "SceneId": "4",
      "SceneName": "home_feed",
      "ProductStatus": "Runnning",
      "PrepubStatus": "Runnning",
      "ExecutionTime": "Permanent",
      "StartTime": "2024-03-25",
      "EndTime": "2024-04-25",
      "BehaviorTableMetaId": "1",
      "UserTableMetaId": "2",
      "ItemTableMetaId": "3",
      "UserConditionType": "Array",
      "UserConditionArray": "[{\"field\":\"gender\",\"option\":\"=\",\"value\":\"male\"}]",
      "UserConditionExpress": "age<=30&&(3<=level<=6)&&gender=male",
      "StatisBehaviorConditionType": "Array",
      "StatisBehaviorConditionArray": "[{\"field\":\"click\",\"option\":\"<=\",\"value\":\"30\"}]",
      "StatisBahaviorConditionExpress": "event=click",
      "ControlType": "Percent",
      "ControlGranularity": "Global",
      "ControlLogic": "Guaranteed",
      "ItemConditionType": "Array",
      "ItemConditionArray": "[{\"field\":\"status\",\"option\":\"=\",\"value\":\"1\"}]",
      "ItemConditionExpress": "status=1",
      "GmtCreateTime": "2024-03-25T06:04:28.441Z",
      "GmtModifiedTime": "2024-03-25T06:04:28.441Z",
      "TrafficControlTargets": [
        {
          "TrafficControlTargetId": "1",
          "Name": "target-1",
          "StartTime": "2024-03-25",
          "EndTime": "2024-04-25",
          "ItemConditionType": "Array",
          "ItemConditionArray": "[{\"field\":\"status\",\"option\":\"=\",\"value\":\"1\"}]",
          "ItemConditionExpress": "status=1",
          "Event": "click",
          "Value": 30,
          "StatisPeriod": "Daily",
          "ToleranceValue": 10,
          "RecallName": "recall-1",
          "Status": "Opened",
          "GmtCreateTime": "2025-06-03T15:08:10.58+08:00",
          "GmtModifiedTime": "2025-11-21T16:26:58.57+08:00",
          "SplitParts": {
            "TimePoints": [
              10
            ],
            "SetValues": [
              3
            ]
          },
          "NewProductRegulation": false,
          "TrafficControlTaskId": "1"
        }
      ],
      "EverPublished": false,
      "ServiceId": "1",
      "PreExperimentIds": "1,2",
      "ProdExperimentIds": "6,7",
      "FlinkResourceId": "resource-xxx",
      "FlinkResourceName": "flink_test",
      "StatisBehaviorConditionExpress": "event=exposure",
      "FlinkJobs": "{\"\"}",
      "FlinkJobOutdated": "{\"\"}",
      "EffectiveSceneIds": [
        4
      ],
      "EffectiveSceneNames": [
        3
      ],
      "ServiceIds": [
        "4"
      ],
      "EffectiveSceneNameList": [
        "home_feed"
      ],
      "ServiceIdList": [
        3
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.