All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
createDevice | POST /devices/ | Create new device |
createDevicePortForwarding | POST /devices/{deviceID}/port-forwarding/ | Create new device port forwarding |
deleteDevice | DELETE /devices/{deviceID}/ | Delete Device |
deleteDevicePortForwarding | DELETE /devices/{deviceID}/port-forwarding/{portForwardingID}/ | Delete Device's Port Forwarding |
getDevice | GET /devices/{deviceID}/ | Device Info |
getDeviceStats | GET /devices/{deviceID}/stats/{statsID}/ | Device's stats detail |
getDeviceWireGuard | GET /devices/{deviceID}/wireguards/{wireGuardID}/ | Device's wireguard profile detail |
listDeviceBindings | GET /devices/{deviceID}/bindings/ | Device bindings |
listDeviceConnectionModes | GET /devices/{deviceID}/connection-modes/ | Device connection modes |
listDeviceDetailStats | GET /devices/{deviceID}/detail-stats/ | Device's detail stats list |
listDevicePortForwardings | GET /devices/{deviceID}/port-forwarding/ | Device Port Forwarding List |
listDeviceStats | GET /devices/{deviceID}/stats/ | Device's stats list |
listDeviceWireGuardPeers | GET /devices/{deviceID}/wireguards/{wireGuardID}/peers/ | Device's wireguard peers |
listDeviceWireGuards | GET /devices/{deviceID}/wireguards/ | Device's wireguard profiles list |
listDevices | GET /devices/ | Device List |
updateDevice | PATCH /devices/{deviceID}/ | Update device properties |
updateDevicePortForwarding | PATCH /devices/{deviceID}/port-forwarding/{portForwardingID}/ | Update device's port forwarding |
Device createDevice(createOrUpdateDeviceRequest)
Create new device
Create new device
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val createOrUpdateDeviceRequest : CreateOrUpdateDeviceRequest = // CreateOrUpdateDeviceRequest |
try {
val result : Device = apiInstance.createDevice(createOrUpdateDeviceRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#createDevice")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#createDevice")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
createOrUpdateDeviceRequest | CreateOrUpdateDeviceRequest | [optional] |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
PortForwarding createDevicePortForwarding(deviceID, createOrUpdatePortForwardingRequest)
Create new device port forwarding
Create new device port forwarding
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val createOrUpdatePortForwardingRequest : CreateOrUpdatePortForwardingRequest = // CreateOrUpdatePortForwardingRequest |
try {
val result : PortForwarding = apiInstance.createDevicePortForwarding(deviceID, createOrUpdatePortForwardingRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#createDevicePortForwarding")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#createDevicePortForwarding")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
createOrUpdatePortForwardingRequest | CreateOrUpdatePortForwardingRequest | [optional] |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
deleteDevice(deviceID)
Delete Device
Delete device by id
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
apiInstance.deleteDevice(deviceID)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#deleteDevice")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#deleteDevice")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID |
null (empty response body)
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
deleteDevicePortForwarding(deviceID, portForwardingID)
Delete Device's Port Forwarding
Delete device's port forwarding by id
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val portForwardingID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
apiInstance.deleteDevicePortForwarding(deviceID, portForwardingID)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#deleteDevicePortForwarding")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#deleteDevicePortForwarding")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
portForwardingID | java.util.UUID |
null (empty response body)
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
Device getDevice(deviceID)
Device Info
Retrieve device info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : Device = apiInstance.getDevice(deviceID)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#getDevice")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#getDevice")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
DeviceStats getDeviceStats(deviceID, statsID)
Device's stats detail
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val statsID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : DeviceStats = apiInstance.getDeviceStats(deviceID, statsID)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#getDeviceStats")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#getDeviceStats")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
statsID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
WireGuard getDeviceWireGuard(deviceID, wireGuardID)
Device's wireguard profile detail
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val wireGuardID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : WireGuard = apiInstance.getDeviceWireGuard(deviceID, wireGuardID)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#getDeviceWireGuard")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#getDeviceWireGuard")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
wireGuardID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<kotlin.String> listDeviceBindings(deviceID)
Device bindings
Each device has bindings to specific servers. This methods returns hostnames where this device binded in a particular time.
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : kotlin.collections.List<kotlin.String> = apiInstance.listDeviceBindings(deviceID)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDeviceBindings")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDeviceBindings")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID |
kotlin.collections.List<kotlin.String>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<ConnectionMode> listDeviceConnectionModes(deviceID, xAndroidPackage, xAndroidSHA1)
Device connection modes
This methods returns list of connection modes are availbale for current device.
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val xAndroidPackage : kotlin.String = xAndroidPackage_example // kotlin.String |
val xAndroidSHA1 : kotlin.String = xAndroidSHA1_example // kotlin.String |
try {
val result : kotlin.collections.List<ConnectionMode> = apiInstance.listDeviceConnectionModes(deviceID, xAndroidPackage, xAndroidSHA1)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDeviceConnectionModes")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDeviceConnectionModes")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
xAndroidPackage | kotlin.String | [optional] | |
xAndroidSHA1 | kotlin.String | [optional] |
kotlin.collections.List<ConnectionMode>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<DeviceStats> listDeviceDetailStats(deviceID, dateTimeAfter, dateTimeBefore, perPage, page)
Device's detail stats list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val dateTimeAfter : kotlin.String = dateTimeAfter_example // kotlin.String |
val dateTimeBefore : kotlin.String = dateTimeBefore_example // kotlin.String |
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<DeviceStats> = apiInstance.listDeviceDetailStats(deviceID, dateTimeAfter, dateTimeBefore, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDeviceDetailStats")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDeviceDetailStats")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
dateTimeAfter | kotlin.String | [optional] | |
dateTimeBefore | kotlin.String | [optional] | |
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<DeviceStats>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<PortForwarding> listDevicePortForwardings(deviceID, perPage, page)
Device Port Forwarding List
Retrieve device's port forwarding lis
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<PortForwarding> = apiInstance.listDevicePortForwardings(deviceID, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDevicePortForwardings")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDevicePortForwardings")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<PortForwarding>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<DeviceStats> listDeviceStats(deviceID, dateAfter, dateBefore, perPage, page)
Device's stats list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val dateAfter : java.time.LocalDate = 2013-10-20 // java.time.LocalDate |
val dateBefore : java.time.LocalDate = 2013-10-20 // java.time.LocalDate |
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<DeviceStats> = apiInstance.listDeviceStats(deviceID, dateAfter, dateBefore, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDeviceStats")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDeviceStats")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
dateAfter | java.time.LocalDate | [optional] | |
dateBefore | java.time.LocalDate | [optional] | |
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<DeviceStats>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<WireGuardPeer> listDeviceWireGuardPeers(deviceID, wireGuardID)
Device's wireguard peers
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val wireGuardID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : kotlin.collections.List<WireGuardPeer> = apiInstance.listDeviceWireGuardPeers(deviceID, wireGuardID)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDeviceWireGuardPeers")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDeviceWireGuardPeers")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
wireGuardID | java.util.UUID |
kotlin.collections.List<WireGuardPeer>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<WireGuard> listDeviceWireGuards(deviceID, perPage, page)
Device's wireguard profiles list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<WireGuard> = apiInstance.listDeviceWireGuards(deviceID, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDeviceWireGuards")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDeviceWireGuards")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<WireGuard>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<Device> listDevices(q, externalKey, recentlyActive, lastActiveAtAfter, lastActiveAtBefore, sort, perPage, page)
Device List
Retrieve devices list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val q : kotlin.String = q_example // kotlin.String | Filter by search query
val externalKey : kotlin.String = externalKey_example // kotlin.String | Filter by external_key
val recentlyActive : kotlin.Boolean = true // kotlin.Boolean | Filter by recently active
val lastActiveAtAfter : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by last active at date-time after provided value
val lastActiveAtBefore : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by last active at date-time before provided value
val sort : kotlin.String = sort_example // kotlin.String | Sort by provided field
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<Device> = apiInstance.listDevices(q, externalKey, recentlyActive, lastActiveAtAfter, lastActiveAtBefore, sort, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#listDevices")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#listDevices")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
q | kotlin.String | Filter by search query | [optional] |
externalKey | kotlin.String | Filter by external_key | [optional] |
recentlyActive | kotlin.Boolean | Filter by recently active | [optional] |
lastActiveAtAfter | java.time.OffsetDateTime | Filter by last active at date-time after provided value | [optional] |
lastActiveAtBefore | java.time.OffsetDateTime | Filter by last active at date-time before provided value | [optional] |
sort | kotlin.String | Sort by provided field | [optional] [enum: last_active_at, -last_active_at, created_at, -created_at, updated_at, -updated_at] |
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<Device>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
Device updateDevice(deviceID, createOrUpdateDeviceRequest)
Update device properties
Update device properties
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val createOrUpdateDeviceRequest : CreateOrUpdateDeviceRequest = // CreateOrUpdateDeviceRequest |
try {
val result : Device = apiInstance.updateDevice(deviceID, createOrUpdateDeviceRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#updateDevice")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#updateDevice")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
createOrUpdateDeviceRequest | CreateOrUpdateDeviceRequest |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
PortForwarding updateDevicePortForwarding(deviceID, portForwardingID, createOrUpdatePortForwardingRequest)
Update device's port forwarding
Update device's port forwarding dst_port
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = DeviceForestVPNAPI()
val deviceID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val portForwardingID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val createOrUpdatePortForwardingRequest : CreateOrUpdatePortForwardingRequest = // CreateOrUpdatePortForwardingRequest |
try {
val result : PortForwarding = apiInstance.updateDevicePortForwarding(deviceID, portForwardingID, createOrUpdatePortForwardingRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeviceForestVPNAPI#updateDevicePortForwarding")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeviceForestVPNAPI#updateDevicePortForwarding")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
deviceID | java.util.UUID | ||
portForwardingID | java.util.UUID | ||
createOrUpdatePortForwardingRequest | CreateOrUpdatePortForwardingRequest |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json