You need to enable JavaScript to run this app.
导航
获取人群包列表V2版本 - getSegmentListV2
最近更新时间:2024.12.06 13:08:25首次发布时间:2024.07.12 14:50:47

请求说明

  • 请求方式:POST
  • 接口名称:getSegmentListV2
  • 请求地址:https://console.volcengine.com/cdp/open_platform/openapi

请求参数

参数

类型

是否必选

示例值

描述

Authorization

String

HMAC-SHA256 Credential=BDPP2952f97532xxxxxx/20240716/cn/openPlatform/request, SignedHeaders=host;x-content-sha256;x-date, Signature=131f3d297eb22a7xxxxxx

详细介绍请查阅调用方式文档

X-Tenant

String

1

项目ID,参考数据管理-ID图谱构建

Query

参数

类型

是否必选

示例值

描述

ApiAction

String

getSegmentListV2

固定值,对应“请求说明”中的“接口名称”

ApiVersion

String

2024-05-22

版本号:2024-05-22

Body

参数

类型

是否必选

示例值

描述

pageSize

Int

10

每页大小

pageNum

Int

1

页码

idTypeId

Int

1

ID类型主键

idTypeCode

String

baseid

实体类型code,参考数据管理-ID图谱构建

subjectId

Int

1

主体ID,参考附录-主体ID获取方式

groupIds

String

1,2

分组ID列表,逗号分隔,参考用户分群-分组管理

keyword

String

关键词

关键词,模糊搜索分群名称和创建人

isSelfSee

Bool

false

是否只看自己创建的

showHidden

Bool

false

是否展示隐藏分群

domainType

String

Public

公私域类型,值为Public或Private

majorIdValues

String

"wx123"

主id筛选项

onlineServiceEnabled

Bool

false

是否开启在线服务

orderBy

String

updateTime

排序键,参考分群列表

order

String

asc

排序方式,值为desc或asc

segmentTypes

Array

Conditional

分群类型列表,值为Conditional等

scheduleTypes

Array

["Daily"]

调度类型列表,值为Once、Daily等

fileStatus

Array

["Created"]

文件任务状态列表,值为Created等

bitmapStatus

Array

["Created"]

bitmap任务状态列表,值为Created等

onlineServiceStatus

Array

["Created"]

在线服务状态列表,值为Created等

segIdLike

Int

1

单个分群id过滤,仅在分群列表页生效

subjectIds

Array

[1,2]

多个主体id过滤,仅在分群列表页生效

sourcePlatforms

Array

["CDP"]

来源平台列表

encryptionMethods

Array

SHA256

加密方法列表,值为SHA256、MD5等

viewer

String

admin

查看人,需要admin身份调用才能生效

segIds

Array

[1,2]

分群ID列表

name

String

name

名称

createdBy

String

admin

创建者

返回参数

data字段内容

参数

类型

示例值

描述

total

Int

10

总数

pageSize

Array

10

每页大小

page

Array

1

页码

data

Array

结果

  • data数组元素字段内容

参数

类型

示例值

描述

id

Int

1001989

分群id

name

String

openapi2024-11-26T11:11:36.931984

分群名称

desc

String

""

分群描述

condition

SegmentCondition

{
    "targetIdTypeId": 1,
    "majorIdValues": null,
    "encryptionMethod": null,
    "onlineServiceEnabled": false,
    "extraCondition": {
        "type": "SqlExport",
        "sql": "select ...",
        "showConf": null
    },
    "realtimeEnabled": null,
    "sampleLimit": null,
    "kvKeyFormat": null
}

分群规则

taskConf

SegmentTaskConf

{
    "scheduleType": "Trigger",
    "skipCheck": null,
    "notAutoRun": null,
    "scheduleTime": "00:00",
    "scheduleStartDate": null,
    "scheduleEndDate": null,
    "segTaskDependencySettingDetail": null,
    "scheduleDateTimes": null
}

分群任务配置

taskResults

Array

[
    {
        "taskTime": "2024-11-26 00:00:00",
        "startTime": "2024-11-26 11:11:37",
        "endTime": "2024-11-26 11:12:11",
        "status": "Success",
        "taskType": "FileTask",
        "errMsg": "",
        "elapseTime": 34,
        "count": 436,
        "filePath": "/user/datarangers/bdb/application/segmentation/segment_v2/target/2024-11-26/1001989/135926/5de3600d-5b1a-4cc3-8896-85e90d2c7640.gz",
        "effectiveRate": null
    },
    {
        "taskTime": "2024-11-26 00:00:00",
        "startTime": "2024-11-26 11:11:37",
        "endTime": "2024-11-26 11:12:42",
        "status": "Success",
        "taskType": "BitmapTask",
        "errMsg": null,
        "elapseTime": 65,
        "versionId": 135927,
        "pDate": "2024-11-26"
    }
]

