Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Lane/ Obtaining All Lanes Based on the Microservice Engine ID
Updated on 2024-10-16 GMT+08:00

Obtaining All Lanes Based on the Microservice Engine ID

Function

This API is used to obtain all lanes based on the microservice engine ID.

URI

GET /v3/{project_id}/cas/swimlane

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

engine_id

Yes

String

Microservice engine ID. See Querying the Exclusive Microservice Engine List.

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

count

Integer

Total number of lanes.

swimlanes

Array of objects

List of lanes. See Table 5.

Table 5 swimlanes

Parameter

Type

Description

id

String

Lane ID.

name

String

Lane name.

swimlane_group_id

String

Lane group ID.

type

String

Lane type.

  • BASE: baseline lane.
  • GRAY: dark launch lane.

tag

String

Lane tag, which is used to control traffic routing.

route_status

String

Route status.

  • ENABLE
  • DISABLED

rule_match_mode

String

Mode of matching routing rules. This parameter is valid when gray_release_type is set to CONTENT.

  • ALL: matches all rules.
  • ANY: matches any rule.

rules

Array of objects

Routing rules. This parameter is valid when gray_release_type is set to CONTENT. See Table 6.

weight

Integer

Lane traffic weight. Value range: 0–100.

This parameter is valid when gray_release_type is set to WEIGHT.

project_id

String

Project ID.

create_time

Integer

Creation time.

update_time

Integer

Update time.

creator

String

Creator.

Table 6 rules

Parameter

Type

Description

type

String

Type of dark launch matching rule. Currently, only HEADER is supported, that is, matching by header.

key

String

Key.

value

String

Value.

condition

String

Match condition.

  • EXACT
  • PREFIX
  • REGEX

Example Request

None

Example Response

{
  "swimlanes": [
    {
      "id": "8c6274b9-113e-4066-9b1c-320fe5ae327b",
      "name": "baselane",
      "swimlane_group_id": "13c73b95-ec0f-4e11-8901-d1e3c9142d75",
      "type": "BASE",
      "tag": "base",
      "weight": 100,
      "route_status": "ENABLE",
      "swimlane_group": {
        "routeInGroupTags": null,
        "gateways": [
          {
            "id": "6b44bcf9-99e9-46f4-9ab5-7670456073fc",
            "name": "microGateway-pyy-0127-1",
            "target_services": [
              {
                "id": "e882070c-7d02-4db1-8b84-619ee88f1a25",
                "host": "unit-provider-all..wulumuqi.servicecomb",
                "name": "unit-provider-all"
              }
            ],
            "engine_id": "b4032a08-b09d-47e4-a01f-596906df6f55"
          }
        ],
        "id": "13c73b95-ec0f-4e11-8901-d1e3c9142d75",
        "name": "test-wqd",
        "gray_release_type": "WEIGHT",
        "description": "111"
      }
    }
  ],
  "count": 1
}

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.