接口功能介绍
查询某个schema属性的详情。
接口约束
请先订购DRDS实例。请先订购和DRDS实例在一个资源池同一个VPC下的RDS-MySQL实例,并关联到DRDS实例。请先创建一个schema。
URI
GET /v2/property/query-schema
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
prodInstId | 是 | String | DRDS产品实例id | cb236d462b924ef7bfba5ecf1d61de2b | |
schemaName | 是 | String | schema名称 | bss_crm_test | |
property | 是 | String | 属性,属性编码或属性名,取决于code | sqlMaxLimit | |
code | 否 | Boolean | true表示上述property为属性编码,false表示property为属性名,默认为true。建议尽量使用属性编码,因为属性编码不变。 | true |
请求参数
请求头header参数
无
请求体body参数
无
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
code | 是 | String | 返回码 取值范围:0表示成功,1表示失败 | 0 | |
message | 是 | String | 结果描述 | success | |
result | 否 | Objects | 返回对象。若无该字段或该字段为null,都代表返回对象为空 | result |
表 result
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
propertyId | 是 | Long | 属性id | 139 | |
catId | 是 | Long | 分类id | 1 | |
propertyCode | 是 | String | 属性编码 | enableMetricMonitor | |
propertyType | 是 | Integer | 属性类型,0-全部分类 1-应用属性 2-实例属性 3-分组属性 | 3 | |
propertyName | 是 | String | 属性名称 | ||
propertyNameEn | 否 | String | 英文属性名称 | ||
memo | 是 | String | 属性描述 | ||
memoEn | 否 | String | 英文属性描述 | ||
inputType | 是 | Integer | 输入类型,(1:select,2:checkbox,3:text,4:textarea) | ||
listOrder | 是 | Integer | 排序序号 | ||
status | 是 | Integer | 状态,0-无效 1-有效 | ||
createdTime | 是 | String | 创建时间 | ||
createdBy | 否 | Long | 创建者id | ||
modifiedTime | 否 | String | 修改时间 | ||
modifiedBy | 否 | Long | 修改者id | ||
required | 是 | Integer | 是否必填,0:否,1:必填 | ||
defaultValue | 否 | String | 默认值 | ||
valueType | 是 | Integer | 属性值类型,0:字符类型,1:数字类型,2:布尔类型,3:日期类型 | ||
realtime | 是 | Integer | 是否支持在线加载(是否即时生效),0:否,1:是 | ||
display | 是 | Integer | 是否显示,0:否,1:是 | ||
groupId | 是 | Long | 属性分组id | ||
zkPropertyId | 是 | String | zk属性id | ||
groupCode | 是 | String | 分组编码 | ||
propertyValue | 否 | String | 属性值 | ||
propertyValueList | 否 | Array of Objects | 属性值可选值范围 | PropertyValue |
表 PropertyValue
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
propertyValueId | 是 | Integer | 属性值id | ||
propertyValue | 是 | Integer | 属性值 | ||
listOrder | 是 | Integer | 排序序号 | ||
propertyId | 是 | Integer | 所属的属性id |
请求示例
请求头header
无
请求体body
无
响应示例
{
"code": 0,
"message": "success",
"result": {
"propertyId": 37,
"catId": 7,
"propertyCode": "sqlMaxLimit",
"propertyType": 1,
"propertyName": "sqlMaxLimit",
"propertyNameEn": "sqlMaxLimit",
"memo": "sql语句只涉及到一张表,并且该表是全局表或者where中没有主键条件的时候,该属性生效",
"memoEn": "The sql statement only involves a table, and the attribute is effective when the table is a global table or there is no primary key condition in where",
"inputType": 3,
"listOrder": 1,
"status": 1,
"createdTime": "2015-09-16T09:20:54.000+00:00",
"createdBy": 1,
"modifiedTime": "2015-10-12T10:17:19.000+00:00",
"modifiedBy": 1,
"required": 1,
"defaultValue": "1000",
"valueType": 1,
"realtime": 1,
"display": 1,
"groupId": 4,
"zkPropertyId": "/dbproxy_cluster/dbproxy_cluster_0000000372/schemas/schema_0000000509",
"groupCode": "schema",
"propertyValue": "1000"
}
}
状态码
请参考 状态码说明。