Retrieve A List Of VPNUsers

An API call that returns information about the configuration of the VPN service container.

The collection returned by this call is a list of users added for the VPN by an appropriately permissioned account. These users will NOT be able to log into the VPN unless the Allow VPN Accounts setting is enabled on the VPN service. In the portal this is under Access Control on your environments VPN setting page, and through the API this can be set using the Reconfigure VPN endpoint and setting auth: vpn_accounts to True.

Requires the environments-vpn-manage permission.

Parameters: token hubIdenvironment IDquery

query
  • sort

    Sorts can be performed on any field - see sorting

  • filter

    Collections of resources can be filtered based on certain criteria - see filtering 

VPN User Resource
  • id
    string

    The ID of the VPN user.

  • username
    string

    The custom username assigned to this VPN user.

  • creator
    object
    includable

    A creator object. Describes who created the resource.

    Show child fields
  • last_login
    timestamp

    The timestamp for when the user last logged in to the VPN.

  • environment_id
    string

    The ID of the environment this VPN user is associated with.

  • hub_id
    string

    The ID of the hub this VPN user is associated with.

  • events
    object

    A collection of timestamps for each event in the VPN User's lifetime.

    Show child fields

Returns

Returns a collection of VPN User resources, otherwise returns an Error.

GET /v1/environments/5b9c2a77b6393d0001eb45fd/services/vpn/users

Example Request
$ curl https://api.cycle.io/v1/environments/5b9c2a77b6393d0001eb45fd/services/vpn/users \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-Hub-Id: HUB_ID"
Example Response
{
"data": [
{
"id": "5b9c2a77b6393d0001eb45fd",
"username": "Demo User",
"creator": {
"id": "5b9c2a77b6393d0001eb45fd",
"type": "account"
},
"last_login": "0001-01-01T00:00:00Z",
"hub_id": "5b9c2a77b6393d0001eb45fd",
"environment_id": "5b9c2a77b6393d0001eb45fd",
"events": {
"created": "2022-09-14T21:39:03.096Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z"
}
}
]
}