Obtaining All Components of an Application
Function
This API is used to obtain all components of an application.
URI
GET /v3/{project_id}/cas/applications/{application_id}/components
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant's project ID. See Obtaining a Project ID. |
application_id |
Yes |
String |
Application ID. See Obtaining All Applications. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
integer |
Number of records to be queried. Value range: 0–100. |
offset |
No |
integer |
Offset. |
order_by |
No |
String |
Sorting field. By default, query results are sorted by creation time. Enumerated values: create_time, name, and update_time. |
order |
No |
String |
Sorting order.
|
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type or format. |
X-Auth-Token |
Yes |
String |
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 a token, see Obtaining a User Token. |
Response
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of components. |
components |
Array of objects |
Component parameters. See Table 5. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Component ID. |
name |
String |
Component name. |
labels |
Array of objects |
Label. For container-based deployment, you can query a workload by label. For VM-based deployment, you can configure a label of the corresponding microservice name to use graceful startup and shutdown. See Table 10. |
status |
Object |
Component status. See Table 8. |
runtime_stack |
Object |
Technology stack. See Table 7. |
application_name |
String |
Application name. |
application_id |
String |
Application ID. |
environment_name |
String |
Environment name. |
environment_id |
String |
Environment ID. |
version |
String |
Version number. |
source |
Object |
Source of the code or software package. See Table 6. |
creator |
String |
Creator. |
platform_type |
String |
Deployment type. |
external_accesses |
Array of objects |
External access. See Table 11. |
Parameter |
Type |
Description |
---|---|---|
kind |
String |
Component source kind.
|
version |
String |
Version number. |
url |
String |
Package address. This parameter is mandatory when kind is set to package or image. |
storage |
String |
Storage mode. Value: swr (image), swr(software repository), codearts, or obs. This parameter is mandatory when kind is set to package or image. |
auth |
String |
Authentication mode. Value: iam or none. Default value: iam. |
repo_auth |
String |
Authorization name, which can be obtained from the authorization list. |
repo_namespace |
String |
Namespace of the code repository. |
repo_ref |
String |
Code branch or tag. Default value: master. |
repo_type |
String |
Code repository type. Value: GitHub, BitBucket, or GitLab. |
web_url |
String |
Code redirection URL. Example: https://github.com/example/demo.git. |
repo_url |
String |
Code repository URL. Example: https://github.com/example/demo.git. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Technology stack name. Example: OpenJDK8. |
type |
String |
Technology stack type. Example: Java. |
version |
String |
Technology stack version. Example: 1.1.4. |
deploy_mode |
String |
Deployment mode.
|
Parameter |
Type |
Description |
---|---|---|
component_status |
String |
Component status.
|
available_replica |
Integer |
Available instances. |
replica |
Integer |
Total instances. |
fail_detail |
String |
Failure cause.
|
last_job_id |
String |
ID of the last executed task. |
create_time |
Integer |
Creation time. |
update_time |
Integer |
Update time. |
creator |
String |
Creator. |
artifact |
Object |
Artifact information. See Table 9. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Component source type.
|
url |
String |
Software package or image address. |
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
HTTP Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
404 |
Not Found |
500 |
Internal Server Error |
Error Code
The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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