Obtaining Component Information Based on the Component ID
Function
This API is used to obtain component information based on the component ID.
URI
GET /v2/{project_id}/cas/applications/{application_id}/components/{component_id}
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. |
component_id |
Yes |
String |
Component ID. See Obtaining All Components of an Application. |
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 |
---|---|---|
id |
String |
Application component ID. |
name |
String |
Application component name. |
status |
Integer |
Value: 0 or 1. 0: Normal. 1: Being deleted. |
runtime |
String |
Runtime system. |
category |
String |
Application component category. Example: Webapp, MicroService, or Common. |
sub_category |
String |
Application component sub-category. Webapp sub-categories include Web. MicroService sub-categories include Java Chassis, and Spring Cloud. Common sub-category can be empty. |
description |
String |
Description. |
project_id |
String |
Project ID. |
application_id |
String |
Application ID. |
source |
Object |
Source of the code or software package. See Table 4. |
build |
Object |
Build. See Table 8. |
create_time |
Integer |
Creation time. |
update_time |
Integer |
Update time. |
creator |
String |
Creator. |
pipeline_ids |
Array of String |
Pipeline ID. |
Parameter |
Type |
Description |
---|---|---|
kind |
String |
Type. |
spec |
Object |
For details about the source code, see Table 5. See Table 6. |
Parameter |
Type |
Description |
---|---|---|
repo_type |
String |
Code repository type. Value: GitHub, BitBucket, or GitLab. |
repo_url |
String |
Code repository URL. Example: https://github.com/example/demo.git. |
repo_ref |
String |
Code branch or tag. Default value: master. |
repo_auth |
String |
Authorization name, which can be obtained from the authorization list. |
Parameter |
Type |
Description |
---|---|---|
storage |
String |
Storage mode. |
type |
String |
Type. |
url |
String |
Address of the software package/source code. |
auth |
String |
Authentication mode. |
webUrl |
String |
Address of the software/source code repository. |
properties |
Object |
Other attributes of the software package. You need to add these attributes only when you set storage to obs. See Table 7. |
Parameter |
Type |
Description |
---|---|---|
endpoint |
String |
OBS endpoint address. Example: https://obs.region_id.external_domain_name.com. |
bucket |
String |
Name of the OBS bucket where the software package is stored. |
key |
String |
Object in the OBS bucket, which is usually the name of the software package. If there is a folder, the path of the folder must be added. Example: test.jar or demo/test.jar. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Job ID. |
parameters |
Map<String,String> |
See Table 9. |
Parameter |
Type |
Description |
---|---|---|
build_cmd |
String |
Compilation command. |
dockerfile_path |
String |
Address of the Docker file. |
artifact_namespace |
String |
Build archive organization. |
cluster_id |
String |
ID of the cluster to be built. |
node_label_selector |
Map<String, String> |
key: label key. value: label value. |
Example Request
None
Example Response
{ "id": "1cfdda6f-84cd-4ead-8e09-628fabf662e2", "name": "test-micro", "runtime": "Java8", "category": "MicroService", "sub_category": "Java Chassis", "description": "", "project_id": "e7d2e9c589e5445e808a8ff0d1235aca", "application_id": "4d92833a-fa05-4fc0-a761-e67620022310", "source": { "kind": "artifact", "spec": { "storage": "obs", "type": "package", "url": "obs://test-soft/fusionweather-1.0.0.jar", "auth": "iam", "webUrl": "", "properties": { "bucket": "test-soft", "endpoint": "https://obs.region_id.development.com:443", "key": "fusionweather-1.0.0.jar" } } }, "build": { "id": "zpdkj42b3rnko8bmyojzt1ng828ubychw13j8flv", "parameters": { "artifact_namespace": "ns", "use_public_cluster": false, "cluster_id": "523498f1-36c4-11eb-ae36-0255ac1000c2", "cluster_name": "cce-test", "cluster_type": "VirtualMachine" } }, "status": 0, "creator": "ss-test", "create_time": 1610331760105, "update_time": 1610519881943 }
Status Code
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