Updated on 2025-08-29 GMT+08:00

Querying API Versions

Function

This API is used to query all available ELB API versions. Generally, APIs of a later version (v3 is the latest version) support more features than those of an earlier version.

Note the following when using APIs of different versions:

  • The API (POST /v3/{project_id}/elb/loadbalancers) cannot be used to create shared load balancers. To create a shared load balancer, you can call v2/v2.0 API, the API (/v3/{project_id}/elb/loadbalancers/batch-create) to batch create load balancers, or the API (/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/clone) to copy a load balancer.

  • Other v3 APIs can be used to manage both dedicated and shared load balancers and their associated resources. For example, you can call the API (POST /v3/{project_id}/elb/listeners) to add a listener to a shared load balancer. However, some features of dedicated load balancers are not supported. For details, see each API description.

Calling Method

For details, see Calling APIs.

URI

GET /versions

Request Parameters

None

Response Parameters

Status code: 200

Table 1 Response body parameters

Parameter

Type

Description

versions

Array of ApiVersionInfo objects

Definition: Specifies the available API version.

Range: N/A

Table 2 ApiVersionInfo

Parameter

Type

Description

id

String

Definition: Specifies the API version.

Range: The value can be v3, v2, or v2.0 in descending order.

status

String

Definition: Specifies the status of the API version.

Range:

  • CURRENT: current version, which is the latest supported API version.

  • STABLE: stable version

  • DEPRECATED: discarded version

Example Requests

Querying API versions of a load balancer

GET https://{ELB_Endpoint}/versions

Example Responses

None

Status Codes

Status Code

Description

200

Successful request.

Error Codes

See Error Codes.