mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-19 17:31:39 +02:00
Update API descriptions and examples (#1364)
This commit is contained in:
parent
050f140245
commit
dd1e730454
@ -115,11 +115,11 @@ components:
|
|||||||
format: date-time
|
format: date-time
|
||||||
example: 2023-05-05T09:00:35.477782Z
|
example: 2023-05-05T09:00:35.477782Z
|
||||||
auto_groups:
|
auto_groups:
|
||||||
description: Groups to auto-assign to peers registered by this user
|
description: Group IDs to auto-assign to peers registered by this user
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: devs
|
example: ch8i4ug6lnn4g9hqv7m0
|
||||||
is_current:
|
is_current:
|
||||||
description: Is true if authenticated user is the same as this user
|
description: Is true if authenticated user is the same as this user
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -154,11 +154,11 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
example: admin
|
example: admin
|
||||||
auto_groups:
|
auto_groups:
|
||||||
description: Groups to auto-assign to peers registered by this user
|
description: Group IDs to auto-assign to peers registered by this user
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: devs
|
example: ch8i4ug6lnn4g9hqv7m0
|
||||||
is_blocked:
|
is_blocked:
|
||||||
description: If set to true then user is blocked and can't use the system
|
description: If set to true then user is blocked and can't use the system
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -183,11 +183,11 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
example: admin
|
example: admin
|
||||||
auto_groups:
|
auto_groups:
|
||||||
description: Groups to auto-assign to peers registered by this user
|
description: Group IDs to auto-assign to peers registered by this user
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: devs
|
example: ch8i4ug6lnn4g9hqv7m0
|
||||||
is_service_user:
|
is_service_user:
|
||||||
description: Is true if this user is a service user
|
description: Is true if this user is a service user
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -405,7 +405,7 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: "devs"
|
example: "ch8i4ug6lnn4g9hqv7m0"
|
||||||
updated_at:
|
updated_at:
|
||||||
description: Setup key last update date
|
description: Setup key last update date
|
||||||
type: string
|
type: string
|
||||||
@ -460,7 +460,7 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: "devs"
|
example: "ch8i4ug6lnn4g9hqv7m0"
|
||||||
usage_limit:
|
usage_limit:
|
||||||
description: A number of times this key can be used. The value of 0 indicates the unlimited usage.
|
description: A number of times this key can be used. The value of 0 indicates the unlimited usage.
|
||||||
type: integer
|
type: integer
|
||||||
@ -621,13 +621,13 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
sources:
|
sources:
|
||||||
type: array
|
type: array
|
||||||
description: List of source groups
|
description: List of source group IDs
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: "ch8i4ug6lnn4g9hqv7m1"
|
example: "ch8i4ug6lnn4g9hqv7m1"
|
||||||
destinations:
|
destinations:
|
||||||
type: array
|
type: array
|
||||||
description: List of destination groups
|
description: List of destination group IDs
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: "ch8i4ug6lnn4g9hqv7m0"
|
example: "ch8i4ug6lnn4g9hqv7m0"
|
||||||
@ -645,12 +645,12 @@ components:
|
|||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
sources:
|
sources:
|
||||||
description: Rule source groups
|
description: Rule source group IDs
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/GroupMinimum'
|
$ref: '#/components/schemas/GroupMinimum'
|
||||||
destinations:
|
destinations:
|
||||||
description: Rule destination groups
|
description: Rule destination group IDs
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/GroupMinimum'
|
$ref: '#/components/schemas/GroupMinimum'
|
||||||
@ -708,13 +708,13 @@ components:
|
|||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
sources:
|
sources:
|
||||||
description: Policy rule source groups
|
description: Policy rule source group IDs
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: "ch8i4ug6lnn4g9hqv797"
|
example: "ch8i4ug6lnn4g9hqv797"
|
||||||
destinations:
|
destinations:
|
||||||
description: Policy rule destination groups
|
description: Policy rule destination group IDs
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@ -728,12 +728,12 @@ components:
|
|||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
sources:
|
sources:
|
||||||
description: Policy rule source groups
|
description: Policy rule source group IDs
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/GroupMinimum'
|
$ref: '#/components/schemas/GroupMinimum'
|
||||||
destinations:
|
destinations:
|
||||||
description: Policy rule destination groups
|
description: Policy rule destination group IDs
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/GroupMinimum'
|
$ref: '#/components/schemas/GroupMinimum'
|
||||||
@ -834,7 +834,7 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
example: true
|
||||||
groups:
|
groups:
|
||||||
description: Route group tag groups
|
description: Group IDs containing routing peers
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@ -891,17 +891,17 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
description: Nameserver group name
|
description: Name of nameserver group name
|
||||||
type: string
|
type: string
|
||||||
maxLength: 40
|
maxLength: 40
|
||||||
minLength: 1
|
minLength: 1
|
||||||
example: Google DNS
|
example: Google DNS
|
||||||
description:
|
description:
|
||||||
description: Nameserver group description
|
description: Description of the nameserver group
|
||||||
type: string
|
type: string
|
||||||
example: Google DNS servers
|
example: Google DNS servers
|
||||||
nameservers:
|
nameservers:
|
||||||
description: Nameserver group
|
description: Nameserver list
|
||||||
minLength: 1
|
minLength: 1
|
||||||
maxLength: 2
|
maxLength: 2
|
||||||
type: array
|
type: array
|
||||||
@ -912,17 +912,17 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
example: true
|
||||||
groups:
|
groups:
|
||||||
description: Nameserver group tag groups
|
description: Distribution group IDs that defines group of peers that will use this nameserver group
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
example: ch8i4ug6lnn4g9hqv7m0
|
example: ch8i4ug6lnn4g9hqv7m0
|
||||||
primary:
|
primary:
|
||||||
description: Nameserver group primary status
|
description: Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
example: true
|
||||||
domains:
|
domains:
|
||||||
description: Nameserver group match domain list
|
description: Match domain list. It should be empty only if primary is true.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@ -930,7 +930,7 @@ components:
|
|||||||
maxLength: 255
|
maxLength: 255
|
||||||
example: "example.com"
|
example: "example.com"
|
||||||
search_domains_enabled:
|
search_domains_enabled:
|
||||||
description: Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
|
description: Search domain status for match domains. It should be true only if domains list is not empty.
|
||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
example: true
|
||||||
required:
|
required:
|
||||||
|
@ -271,58 +271,58 @@ type NameserverNsType string
|
|||||||
|
|
||||||
// NameserverGroup defines model for NameserverGroup.
|
// NameserverGroup defines model for NameserverGroup.
|
||||||
type NameserverGroup struct {
|
type NameserverGroup struct {
|
||||||
// Description Nameserver group description
|
// Description Description of the nameserver group
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
|
||||||
// Domains Nameserver group match domain list
|
// Domains Match domain list. It should be empty only if primary is true.
|
||||||
Domains []string `json:"domains"`
|
Domains []string `json:"domains"`
|
||||||
|
|
||||||
// Enabled Nameserver group status
|
// Enabled Nameserver group status
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
|
||||||
// Groups Nameserver group tag groups
|
// Groups Distribution group IDs that defines group of peers that will use this nameserver group
|
||||||
Groups []string `json:"groups"`
|
Groups []string `json:"groups"`
|
||||||
|
|
||||||
// Id Nameserver group ID
|
// Id Nameserver group ID
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
|
|
||||||
// Name Nameserver group name
|
// Name Name of nameserver group name
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Nameservers Nameserver group
|
// Nameservers Nameserver list
|
||||||
Nameservers []Nameserver `json:"nameservers"`
|
Nameservers []Nameserver `json:"nameservers"`
|
||||||
|
|
||||||
// Primary Nameserver group primary status
|
// Primary Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||||
Primary bool `json:"primary"`
|
Primary bool `json:"primary"`
|
||||||
|
|
||||||
// SearchDomainsEnabled Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
|
// SearchDomainsEnabled Search domain status for match domains. It should be true only if domains list is not empty.
|
||||||
SearchDomainsEnabled bool `json:"search_domains_enabled"`
|
SearchDomainsEnabled bool `json:"search_domains_enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NameserverGroupRequest defines model for NameserverGroupRequest.
|
// NameserverGroupRequest defines model for NameserverGroupRequest.
|
||||||
type NameserverGroupRequest struct {
|
type NameserverGroupRequest struct {
|
||||||
// Description Nameserver group description
|
// Description Description of the nameserver group
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
|
||||||
// Domains Nameserver group match domain list
|
// Domains Match domain list. It should be empty only if primary is true.
|
||||||
Domains []string `json:"domains"`
|
Domains []string `json:"domains"`
|
||||||
|
|
||||||
// Enabled Nameserver group status
|
// Enabled Nameserver group status
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
|
||||||
// Groups Nameserver group tag groups
|
// Groups Distribution group IDs that defines group of peers that will use this nameserver group
|
||||||
Groups []string `json:"groups"`
|
Groups []string `json:"groups"`
|
||||||
|
|
||||||
// Name Nameserver group name
|
// Name Name of nameserver group name
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Nameservers Nameserver group
|
// Nameservers Nameserver list
|
||||||
Nameservers []Nameserver `json:"nameservers"`
|
Nameservers []Nameserver `json:"nameservers"`
|
||||||
|
|
||||||
// Primary Nameserver group primary status
|
// Primary Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||||
Primary bool `json:"primary"`
|
Primary bool `json:"primary"`
|
||||||
|
|
||||||
// SearchDomainsEnabled Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
|
// SearchDomainsEnabled Search domain status for match domains. It should be true only if domains list is not empty.
|
||||||
SearchDomainsEnabled bool `json:"search_domains_enabled"`
|
SearchDomainsEnabled bool `json:"search_domains_enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -600,7 +600,7 @@ type PolicyRule struct {
|
|||||||
// Description Policy rule friendly description
|
// Description Policy rule friendly description
|
||||||
Description *string `json:"description,omitempty"`
|
Description *string `json:"description,omitempty"`
|
||||||
|
|
||||||
// Destinations Policy rule destination groups
|
// Destinations Policy rule destination group IDs
|
||||||
Destinations []GroupMinimum `json:"destinations"`
|
Destinations []GroupMinimum `json:"destinations"`
|
||||||
|
|
||||||
// Enabled Policy rule status
|
// Enabled Policy rule status
|
||||||
@ -618,7 +618,7 @@ type PolicyRule struct {
|
|||||||
// Protocol Policy rule type of the traffic
|
// Protocol Policy rule type of the traffic
|
||||||
Protocol PolicyRuleProtocol `json:"protocol"`
|
Protocol PolicyRuleProtocol `json:"protocol"`
|
||||||
|
|
||||||
// Sources Policy rule source groups
|
// Sources Policy rule source group IDs
|
||||||
Sources []GroupMinimum `json:"sources"`
|
Sources []GroupMinimum `json:"sources"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,7 +672,7 @@ type PolicyRuleUpdate struct {
|
|||||||
// Description Policy rule friendly description
|
// Description Policy rule friendly description
|
||||||
Description *string `json:"description,omitempty"`
|
Description *string `json:"description,omitempty"`
|
||||||
|
|
||||||
// Destinations Policy rule destination groups
|
// Destinations Policy rule destination group IDs
|
||||||
Destinations []string `json:"destinations"`
|
Destinations []string `json:"destinations"`
|
||||||
|
|
||||||
// Enabled Policy rule status
|
// Enabled Policy rule status
|
||||||
@ -690,7 +690,7 @@ type PolicyRuleUpdate struct {
|
|||||||
// Protocol Policy rule type of the traffic
|
// Protocol Policy rule type of the traffic
|
||||||
Protocol PolicyRuleUpdateProtocol `json:"protocol"`
|
Protocol PolicyRuleUpdateProtocol `json:"protocol"`
|
||||||
|
|
||||||
// Sources Policy rule source groups
|
// Sources Policy rule source group IDs
|
||||||
Sources []string `json:"sources"`
|
Sources []string `json:"sources"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,7 +729,7 @@ type Route struct {
|
|||||||
// Enabled Route status
|
// Enabled Route status
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
|
||||||
// Groups Route group tag groups
|
// Groups Group IDs containing routing peers
|
||||||
Groups []string `json:"groups"`
|
Groups []string `json:"groups"`
|
||||||
|
|
||||||
// Id Route Id
|
// Id Route Id
|
||||||
@ -765,7 +765,7 @@ type RouteRequest struct {
|
|||||||
// Enabled Route status
|
// Enabled Route status
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
|
||||||
// Groups Route group tag groups
|
// Groups Group IDs containing routing peers
|
||||||
Groups []string `json:"groups"`
|
Groups []string `json:"groups"`
|
||||||
|
|
||||||
// Masquerade Indicate if peer should masquerade traffic to this route's prefix
|
// Masquerade Indicate if peer should masquerade traffic to this route's prefix
|
||||||
@ -792,7 +792,7 @@ type Rule struct {
|
|||||||
// Description Rule friendly description
|
// Description Rule friendly description
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
|
||||||
// Destinations Rule destination groups
|
// Destinations Rule destination group IDs
|
||||||
Destinations []GroupMinimum `json:"destinations"`
|
Destinations []GroupMinimum `json:"destinations"`
|
||||||
|
|
||||||
// Disabled Rules status
|
// Disabled Rules status
|
||||||
@ -807,7 +807,7 @@ type Rule struct {
|
|||||||
// Name Rule name identifier
|
// Name Rule name identifier
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Sources Rule source groups
|
// Sources Rule source group IDs
|
||||||
Sources []GroupMinimum `json:"sources"`
|
Sources []GroupMinimum `json:"sources"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -831,7 +831,7 @@ type RuleRequest struct {
|
|||||||
// Description Rule friendly description
|
// Description Rule friendly description
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
|
||||||
// Destinations List of destination groups
|
// Destinations List of destination group IDs
|
||||||
Destinations *[]string `json:"destinations,omitempty"`
|
Destinations *[]string `json:"destinations,omitempty"`
|
||||||
|
|
||||||
// Disabled Rules status
|
// Disabled Rules status
|
||||||
@ -843,7 +843,7 @@ type RuleRequest struct {
|
|||||||
// Name Rule name identifier
|
// Name Rule name identifier
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Sources List of source groups
|
// Sources List of source group IDs
|
||||||
Sources *[]string `json:"sources,omitempty"`
|
Sources *[]string `json:"sources,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -918,7 +918,7 @@ type SetupKeyRequest struct {
|
|||||||
|
|
||||||
// User defines model for User.
|
// User defines model for User.
|
||||||
type User struct {
|
type User struct {
|
||||||
// AutoGroups Groups to auto-assign to peers registered by this user
|
// AutoGroups Group IDs to auto-assign to peers registered by this user
|
||||||
AutoGroups []string `json:"auto_groups"`
|
AutoGroups []string `json:"auto_groups"`
|
||||||
|
|
||||||
// Email User's email address
|
// Email User's email address
|
||||||
@ -957,7 +957,7 @@ type UserStatus string
|
|||||||
|
|
||||||
// UserCreateRequest defines model for UserCreateRequest.
|
// UserCreateRequest defines model for UserCreateRequest.
|
||||||
type UserCreateRequest struct {
|
type UserCreateRequest struct {
|
||||||
// AutoGroups Groups to auto-assign to peers registered by this user
|
// AutoGroups Group IDs to auto-assign to peers registered by this user
|
||||||
AutoGroups []string `json:"auto_groups"`
|
AutoGroups []string `json:"auto_groups"`
|
||||||
|
|
||||||
// Email User's Email to send invite to
|
// Email User's Email to send invite to
|
||||||
@ -975,7 +975,7 @@ type UserCreateRequest struct {
|
|||||||
|
|
||||||
// UserRequest defines model for UserRequest.
|
// UserRequest defines model for UserRequest.
|
||||||
type UserRequest struct {
|
type UserRequest struct {
|
||||||
// AutoGroups Groups to auto-assign to peers registered by this user
|
// AutoGroups Group IDs to auto-assign to peers registered by this user
|
||||||
AutoGroups []string `json:"auto_groups"`
|
AutoGroups []string `json:"auto_groups"`
|
||||||
|
|
||||||
// IsBlocked If set to true then user is blocked and can't use the system
|
// IsBlocked If set to true then user is blocked and can't use the system
|
||||||
|
Loading…
x
Reference in New Issue
Block a user