2022-06-14 10:32:54 +02:00
openapi : 3.0 .1
info :
title : NetBird REST API
2023-03-13 15:14:18 +01:00
description : API to manipulate groups, rules, policies and retrieve information about peers and users
2022-06-14 10:32:54 +02:00
version : 0.0 .1
tags :
- name : Users
description : Interact with and view information about users.
- name : Peers
description : Interact with and view information about peers.
- name : Setup Keys
description : Interact with and view information about setup keys.
- name : Groups
description : Interact with and view information about groups.
- name : Rules
description : Interact with and view information about rules.
2023-03-13 15:14:18 +01:00
- name : Policies
description : Interact with and view information about policies.
2022-08-20 19:11:54 +02:00
- name : Routes
description : Interact with and view information about routes.
2022-10-10 11:06:54 +02:00
- name : DNS
description : Interact with and view information about DNS configuration.
2023-01-02 15:11:32 +01:00
- name : Events
description : View information about the account and network events.
2023-02-16 12:00:41 +01:00
- name : Accounts
description : View information about the accounts.
2022-06-14 10:32:54 +02:00
components :
schemas :
2023-02-16 12:00:41 +01:00
Account :
properties :
id :
description : Account ID
type : string
settings :
$ref : '#/components/schemas/AccountSettings'
required :
- id
- settings
AccountSettings :
properties :
peer_login_expiration_enabled :
description : Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
type : boolean
peer_login_expiration :
description : Period of time after which peer login expires (seconds).
type : integer
required :
- peer_login_expiration_enabled
- peer_login_expiration
2022-06-14 10:32:54 +02:00
User :
type : object
properties :
id :
description : User ID
type : string
email :
description : User's email address
type : string
name :
description : User's name from idp provider
type : string
role :
2022-09-22 09:06:32 +02:00
description : User's NetBird account role
2022-06-14 10:32:54 +02:00
type : string
2022-10-13 18:26:31 +02:00
status :
description : User's status
type : string
2023-05-11 18:09:36 +02:00
enum : [ "active" , "invited" , "blocked" ]
2022-09-22 09:06:32 +02:00
auto_groups :
description : Groups to auto-assign to peers registered by this user
type : array
items :
type : string
2023-02-03 21:47:20 +01:00
is_current :
description : Is true if authenticated user is the same as this user
type : boolean
readOnly : true
2023-04-22 12:57:51 +02:00
is_service_user :
description : Is true if this user is a service user
type : boolean
readOnly : true
2023-05-11 18:09:36 +02:00
is_blocked :
description : Is true if this user is blocked. Blocked users can't use the system
type : boolean
2022-06-14 10:32:54 +02:00
required :
2023-01-02 15:11:32 +01:00
- id
- email
- name
- role
- auto_groups
- status
2023-05-11 18:09:36 +02:00
- is_blocked
2022-09-22 09:06:32 +02:00
UserRequest :
type : object
properties :
2022-09-23 14:18:42 +02:00
role :
description : User's NetBird account role
type : string
2022-09-22 09:06:32 +02:00
auto_groups :
description : Groups to auto-assign to peers registered by this user
type : array
items :
type : string
2023-05-11 18:09:36 +02:00
is_blocked :
description : If set to true then user is blocked and can't use the system
type : boolean
2022-09-22 09:06:32 +02:00
required :
2022-09-23 14:18:42 +02:00
- role
2022-09-22 09:06:32 +02:00
- auto_groups
2023-05-11 18:09:36 +02:00
- is_blocked
2022-10-13 18:26:31 +02:00
UserCreateRequest :
type : object
properties :
email :
description : User's Email to send invite to
type : string
name :
description : User's full name
type : string
2023-05-03 00:15:25 +02:00
role :
description : User's NetBird account role
type : string
2022-10-13 18:26:31 +02:00
auto_groups :
description : Groups to auto-assign to peers registered by this user
type : array
items :
type : string
2023-04-22 12:57:51 +02:00
is_service_user :
description : Is true if this user is a service user
type : boolean
2022-10-13 18:26:31 +02:00
required :
- role
- auto_groups
2023-04-22 12:57:51 +02:00
- is_service_user
2022-06-14 10:32:54 +02:00
PeerMinimum :
type : object
properties :
id :
description : Peer ID
type : string
name :
description : Peer's hostname
type : string
required :
2023-01-02 15:11:32 +01:00
- id
- name
2022-06-14 10:32:54 +02:00
Peer :
allOf :
- $ref : '#/components/schemas/PeerMinimum'
- type : object
properties :
ip :
description : Peer's IP address
type : string
connected :
description : Peer to Management connection status
type : boolean
last_seen :
description : Last time peer connected to Netbird's management service
type : string
format : date-time
os :
description : Peer's operating system and version
type : string
version :
description : Peer's daemon or cli version
type : string
groups :
description : Groups that the peer belongs to
type : array
items :
$ref : '#/components/schemas/GroupMinimum'
2022-06-23 17:04:53 +02:00
ssh_enabled :
description : Indicates whether SSH server is enabled on this peer
type : boolean
2022-09-26 18:02:45 +02:00
user_id :
description : User ID of the user that enrolled this peer
type : string
hostname :
description : Hostname of the machine
type : string
ui_version :
description : Peer's desktop UI version
type : string
2022-11-07 15:38:21 +01:00
dns_label :
description : Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud
type : string
2023-02-14 10:14:00 +01:00
login_expiration_enabled :
description : Indicates whether peer login expiration has been enabled or not
type : boolean
login_expired :
description : Indicates whether peer's login expired or not
type : boolean
last_login :
description : Last time this peer performed log in (authentication). E.g., user authenticated.
type : string
format : date-time
2022-06-14 10:32:54 +02:00
required :
2023-01-02 15:11:32 +01:00
- ip
- connected
- last_seen
- os
- version
- groups
- ssh_enabled
- hostname
- dns_label
2023-02-14 10:14:00 +01:00
- login_expiration_enabled
- login_expired
- last_login
2022-06-14 10:32:54 +02:00
SetupKey :
type : object
properties :
id :
description : Setup Key ID
type : string
key :
description : Setup Key value
type : string
name :
description : Setup key name identifier
type : string
expires :
description : Setup Key expiration date
type : string
format : date-time
type :
description : Setup key type, one-off for single time usage and reusable
type : string
valid :
description : Setup key validity status
type : boolean
revoked :
description : Setup key revocation status
type : boolean
used_times :
description : Usage count of setup key
type : integer
last_used :
description : Setup key last usage date
type : string
format : date-time
state :
description : Setup key status, "valid", "overused","expired" or "revoked"
type : string
2022-09-11 23:16:40 +02:00
auto_groups :
description : Setup key groups to auto-assign to peers registered with this key
type : array
items :
type : string
updated_at :
description : Setup key last update date
type : string
format : date-time
2022-12-05 13:09:59 +01:00
usage_limit :
description : A number of times this key can be used. The value of 0 indicates the unlimited usage.
type : integer
2022-06-14 10:32:54 +02:00
required :
2023-01-02 15:11:32 +01:00
- id
- key
- name
- expires
- type
- valid
- revoked
- used_times
- last_used
- state
- auto_groups
- updated_at
- usage_limit
2022-06-14 10:32:54 +02:00
SetupKeyRequest :
type : object
properties :
name :
description : Setup Key name
type : string
type :
description : Setup key type, one-off for single time usage and reusable
type : string
expires_in :
description : Expiration time in seconds
type : integer
revoked :
description : Setup key revocation status
type : boolean
2022-09-11 23:16:40 +02:00
auto_groups :
description : Setup key groups to auto-assign to peers registered with this key
type : array
items :
type : string
2022-12-05 13:09:59 +01:00
usage_limit :
description : A number of times this key can be used. The value of 0 indicates the unlimited usage.
type : integer
2022-06-14 10:32:54 +02:00
required :
- name
- type
- expires_in
- revoked
2022-09-11 23:16:40 +02:00
- auto_groups
2022-12-05 13:09:59 +01:00
- usage_limit
2023-03-21 16:02:19 +01:00
PersonalAccessToken :
type : object
properties :
id :
description : ID of a token
type : string
2023-03-27 16:28:49 +02:00
name :
description : Name of the token
2023-03-21 16:02:19 +01:00
type : string
expiration_date :
description : Date the token expires
type : string
format : date-time
created_by :
description : User ID of the user who created the token
type : string
created_at :
description : Date the token was created
type : string
format : date-time
last_used :
description : Date the token was last used
type : string
format : date-time
required :
- id
2023-03-27 16:28:49 +02:00
- name
2023-03-21 16:02:19 +01:00
- expiration_date
- created_by
- created_at
2023-03-28 14:47:15 +02:00
PersonalAccessTokenGenerated :
type : object
properties :
plain_token :
description : Plain text representation of the generated token
type : string
personal_access_token :
$ref : '#/components/schemas/PersonalAccessToken'
required :
- plain_token
- personal_access_token
2023-03-21 16:02:19 +01:00
PersonalAccessTokenRequest :
type : object
properties :
2023-03-27 16:28:49 +02:00
name :
description : Name of the token
2023-03-21 16:02:19 +01:00
type : string
expires_in :
description : Expiration in days
type : integer
2023-05-03 00:15:25 +02:00
minimum : 1
maximum : 365
2023-03-21 16:02:19 +01:00
required :
2023-03-27 16:28:49 +02:00
- name
2023-03-21 16:02:19 +01:00
- expires_in
2022-06-14 10:32:54 +02:00
GroupMinimum :
type : object
properties :
id :
description : Group ID
type : string
name :
description : Group Name identifier
type : string
peers_count :
description : Count of peers associated to the group
type : integer
required :
2023-01-02 15:11:32 +01:00
- id
- name
- peers_count
2022-06-14 10:32:54 +02:00
Group :
allOf :
- $ref : '#/components/schemas/GroupMinimum'
- type : object
properties :
peers :
description : List of peers object
type : array
items :
$ref : '#/components/schemas/PeerMinimum'
required :
2023-01-02 15:11:32 +01:00
- peers
2022-06-14 10:32:54 +02:00
RuleMinimum :
type : object
properties :
name :
description : Rule name identifier
type : string
description :
description : Rule friendly description
type : string
disabled :
description : Rules status
type : boolean
flow :
description : Rule flow, currently, only "bidirect" for bi-directional traffic is accepted
type : string
required :
2023-01-02 15:11:32 +01:00
- name
- description
- disabled
- flow
2022-06-14 10:32:54 +02:00
Rule :
allOf :
- type : object
properties :
id :
description : Rule ID
type : string
required :
2023-01-02 15:11:32 +01:00
- id
2022-06-14 10:32:54 +02:00
- $ref : '#/components/schemas/RuleMinimum'
- type : object
properties :
sources :
description : Rule source groups
type : array
items :
$ref : '#/components/schemas/GroupMinimum'
destinations :
description : Rule destination groups
type : array
items :
$ref : '#/components/schemas/GroupMinimum'
required :
2023-01-02 15:11:32 +01:00
- sources
- destinations
2023-03-13 15:14:18 +01:00
PolicyRule :
type : object
properties :
id :
description : Rule ID
type : string
name :
description : Rule name identifier
type : string
description :
description : Rule friendly description
type : string
enabled :
description : Rules status
type : boolean
sources :
description : policy source groups
type : array
items :
$ref : '#/components/schemas/GroupMinimum'
destinations :
description : policy destination groups
type : array
items :
$ref : '#/components/schemas/GroupMinimum'
action :
description : policy accept or drops packets
type : string
enum : [ "accept" , "drop" ]
required :
- name
- sources
- destinations
- action
- enabled
PolicyMinimum :
type : object
properties :
name :
description : Policy name identifier
type : string
description :
description : Policy friendly description
type : string
enabled :
description : Policy status
type : boolean
query :
description : Policy Rego query
type : string
rules :
description : Policy rule object for policy UI editor
type : array
items :
$ref : '#/components/schemas/PolicyRule'
required :
- name
- description
- enabled
- query
- rules
Policy :
allOf :
- $ref : '#/components/schemas/PolicyMinimum'
- type : object
properties :
id :
description : Policy ID
type : string
required :
- id
2022-08-20 19:11:54 +02:00
RouteRequest :
2022-06-14 10:32:54 +02:00
type : object
properties :
2022-08-20 19:11:54 +02:00
description :
description : Route description
2022-06-14 10:32:54 +02:00
type : string
2022-08-22 14:10:24 +02:00
network_id :
description : Route network identifier, to group HA routes
type : string
maxLength : 40
minLength : 1
2022-08-20 19:11:54 +02:00
enabled :
description : Route status
type : boolean
peer :
description : Peer Identifier associated with route
2022-06-14 10:32:54 +02:00
type : string
2022-08-22 14:10:24 +02:00
network :
description : Network range in CIDR format
2022-08-20 19:11:54 +02:00
type : string
metric :
description : Route metric number. Lowest number has higher priority
type : integer
maximum : 9999
minimum : 1
masquerade :
description : Indicate if peer should masquerade traffic to this route's prefix
type : boolean
2022-12-06 10:11:57 +01:00
groups :
description : Route group tag groups
type : array
items :
type : string
2022-06-14 10:32:54 +02:00
required :
2022-08-20 19:11:54 +02:00
- id
- description
2022-08-22 14:10:24 +02:00
- network_id
2022-08-20 19:11:54 +02:00
- enabled
- peer
2022-08-22 14:10:24 +02:00
- network
2022-08-20 19:11:54 +02:00
- metric
- masquerade
2022-12-06 10:11:57 +01:00
- groups
2022-08-20 19:11:54 +02:00
Route :
allOf :
- type : object
properties :
id :
description : Route Id
type : string
2022-08-22 14:10:24 +02:00
network_type :
description : Network type indicating if it is IPv4 or IPv6
2022-08-20 19:11:54 +02:00
type : string
required :
- id
2022-08-22 14:10:24 +02:00
- network_type
2022-08-20 19:11:54 +02:00
- $ref : '#/components/schemas/RouteRequest'
2022-10-10 11:06:54 +02:00
Nameserver :
type : object
properties :
ip :
description : Nameserver IP
type : string
ns_type :
description : Nameserver Type
type : string
2023-01-02 15:11:32 +01:00
enum : [ "udp" ]
2022-10-10 11:06:54 +02:00
port :
description : Nameserver Port
type : integer
required :
- ip
- ns_type
- port
NameserverGroupRequest :
type : object
properties :
name :
description : Nameserver group name
type : string
maxLength : 40
minLength : 1
description :
description : Nameserver group description
type : string
nameservers :
description : Nameserver group
minLength : 1
maxLength : 2
type : array
items :
$ref : '#/components/schemas/Nameserver'
enabled :
description : Nameserver group status
type : boolean
groups :
description : Nameserver group tag groups
type : array
items :
type : string
2022-11-03 18:39:37 +01:00
primary :
description : Nameserver group primary status
type : boolean
domains :
description : Nameserver group domain list
type : array
items :
type : string
minLength : 1
maxLength : 255
2022-10-10 11:06:54 +02:00
required :
- name
- description
- nameservers
- enabled
- groups
2022-11-03 18:39:37 +01:00
- primary
- domains
2022-10-10 11:06:54 +02:00
NameserverGroup :
allOf :
- type : object
properties :
id :
description : Nameserver group ID
type : string
required :
- id
- $ref : '#/components/schemas/NameserverGroupRequest'
2023-01-17 17:34:40 +01:00
DNSSettings :
type : object
properties :
disabled_management_groups :
description : Groups whose DNS management is disabled
type : array
items :
type : string
required :
- disabled_management_groups
2023-01-02 15:11:32 +01:00
Event :
type : object
properties :
id :
description : Event unique identifier
type : string
timestamp :
description : The date and time when the event occurred
type : string
format : date-time
activity :
description : The activity that occurred during the event
type : string
activity_code :
description : The string code of the activity that occurred during the event
type : string
enum : [ "user.peer.delete" , "user.join" , "user.invite" , "user.peer.add" , "user.group.add" , "user.group.delete" ,
2023-05-11 18:09:36 +02:00
"user.role.update" , "user.block" , "user.unblock" ,
2023-01-02 15:11:32 +01:00
"setupkey.peer.add" , "setupkey.add" , "setupkey.update" , "setupkey.revoke" , "setupkey.overuse" ,
2023-01-17 17:34:40 +01:00
"setupkey.group.delete" , "setupkey.group.add" ,
2023-01-02 15:11:32 +01:00
"rule.add" , "rule.delete" , "rule.update" ,
2023-03-13 15:14:18 +01:00
"policy.add" , "policy.delete" , "policy.update" ,
2023-02-16 15:36:36 +01:00
"group.add" , "group.update" , "dns.setting.disabled.management.group.add" , "dns.setting.disabled.management.group.delete" ,
"account.create" , "account.setting.peer.login.expiration.update" , "account.setting.peer.login.expiration.disable" , "account.setting.peer.login.expiration.enable" ,
2023-01-25 16:29:59 +01:00
"route.add" , "route.delete" , "route.update" ,
"nameserver.group.add" , "nameserver.group.delete" , "nameserver.group.update" ,
2023-03-13 15:14:18 +01:00
"peer.ssh.disable" , "peer.ssh.enable" , "peer.rename" , "peer.login.expiration.disable" , "peer.login.expiration.enable" ]
2023-01-02 15:11:32 +01:00
initiator_id :
description : The ID of the initiator of the event. E.g., an ID of a user that triggered the event.
type : string
target_id :
description : The ID of the target of the event. E.g., an ID of the peer that a user removed.
type : string
meta :
description : The metadata of the event
type : object
additionalProperties :
type : string
required :
- id
- timestamp
- activity
- activity_code
- initiator_id
- target_id
- meta
2022-06-14 10:32:54 +02:00
responses :
not_found :
description : Resource not found
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
validation_failed_simple :
description : Validation failed
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
bad_request :
description : Bad Request
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
internal_error :
description : Internal Server Error
content : { }
validation_failed :
description : Validation failed
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
forbidden :
description : Forbidden
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
requires_authentication :
description : Requires authentication
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
securitySchemes :
BearerAuth :
type : http
scheme : bearer
bearerFormat : JWT
2023-05-03 00:15:25 +02:00
TokenAuth :
type : apiKey
in : header
name : Authorization
description : >-
Enter the token with the `Token` prefix, e.g. "Token nbp_F3f0d.....".
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
paths :
2023-02-16 12:00:41 +01:00
/api/accounts :
get :
2023-05-03 00:15:25 +02:00
summary : Returns a list of accounts of a user. Always returns a list of one account.
2023-02-16 12:00:41 +01:00
tags : [ Accounts ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-02-16 12:00:41 +01:00
responses :
'200' :
description : A JSON array of accounts
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Account'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/accounts/{accountId}:
2023-02-16 12:00:41 +01:00
put :
summary : Update information about an account
tags : [ Accounts ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-02-16 12:00:41 +01:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : accountId
2023-02-16 12:00:41 +01:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of an account
2023-02-16 12:00:41 +01:00
requestBody :
description : update an account
content :
'application/json' :
schema :
type : object
properties :
settings :
$ref : '#/components/schemas/AccountSettings'
required :
- settings
responses :
'200' :
description : An Account object
content :
application/json :
schema :
$ref : '#/components/schemas/Account'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2022-06-14 10:32:54 +02:00
/api/users :
get :
summary : Returns a list of all users
2023-01-02 15:11:32 +01:00
tags : [ Users ]
2022-06-14 10:32:54 +02:00
security :
2023-01-02 15:11:32 +01:00
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-04-22 12:57:51 +02:00
parameters :
- in : query
name : service_user
schema :
type : boolean
2023-05-03 00:15:25 +02:00
description : Filters users and returns either regular users or service users
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A JSON array of Users
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/User'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2022-10-13 18:26:31 +02:00
post :
2023-05-03 00:15:25 +02:00
summary : Create a User (or invite)
2023-01-02 15:11:32 +01:00
tags : [ Users ]
2022-10-13 18:26:31 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-10-13 18:26:31 +02:00
requestBody :
description : User invite information
content :
'application/json' :
schema :
$ref : '#/components/schemas/UserCreateRequest'
responses :
'200' :
description : A User object
content :
application/json :
schema :
$ref : '#/components/schemas/User'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/users/{userId}:
2022-09-22 09:06:32 +02:00
put :
summary : Update information about a User
2023-01-02 15:11:32 +01:00
tags : [ Users ]
2022-09-22 09:06:32 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-09-22 09:06:32 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : userId
2022-09-22 09:06:32 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a user
2022-09-22 09:06:32 +02:00
requestBody :
description : User update
content :
'application/json' :
schema :
$ref : '#/components/schemas/UserRequest'
responses :
'200' :
description : A User object
content :
application/json :
schema :
$ref : '#/components/schemas/User'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
2023-03-21 16:02:19 +01:00
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-04-22 12:57:51 +02:00
delete :
summary : Delete a User
tags : [ Users ]
security :
- BearerAuth : [ ]
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : userId
2023-04-22 12:57:51 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a user
2023-04-22 12:57:51 +02:00
responses :
'200' :
description : Delete status code
content : { }
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-03-21 16:02:19 +01:00
/api/users/{userId}/tokens:
get :
summary : Returns a list of all tokens for a user
2023-05-03 00:15:25 +02:00
tags : [ Users ]
2023-03-21 16:02:19 +01:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-21 16:02:19 +01:00
parameters :
- in : path
name : userId
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a user
2023-03-21 16:02:19 +01:00
responses :
'200' :
description : A JSON Array of PersonalAccessTokens
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/PersonalAccessToken'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
2023-05-03 00:15:25 +02:00
summary : Create a new token for a user
tags : [ Users ]
2023-03-21 16:02:19 +01:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-21 16:02:19 +01:00
parameters :
- in : path
name : userId
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a user
2023-03-21 16:02:19 +01:00
requestBody :
description : PersonalAccessToken create parameters
content :
application/json :
schema :
$ref : '#/components/schemas/PersonalAccessTokenRequest'
responses :
'200' :
description : The token in plain text
content :
2023-03-28 14:47:15 +02:00
application/json :
2023-03-21 16:02:19 +01:00
schema :
2023-03-28 14:47:15 +02:00
$ref : '#/components/schemas/PersonalAccessTokenGenerated'
2023-03-21 16:02:19 +01:00
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
/api/users/{userId}/tokens/{tokenId}:
get :
2023-05-03 00:15:25 +02:00
summary : Returns a specific token for a user
tags : [ Users ]
2023-03-21 16:02:19 +01:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-21 16:02:19 +01:00
parameters :
- in : path
name : userId
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a user
2023-03-21 16:02:19 +01:00
- in : path
name : tokenId
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a token
2023-03-21 16:02:19 +01:00
responses :
'200' :
description : A PersonalAccessTokens Object
content :
application/json :
schema :
$ref : '#/components/schemas/PersonalAccessToken'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
delete :
2023-05-03 00:15:25 +02:00
summary : Delete a token for a user
tags : [ Users ]
2023-03-21 16:02:19 +01:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-21 16:02:19 +01:00
parameters :
- in : path
name : userId
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a user
2023-03-21 16:02:19 +01:00
- in : path
name : tokenId
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a token
2023-03-21 16:02:19 +01:00
responses :
'200' :
description : Delete status code
content : { }
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
2022-09-22 09:06:32 +02:00
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2022-06-14 10:32:54 +02:00
/api/peers :
get :
summary : Returns a list of all peers
2023-01-02 15:11:32 +01:00
tags : [ Peers ]
2022-06-14 10:32:54 +02:00
security :
2023-01-02 15:11:32 +01:00
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A JSON Array of Peers
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Peer'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/peers/{peerId}:
2022-06-14 10:32:54 +02:00
get :
summary : Get information about a peer
2023-01-02 15:11:32 +01:00
tags : [ Peers ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : peerId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a peer
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A Peer object
content :
application/json :
schema :
$ref : '#/components/schemas/Peer'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update information about a peer
2023-01-02 15:11:32 +01:00
tags : [ Peers ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : peerId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a peer
2022-06-14 10:32:54 +02:00
requestBody :
2023-02-14 10:14:00 +01:00
description : update a peer
2022-06-14 10:32:54 +02:00
content :
'application/json' :
schema :
type : object
properties :
name :
type : string
2022-06-23 17:04:53 +02:00
ssh_enabled :
type : boolean
2023-02-14 10:14:00 +01:00
login_expiration_enabled :
type : boolean
2022-06-14 10:32:54 +02:00
required :
- name
2022-06-23 17:04:53 +02:00
- ssh_enabled
2023-02-14 10:14:00 +01:00
- login_expiration_enabled
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A Peer object
content :
application/json :
schema :
$ref : '#/components/schemas/Peer'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
delete :
summary : Delete a peer
2023-01-02 15:11:32 +01:00
tags : [ Peers ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : peerId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a peer
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : Delete status code
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
/api/setup-keys :
get :
summary : Returns a list of all Setup Keys
2023-01-02 15:11:32 +01:00
tags : [ Setup Keys ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A JSON Array of Setup keys
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/SetupKey'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
summary : Creates a Setup Key
2023-01-02 15:11:32 +01:00
tags : [ Setup Keys ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
requestBody :
description : New Setup Key request
content :
'application/json' :
schema :
$ref : '#/components/schemas/SetupKeyRequest'
responses :
'200' :
description : A Setup Keys Object
content :
application/json :
schema :
$ref : '#/components/schemas/SetupKey'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/setup-keys/{keyId}:
2022-06-14 10:32:54 +02:00
get :
summary : Get information about a Setup Key
2023-01-02 15:11:32 +01:00
tags : [ Setup Keys ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : keyId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a setup key
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A Setup Key object
content :
application/json :
schema :
$ref : '#/components/schemas/SetupKey'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update information about a Setup Key
2023-01-02 15:11:32 +01:00
tags : [ Setup Keys ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : keyId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a setup key
2022-06-14 10:32:54 +02:00
requestBody :
description : update to Setup Key
content :
'application/json' :
schema :
$ref : '#/components/schemas/SetupKeyRequest'
responses :
'200' :
description : A Setup Key object
content :
application/json :
schema :
$ref : '#/components/schemas/SetupKey'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
/api/groups :
get :
summary : Returns a list of all Groups
2023-01-02 15:11:32 +01:00
tags : [ Groups ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A JSON Array of Groups
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Group'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
summary : Creates a Group
2023-01-02 15:11:32 +01:00
tags : [ Groups ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
requestBody :
description : New Group request
content :
'application/json' :
schema :
type : object
properties :
name :
type : string
peers :
type : array
items :
type : string
required :
- name
responses :
'200' :
description : A Group Object
content :
application/json :
schema :
$ref : '#/components/schemas/Group'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/groups/{groupId}:
2022-06-14 10:32:54 +02:00
get :
summary : Get information about a Group
2023-01-02 15:11:32 +01:00
tags : [ Groups ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : groupId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a group
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A Group object
content :
application/json :
schema :
$ref : '#/components/schemas/Group'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update/Replace a Group
2023-01-02 15:11:32 +01:00
tags : [ Groups ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : groupId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a group
2022-06-14 10:32:54 +02:00
requestBody :
description : Update Group request
content :
'application/json' :
schema :
type : object
properties :
Name :
type : string
Peers :
type : array
items :
type : string
responses :
'200' :
description : A Group object
content :
application/json :
schema :
$ref : '#/components/schemas/Group'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
delete :
summary : Delete a Group
2023-01-02 15:11:32 +01:00
tags : [ Groups ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : groupId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a group
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : Delete status code
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
/api/rules :
get :
summary : Returns a list of all Rules
2023-01-02 15:11:32 +01:00
tags : [ Rules ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A JSON Array of Rules
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Rule'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
summary : Creates a Rule
2023-01-02 15:11:32 +01:00
tags : [ Rules ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
requestBody :
description : New Rule request
content :
'application/json' :
schema :
allOf :
- $ref : '#/components/schemas/RuleMinimum'
- type : object
properties :
sources :
type : array
items :
type : string
destinations :
type : array
items :
type : string
responses :
'200' :
description : A Rule Object
content :
application/json :
schema :
$ref : '#/components/schemas/Rule'
2023-05-03 00:15:25 +02:00
/api/rules/{ruleId}:
2022-06-14 10:32:54 +02:00
get :
summary : Get information about a Rules
2023-01-02 15:11:32 +01:00
tags : [ Rules ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : ruleId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a rule
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : A Rule object
content :
application/json :
schema :
$ref : '#/components/schemas/Rule'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update/Replace a Rule
2023-01-02 15:11:32 +01:00
tags : [ Rules ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : ruleId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a rule
2022-06-14 10:32:54 +02:00
requestBody :
description : Update Rule request
content :
'application/json' :
schema :
allOf :
- $ref : '#/components/schemas/RuleMinimum'
- type : object
properties :
sources :
type : array
items :
type : string
destinations :
type : array
items :
type : string
responses :
'200' :
description : A Rule object
content :
application/json :
schema :
$ref : '#/components/schemas/Rule'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-03-13 15:14:18 +01:00
delete :
summary : Delete a Rule
2022-06-14 10:32:54 +02:00
tags : [ Rules ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : ruleId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a rule
2023-03-13 15:14:18 +01:00
responses :
'200' :
description : Delete status code
content : { }
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
/api/policies :
get :
summary : Returns a list of all Policies
tags : [ Policies ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-13 15:14:18 +01:00
responses :
'200' :
description : A JSON Array of Policies
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Policy'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
summary : Creates a Policy
tags : [ Policies ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
requestBody :
2023-03-13 15:14:18 +01:00
description : New Policy request
2022-06-14 10:32:54 +02:00
content :
'application/json' :
schema :
2023-03-13 15:14:18 +01:00
allOf :
- $ref : '#/components/schemas/PolicyMinimum'
2022-06-14 10:32:54 +02:00
responses :
'200' :
2023-03-13 15:14:18 +01:00
description : A Policy Object
2022-06-14 10:32:54 +02:00
content :
application/json :
schema :
2023-03-13 15:14:18 +01:00
$ref : '#/components/schemas/Policy'
2023-05-03 00:15:25 +02:00
/api/policies/{policyId}:
2023-03-13 15:14:18 +01:00
get :
summary : Get information about a Policies
tags : [ Policies ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-13 15:14:18 +01:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : policyId
2023-03-13 15:14:18 +01:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a policy
2023-03-13 15:14:18 +01:00
responses :
'200' :
description : A Policy object
content :
application/json :
schema :
$ref : '#/components/schemas/Policy'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update/Replace a Policy
tags : [ Policies ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-03-13 15:14:18 +01:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : policyId
2023-03-13 15:14:18 +01:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a policy
2023-03-13 15:14:18 +01:00
requestBody :
description : Update Policy request
content :
'application/json' :
schema :
allOf :
- $ref : '#/components/schemas/PolicyMinimum'
responses :
'200' :
description : A Policy object
content :
application/json :
schema :
$ref : '#/components/schemas/Policy'
2022-06-14 10:32:54 +02:00
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
delete :
2023-03-13 15:14:18 +01:00
summary : Delete a Policy
tags : [ Policies ]
2022-06-14 10:32:54 +02:00
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-06-14 10:32:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : policyId
2022-06-14 10:32:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a policy
2022-06-14 10:32:54 +02:00
responses :
'200' :
description : Delete status code
2023-01-02 15:11:32 +01:00
content : { }
2022-06-14 10:32:54 +02:00
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
2022-08-20 19:11:54 +02:00
'500' :
"$ref": "#/components/responses/internal_error"
/api/routes :
get :
summary : Returns a list of all routes
tags : [ Routes ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-08-20 19:11:54 +02:00
responses :
'200' :
description : A JSON Array of Routes
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Route'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
summary : Creates a Route
tags : [ Routes ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-08-20 19:11:54 +02:00
requestBody :
description : New Routes request
content :
'application/json' :
schema :
$ref : '#/components/schemas/RouteRequest'
responses :
'200' :
description : A Route Object
content :
application/json :
schema :
$ref : '#/components/schemas/Route'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/routes/{routeId}:
2022-08-20 19:11:54 +02:00
get :
summary : Get information about a Routes
tags : [ Routes ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-08-20 19:11:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : routeId
2022-08-20 19:11:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a route
2022-08-20 19:11:54 +02:00
responses :
'200' :
description : A Route object
content :
application/json :
schema :
$ref : '#/components/schemas/Route'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update/Replace a Route
tags : [ Routes ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-08-20 19:11:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : routeId
2022-08-20 19:11:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a route
2022-08-20 19:11:54 +02:00
requestBody :
description : Update Route request
content :
application/json :
schema :
$ref : '#/components/schemas/RouteRequest'
responses :
'200' :
description : A Route object
content :
application/json :
schema :
$ref : '#/components/schemas/Route'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
delete :
summary : Delete a Route
tags : [ Routes ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-08-20 19:11:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : routeId
2022-08-20 19:11:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a route
2022-10-10 11:06:54 +02:00
responses :
'200' :
description : Delete status code
content : { }
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
/api/dns/nameservers :
get :
summary : Returns a list of all Nameserver Groups
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-10-10 11:06:54 +02:00
responses :
'200' :
description : A JSON Array of Nameserver Groups
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/NameserverGroup'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
post :
summary : Creates a Nameserver Group
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-10-10 11:06:54 +02:00
requestBody :
description : New Nameserver Groups request
content :
'application/json' :
schema :
$ref : '#/components/schemas/NameserverGroupRequest'
responses :
'200' :
description : A Nameserver Groups Object
content :
application/json :
schema :
$ref : '#/components/schemas/NameserverGroup'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-05-03 00:15:25 +02:00
/api/dns/nameservers/{nsgroupId}:
2022-10-10 11:06:54 +02:00
get :
summary : Get information about a Nameserver Groups
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-10-10 11:06:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : nsgroupId
2022-10-10 11:06:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a Nameserver Group
2022-10-10 11:06:54 +02:00
responses :
'200' :
description : A Nameserver Group object
content :
application/json :
schema :
$ref : '#/components/schemas/NameserverGroup'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Update/Replace a Nameserver Group
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-10-10 11:06:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : nsgroupId
2022-10-10 11:06:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a Nameserver Group
2022-10-10 11:06:54 +02:00
requestBody :
description : Update Nameserver Group request
content :
application/json :
schema :
$ref : '#/components/schemas/NameserverGroupRequest'
responses :
'200' :
description : A Nameserver Group object
content :
application/json :
schema :
$ref : '#/components/schemas/NameserverGroup'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
delete :
summary : Delete a Nameserver Group
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2022-10-10 11:06:54 +02:00
parameters :
- in : path
2023-05-03 00:15:25 +02:00
name : nsgroupId
2022-10-10 11:06:54 +02:00
required : true
schema :
type : string
2023-05-03 00:15:25 +02:00
description : The unique identifier of a Nameserver Group
2022-08-20 19:11:54 +02:00
responses :
'200' :
description : Delete status code
content : { }
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
2023-01-02 15:11:32 +01:00
'500' :
"$ref": "#/components/responses/internal_error"
2023-01-17 17:34:40 +01:00
/api/dns/settings :
get :
summary : Returns a DNS settings object
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-01-17 17:34:40 +01:00
responses :
'200' :
description : A JSON Object of DNS Setting
content :
application/json :
schema :
items :
$ref : '#/components/schemas/DNSSettings'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
put :
summary : Updates a DNS settings object
tags : [ DNS ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-01-17 17:34:40 +01:00
requestBody :
description : A DNS settings object
content :
'application/json' :
schema :
$ref : '#/components/schemas/DNSSettings'
responses :
'200' :
description : A JSON Object of DNS Setting
content :
application/json :
schema :
$ref : '#/components/schemas/DNSSettings'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
'500' :
"$ref": "#/components/responses/internal_error"
2023-01-02 15:11:32 +01:00
/api/events :
get :
summary : Returns a list of all events
tags : [ Events ]
security :
- BearerAuth : [ ]
2023-05-03 00:15:25 +02:00
- TokenAuth : [ ]
2023-01-02 15:11:32 +01:00
responses :
'200' :
description : A JSON Array of Events
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Event'
'400' :
"$ref": "#/components/responses/bad_request"
'401' :
"$ref": "#/components/responses/requires_authentication"
'403' :
"$ref": "#/components/responses/forbidden"
2022-06-14 10:32:54 +02:00
'500' :
2023-02-03 21:47:20 +01:00
"$ref": "#/components/responses/internal_error"