Obtaining the Component List
Function
This API is used to obtain the component list.
URI
GET /v1/{project_id}/cae/applications/{application_id}/components
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
application_id |
Yes |
String |
Application ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
String |
Maximum number of returned results. |
offset |
No |
String |
Pagination offset, that is, the start position for query. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token.
Maximum characters: 16,384 |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide. |
X-Environment-ID |
Yes |
String |
Environment ID.
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
api_version |
String |
API version. Fixed value: v1. Enumerated value:
|
kind |
String |
API type. Fixed value: Component. Enumerated value:
|
items |
Array of ComponentItem objects |
Component list. |
total_count |
Integer |
Total number of pages. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Component ID. |
name |
String |
Component name. |
annotations |
map<string, object> |
Additional information. |
created_at |
String |
Creation time. |
updated_at |
String |
Update time. |
spec |
ComponentSpec object |
Component specifications. |
Parameter |
Type |
Description |
---|---|---|
runtime |
String |
Language or runtime. Enumerated value:
|
env_id |
String |
Environment ID. |
replica |
Integer |
Number of instances. |
source |
Source object |
Source information. |
build |
Build object |
Build information. |
resource_limit |
ResourceLimit object |
Instance specifications. |
access_info |
Array of Access objects |
Access mode list. |
image_url |
String |
Image address. |
available_replica |
Integer |
Number of available instances. |
job_id |
String |
Job ID. |
build_id |
String |
Build task ID. |
status |
String |
Component status. |
build_log_id |
String |
Build log ID. |
configuration_operation_id |
String |
Latest operation ID. |
Parameter |
Type |
Description |
---|---|---|
code |
Repo object |
Source code repository information. |
type |
String |
Source type. Enumerated values:
|
sub_type |
String |
Source subtype.
Enumerated values:
|
url |
String |
URL.
|
Parameter |
Type |
Description |
---|---|---|
auth_name |
String |
Authorization name. |
branch |
String |
Branch. |
namespace |
String |
Namespace, which must be Base64-encoded. |
Parameter |
Type |
Description |
---|---|---|
archive |
Archive object |
Place where build products are archived for management. |
parameters |
map<string, object> |
Additional parameters. Options:
|
Parameter |
Type |
Description |
---|---|---|
artifact_namespace |
String |
SWR organization for product management. |
Example Request
Obtain the component list.
GET https://{endpoint}/v1/{project_id}/cae/applications/{application_id}/components
Example Response
Status code: 200
The request is successful.
{ "api_version" : "v1", "kind" : "Component", "items" : [ { "id" : "610fb1de-5ac6-424e-b910-d7be902575d0", "name" : "demo-xxx", "annotations" : { "version" : "1.0.0", "enterprise_project_id" : "" }, "created_at" : "2022-06-09T07:01:05.323979Z", "updated_at" : "2022-06-09T07:01:05.323979Z", "spec" : { "runtime" : "Docker", "env_id" : "50d18173-5df0-4db4-a2b6-8a428d42146b", "replica" : 1, "source" : { "type" : "image", "url" : "xxx/demo-jar:v2" }, "build" : { "archive" : { "artifact_namespace" : "xxx" }, "parameters" : { "base_image" : "" } }, "resource_limit" : { "cpu_limit" : "500m", "memory_limit" : "1Gi" }, "image_url" : "xxx/demo-jar:v2", "available_replica" : 1, "job_id" : "251b7d84-c353-416a-864f-5878a94c3d28", "status" : "running", "configuration_operation_id" : "xxx" } } ], "total_count" : 1 }
Status Code
Status Code |
Description |
---|---|
200 |
The request is successful. |
Error Code
For details, see 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