
# 列出应用程序模板 - ListApplicationTemplates
#### 功能介绍
查询应用程序模板列表。此操作只能由组织的管理账号或作为服务委托管理员的成员账号调用。
#### 授权信息
账号根用户具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备如下身份策略权限，更多的权限说明请参见[权限和授权项](https://support.huaweicloud.com/api-identitycenter/iic_04_0028.html)。
| 授权项                                                 | 访问级别 | 资源类型（\*为必须） | 条件键 | 别名 | 依赖的授权项                                     |
|:---|:---|:---|:---|:---|:---|
| IdentityCenter:application:listApplicationTemplates | List | -           | -   | -  | organizations:delegatedAdministrators:list |
   
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IdentityCenter/doc?api=ListApplicationTemplates)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### URI
GET /v1/application-templates
表1Query参数 
| 参数             | 是否必选 | 参数类型   | 描述              |
|:---|:---|:---|:---|
| application_id | 是    | String | 应用程序ID，以app-为前缀 |
   
#### 请求参数
表2请求Header参数 
| 参数               | 是否必选 | 参数类型   | 描述                                              |
|:---|:---|:---|:---|
| X-Security-Token | 否    | String | 如果正在使用临时安全凭据，则此header是必需的，该值是临时安全凭据的安全令牌（会话令牌）。 |
   
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数                    | 参数类型                                                                                                  | 描述       |
|:---|:---|:---|
| application_templates | Array of [ApplicationTemplateDto] objects | 应用程序模板列表 |
   
 表4ApplicationTemplateDto 
| 参数                      | 参数类型                                                                                                      | 描述           |
|:---|:---|:---|
| application             | [ApplicationTemplateDisplayDto] object | 应用程序模板显示信息   |
| response_config         | [ResponseConfigDto] object                         | 应用程序属性配置信息   |
| response_schema_config  | [ResponseSchemaConfigDto] object             | 应用程序属性映射配置信息 |
| sso_protocol            | String                                                                                                    | 支持的协议        |
| security_config         | [SecurityConfigDto] object                         | 证书配置信息       |
| service_provider_config | [ServiceProviderConfigDto] object           | 服务提供商配置信息    |
| template_id             | String                                                                                                    | 应用程序模板唯一标识ID |
| template_version        | String                                                                                                    | 应用程序模板版本     |
   
 表5ApplicationTemplateDisplayDto 
| 参数               | 参数类型                                                                | 描述              |
|:---|:---|:---|
| application_id   | String                                                              | 应用程序Id,以app-为前缀 |
| display          | [DisplayDto] object | 应用程序显示信息        |
| application_type | String                                                              | 应用程序类型          |
   
 表6DisplayDto 
| 参数           | 参数类型   | 描述       |
|:---|:---|:---|
| description  | String | 应用程序描述   |
| display_name | String | 应用程序显示名称 |
| icon         | String | 应用程序图标   |
   
 表7ResponseConfigDto 
| 参数          | 参数类型                                                                                                   | 描述            |
|:---|:---|:---|
| properties  | Map\<String,[ResponseSourceDetailsDto]\> | 额外添加的属性映射配置   |
| subject     | [ResponseSourceDetailsDto] object        | Subject属性映射配置 |
| relay_state | String                                                                                                 | 中继状态          |
| ttl         | String                                                                                                 | 会话过期时间        |
   
 表8ResponseSourceDetailsDto 
| 参数     | 参数类型             | 描述    |
|:---|:---|:---|
| source | Array of strings | 属性映射值 |
   
 表9ResponseSchemaConfigDto 
| 参数                        | 参数类型                                                                                                                       | 描述                      |
|:---|:---|:---|
| properties                | Map\<String,[ResponseSchemaPropertiesDetailsDto]\> | 额外添加的属性映射Schema配置       |
| subject                   | [ResponseSchemaSubjectDetailsDto] object              | Subject属性映射Schema配置     |
| supported_name_id_formats | Array of strings                                                                                                           | 应用程序支持的Subject NameID格式 |
   
 表10ResponseSchemaPropertiesDetailsDto 
| 参数               | 参数类型   | 描述         |
|:---|:---|:---|
| attr_name_format | String | 额外添加的属性的格式 |
| include          | String | 是否包含额外属性   |
   
 表11ResponseSchemaSubjectDetailsDto 
| 参数             | 参数类型   | 描述         |
|:---|:---|:---|
| name_id_format | String | NameID的格式  |
| include        | String | 是否包含NameID |
   
 表12SecurityConfigDto 
| 参数  | 参数类型   | 描述     |
|:---|:---|:---|
| ttl | String | 证书过期时间 |
   
 表13ServiceProviderConfigDto 
| 参数                        | 参数类型                                                                              | 描述        |
|:---|:---|:---|
| audience                  | String                                                                            | SAML受众    |
| require_request_signature | Boolean                                                                           | 是否需要签名    |
| consumers                 | Array of [ConsumersDto] objects | SAML响应接收方 |
| start_url                 | String                                                                            | 应用程序启动Url |
   
 表14ConsumersDto 
| 参数            | 参数类型    | 描述           |
|:---|:---|:---|
| binding       | String  | SAML传输协议     |
| default_value | Boolean | 是否是默认接收方     |
| location      | String  | SAML ACS Url |
   
**状态码：400**
表15响应Body参数 
| 参数         | 参数类型   | 描述     |
|:---|:---|:---|
| error_code | String | 错误码    |
| error_msg  | String | 错误信息   |
| request_id | String | 请求唯一标识 |
   
**状态码：403**
表16响应Body参数 
| 参数                            | 参数类型   | 描述      |
|:---|:---|:---|
| error_code                    | String | 错误码     |
| error_msg                     | String | 错误信息    |
| request_id                    | String | 请求唯一标识  |
| encoded_authorization_message | String | 加密的错误信息 |
   
#### 请求示例
查询应用程序模板列表
```
GET https://{hostname}/v1/application-templates
```
#### 响应示例
**状态码：200**
Successful
```
{
  "application_templates" : [ {
    "application" : {
      "application_id" : "app-ff1258a63a4a263f",
      "display" : {
        "description" : "Custom SAML 2.0 application",
        "display_name" : "Custom SAML 2.0 application",
        "icon" : ""
      },
      "application_type" : ""
    },
    "response_config" : {
      "properties" : { },
      "subject" : null,
      "relay_state" : null,
      "ttl" : "PT1H"
    },
    "response_schema_config" : {
      "properties" : { },
      "subject" : null,
      "supported_name_id_formats" : null
    },
    "sso_protocol" : "SAML",
    "security_config" : {
      "ttl" : null
    },
    "service_provider_config" : {
      "audience" : null,
      "require_request_signature" : false,
      "consumers" : null,
      "start_url" : null
    },
    "template_id" : "tpl-88f215b39bfc7575",
    "template_version" : "1"
  } ]
}
```
#### 状态码
| 状态码 | 描述          |
|:---|:---|
| 200 | Successful  |
| 400 | Bad request |
| 403 | Forbidden   |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-identitycenter/ErrorCode.html)。
