Skip to content

Latest commit

 

History

History
100 lines (71 loc) · 2.54 KB

WireguardForestVPNAPI.md

File metadata and controls

100 lines (71 loc) · 2.54 KB

WireguardForestVPNAPI

All URIs are relative to https://api.forestvpn.com/v2

Method HTTP request Description
getWireGuardPeerInfo GET /wireguard/peers/{pubKey}/ Wireguard peer info
listWireGuardPeers GET /wireguard/peers/ Wireguard peers list

getWireGuardPeerInfo

WireGuardPeerInfo getWireGuardPeerInfo(pubKey)

Wireguard peer info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = WireguardForestVPNAPI()
val pubKey : kotlin.String = pubKey_example // kotlin.String | 
try {
    val result : WireGuardPeerInfo = apiInstance.getWireGuardPeerInfo(pubKey)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WireguardForestVPNAPI#getWireGuardPeerInfo")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WireguardForestVPNAPI#getWireGuardPeerInfo")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
pubKey kotlin.String

Return type

WireGuardPeerInfo

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listWireGuardPeers

kotlin.collections.List<WireGuardPeerInfo> listWireGuardPeers()

Wireguard peers list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = WireguardForestVPNAPI()
try {
    val result : kotlin.collections.List<WireGuardPeerInfo> = apiInstance.listWireGuardPeers()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WireguardForestVPNAPI#listWireGuardPeers")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WireguardForestVPNAPI#listWireGuardPeers")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List<WireGuardPeerInfo>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json