Skip to content

Models

Server

Bases: BaseModel

Represents the Outline VPN server configuration and current state.

Source code in outline_vpn_api_client/models.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class Server(BaseModel):
    """Represents the Outline VPN server configuration and current state."""

    name: str
    """Human-readable name of the server."""
    serverId: str
    """Unique identifier of the server."""
    metricsEnabled: bool
    """Whether metrics sharing is enabled."""
    createdTimestampMs: int
    """Server creation timestamp in milliseconds since epoch."""
    version: str
    """Outline server version."""
    accessKeyDataLimit: Optional[AccessKeyDataLimit] = None
    """Default data transfer limit applied to all access keys, if set."""
    portForNewAccessKeys: int
    """Default port assigned to newly created access keys."""
    hostnameForAccessKeys: str
    """Hostname or IP address used in access key URLs."""

accessKeyDataLimit = None class-attribute instance-attribute

Default data transfer limit applied to all access keys, if set.

createdTimestampMs instance-attribute

Server creation timestamp in milliseconds since epoch.

hostnameForAccessKeys instance-attribute

Hostname or IP address used in access key URLs.

metricsEnabled instance-attribute

Whether metrics sharing is enabled.

name instance-attribute

Human-readable name of the server.

portForNewAccessKeys instance-attribute

Default port assigned to newly created access keys.

serverId instance-attribute

Unique identifier of the server.

version instance-attribute

Outline server version.

AccessKey

Bases: BaseModel

Represents an Outline VPN access key.

Source code in outline_vpn_api_client/models.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
class AccessKey(BaseModel):
    """Represents an Outline VPN access key."""

    id: str
    """Unique identifier of the access key."""
    name: str
    """Human-readable name of the access key."""
    password: str
    """Password used for the Shadowsocks connection."""
    port: int
    """Port used for the Shadowsocks connection."""
    method: str
    """Encryption method used for the Shadowsocks connection."""
    dataLimit: Optional[AccessKeyDataLimit] = None
    """Data transfer limit for this key, if set."""
    accessUrl: str
    """Shadowsocks URL used to configure VPN clients."""

    @field_validator("accessUrl", mode="before")
    def validate_access_url(cls, value):
        pattern = re.compile(r"^ss://[\w\-:]+@[\w\-\.]+:\d+/.+$")
        if not pattern.match(value):
            raise ValueError("Invalid accessUrl format")
        return value

accessUrl instance-attribute

Shadowsocks URL used to configure VPN clients.

dataLimit = None class-attribute instance-attribute

Data transfer limit for this key, if set.

id instance-attribute

Unique identifier of the access key.

method instance-attribute

Encryption method used for the Shadowsocks connection.

name instance-attribute

Human-readable name of the access key.

password instance-attribute

Password used for the Shadowsocks connection.

port instance-attribute

Port used for the Shadowsocks connection.

AccessKeyDataLimit

Bases: BaseModel

Represents a data transfer limit in bytes.

Source code in outline_vpn_api_client/models.py
 7
 8
 9
10
11
class AccessKeyDataLimit(BaseModel):
    """Represents a data transfer limit in bytes."""

    bytes: int
    """Data transfer limit in bytes."""

bytes instance-attribute

Data transfer limit in bytes.

AccessKeyList

Bases: BaseModel

Represents a list of access keys.

Source code in outline_vpn_api_client/models.py
68
69
70
71
72
class AccessKeyList(BaseModel):
    """Represents a list of access keys."""

    accessKeys: list[AccessKey]
    """List of all access keys on the server."""

accessKeys instance-attribute

List of all access keys on the server.

Metrics

Bases: BaseModel

Represents the metrics sharing status of the server.

Source code in outline_vpn_api_client/models.py
61
62
63
64
65
class Metrics(BaseModel):
    """Represents the metrics sharing status of the server."""

    enabled: bool
    """Whether metrics sharing is currently enabled."""

enabled instance-attribute

Whether metrics sharing is currently enabled.

BytesTransferredByUserId

Bases: BaseModel

Represents data transfer statistics per access key.

Source code in outline_vpn_api_client/models.py
75
76
77
78
79
class BytesTransferredByUserId(BaseModel):
    """Represents data transfer statistics per access key."""

    bytesTransferredByUserId: dict[str, int]
    """Mapping of access key ID to total bytes transferred."""

bytesTransferredByUserId instance-attribute

Mapping of access key ID to total bytes transferred.

Info

Bases: BaseModel

Aggregated information about the Outline server, its metrics, and access keys.

Source code in outline_vpn_api_client/models.py
82
83
84
85
86
87
88
89
90
class Info(BaseModel):
    """Aggregated information about the Outline server, its metrics, and access keys."""

    server: Server
    """Server configuration and state."""
    metrics: Metrics
    """Metrics sharing status."""
    access_keys: AccessKeyList
    """List of all access keys."""

access_keys instance-attribute

List of all access keys.

metrics instance-attribute

Metrics sharing status.

server instance-attribute

Server configuration and state.

ServerMetrics

Bases: BaseModel

Represents the full response from the experimental server metrics endpoint.

Source code in outline_vpn_api_client/models.py
186
187
188
189
190
191
192
class ServerMetrics(BaseModel):
    """Represents the full response from the experimental server metrics endpoint."""

    server: ServerMetricsData
    """Aggregated server-level metrics."""
    accessKeys: list[AccessKeyMetrics]
    """Per-access-key metrics."""

accessKeys instance-attribute

Per-access-key metrics.

server instance-attribute

Aggregated server-level metrics.

ServerMetricsData

Bases: BaseModel

Represents aggregated metrics for the entire server.

