
# 获取所有应用
#### 功能介绍
通过此API可以获取所有已经创建的应用。
#### 调试
您可以在[API Explorer](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=ServiceStage&api=ListApplications)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### URI
GET /v2/{project_id}/cas/applications
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                 |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID。获取方法，请参考[获取项目ID](https://support.huaweicloud.com/api-servicestage/servicestage_06_0164.html)。 |
   
表2查询参数 
| 参数       | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|:---|
| limit    | 否    | String | 指定个数，取值\[0, 100\]或者1000，指定的值不在该范围内的话相当于赋值为10。默认1000，用于不分页的场景。分页的场景取值请用\[0, 100\]。                                                                                                                                                                                                   |
| offset   | 否    | String | 指定偏移量，表示查询第n条数据后的结果。                                                                                                                                                                                                                                                                |
| order_by | 否    | String | 排序字段，默认按创建时间排序。 排序字段支持枚举值：create_time，name，update_time。传的值不在支持的枚举值范围内的话按默认排序字段排序。                                                                                                                                          |
| order    | 否    | String | 排序方式。 - desc，降序排序，默认为desc。  - asc，升序排序。   |
   
#### 请求消息
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                           |
|:---|:---|:---|:---|
| Content-Type | 是    | String | 消息体的类型（格式），默认取值为"application/json;charset=utf8"。                                                                                             |
| X-Auth-Token | 是    | String | 调用接口的认证方式分为Token和AK/SK两种。如果您使用的Token方式，此参数为必填，请填写Token的值。Token获取方式，请参考[获取用户Token](https://support.huaweicloud.com/api-iam/iam_30_0001.html)。 |
   
#### 响应消息
表4响应参数 
| 参数           | 参数类型             | 描述                                                                   |
|:---|:---|:---|
| count        | Integer          | 应用总数。                                                                |
| applications | Array of objects | 应用信息，请参考[表5]。 |
   
 表5applications 
| 参数                    | 参数类型    | 描述                  |
|:---|:---|:---|
| id                    | String  | 应用ID。               |
| name                  | String  | 应用名称。               |
| description           | String  | 应用描述。               |
| creator               | String  | 创建人。                |
| project_id            | String  | 项目ID。               |
| enterprise_project_id | String  | 企业项目ID。             |
| create_time           | Integer | 创建时间。               |
| update_time           | Integer | 修改时间。               |
| unified_model         | String  | 是否开启统一模型，返回固定值null。 |
| component_count       | Integer | 组件个数。               |
   
#### 请求示例
无
#### 响应示例
```
{
"count": 1,
"applications": [
{
"id": "e5213b62-0e3c-476f-9960-3e4108787350",
"name": "app-xpmtii",
"description": "test",
"project_id": "e7d2e9c589e5445e808a8ff0d1235aca",
"enterprise_project_id": "0",
"creator": "ss-test",
"create_time": 1610432385245,
"update_time": 1610432385245,
"unified_model": null,
"component_count": 0
}
]
}
```
#### 状态码
| 状态码 | 描述       |
|:---|:---|
| 200 | 操作成功。    |
| 400 | 错误的请求。   |
| 404 | 请求对象不存在。 |
| 500 | 内部错误。    |
   
#### 错误码
请参考[ServiceStage错误码](https://support.huaweicloud.com/api-servicestage/servicestage_06_0162.html)。
