Querying All VPN Servers of a Tenant
Function
This API is used to query all VPN servers of a tenant.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/vpn-servers
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
limit |
Integer |
No |
Specifies the number of records returned on each page during pagination query. |
marker |
String |
No |
|
Response
- Response parameters
Returned status code 200: successful query
Table 3 Parameters in the response body Parameter
Type
Description
vpn_servers
Array of ShowServerResponse objects
Specifies VPN server information.
total_count
Integer
Specifies the total number of VPN servers under the current tenant.
page_info
PageInfo object
Specifies pagination query information.
request_id
String
Specifies a request ID.
Table 4 ShowServerResponse Parameter
Type
Description
id
String
- Specifies the ID of a VPN server.
- The value is a UUID containing 36 characters.
p2c_vgw_id
String
- Specifies the ID of a P2C VPN gateway.
- The value is a UUID containing 36 characters.
client_cidr
String
- Specifies a client CIDR block. A virtual IP address on this CIDR block will be assigned to a client for establishing a connection.
- The value is in the format of dotted decimal notation/mask, for example, 192.168.1.0/24.
local_subnets
Array of strings
- Specifies the list of local CIDR blocks.
- The value is in the format of dotted decimal notation/mask, for example, 10.10.1.0/24.
client_auth_type
String
tunnel_protocol
String
server_certificate
server_certificate object
Specifies server certificate information.
client_ca_certificates
Array of QueryClientCaCertificateBody objects
Specifies the list of client CA certificates, which are used to authenticate client certificates.
ssl_options
ssl_options object
Specifies SSL options.
dns_servers
Array of strings
- Specifies the DNS server list.
- The value is in dotted decimal notation, for example, 172.16.1.1.
status
String
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
updated_at
String
- Specifies the last update time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
Table 5 server_certificate Parameter
Type
Description
id
String
Specifies a certificate ID, which is the ID of a certificated uploaded in the CCM. This parameter is left empty if the certificate is deleted from the CCM.
name
String
Specifies a certificate name, which is the name of a certificated uploaded in the CCM.
issuer
String
- Specifies the issuer of a certificate.
- The value is a string of 1 to 256 characters.
subject
String
- Specifies the subject of a certificate.
- The value is a string of 1 to 256 characters.
serial_number
String
- Specifies the serial number of a certificate.
- The value is a string of 1 to 64 characters.
expiration_time
String
- Specifies the expiration time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
signature_algorithm
String
- Specifies the signature algorithm of a certificate.
- The value is a string of 1 to 64 characters.
Table 6 QueryClientCaCertificateBody Parameter
Type
Description
id
String
- Specifies a certificate ID.
- The value is a UUID containing 36 characters.
name
String
- Specifies a certificate name.
- The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), and hyphens (-).
issuer
String
- Specifies the issuer of a certificate.
- The value is a string of 1 to 256 characters.
subject
String
- Specifies the subject of a certificate.
- The value is a string of 1 to 256 characters.
serial_number
String
- Specifies the serial number of a CA certificate.
- The value is a string of 1 to 64 characters.
expiration_time
String
- Specifies the expiration time of a certificate.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
signature_algorithm
String
- Specifies the signature algorithm of a certificate.
- The value is a string of 1 to 64 characters.
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
updated_at
String
- Specifies the last update time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
Table 7 ssl_options Parameter
Type
Description
protocol
string
- Specifies a protocol.
- Value range: TCP
port
integer
- Specifies a port number.
- Value range:
- 443
- 1194
encryption_algorithm
string
- Specifies an encryption algorithm.
- Value range:
- AES-128-GCM
- AES-256-GCM
authentication_algorithm
string
- Specifies an authentication algorithm.
- Value range:
- SHA256
- SHA384
is_compressed
boolean
- Specifies whether to compress data. By default, data is not compressed.
- Value range:
- true
- false
Table 8 PageInfo Parameter
Type
Description
next_marker
String
Specifies the marker of the next page. The value is the time when the last resource in the last query response was created.
current_count
Integer
Specifies the number of resources in the list.
- Example response
{ "vpn_servers": [ { "id": "3f7e48ca-cd3c-4ce2-a277-674382ce44ea", "p2c_vgw_id": "10d176c7-aed8-4766-9180-a47e536c64d0", "client_cidr": "173.16.1.0/24", "local_subnets": [ "172.16.0.0/24", "172.16.1.0/24" ], "client_auth_type": "CERT", "tunnel_protocol": "SSL", "server_certificate": { "id": "scs1698803781642", "name": "p2cvpn_test", "issuer": "CN=p2cvpn.test", "subject": "CN=p2cvpn.server", "serial_number": "109258411809374886820602321558250159914", "expiration_time": "2026-01-22T06:26:18Z", "signature_algorithm": "SHA256WITHRSA" }, "client_ca_certificates": [ { "id": "2f291995-9582-4ce8-a7f4-e1b7742e6e0c", "name": "client_ca_sdk_test_1", "issuer": "CN=p2cvpn.test", "subject": "CN=p2cvpn.test", "serial_number": "218730615113252363388323617489459159151767515623", "expiration_time": "2033-10-17T06:21:25Z", "signature_algorithm": "SHA256WITHRSA", "created_at": "2024-06-15T01:59:46.612Z", "updated_at": "2024-06-15T01:59:46.612Z" } ], "ssl_options": { "protocol": "TCP", "port": 443, "encryption_algorithm": "AES-128-GCM", "authentication_algorithm": "SHA256", "is_compressed": false }, "status": "ACTIVE", "created_at": "2024-06-15T01:59:46.612Z", "updated_at": "2024-06-15T02:01:16.606Z" }, { "id": "3840e9ea-84be-4ff9-ad26-817829ba16ed", "p2c_vgw_id": "30dfb9cd-eeb0-4937-a7a5-4bc08184090b", "client_cidr": "173.17.0.0/24", "local_subnets": [ "172.16.0.0/24", "172.16.1.0/24" ], "client_auth_type": "LOCAL_PASSWORD", "tunnel_protocol": "SSL", "server_certificate": { "id": "scs1698803781642", "name": "p2cvpn_test", "issuer": "CN=p2cvpn.test", "subject": "CN=p2cvpn.server", "serial_number": "109258411809374886820602321558250159914", "expiration_time": "2026-01-22T06:26:18Z", "signature_algorithm": "SHA256WITHRSA" }, "client_ca_certificates": [], "ssl_options": { "protocol": "TCP", "port": 443, "encryption_algorithm": "AES-128-GCM", "authentication_algorithm": "SHA256", "is_compressed": false }, "status": "ACTIVE", "created_at": "2024-06-15T02:01:19.87Z", "updated_at": "2024-06-15T02:01:19.87Z" } ], "total_count": 2, "page_info": { "current_count": 2 }, "request_id": "2b16014544fff455b50ef3f1e62bbe35" }
Status Codes
For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.