Source code in outline_vpn_api_client/models.py
173
174
175
176
177
178
179
180
181
182
183
class ServerMetricsData(BaseModel):
    """Represents aggregated metrics for the entire server."""

    tunnelTime: Optional[TunnelTime] = None
    """Total tunnel time across all access keys."""
    dataTransferred: Optional[DataTransferred] = None
    """Total data transferred across all access keys."""
    bandwidth: Optional[Bandwidth] = None
    """Current and peak bandwidth measurements."""
    locations: Optional[list[LocationMetrics]] = None
    """Metrics broken down by geographic location."""

bandwidth = None class-attribute instance-attribute

Current and peak bandwidth measurements.

dataTransferred = None class-attribute instance-attribute

Total data transferred across all access keys.

locations = None class-attribute instance-attribute

Metrics broken down by geographic location.

tunnelTime = None class-attribute instance-attribute

Total tunnel time across all access keys.

AccessKeyMetrics

Bases: BaseModel

Represents detailed metrics for a single access key.

Source code in outline_vpn_api_client/models.py
160
161
162
163
164
165
166
167
168
169
170
class AccessKeyMetrics(BaseModel):
    """Represents detailed metrics for a single access key."""

    accessKeyId: int
    """Unique identifier of the access key."""
    tunnelTime: Optional[TunnelTime] = None
    """Total tunnel time for this key."""
    dataTransferred: Optional[DataTransferred] = None
    """Total data transferred by this key."""
    connection: Optional[AccessKeyConnection] = None
    """Connection statistics for this key."""

accessKeyId instance-attribute

Unique identifier of the access key.

connection = None class-attribute instance-attribute

Connection statistics for this key.

dataTransferred = None class-attribute instance-attribute

Total data transferred by this key.

tunnelTime = None class-attribute instance-attribute

Total tunnel time for this key.

AccessKeyConnection

Bases: BaseModel

Represents connection statistics for a single access key.

Source code in outline_vpn_api_client/models.py
151
152
153
154
155
156
157
class AccessKeyConnection(BaseModel):
    """Represents connection statistics for a single access key."""

    lastTrafficSeen: Optional[float] = None
    """Unix timestamp of the last observed traffic for this key."""
    peakDeviceCount: Optional[PeakDeviceCount] = None
    """Peak number of devices connected using this key."""

lastTrafficSeen = None class-attribute instance-attribute

Unix timestamp of the last observed traffic for this key.

peakDeviceCount = None class-attribute instance-attribute

Peak number of devices connected using this key.

LocationMetrics

Bases: BaseModel

Represents metrics aggregated by geographic location.

Source code in outline_vpn_api_client/models.py
127
128
129
130
131
132
133
134
135
136
137
138
139
class LocationMetrics(BaseModel):
    """Represents metrics aggregated by geographic location."""

    location: Optional[str] = None
    """ISO country code of the location."""
    asn: Optional[int] = None
    """Autonomous System Number of the location."""
    asOrg: Optional[str] = None
    """Name of the autonomous system organization."""
    tunnelTime: Optional[TunnelTime] = None
    """Total tunnel time for this location."""
    dataTransferred: Optional[DataTransferred] = None
    """Total data transferred from this location."""

asOrg = None class-attribute instance-attribute

Name of the autonomous system organization.

asn = None class-attribute instance-attribute

Autonomous System Number of the location.

dataTransferred = None class-attribute instance-attribute

Total data transferred from this location.

location = None class-attribute instance-attribute

ISO country code of the location.

tunnelTime = None class-attribute instance-attribute

Total tunnel time for this location.

Bandwidth

Bases: BaseModel

Represents current and peak bandwidth measurements.

Source code in outline_vpn_api_client/models.py
118
119
120
121
122
123
124
class Bandwidth(BaseModel):
    """Represents current and peak bandwidth measurements."""

    current: BandwidthSnapshot
    """Most recent bandwidth measurement."""
    peak: BandwidthSnapshot
    """Peak bandwidth measurement over the observed period."""

current instance-attribute

Most recent bandwidth measurement.

peak instance-attribute

Peak bandwidth measurement over the observed period.

BandwidthSnapshot

Bases: BaseModel

Represents a bandwidth measurement at a specific point in time.

Source code in outline_vpn_api_client/models.py
109
110
111
112
113
114
115
class BandwidthSnapshot(BaseModel):
    """Represents a bandwidth measurement at a specific point in time."""

    data: DataTransferred
    """Bandwidth data at this snapshot."""
    timestamp: int
    """Unix timestamp of the snapshot."""

data instance-attribute

Bandwidth data at this snapshot.

timestamp instance-attribute

Unix timestamp of the snapshot.

TunnelTime

Bases: BaseModel

Represents the total time a tunnel was active.

Source code in outline_vpn_api_client/models.py
102
103
104
105
106
class TunnelTime(BaseModel):
    """Represents the total time a tunnel was active."""

    seconds: float
    """Total tunnel time in seconds."""

seconds instance-attribute

Total tunnel time in seconds.

DataTransferred

Bases: BaseModel

Represents an amount of transferred data.

Source code in outline_vpn_api_client/models.py
95
96
97
98
99
class DataTransferred(BaseModel):
    """Represents an amount of transferred data."""

    bytes: int
    """Total data transferred in bytes."""

bytes instance-attribute

Total data transferred in bytes.

PeakDeviceCount

Bases: BaseModel

Represents the peak number of connected devices at a point in time.

Source code in outline_vpn_api_client/models.py
142
143
144
145
146
147
148
class PeakDeviceCount(BaseModel):
    """Represents the peak number of connected devices at a point in time."""

    data: int
    """Peak number of connected devices."""
    timestamp: int
    """Unix timestamp when the peak was observed."""

data instance-attribute

Peak number of connected devices.

timestamp instance-attribute

Unix timestamp when the peak was observed.