文档首页> 推荐系统 RES> API参考> API> 数据源> 修改数据源内容
更新时间:2022-05-13 GMT+08:00
分享

修改数据源内容

功能介绍

修改指定数据源的配置内容。

调试

您可以在API Explorer中调试该接口。

URI

PUT /v2.0/{project_id}/workspaces/{workspace_id}/data-sources/{datasource_id}

表1 路径参数

参数

是否必选

参数类型

描述

datasource_id

String

数据源id

project_id

String

项目id,获取方式请参见获取项目ID

workspace_id

String

工作空间id

表2 Query参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户token,获取方式请参见获取用户Token

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

内容类型,取值为application/json

表4 请求Body参数

参数

是否必选

参数类型

描述

name

String

数据源名称:,1-64位字母、数字、下划线、中划线组合。

最小长度:1

最大长度:64

data_config

DataConfig object

数据配置。

specs_config

SpecsConfig object

计算规格配置。

表5 DataConfig

参数

是否必选

参数类型

描述

offline

Offline object

离线计算规格。

nearline

Nearline object

近线数据源。

表6 Offline

参数

是否必选

参数类型

描述

user_url

String

用户数据url。

item_url

String

物品数据url。

behavior_url

String

行为数据url。

表7 Nearline

参数

是否必选

参数类型

描述

item_topic

Topic object

物品topic。

user_topic

Topic object

用户topic。

behavior_topic

Topic object

行为topic。

表8 Topic

参数

是否必选

参数类型

描述

name

String

名称。

id

String

id。

表9 SpecsConfig

参数

是否必选

参数类型

描述

offline

String

离线计算规格。

nearline

String

实时计算规格。

rank

String

深度学习计算规格。

online_tps

Integer

在线服务最大并发数。

响应参数

状态码: 200

表10 响应Body参数

参数

参数类型

描述

is_success

Boolean

是否成功。

message

String

返回消息。

error_code

String

错误码(请求成功时,不返回此字段)。

请求示例

修改数据源内容

/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/data-sources/testuuidxxxxxxxxxxxxxxxxxxxxxxxx

{
  "datasource_name" : "jby-test-datasourc1e",
  "data_config" : {
    "offline" : {
      "user_url" : "<OBS path for storing user data>",
      "item_url" : "<OBS path for storing item data>",
      "behavior_url" : "<OBS path for storing behavior data>"
    }
  },
  "specs_config" : {
    "offline" : "4CU",
    "nearline" : "8CU"
  }
}

响应示例

状态码: 200

OK

{
  "is_success" : true,
  "message" : "Successed to update data source."
}

状态码

状态码

描述

200

OK

错误码

请参见错误码

分享:

    相关文档

    相关产品