Help Center/ ServiceStage/ API Reference (Kuala Lumpur Region)/ Application Management APIs/ Component/ Obtaining Application Component Information Based on the Component ID
Updated on 2022-08-15 GMT+08:00

Obtaining Application Component Information Based on the Component ID

Function

This API is used to obtain application component information based on the component ID.

URI

GET /v2/{project_id}/cas/applications/{application_id}/components/{component_id}

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Tenant's project ID.

application_id

String

Yes

Application ID.

component_id

String

Yes

Component ID.

Request

None

Response

Table 2 Response parameters

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.

category

String

Application component type. Example: Webapp, MicroService, or Common.

sub_category

String

Application component sub-type.

Webapp sub-types include Web.

MicroService sub-types include Java Chassis, Go Chassis, Mesher, Spring Cloud, and Dubbo.

Common sub-type can be empty.

description

String

Description.

pipeline_ids

Array<String>

Pipeline ID list. A maximum of 10 pipeline IDs are supported.

project_id

String

Project ID.

application_id

String

Application ID.

source

Object

Source of the code or software package. See Table 3.

build

Object

Build. See Table 6.

create_time

Integer

Creation time.

update_time

Integer

Update time.

creator

String

Creator.

Table 3 source parameters

Parameter

Type

Description

kind

String

Type.

spec

Object

See Table 4.

Table 4 spec parameters

Parameter

Type

Description

storage

String

Storage mode.

type

String

Type.

url

String

Address of the software package or source code.

auth

String

Authentication mode.

properties

Object

Other attributes of the software package. You need to add these attributes only when you set storage to obs. For details, see Table 5.

Table 5 artifact spec properties parameters

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.

Table 6 build parameters

Parameter

Type

Description

ID

String

Type.

parameters

Map<String,String>

See Table 7.

Table 7 parameters description

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 indicates the key of the tag, and value indicates the value of the tag.

Example

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"
		}
	},
	"pipeline_ids": null,
	"status": 0,
	"creator": "ss-test",
	"create_time": 1610331760105,
	"update_time": 1610519881943
}

Status Code

Table 8 Status codes

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.