查询短信模板
功能介绍
该接口用于用户查询已创建的模板信息。
URI
GET /v2/{project_id}/msgsms/templates
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        是  | 
      
        String  | 
      
        项目ID,参考“获取账号、用户、项目的名称和ID”  | 
     
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        app_key  | 
      
        否  | 
      
        String  | 
      
        应用key  | 
     
| 
        app_name  | 
      
        否  | 
      
        String  | 
      
        应用名称  | 
     
| 
        end_time  | 
      
        否  | 
      
        String  | 
      
        结束时间  | 
     
| 
        flow_status  | 
      
        否  | 
      
        String  | 
      
        流程状态 
  | 
     
| 
        has_variable  | 
      
        否  | 
      
        String  | 
      
        是否存在变量 
  | 
     
| 
        limit  | 
      
        否  | 
      
        Integer  | 
      
        数量,默认值10  | 
     
| 
        offset  | 
      
        否  | 
      
        Integer  | 
      
        偏移量  | 
     
| 
        region  | 
      
        否  | 
      
        String  | 
      
        地域  | 
     
| 
        sign_name  | 
      
        否  | 
      
        String  | 
      
        签名名称  | 
     
| 
        sort_dir  | 
      
        否  | 
      
        String  | 
      
        排序方式 
  | 
     
| 
        sort_key  | 
      
        否  | 
      
        String  | 
      
        排序字段,仅支持create_time  | 
     
| 
        start_time  | 
      
        否  | 
      
        String  | 
      
        开始时间  | 
     
| 
        template_id  | 
      
        否  | 
      
        String  | 
      
        模板ID  | 
     
| 
        template_name  | 
      
        否  | 
      
        String  | 
      
        模板名称  | 
     
| 
        template_type  | 
      
        否  | 
      
        String  | 
      
        模板类型 
 全球短信固定写为NOTIFY_TYPE  | 
     
请求参数
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        Content-Type  | 
      
        是  | 
      
        String  | 
      
        请求体参数类型,该字段必须设置为:application/json  | 
     
| 
        X-Auth-Token  | 
      
        是  | 
      
        String  | 
      
        用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)  | 
     
响应参数
状态码: 200
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        results  | 
      
        Array of SmsTemplateResp  | 
      
        查询结果  | 
     
| 
        total  | 
      
        Long  | 
      
        总数  | 
     
| 
        参数  | 
      
        描述  | 
     
|---|---|
| 
        id  | 
      
        模板主键ID,用于获取、修改、删除模板以及查询模板变量的唯一标识  | 
     
| 
        template_name  | 
      
        模板名称  | 
     
| 
        template_type  | 
      
        模板类型  | 
     
| 
        template_content  | 
      
        模板内容  | 
     
| 
        template_id  | 
      
        模板ID  | 
     
| 
        app_key  | 
      
        应用key  | 
     
| 
        sign_id  | 
      
        签名ID  | 
     
| 
        create_time  | 
      
        创建时间  | 
     
| 
        customer_id  | 
      
        租户customer id  | 
     
| 
        has_variable  | 
      
        是否存在变量  | 
     
| 
        flow_status  | 
      
        流程状态  | 
     
| 
        status  | 
      
        模板状态 
  | 
     
| 
        universal_template  | 
      
        是否是通用模板  | 
     
| 
        review_desc  | 
      
        审批描述  | 
     
| 
        country_name  | 
      
        国家  | 
     
请求示例
GET /v2/845ada5bc7444f1295cd517af0123da1/msgsms/templates?template_name=auto_test789 Host: 100.85.***.***:30300 Content-Type: application/json X-Auth-Token: ****
响应示例
{
    "results": [
        {
            "create_time": "2022-08-12 07:40:36",
            "customer_id": "******c55c3c4526b2ed7a0213bc9871",
            "tenant": {
                "customer_id": "******c55c3c4526b2ed7a0213bc9871",
                "customer_name": "****05",
                "enterprise_name": "华为技术有限公司"
            },
            "id": "******27-37eb-4229-bee9-0eba4d8a897f",
            "template_type": "NOTIFY_TYPE",
            "template_name": "auto_test789",
            "app_name": "auto_test7890",
            "app_key": "******3baZf4c856O4Qrbqvui3K2",
            "sign_id": "******b9-4141-4e2d-9838-14889c32a4bf",
            "template_content": "测试",
            "has_variable": "No",
            "flow_status": "Reviewing",
            "status": "Normal",
            "universal_template": 0,
            "region": "cn",
            "brackets": "GB",
            "site": "cn",
            "urge_status": "NO",
            "is_support_multiomp": false,
            "country_name": ""
        }
    ],
    "total": 1
}
 返回值
| 
        返回值  | 
      
        描述  | 
     
|---|---|
| 
        200  | 
      
        OK  | 
     
| 
        401  | 
      
        Unauthorized  | 
     
| 
        403  | 
      
        Forbidden  | 
     
| 
        404  | 
      
        Not Found  | 
     
| 
        500  | 
      
        System error  |