
# 获取指定元数据constraints列表 - ShowMetaConstraints
#### 功能介绍
获取指定元数据constraints列表
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-functiongraph/functiongraph_06_0200.html#functiongraph_06_0200)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-functiongraph/functiongraph_06_1100.html#functiongraph_06_1100)。
#### URI
GET /v1/{project_id}/ffs/metadata/constraints
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|:---|
| project_id | 是    | String | **参数解释**: 租户项目 ID，获取方式请参见[获取项目ID](https://support.huaweicloud.com/api-functiongraph/functiongraph_06_0260.html#functiongraph_06_0260)。 **约束限制**: 不涉及。 **取值范围**: 只能由英文字母、数字组成，且长度为32个字符 **默认取值**: 不涉及。 |
   
表2Query参数 
| 参数     | 是否必选 | 参数类型   | 描述     |
|:---|:---|:---|:---|
| locale | 否    | String | locale |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数          | 参数类型   | 描述   |
|:---|:---|:---|
| constraints | Object | 约束元素 |
   
表4ConstraintsItem 
| 参数                    | 参数类型    | 描述     |
|:---|:---|:---|
| type                  | String  | 类型     |
| description           | String  | 描述     |
| error_msg             | String  | 错误信息   |
| disabled              | Boolean | 是否启用   |
| configuration         | Object  | 约束配置信息 |
| initialize_validation | String  | 初始化校验  |
   
**状态码：400**
表5响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误描述 |
| request_id | String | 请求ID |
   
**状态码：500**
表6响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误描述 |
| request_id | String | 请求ID |
   
#### 请求示例
无
#### 响应示例
**状态码：200**
指定元数据constraints列表
```
{
  "constraints" : {
    "type" : "standalone_node_check",
    "description" : "all nodes in the graph should have at least one edge to the other node, and can not be standalone by itself",
    "error_msg" : "{0} is a standalone node",
    "disabled" : true,
    "configuration" : { },
     "initialize_validation": "xxx"
  } 
}
```
#### 状态码
| 状态码 | 描述                    |
|:---|:---|
| 200 | 指定元数据constraints列表    |
| 400 | Bad Request           |
| 500 | Internal Server Error |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-functiongraph/ErrorCode.html)。
