ListTrafficControlTasks

更新时间:
复制 MD 格式

Lists traffic control tasks that meet specified conditions.

Operation description

Request

  • This API retrieves a list of traffic control tasks.

  • Use query parameters to filter and sort the results.

  • This operation supports pagination. You can also retrieve all results in a single response.

  • Note: The InstanceId is a required parameter. All other parameters are optional.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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 this ID by calling the ListScenes operation.

1

Environment

string

No

The environment. Valid values:

  • Daily: the daily environment

  • Pre: the pre-production environment

  • Prod: the production environment

Pre

Status

string

No

The status of the task. Valid values:

  • NotRunning: The task is not running.

  • Ready: The task is ready to run.

  • Running: The task is running.

  • Finished: The task is 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: Returns all traffic control targets.

  • Valid: Returns only active traffic control targets. A traffic control target is active if the current time is within the specified start and end time.

  • None: Does not return any traffic control targets.

All

SortBy

string

No

The field by which to sort the results. Valid values:

  • GmtCreateTime: Sorts the results by creation time.

  • GmtModifiedTime: Sorts the results by modification 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 results without pagination.

false

InstanceId

string

No

The instance ID. You can obtain this ID by calling the ListInstances operation.

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

Response elements

Element

Type

Description

Example

object

The data returned.

RequestId

string

The request ID.

3AAA45F6-0798-5461-9360-81D133823CE7

TotalCount

string

The total number of traffic control tasks.

20

TrafficControlTasks

array<object>

The list of traffic control tasks.

array<object>

The details of a traffic control task.

TrafficControlTaskId

string

The traffic control task ID.

1

Name

string

The name of the traffic control task.

task_1

Description

string

The description of the traffic control task.

this is a test task

SceneId

string

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

4

SceneName

string

The name of the scene.

home_feed

ProductStatus

string

The production environment status.

Runnning

PrepubStatus

string

The staging environment status.

Runnning

ExecutionTime

string

The execution schedule for the task. Valid values:

  • Permanent: The task runs indefinitely.

  • TimeRange: The task runs within a specified time range. If you set this parameter to this value, you must also specify the StartTime and EndTime parameters.

Permanent

StartTime

string

The start time.

2024-03-25

EndTime

string

The end time.

2024-04-25

BehaviorTableMetaId

string

The behavior table ID.

1

UserTableMetaId

string

The user table ID.

2

ItemTableMetaId

string

The item table ID.

3

UserConditionType

string

The condition type for the target user group.

Array

UserConditionArray

string

The condition for the target user group, in an array format.

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

UserConditionExpress

string

The condition for the target user group, in an expression format.

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

StatisBehaviorConditionType

string

The condition type for behavior statistics.

Array

StatisBehaviorConditionArray

string

The behavior statistics condition, in an array format.

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

StatisBahaviorConditionExpress

string

The behavior statistics expression.

event=click

ControlType

string

The control type.

Percent

ControlGranularity

string

The control granularity.

Global

ControlLogic

string

The control logic.

Guaranteed

ItemConditionType

string

The item condition type.

Array

ItemConditionArray

string

The item condition, in an array format.

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

ItemConditionExpress

string

The item condition, in an expression format.

status=1

GmtCreateTime

string

The creation time of the task.

2024-03-25T06:04:28.441Z

GmtModifiedTime

string

The last update time of the task.

2024-03-25T06:04:28.441Z

TrafficControlTargets

array<object>

The list of traffic control targets.

array<object>

The details of a traffic control target.

TrafficControlTargetId

string

The traffic control target ID.

1

Name

string

The name of the traffic control target.

target-1

StartTime

string

The start time.

2024-03-25

EndTime

string

The end time.

2024-04-25

ItemConditionType

string

The item condition type.

Array

ItemConditionArray

string

The item condition, in an array format.

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

ItemConditionExpress

string

The item condition, in an expression format.

status=1

Event

string

The event for the traffic control target.

click

Value

number

The value of the traffic control target.

30

StatisPeriod

string

The statistics period.

Daily

ToleranceValue

integer

The tolerance value for the traffic control target.

10

RecallName

string

The name of the recall strategy.

recall-1

Status

string

The status of the traffic control target.

Opened

GmtCreateTime

string

The creation time of the target.

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

GmtModifiedTime

string

The last update time of the target.

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

SplitParts

object

The details of the split points.

TimePoints

array

The list of time-based split points.

integer

A time-based split point.

10

SetValues

array

The list of value-based split points for the target.

integer

A value-based split point for the target.

3

NewProductRegulation

boolean

Indicates whether the traffic control target is for a new product recall.

false

TrafficControlTaskId

string

The traffic control task ID.

1

EverPublished

boolean

Indicates whether the task has ever been published.

false

ServiceId

string

The service ID.

1

PreExperimentIds

string

A comma-separated list of staging experiment IDs.

1,2

ProdExperimentIds

string

A comma-separated list of production experiment IDs.

6,7

FlinkResourceId

string

The Flink resource ID.

resource-xxx

FlinkResourceName

string

The name of the Flink resource.

flink_test

StatisBehaviorConditionExpress

string

The behavior statistics expression.

event=exposure

EffectiveSceneIds

array

The list of effective scene IDs.

integer

An effective scene ID.

4

EffectiveSceneNames

array

The list of effective scene names.

integer

The name of an effective scene.

home_feed

ServiceIds

array

The list of bound engine service IDs.

string

An engine service ID.

4

EffectiveSceneNameList

array

The list of effective scene names.

string

The name of an effective scene.

home_feed

ServiceIdList

array

The list of service IDs.

integer

A 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",
      "EffectiveSceneIds": [
        4
      ],
      "EffectiveSceneNames": [
        0
      ],
      "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.