Obtaining All Components of an Application
Function
This API is used to obtain all components of an application.
Authorization Information
Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permission listed below is required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
servicestage:app:listComponent
list
-
-
servicestage:app:list
-
URI
GET /v3/{project_id}/cas/applications/{application_id}/components
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Tenant's project ID. See Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| application_id | Yes | String | Definition Application ID. See Obtaining All Applications. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Definition Number of query results. Constraints N/A Range 1~100 Default Value 10 |
| offset | No | Integer | Definition Query offset, which indicates the result after the Nth data record is queried. Constraints N/A Range N/A Default Value 0 |
| order_by | No | String | Definition Sorting field. Constraints N/A Range
If the transferred value is not within the supported enumerated value range, the data is sorted by create_time. Default Value create_time |
| order | No | String | Definition Sorting order. Constraints N/A Range
Default Value desc |
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Definition Message body type (or format). Constraints N/A Range application/json;charset=utf8 Default Value N/A |
| X-Auth-Token | Yes | String | Definition API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication. Constraints N/A Range N/A Default Value N/A |
Response
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Definition Total number of components. Range N/A |
| components | Array of objects | Definition Component parameters. See Table 5. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Component ID. Range N/A |
| name | String | Definition Component name. Range N/A |
| labels | Array of objects | Definition Label. For container-deployed components, you can query a workload by label. For VM-deployed components, you can configure a label of the corresponding microservice name to use graceful startup and shutdown. See Table 10. |
| status | Object | Definition Component status. See Table 8. |
| runtime_stack | Object | Definition Technology stack. See Table 7. |
| application_name | String | Definition Application name. Range N/A |
| application_id | String | Definition Application ID. Range N/A |
| environment_name | String | Definition Environment name. Range N/A |
| environment_id | String | Definition Environment ID. Range N/A |
| version | String | Definition Component version. Range N/A |
| source | Object | Definition Source of the code or software package. See Table 6. |
| creator | String | Definition Component creator. Range N/A |
| platform_type | String | Definition Platform type. Range Values:
|
| external_accesses | Array of objects | Definition External access. See Table 11. |
| workload_kind | String | Definition Workload type. Range
|
| is_multi_containers | Boolean | Definition Whether multi-container is set. Range
|
| enterprise_project_id | String | Definition Enterprise project ID. Range N/A |
| engine_id | String | Definition Engine ID. Range N/A |
| swimlane_tag | String | Definition Lane tag. Range N/A |
| swimlane | Object | Definition Lane. See Table 12. |
| refer_resources | Array of objects | Definition Associated resource. See Table 14. |
| config_mode | String | Definition Component creation mode. Range
|
| template_source | Object | Definition Source of the component template package. See Table 20. |
| vmapp_config_mode | String | Definition Directory type of a VM-deployed component. Range
|
| vmapp_config | Object | Definition Directory settings of a VM-deployed component. See Table 22. |
| Parameter | Type | Description |
|---|---|---|
| kind | String | Definition Component source kind. Range
|
| version | String | Definition Version number. Range N/A |
| url | String | Definition Package address. This parameter is mandatory when kind is set to package or image. Range N/A |
| storage | String | Definition Storage mode. Range
This parameter is mandatory when kind is set to package or image. |
| auth | String | Definition Authentication mode. Range
|
| repo_auth | String | Definition Authorization name, which can be obtained from the authorization list. Range N/A |
| repo_namespace | String | Definition Namespace of the code repository. Range N/A |
| repo_ref | String | Definition Code branch or tag. Default value: master. Range N/A |
| repo_type | String | Definition Code repository. Range
|
| web_url | String | Definition Code redirection URL. Example: https://github.com/example/demo.git. Range N/A |
| repo_url | String | Definition Code repository URL. Example: https://github.com/example/demo.git. Range N/A |
| http_username | String | Definition Username. This parameter is mandatory when storage is set to http. Username and password authentication is supported. Range N/A |
| http_password | String | Definition Password. This parameter is mandatory when storage is set to http. Username and password authentication is supported. Range N/A |
| http_command | String | Definition Address of the custom software package. This parameter is mandatory when storage is set to http. Range N/A |
| http_headers | Map<String, String> | Definition This parameter is mandatory when storage is set to http. You can customize request headers as key-value pairs, for example, {"key":"xx","value":"xx""}. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Technology stack name. Example: OpenJDK8. Range N/A |
| type | String | Definition Technology stack type. Range
|
| version | String | Definition Technology stack version. Example: 1.1.4. Range N/A |
| deploy_mode | String | Definition Deployment mode. Range
|
| Parameter | Type | Description |
|---|---|---|
| component_status | String | Definition Component status. Range
|
| available_replica | Integer | Definition Available instances. Range N/A |
| succeeded_replica | Integer | Definition Number of instances that are successfully executed by the job workload. Range N/A |
| replica | Integer | Definition Total instances. Range N/A |
| fail_detail | String | Definition Failure cause. Range
|
| last_job_id | String | Definition ID of the last executed job. Range N/A |
| create_time | Integer | Definition Creation time. Range N/A |
| update_time | Integer | Definition Update time. Range N/A |
| creator | String | Definition Creator. Range N/A |
| artifact | Object | Definition Artifact information. See Table 9. |
| Parameter | Type | Description |
|---|---|---|
| type | String | Definition Kind of the component source package. Range
|
| url | String | Definition Software package or image address. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| key | String | Definition Label name. Range N/A |
| value | String | Definition Label value. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| protocol | String | Definition External access type. Range
|
| address | String | Definition External access address. Range N/A |
| forward_port | Integer | Definition External access port. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Lane ID. Range N/A |
| name | String | Definition Lane name. Range N/A |
| swimlane_group_id | String | Definition Lane group ID. Range N/A |
| type | String | Definition Lane type. Range
|
| tag | String | Definition Lane tag, which is used to control traffic routing. Range N/A |
| route_status | String | Definition Route status. Range
|
| rule_match_mode | String | Definition Mode of matching routing rules. This parameter is valid when gray_release_type is set to CONTENT. Range
|
| rules | Array of objects | Definition Routing rules. This parameter is valid when gray_release_type is set to CONTENT. See Table 13. |
| weight | Integer | Definition Lane traffic weight. This parameter is valid when gray_release_type is set to WEIGHT. Range 0–100 |
| project_id | String | Definition Project ID. Range N/A |
| create_time | Integer | Definition Creation time. Range N/A |
| update_time | Integer | Definition Update time. Range N/A |
| creator | String | Definition Creator. Range N/A |
| swimlane_group | Object | Definition Lane group. See Table 17. |
| engine_ids | Array of strings | Definition Engine ID list. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| type | String | Definition Matching type of dark launch policies. Range HEADER |
| key | String | Definition Key. Range N/A |
| value | String | Definition Value. Range N/A |
| condition | String | Definition Match condition. Range
|
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Resource ID. Range N/A |
| instance_id | String | Definition Component instance ID. Range N/A |
| type | String | Definition Resource type. Range
|
| refer_type | String | Definition Resource type. Range
|
| refer_alias | String | Definition Resource alias. Range N/A |
| parameters | Object | Definition Resource parameters. See Table 15. |
| selectors | Objects | Definition Resource selector. See Table 16. |
| Parameter | Type | Description |
|---|---|---|
| namespace | String | Definition Namespace. Range N/A |
| name | String | Definition Resource name. Range N/A |
| capacity | Integer | Definition Storage capacity, in GiB. Range N/A |
| type | String | Definition Volume declaration type. This parameter is specified when type is set to pvc in Table 14. Range
|
| class | String | Definition Volume declaration subtype. Range
|
| pv_name | String | Definition Volume name. This parameter is displayed when type is set to efs. Range N/A |
| share_id | String | Definition Volume handle. This parameter is displayed when type is set to efs. Range N/A |
| share_export_location | String | Definition Shared path of the volume. This parameter is displayed when type is set to efs. Range N/A |
| share_proto | String | Definition File system type of the volume. This parameter is displayed when type is set to efs. Default value: NFS. Range N/A |
| obs_volume_type | String | Definition OBS volume type. Default value: STANDARD. Range
|
| access_mode | String | Definition Storage volume access mode. Range
|
| availableZone | String | Definition AZ. Range N/A |
| volume_type | String | Definition Volume type. Range
|
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Resource selector name. Range N/A |
| flavor | String | Definition Resource selector flavor. Range N/A |
| labels | Map<String, String> | Definition Label. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Lane group ID. Range N/A |
| name | String | Definition Lane group name. Range N/A |
| description | String | Definition Lane group description. Range N/A |
| creator | String | Definition Creator. Range N/A |
| project_id | String | Definition Project ID. Range N/A |
| gray_release_type | String | Definition Dark launch type of the lane group. Range
|
| engine_ids | Array of strings | Definition Engine IDs of the gateway's target services. Range N/A |
| gateways | Array of objects | Definition List of target services. See Table 18. |
| create_time | Integer | Definition Creation time. Range N/A |
| update_time | Integer | Definition Update time. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Gateway ID. Range N/A |
| name | String | Definition Gateway name. Range N/A |
| engine_id | String | Definition ID of the engine used by the target services. Range N/A |
| target_services | Array of objects | Definition List of target services in the gateway service management. See Table 19. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Target service ID. Range N/A |
| name | String | Definition Target service name. Range N/A |
| host | String | Definition Host information of the target service. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| storage | String | Definition Storage mode of the component template package. Range
|
| url | String | Definition Address of the component template package. This parameter is valid only when the component template package storage mode is http. Range N/A |
| http_username | String | Definition Username. This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication. Range N/A |
| http_password | String | Definition Password. This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication. Range N/A |
| http_headers | Array of objects | Definition Request header. See Table 21. This parameter is valid only when the component template package storage mode is http and the security authentication mode is custom header authentication. |
| Parameter | Type | Description |
|---|---|---|
| key | String | Definition Request key. Range N/A |
| value | String | Definition Request value. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| run_as_user | String | Definition Running user. Range N/A |
| app_home | Object | Definition Deployment directory settings. See Table 23. |
| log_home | Object | Definition Log directory settings. See Table 23. |
| Parameter | Type | Description |
|---|---|---|
| path | String | Definition Directory setting path. Range N/A |
| user | String | Definition User to which the directory setting path belongs. Range N/A |
| group | String | Definition User group to which the directory setting path belongs. Range N/A |
| mode | String | Definition Permission on the directory setting path. Range N/A |
Example Request
None
Example Response
{
"components": [
{
"source": {
"kind": "package",
"url": "obs://bucket0001/weather-1.0.0.jar",
"storage": "obs"
},
"name": "mycomponent",
"id": "b8702b0f-94d3-4822-98a1-56815632a0a0",
"labels": null,
"runtime_stack": {
"name": "OpenJDK8",
"deploy_mode": "virtualmachine",
"version": "1.1.1"
},
"external_accesses": null,
"status": {
"component_status": "RUNNING",
"available_replica": 1,
"replica": 1,
"fail_detail": null,
"last_job_id": "JOB8be53b2a-af9a-4e2b-8505-096688a52237",
"creator": "ss-test",
"create_time": 1679556221028,
"update_time": 1679556318779
},
"environment_name": "sudo",
"environment_id": "4d084044-0b80-4641-963c-b9c9f4092a4f",
"application_name": "app-39mbbn",
"application_id": "fc092465-a5fb-4a52-bc65-b735f18366d8",
"creator": "ss-test",
"platform_type": "cce",
"version": "2023.0323.15181"
}
],
"count": 1
} Status Code
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |
Error Code
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot