Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Lane Group/ Obtaining the Target Service List Based on the Gateway ID
Updated on 2024-10-16 GMT+08:00

Obtaining the Target Service List Based on the Gateway ID

Function

This API is used to obtain the target service list based on the gateway ID.

URI

GET /v3/{project_id}/cas/swimlane-group/target-services

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID. See Obtaining a Project ID.

Table 2 Query parameter

Parameter

Mandatory

Type

Description

gateway_id

Yes

String

Gateway ID.

Request

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

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

Table 4 Response parameters

Parameter

Type

Description

id

String

Target service ID.

host

String

Host information of the target service.

The host information consists of the microservice name after the target service is connected to the engine, the microservice environment name, the microservice application name, and the type of the engine to which the microservice is connected. They are separated by periods (.).

For example, unit-controller.testing.test-application.servicecomb. unit-controller indicates the name of the microservice connected to the engine. testing indicates the name of the environment where the unit-controller microservice is located. test-application indicates the name of the application to which the unit-controller microservice belongs. servicecomb indicates that the unit-controller microservice is connected to the ServiceComb engine.

name

String

Target service name.

service_source_name

String

Service source name.

engine_id

String

Service source engine ID.

engine_type

String

Service source engine type.

swimlane_group_id

String

Lane group ID.

swimlane_group_name

String

Lane group name.

status

String

Target service status.

  • TARGET_SERVICE_MANAGED: The target service is managed.
  • MICROSERVICE_OF_TARGET_SERVICE_UNROUTING: Routing is not available for mapped microservices.
  • MICROSERVICE_OF_TARGET_SERVICE_MANAGED: Mapped microservices are managed.

Example Request

None

Example Response

[
    {
        "id": "8177d237-b912-4167-a90d-33c603610d0b",
        "host": "provider..demo-java-chassis-cse-v2.servicecomb",
        "name": "provider",
        "service_source_name": "cscs",
        "engine_id": "d68a5ca7-b5b6-4917-a464-0adef94b8067",
        "engine_type": "servicecomb",
        "swimlane_group_id": null,
        "swimlane_group_name": null,
        "status": null
    },
    {
        "id": "8d8d5d85-2ae6-463b-b2e9-0fa9d9a0aa7d",
        "host": "test.static",
        "name": "test",
        "service_source_name": "static",
        "engine_id": null,
        "engine_type": null,
        "swimlane_group_id": null,
        "swimlane_group_name": null,
        "status": "MICROSERVICE_OF_TARGET_SERVICE_UNROUTING"
    }
]

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.