分群最新任务状态

lastSuccessTaskResults

Array

分群最新成功任务状态

count

Int

436

人群数量

exportAt

String

2024-11-26 11:12:11

分群导出时间

createdBy

String

admin

创建人

createTime

String

2024-11-26 11:11:37

创建时间

updatedBy

String

admin

编辑人

updateTime

String

2024-11-26 11:11:37

编辑时间

idType

IdTypeResponse

{
    "id": 1,
    "name": "主体1的基准ID",
    "code": "baseid",
    "subjectId": 1,
    "subjectName": null,
    "entityType": "BaseId"
}

id类型信息

sourcePlatform

String

CDP

来源平台

sourceModule

String

来源模块

deletedFlag

Int

0

软删除标记,0存在,1删除

segType

String

SqlExport

分群类型

tenantId

Int

5

租户id

bdbTaskId

Int

100006771

bdb任务id

childSegments

Array

子包信息

readable

Bool

true

是否可读

isHidden

Bool

false

是否隐藏(GMP人群可能会隐藏)

publicSegId

Int

私转公对应的其他人群包id

groupInfo

Array

组信息

onlineServiceTaskId

Int

在线导入任务id

请求示例

{
}

返回示例

{
    "code": 0,
    "msg": "成功",
    "data": [{
        "id": 1001989,
        "name": "openapi2024-11-26T11:11:36.931984",
        "desc": null,
        "condition": {
            "targetIdTypeId": 1,
            "majorIdValues": null,
            "encryptionMethod": null,
            "onlineServiceEnabled": false,
            "extraCondition": {
                "type": "SqlExport",
                "sql": "select ...",
                "showConf": null
            },
            "realtimeEnabled": null,
            "sampleLimit": null,
            "kvKeyFormat": null
        },
        "taskConf": {
            "scheduleType": "Trigger",
            "skipCheck": null,
            "notAutoRun": null,
            "scheduleTime": "00:00",
            "scheduleStartDate": null,
            "scheduleEndDate": null,
            "segTaskDependencySettingDetail": null,
            "scheduleDateTimes": null
        },
        "taskResults": [
            {
                "taskTime": "2024-11-26 00:00:00",
                "startTime": "2024-11-26 11:11:37",
                "endTime": "2024-11-26 11:12:11",
                "status": "Success",
                "taskType": "FileTask",
                "errMsg": "",
                "elapseTime": 34,
                "count": 436,
                "filePath": "/user/datarangers/bdb/application/segmentation/segment_v2/target/2024-11-26/1001989/135926/5de3600d-5b1a-4cc3-8896-85e90d2c7640.gz",
                "effectiveRate": null
            },
            {
                "taskTime": "2024-11-26 00:00:00",
                "startTime": "2024-11-26 11:11:37",
                "endTime": "2024-11-26 11:12:42",
                "status": "Success",
                "taskType": "BitmapTask",
                "errMsg": null,
                "elapseTime": 65,
                "versionId": 135927,
                "pDate": "2024-11-26"
            }
        ],
        "lastSuccessTaskResults": null,
        "count": 436,
        "exportAt": "2024-11-26 11:12:11",
        "createdBy": "admin",
        "createTime": "2024-11-26 11:11:37",
        "updatedBy": "admin",
        "updateTime": "2024-11-26 11:11:37",
        "idType": {
            "id": 1,
            "name": "主体1的基准ID",
            "code": "baseid",
            "subjectId": 1,
            "subjectName": null,
            "entityType": "BaseId"
        },
        "sourcePlatform": "CDP",
        "sourceModule": null,
        "deletedFlag": 0,
        "segType": "SqlExport",
        "tenantId": 5,
        "bdbTaskId": 100006771,
        "childSegments": null,
        "readable": true,
        "isHidden": false,
        "publicSegId": null,
        "groupInfo": [],
        "onlineServiceTaskId": null,
        "appInfo": {
            "appId": null,
            "appName": null,
            "teaAppId": null,
            "projectId": null,
            "subjectId": null
        }
    }]
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HTTP 状态码

错误码

错误信息

说明

400

invalidParameter

PARAMETER INVALID

参数非法,检查入参。