更新时间:2022-12-05 GMT+08:00

查询字典详情

功能介绍

查询字典详情,

URI

GET /v2/{project_id}/instances/{instance_id}/dictionaries/{dict_id}

表1 路径参数

参数

是否必选

参数类型

描述

dict_id

String

字典ID

最小长度:0

最大长度:64

instance_id

String

实例ID

最小长度:0

最大长度:64

project_id

String

项目ID

最小长度:0

最大长度:64

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)

最小长度:1

最大长度:100000

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

id

String

字典ID

最小长度:0

最大长度:64

name

String

字典名称

  • 字符集:中文、英文字母、数字、下划线和空格

  • 约束:实例下唯一

remark

String

字典描述

code

String

字典编码

  • 字符集:英文字母、数字、下划线和空格

  • 约束:实例下唯一

extend_one

String

字典扩展字段1

  • 字符集:中文、英文字母、数字、下划线和空格

extend_two

String

字典扩展字段2

  • 字符集:中文、英文字母、数字、下划线和空格

parent_code

String

父字典编码,为空时代表自身就是最顶级字典

type

String

字典类型

  • system: 代表系统内置字典,用户可编辑但不可删除

  • user: 代表用户创建字典

create_time

Number

创建时间

最小值:1

最大值:128

update_time

Number

更新时间

最小值:1

最大值:128

请求示例

响应示例

状态码: 200

OK

{
  "id" : "string",
  "name" : "string",
  "remark" : "string",
  "code" : "string",
  "extend_one" : "string",
  "extend_two" : "string",
  "parent_code" : "string",
  "type" : "system",
  "create_time" : "2019-12-06T06:49:04Z",
  "update_time" : "2019-12-06T06:49:04Z"
}

状态码: 404

Not Found

{
  "error_code" : "ROMA.00013011",
  "error_msg" : "dictionary does not exist",
  "error_details" : "The dictionary for specified name does not exist",
  "suggestion" : "",
  "request_id" : "f3951a4644f3917d8ff3a7d976d6ee21"
}

状态码

状态码

描述

200

OK

404

Not Found

错误码

请参见错误码