rest

package
v0.65.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: BSD-3-Clause Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGroupNotFound = errors.New("group not found")

ErrGroupNotFound is returned when a group is not found

Functions

func WithAuthHeader

func WithAuthHeader(value string) option

WithAuthHeader overrides auth header completely, this should generally not be used and WithBearerToken or WithPAT should be used instead

func WithBearerToken

func WithBearerToken(token string) option

WithBearerToken uses provided bearer token acquired from SSO for authentication

func WithHttpClient

func WithHttpClient(client HttpClient) option

WithHTTPClient overrides HTTPClient used

func WithManagementURL

func WithManagementURL(url string) option

WithManagementURL overrides target NetBird Management server

func WithPAT

func WithPAT(token string) option

WithPAT uses provided Personal Access Token (created from NetBird Management Dashboard) for authentication

func WithUserAgent added in v0.62.0

func WithUserAgent(userAgent string) option

WithUserAgent sets a custom User-Agent header for HTTP requests

Types

type AccountsAPI

type AccountsAPI struct {
	// contains filtered or unexported fields
}

AccountsAPI APIs for accounts, do not use directly

func (*AccountsAPI) Delete

func (a *AccountsAPI) Delete(ctx context.Context, accountID string) error

Delete delete account See more: https://docs.netbird.io/api/resources/accounts#delete-an-account

func (*AccountsAPI) List

func (a *AccountsAPI) List(ctx context.Context) ([]api.Account, error)

List list all accounts, only returns one account always See more: https://docs.netbird.io/api/resources/accounts#list-all-accounts

func (*AccountsAPI) Update

Update update account settings See more: https://docs.netbird.io/api/resources/accounts#update-an-account

type BillingAPI added in v0.65.0

type BillingAPI struct {
	// contains filtered or unexported fields
}

BillingAPI APIs for billing and invoices

func (*BillingAPI) GetInvoiceCSV added in v0.65.0

func (a *BillingAPI) GetInvoiceCSV(ctx context.Context, invoiceID string) (string, error)

GetInvoiceCSV retrieves the invoice CSV content See more: https://docs.netbird.io/api/resources/billing#get-invoice-csv

func (*BillingAPI) GetInvoicePDF added in v0.65.0

func (a *BillingAPI) GetInvoicePDF(ctx context.Context, invoiceID string) (*api.InvoicePDFResponse, error)

GetInvoicePDF retrieves the invoice PDF URL See more: https://docs.netbird.io/api/resources/billing#get-invoice-pdf

func (*BillingAPI) GetInvoices added in v0.65.0

func (a *BillingAPI) GetInvoices(ctx context.Context) ([]api.InvoiceResponse, error)

GetInvoices retrieves the account's paid invoices See more: https://docs.netbird.io/api/resources/billing#list-all-invoices

func (*BillingAPI) GetSubscription added in v0.65.0

func (a *BillingAPI) GetSubscription(ctx context.Context) (*api.Subscription, error)

GetSubscription retrieves the current subscription details See more: https://docs.netbird.io/api/resources/billing#get-current-subscription

func (*BillingAPI) GetUsage added in v0.65.0

func (a *BillingAPI) GetUsage(ctx context.Context) (*api.UsageStats, error)

GetUsage retrieves current usage statistics for the account See more: https://docs.netbird.io/api/resources/billing#get-current-usage

type Client

type Client struct {

	// Accounts NetBird account APIs
	// see more: https://docs.netbird.io/api/resources/accounts
	Accounts *AccountsAPI

	// Users NetBird users APIs
	// see more: https://docs.netbird.io/api/resources/users
	Users *UsersAPI

	// Tokens NetBird tokens APIs
	// see more: https://docs.netbird.io/api/resources/tokens
	Tokens *TokensAPI

	// Peers NetBird peers APIs
	// see more: https://docs.netbird.io/api/resources/peers
	Peers *PeersAPI

	// SetupKeys NetBird setup keys APIs
	// see more: https://docs.netbird.io/api/resources/setup-keys
	SetupKeys *SetupKeysAPI

	// Groups NetBird groups APIs
	// see more: https://docs.netbird.io/api/resources/groups
	Groups *GroupsAPI

	// Policies NetBird policies APIs
	// see more: https://docs.netbird.io/api/resources/policies
	Policies *PoliciesAPI

	// PostureChecks NetBird posture checks APIs
	// see more: https://docs.netbird.io/api/resources/posture-checks
	PostureChecks *PostureChecksAPI

	// Networks NetBird networks APIs
	// see more: https://docs.netbird.io/api/resources/networks
	Networks *NetworksAPI

	// Routes NetBird routes APIs
	// see more: https://docs.netbird.io/api/resources/routes
	Routes *RoutesAPI

	// DNS NetBird DNS APIs
	// see more: https://docs.netbird.io/api/resources/dns
	DNS *DNSAPI

	// DNSZones NetBird DNS Zones APIs
	// see more: https://docs.netbird.io/api/resources/dns-zones
	DNSZones *DNSZonesAPI

	// GeoLocation NetBird Geo Location APIs
	// see more: https://docs.netbird.io/api/resources/geo-locations
	GeoLocation *GeoLocationAPI

	// Events NetBird Events APIs
	// see more: https://docs.netbird.io/api/resources/events
	Events *EventsAPI

	// Billing NetBird Billing APIs for subscriptions, plans, and invoices
	// see more: https://docs.netbird.io/api/resources/billing
	Billing *BillingAPI

	// MSP NetBird MSP tenant management APIs
	// see more: https://docs.netbird.io/api/resources/msp
	MSP *MSPAPI

	// EDR NetBird EDR integration APIs (Intune, SentinelOne, Falcon, Huntress)
	// see more: https://docs.netbird.io/api/resources/edr
	EDR *EDRAPI

	// SCIM NetBird SCIM IDP integration APIs
	// see more: https://docs.netbird.io/api/resources/scim
	SCIM *SCIMAPI

	// EventStreaming NetBird Event Streaming integration APIs
	// see more: https://docs.netbird.io/api/resources/event-streaming
	EventStreaming *EventStreamingAPI

	// IdentityProviders NetBird Identity Providers APIs
	// see more: https://docs.netbird.io/api/resources/identity-providers
	IdentityProviders *IdentityProvidersAPI

	// Ingress NetBird Ingress Peers APIs
	// see more: https://docs.netbird.io/api/resources/ingress-ports
	Ingress *IngressAPI

	// Instance NetBird Instance API
	// see more: https://docs.netbird.io/api/resources/instance
	Instance *InstanceAPI
	// contains filtered or unexported fields
}

Client Management service HTTP REST API Client

func New

func New(managementURL, token string) *Client

New initialize new Client instance using PAT token

func NewWithBearerToken

func NewWithBearerToken(managementURL, token string) *Client

NewWithBearerToken initialize new Client instance using Bearer token type

func NewWithOptions

func NewWithOptions(opts ...option) *Client

NewWithOptions initialize new Client instance with options

func (*Client) Impersonate

func (c *Client) Impersonate(account string) *Client

Impersonate returns a Client impersonated for a specific account

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader, query map[string]string) (*http.Response, error)

NewRequest creates and executes new management API request

type DNSAPI

type DNSAPI struct {
	// contains filtered or unexported fields
}

DNSAPI APIs for DNS Management, do not use directly

func (*DNSAPI) CreateNameserverGroup

func (a *DNSAPI) CreateNameserverGroup(ctx context.Context, request api.PostApiDnsNameserversJSONRequestBody) (*api.NameserverGroup, error)

CreateNameserverGroup create new nameserver group See more: https://docs.netbird.io/api/resources/dns#create-a-nameserver-group

func (*DNSAPI) DeleteNameserverGroup

func (a *DNSAPI) DeleteNameserverGroup(ctx context.Context, nameserverGroupID string) error

DeleteNameserverGroup delete nameserver group See more: https://docs.netbird.io/api/resources/dns#delete-a-nameserver-group

func (*DNSAPI) GetNameserverGroup

func (a *DNSAPI) GetNameserverGroup(ctx context.Context, nameserverGroupID string) (*api.NameserverGroup, error)

GetNameserverGroup get nameserver group info See more: https://docs.netbird.io/api/resources/dns#retrieve-a-nameserver-group

func (*DNSAPI) GetSettings

func (a *DNSAPI) GetSettings(ctx context.Context) (*api.DNSSettings, error)

GetSettings get DNS settings See more: https://docs.netbird.io/api/resources/dns#retrieve-dns-settings

func (*DNSAPI) ListNameserverGroups

func (a *DNSAPI) ListNameserverGroups(ctx context.Context) ([]api.NameserverGroup, error)

ListNameserverGroups list all nameserver groups See more: https://docs.netbird.io/api/resources/dns#list-all-nameserver-groups

func (*DNSAPI) UpdateNameserverGroup

func (a *DNSAPI) UpdateNameserverGroup(ctx context.Context, nameserverGroupID string, request api.PutApiDnsNameserversNsgroupIdJSONRequestBody) (*api.NameserverGroup, error)

UpdateNameserverGroup update nameserver group info See more: https://docs.netbird.io/api/resources/dns#update-a-nameserver-group

func (*DNSAPI) UpdateSettings

func (a *DNSAPI) UpdateSettings(ctx context.Context, request api.PutApiDnsSettingsJSONRequestBody) (*api.DNSSettings, error)

UpdateSettings update DNS settings See more: https://docs.netbird.io/api/resources/dns#update-dns-settings

type DNSZonesAPI added in v0.63.0

type DNSZonesAPI struct {
	// contains filtered or unexported fields
}

DNSZonesAPI APIs for DNS Zones Management, do not use directly

func (*DNSZonesAPI) CreateRecord added in v0.63.0

CreateRecord create new DNS record in a zone See more: https://docs.netbird.io/api/resources/dns-zones#create-a-dns-record

func (*DNSZonesAPI) CreateZone added in v0.63.0

func (a *DNSZonesAPI) CreateZone(ctx context.Context, request api.PostApiDnsZonesJSONRequestBody) (*api.Zone, error)

CreateZone create new DNS zone See more: https://docs.netbird.io/api/resources/dns-zones#create-a-dns-zone

func (*DNSZonesAPI) DeleteRecord added in v0.63.0

func (a *DNSZonesAPI) DeleteRecord(ctx context.Context, zoneID, recordID string) error

DeleteRecord delete DNS record See more: https://docs.netbird.io/api/resources/dns-zones#delete-a-dns-record

func (*DNSZonesAPI) DeleteZone added in v0.63.0

func (a *DNSZonesAPI) DeleteZone(ctx context.Context, zoneID string) error

DeleteZone delete DNS zone See more: https://docs.netbird.io/api/resources/dns-zones#delete-a-dns-zone

func (*DNSZonesAPI) GetRecord added in v0.63.0

func (a *DNSZonesAPI) GetRecord(ctx context.Context, zoneID, recordID string) (*api.DNSRecord, error)

GetRecord get DNS record info See more: https://docs.netbird.io/api/resources/dns-zones#retrieve-a-dns-record

func (*DNSZonesAPI) GetZone added in v0.63.0

func (a *DNSZonesAPI) GetZone(ctx context.Context, zoneID string) (*api.Zone, error)

GetZone get DNS zone info See more: https://docs.netbird.io/api/resources/dns-zones#retrieve-a-dns-zone

func (*DNSZonesAPI) ListRecords added in v0.63.0

func (a *DNSZonesAPI) ListRecords(ctx context.Context, zoneID string) ([]api.DNSRecord, error)

ListRecords list all DNS records in a zone See more: https://docs.netbird.io/api/resources/dns-zones#list-all-dns-records

func (*DNSZonesAPI) ListZones added in v0.63.0

func (a *DNSZonesAPI) ListZones(ctx context.Context) ([]api.Zone, error)

ListZones list all DNS zones See more: https://docs.netbird.io/api/resources/dns-zones#list-all-dns-zones

func (*DNSZonesAPI) UpdateRecord added in v0.63.0

func (a *DNSZonesAPI) UpdateRecord(ctx context.Context, zoneID, recordID string, request api.PutApiDnsZonesZoneIdRecordsRecordIdJSONRequestBody) (*api.DNSRecord, error)

UpdateRecord update DNS record info See more: https://docs.netbird.io/api/resources/dns-zones#update-a-dns-record

func (*DNSZonesAPI) UpdateZone added in v0.63.0

func (a *DNSZonesAPI) UpdateZone(ctx context.Context, zoneID string, request api.PutApiDnsZonesZoneIdJSONRequestBody) (*api.Zone, error)

UpdateZone update DNS zone info See more: https://docs.netbird.io/api/resources/dns-zones#update-a-dns-zone

type EDRAPI added in v0.65.0

type EDRAPI struct {
	// contains filtered or unexported fields
}

EDRAPI APIs for EDR integrations (Intune, SentinelOne, Falcon, Huntress)

func (*EDRAPI) BypassPeerCompliance added in v0.65.0

func (a *EDRAPI) BypassPeerCompliance(ctx context.Context, peerID string) (*api.BypassResponse, error)

BypassPeerCompliance bypasses compliance for a non-compliant peer See more: https://docs.netbird.io/api/resources/edr#bypass-peer-compliance

func (*EDRAPI) CreateFalconIntegration added in v0.65.0

func (a *EDRAPI) CreateFalconIntegration(ctx context.Context, request api.EDRFalconRequest) (*api.EDRFalconResponse, error)

CreateFalconIntegration creates a new EDR Falcon integration See more: https://docs.netbird.io/api/resources/edr#create-falcon-integration

func (*EDRAPI) CreateHuntressIntegration added in v0.65.0

func (a *EDRAPI) CreateHuntressIntegration(ctx context.Context, request api.EDRHuntressRequest) (*api.EDRHuntressResponse, error)

CreateHuntressIntegration creates a new EDR Huntress integration See more: https://docs.netbird.io/api/resources/edr#create-huntress-integration

func (*EDRAPI) CreateIntuneIntegration added in v0.65.0

func (a *EDRAPI) CreateIntuneIntegration(ctx context.Context, request api.EDRIntuneRequest) (*api.EDRIntuneResponse, error)

CreateIntuneIntegration creates a new EDR Intune integration See more: https://docs.netbird.io/api/resources/edr#create-intune-integration

func (*EDRAPI) CreateSentinelOneIntegration added in v0.65.0

func (a *EDRAPI) CreateSentinelOneIntegration(ctx context.Context, request api.EDRSentinelOneRequest) (*api.EDRSentinelOneResponse, error)

CreateSentinelOneIntegration creates a new EDR SentinelOne integration See more: https://docs.netbird.io/api/resources/edr#create-sentinelone-integration

func (*EDRAPI) DeleteFalconIntegration added in v0.65.0

func (a *EDRAPI) DeleteFalconIntegration(ctx context.Context) error

DeleteFalconIntegration deletes the EDR Falcon integration See more: https://docs.netbird.io/api/resources/edr#delete-falcon-integration

func (*EDRAPI) DeleteHuntressIntegration added in v0.65.0

func (a *EDRAPI) DeleteHuntressIntegration(ctx context.Context) error

DeleteHuntressIntegration deletes the EDR Huntress integration See more: https://docs.netbird.io/api/resources/edr#delete-huntress-integration

func (*EDRAPI) DeleteIntuneIntegration added in v0.65.0

func (a *EDRAPI) DeleteIntuneIntegration(ctx context.Context) error

DeleteIntuneIntegration deletes the EDR Intune integration See more: https://docs.netbird.io/api/resources/edr#delete-intune-integration

func (*EDRAPI) DeleteSentinelOneIntegration added in v0.65.0

func (a *EDRAPI) DeleteSentinelOneIntegration(ctx context.Context) error

DeleteSentinelOneIntegration deletes the EDR SentinelOne integration See more: https://docs.netbird.io/api/resources/edr#delete-sentinelone-integration

func (*EDRAPI) GetFalconIntegration added in v0.65.0

func (a *EDRAPI) GetFalconIntegration(ctx context.Context) (*api.EDRFalconResponse, error)

GetFalconIntegration retrieves the EDR Falcon integration See more: https://docs.netbird.io/api/resources/edr#get-falcon-integration

func (*EDRAPI) GetHuntressIntegration added in v0.65.0

func (a *EDRAPI) GetHuntressIntegration(ctx context.Context) (*api.EDRHuntressResponse, error)

GetHuntressIntegration retrieves the EDR Huntress integration See more: https://docs.netbird.io/api/resources/edr#get-huntress-integration

func (*EDRAPI) GetIntuneIntegration added in v0.65.0

func (a *EDRAPI) GetIntuneIntegration(ctx context.Context) (*api.EDRIntuneResponse, error)

GetIntuneIntegration retrieves the EDR Intune integration See more: https://docs.netbird.io/api/resources/edr#get-intune-integration

func (*EDRAPI) GetSentinelOneIntegration added in v0.65.0

func (a *EDRAPI) GetSentinelOneIntegration(ctx context.Context) (*api.EDRSentinelOneResponse, error)

GetSentinelOneIntegration retrieves the EDR SentinelOne integration See more: https://docs.netbird.io/api/resources/edr#get-sentinelone-integration

func (*EDRAPI) ListBypassedPeers added in v0.65.0

func (a *EDRAPI) ListBypassedPeers(ctx context.Context) ([]api.BypassResponse, error)

ListBypassedPeers returns all peers that have compliance bypassed See more: https://docs.netbird.io/api/resources/edr#list-all-bypassed-peers

func (*EDRAPI) RevokePeerBypass added in v0.65.0

func (a *EDRAPI) RevokePeerBypass(ctx context.Context, peerID string) error

RevokePeerBypass revokes the compliance bypass for a peer See more: https://docs.netbird.io/api/resources/edr#revoke-peer-bypass

func (*EDRAPI) UpdateFalconIntegration added in v0.65.0

func (a *EDRAPI) UpdateFalconIntegration(ctx context.Context, request api.EDRFalconRequest) (*api.EDRFalconResponse, error)

UpdateFalconIntegration updates an existing EDR Falcon integration See more: https://docs.netbird.io/api/resources/edr#update-falcon-integration

func (*EDRAPI) UpdateHuntressIntegration added in v0.65.0

func (a *EDRAPI) UpdateHuntressIntegration(ctx context.Context, request api.EDRHuntressRequest) (*api.EDRHuntressResponse, error)

UpdateHuntressIntegration updates an existing EDR Huntress integration See more: https://docs.netbird.io/api/resources/edr#update-huntress-integration

func (*EDRAPI) UpdateIntuneIntegration added in v0.65.0

func (a *EDRAPI) UpdateIntuneIntegration(ctx context.Context, request api.EDRIntuneRequest) (*api.EDRIntuneResponse, error)

UpdateIntuneIntegration updates an existing EDR Intune integration See more: https://docs.netbird.io/api/resources/edr#update-intune-integration

func (*EDRAPI) UpdateSentinelOneIntegration added in v0.65.0

func (a *EDRAPI) UpdateSentinelOneIntegration(ctx context.Context, request api.EDRSentinelOneRequest) (*api.EDRSentinelOneResponse, error)

UpdateSentinelOneIntegration updates an existing EDR SentinelOne integration See more: https://docs.netbird.io/api/resources/edr#update-sentinelone-integration

type EventStreamingAPI added in v0.65.0

type EventStreamingAPI struct {
	// contains filtered or unexported fields
}

EventStreamingAPI APIs for event streaming integrations

func (*EventStreamingAPI) Create added in v0.65.0

Create creates a new event streaming integration See more: https://docs.netbird.io/api/resources/event-streaming#create-an-event-streaming-integration

func (*EventStreamingAPI) Delete added in v0.65.0

func (a *EventStreamingAPI) Delete(ctx context.Context, integrationID int) error

Delete deletes an event streaming integration See more: https://docs.netbird.io/api/resources/event-streaming#delete-an-event-streaming-integration

func (*EventStreamingAPI) Get added in v0.65.0

func (a *EventStreamingAPI) Get(ctx context.Context, integrationID int) (*api.IntegrationResponse, error)

Get retrieves a specific event streaming integration by ID See more: https://docs.netbird.io/api/resources/event-streaming#retrieve-an-event-streaming-integration

func (*EventStreamingAPI) List added in v0.65.0

List retrieves all event streaming integrations See more: https://docs.netbird.io/api/resources/event-streaming#list-all-event-streaming-integrations

func (*EventStreamingAPI) Update added in v0.65.0

func (a *EventStreamingAPI) Update(ctx context.Context, integrationID int, request api.CreateIntegrationRequest) (*api.IntegrationResponse, error)

Update updates an existing event streaming integration See more: https://docs.netbird.io/api/resources/event-streaming#update-an-event-streaming-integration

type EventsAPI

type EventsAPI struct {
	// contains filtered or unexported fields
}

EventsAPI APIs for Events, do not use directly

func (*EventsAPI) ListAuditEvents added in v0.65.0

func (a *EventsAPI) ListAuditEvents(ctx context.Context) ([]api.Event, error)

ListAuditEvents list all audit events See more: https://docs.netbird.io/api/resources/events#list-all-audit-events

func (*EventsAPI) ListNetworkTrafficEvents added in v0.65.0

func (a *EventsAPI) ListNetworkTrafficEvents(ctx context.Context, opts ...NetworkTrafficOption) (*api.NetworkTrafficEventsResponse, error)

ListNetworkTrafficEvents list network traffic events See more: https://docs.netbird.io/api/resources/events#list-network-traffic-events

type GeoLocationAPI

type GeoLocationAPI struct {
	// contains filtered or unexported fields
}

GeoLocationAPI APIs for Geo-Location, do not use directly

func (*GeoLocationAPI) ListCountries

func (a *GeoLocationAPI) ListCountries(ctx context.Context) ([]api.Country, error)

ListCountries list all country codes See more: https://docs.netbird.io/api/resources/geo-locations#list-all-country-codes

func (*GeoLocationAPI) ListCountryCities

func (a *GeoLocationAPI) ListCountryCities(ctx context.Context, countryCode string) ([]api.City, error)

ListCountryCities Get a list of all English city names for a given country code See more: https://docs.netbird.io/api/resources/geo-locations#list-all-city-names-by-country

type GroupsAPI

type GroupsAPI struct {
	// contains filtered or unexported fields
}

GroupsAPI APIs for Groups, do not use directly

func (*GroupsAPI) Create

Create create new group See more: https://docs.netbird.io/api/resources/groups#create-a-group

func (*GroupsAPI) Delete

func (a *GroupsAPI) Delete(ctx context.Context, groupID string) error

Delete delete group See more: https://docs.netbird.io/api/resources/groups#delete-a-group

func (*GroupsAPI) Get

func (a *GroupsAPI) Get(ctx context.Context, groupID string) (*api.Group, error)

Get get group info See more: https://docs.netbird.io/api/resources/groups#retrieve-a-group

func (*GroupsAPI) GetByName added in v0.60.5

func (a *GroupsAPI) GetByName(ctx context.Context, groupName string) (*api.Group, error)

GetByName get group by name See more: https://docs.netbird.io/api/resources/groups#list-all-groups

func (*GroupsAPI) List

func (a *GroupsAPI) List(ctx context.Context) ([]api.Group, error)

List list all groups See more: https://docs.netbird.io/api/resources/groups#list-all-groups

func (*GroupsAPI) Update

func (a *GroupsAPI) Update(ctx context.Context, groupID string, request api.PutApiGroupsGroupIdJSONRequestBody) (*api.Group, error)

Update update group info See more: https://docs.netbird.io/api/resources/groups#update-a-group

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient interface for HTTP client

type IdentityProvidersAPI added in v0.65.0

type IdentityProvidersAPI struct {
	// contains filtered or unexported fields
}

IdentityProvidersAPI APIs for Identity Providers, do not use directly

func (*IdentityProvidersAPI) Create added in v0.65.0

Create new identity provider See more: https://docs.netbird.io/api/resources/identity-providers#create-an-identity-provider

func (*IdentityProvidersAPI) Delete added in v0.65.0

func (a *IdentityProvidersAPI) Delete(ctx context.Context, idpID string) error

Delete delete identity provider See more: https://docs.netbird.io/api/resources/identity-providers#delete-an-identity-provider

func (*IdentityProvidersAPI) Get added in v0.65.0

Get identity provider info See more: https://docs.netbird.io/api/resources/identity-providers#retrieve-an-identity-provider

func (*IdentityProvidersAPI) List added in v0.65.0

List all identity providers See more: https://docs.netbird.io/api/resources/identity-providers#list-all-identity-providers

func (*IdentityProvidersAPI) Update added in v0.65.0

Update update identity provider See more: https://docs.netbird.io/api/resources/identity-providers#update-an-identity-provider

type IngressAPI added in v0.65.0

type IngressAPI struct {
	// contains filtered or unexported fields
}

IngressAPI APIs for Ingress Peers, do not use directly

func (*IngressAPI) Create added in v0.65.0

Create new ingress peer See more: https://docs.netbird.io/api/resources/ingress#create-an-ingress-peer

func (*IngressAPI) Delete added in v0.65.0

func (a *IngressAPI) Delete(ctx context.Context, ingressPeerID string) error

Delete delete ingress peer See more: https://docs.netbird.io/api/resources/ingress#delete-an-ingress-peer

func (*IngressAPI) Get added in v0.65.0

func (a *IngressAPI) Get(ctx context.Context, ingressPeerID string) (*api.IngressPeer, error)

Get ingress peer info See more: https://docs.netbird.io/api/resources/ingress#retrieve-an-ingress-peer

func (*IngressAPI) List added in v0.65.0

func (a *IngressAPI) List(ctx context.Context) ([]api.IngressPeer, error)

List all ingress peers See more: https://docs.netbird.io/api/resources/ingress#list-all-ingress-peers

func (*IngressAPI) Update added in v0.65.0

Update update ingress peer See more: https://docs.netbird.io/api/resources/ingress#update-an-ingress-peer

type InstanceAPI added in v0.65.0

type InstanceAPI struct {
	// contains filtered or unexported fields
}

InstanceAPI APIs for Instance status and version, do not use directly

func (*InstanceAPI) GetStatus added in v0.65.0

func (a *InstanceAPI) GetStatus(ctx context.Context) (*api.InstanceStatus, error)

GetStatus get instance status See more: https://docs.netbird.io/api/resources/instance#get-instance-status

func (*InstanceAPI) Setup added in v0.65.0

Setup perform initial instance setup See more: https://docs.netbird.io/api/resources/instance#setup-instance

type MSPAPI added in v0.65.0

type MSPAPI struct {
	// contains filtered or unexported fields
}

MSPAPI APIs for MSP tenant management

func (*MSPAPI) CreateTenant added in v0.65.0

func (a *MSPAPI) CreateTenant(ctx context.Context, request api.CreateTenantRequest) (*api.TenantResponse, error)

CreateTenant creates a new MSP tenant See more: https://docs.netbird.io/api/resources/msp#create-a-tenant

func (*MSPAPI) DeleteTenant added in v0.65.0

func (a *MSPAPI) DeleteTenant(ctx context.Context, tenantID string) error

DeleteTenant deletes an MSP tenant See more: https://docs.netbird.io/api/resources/msp#delete-a-tenant

func (*MSPAPI) InviteTenant added in v0.65.0

func (a *MSPAPI) InviteTenant(ctx context.Context, tenantID string) (*api.TenantResponse, error)

InviteTenant invites an existing account as a tenant to the MSP account See more: https://docs.netbird.io/api/resources/msp#invite-a-tenant

func (*MSPAPI) ListTenants added in v0.65.0

func (a *MSPAPI) ListTenants(ctx context.Context) (*api.GetTenantsResponse, error)

ListTenants retrieves all MSP tenants See more: https://docs.netbird.io/api/resources/msp#list-all-tenants

func (*MSPAPI) UnlinkTenant added in v0.65.0

func (a *MSPAPI) UnlinkTenant(ctx context.Context, tenantID, owner string) error

UnlinkTenant unlinks a tenant from the MSP account See more: https://docs.netbird.io/api/resources/msp#unlink-a-tenant

func (*MSPAPI) UpdateTenant added in v0.65.0

func (a *MSPAPI) UpdateTenant(ctx context.Context, tenantID string, request api.UpdateTenantRequest) (*api.TenantResponse, error)

UpdateTenant updates an existing MSP tenant See more: https://docs.netbird.io/api/resources/msp#update-a-tenant

func (*MSPAPI) VerifyTenantDNS added in v0.65.0

func (a *MSPAPI) VerifyTenantDNS(ctx context.Context, tenantID string) error

VerifyTenantDNS verifies a tenant domain DNS challenge See more: https://docs.netbird.io/api/resources/msp#verify-tenant-dns

type NetworkResourcesAPI

type NetworkResourcesAPI struct {
	// contains filtered or unexported fields
}

NetworkResourcesAPI APIs for Network Resources, do not use directly

func (*NetworkResourcesAPI) Delete

func (a *NetworkResourcesAPI) Delete(ctx context.Context, networkResourceID string) error

Delete delete network resource See more: https://docs.netbird.io/api/resources/networks#delete-a-network-resource

func (*NetworkResourcesAPI) Get

func (a *NetworkResourcesAPI) Get(ctx context.Context, networkResourceID string) (*api.NetworkResource, error)

Get get network resource info See more: https://docs.netbird.io/api/resources/networks#retrieve-a-network-resource

func (*NetworkResourcesAPI) List

List list all resources in networks See more: https://docs.netbird.io/api/resources/networks#list-all-network-resources

func (*NetworkResourcesAPI) Update

Update update network resource See more: https://docs.netbird.io/api/resources/networks#update-a-network-resource

type NetworkRoutersAPI

type NetworkRoutersAPI struct {
	// contains filtered or unexported fields
}

NetworkRoutersAPI APIs for Network Routers, do not use directly

func (*NetworkRoutersAPI) Delete

func (a *NetworkRoutersAPI) Delete(ctx context.Context, networkRouterID string) error

Delete delete network router See more: https://docs.netbird.io/api/routers/networks#delete-a-network-router

func (*NetworkRoutersAPI) Get

func (a *NetworkRoutersAPI) Get(ctx context.Context, networkRouterID string) (*api.NetworkRouter, error)

Get get network router info See more: https://docs.netbird.io/api/routers/networks#retrieve-a-network-router

func (*NetworkRoutersAPI) List

List list all routers in networks See more: https://docs.netbird.io/api/routers/networks#list-all-network-routers

func (*NetworkRoutersAPI) Update

Update update network router See more: https://docs.netbird.io/api/routers/networks#update-a-network-router

type NetworkTrafficOption added in v0.65.0

type NetworkTrafficOption func(query map[string]string)

NetworkTrafficOption options for ListNetworkTrafficEvents API

func NetworkTrafficConnectionType added in v0.65.0

func NetworkTrafficDirection added in v0.65.0

func NetworkTrafficEndDate added in v0.65.0

func NetworkTrafficEndDate(t time.Time) NetworkTrafficOption

func NetworkTrafficPage added in v0.65.0

func NetworkTrafficPage(page int) NetworkTrafficOption

func NetworkTrafficPageSize added in v0.65.0

func NetworkTrafficPageSize(pageSize int) NetworkTrafficOption

func NetworkTrafficProtocol added in v0.65.0

func NetworkTrafficProtocol(protocol int) NetworkTrafficOption

func NetworkTrafficReporterID added in v0.65.0

func NetworkTrafficReporterID(reporterID string) NetworkTrafficOption

func NetworkTrafficSearch added in v0.65.0

func NetworkTrafficSearch(search string) NetworkTrafficOption

func NetworkTrafficStartDate added in v0.65.0

func NetworkTrafficStartDate(t time.Time) NetworkTrafficOption

func NetworkTrafficType added in v0.65.0

func NetworkTrafficUserID added in v0.65.0

func NetworkTrafficUserID(userID string) NetworkTrafficOption

type NetworksAPI

type NetworksAPI struct {
	// contains filtered or unexported fields
}

NetworksAPI APIs for Networks, do not use directly

func (*NetworksAPI) Create

Create create new network See more: https://docs.netbird.io/api/resources/networks#create-a-network

func (*NetworksAPI) Delete

func (a *NetworksAPI) Delete(ctx context.Context, networkID string) error

Delete delete network See more: https://docs.netbird.io/api/resources/networks#delete-a-network

func (*NetworksAPI) Get

func (a *NetworksAPI) Get(ctx context.Context, networkID string) (*api.Network, error)

Get get network info See more: https://docs.netbird.io/api/resources/networks#retrieve-a-network

func (*NetworksAPI) List

func (a *NetworksAPI) List(ctx context.Context) ([]api.Network, error)

List list all networks See more: https://docs.netbird.io/api/resources/networks#list-all-networks

func (*NetworksAPI) ListAllRouters added in v0.65.0

func (a *NetworksAPI) ListAllRouters(ctx context.Context) ([]api.NetworkRouter, error)

ListAllRouters list all routers across all networks See more: https://docs.netbird.io/api/resources/networks#list-all-network-routers

func (*NetworksAPI) Resources

func (a *NetworksAPI) Resources(networkID string) *NetworkResourcesAPI

Resources APIs for network resources

func (*NetworksAPI) Routers

func (a *NetworksAPI) Routers(networkID string) *NetworkRoutersAPI

Routers APIs for network routers

func (*NetworksAPI) Update

Update update network See more: https://docs.netbird.io/api/resources/networks#update-a-network

type PeerIngressPortsAPI added in v0.65.0

type PeerIngressPortsAPI struct {
	// contains filtered or unexported fields
}

PeerIngressPortsAPI APIs for Peer Ingress Ports, do not use directly

func (*PeerIngressPortsAPI) Create added in v0.65.0

Create create new ingress port allocation See more: https://docs.netbird.io/api/resources/peers#create-an-ingress-port-allocation

func (*PeerIngressPortsAPI) Delete added in v0.65.0

func (a *PeerIngressPortsAPI) Delete(ctx context.Context, allocationID string) error

Delete delete ingress port allocation See more: https://docs.netbird.io/api/resources/peers#delete-an-ingress-port-allocation

func (*PeerIngressPortsAPI) Get added in v0.65.0

Get get ingress port allocation info See more: https://docs.netbird.io/api/resources/peers#retrieve-an-ingress-port-allocation

func (*PeerIngressPortsAPI) List added in v0.65.0

List list all ingress port allocations for a peer See more: https://docs.netbird.io/api/resources/peers#list-all-ingress-port-allocations

func (*PeerIngressPortsAPI) Update added in v0.65.0

Update update ingress port allocation See more: https://docs.netbird.io/api/resources/peers#update-an-ingress-port-allocation

type PeerJobsAPI added in v0.65.0

type PeerJobsAPI struct {
	// contains filtered or unexported fields
}

PeerJobsAPI APIs for Peer Jobs, do not use directly

func (*PeerJobsAPI) Create added in v0.65.0

Create create new job for a peer See more: https://docs.netbird.io/api/resources/peers#create-a-peer-job

func (*PeerJobsAPI) Get added in v0.65.0

func (a *PeerJobsAPI) Get(ctx context.Context, jobID string) (*api.JobResponse, error)

Get get job info See more: https://docs.netbird.io/api/resources/peers#retrieve-a-peer-job

func (*PeerJobsAPI) List added in v0.65.0

func (a *PeerJobsAPI) List(ctx context.Context) ([]api.JobResponse, error)

List list all jobs for a peer See more: https://docs.netbird.io/api/resources/peers#list-all-peer-jobs

type PeersAPI

type PeersAPI struct {
	// contains filtered or unexported fields
}

PeersAPI APIs for peers, do not use directly

func (*PeersAPI) CreateTemporaryAccess added in v0.65.0

CreateTemporaryAccess create temporary access for a peer See more: https://docs.netbird.io/api/resources/peers#create-temporary-access

func (*PeersAPI) Delete

func (a *PeersAPI) Delete(ctx context.Context, peerID string) error

Delete delete a peer See more: https://docs.netbird.io/api/resources/peers#delete-a-peer

func (*PeersAPI) Get

func (a *PeersAPI) Get(ctx context.Context, peerID string) (*api.Peer, error)

Get retrieve a peer See more: https://docs.netbird.io/api/resources/peers#retrieve-a-peer

func (*PeersAPI) IngressPorts added in v0.65.0

func (a *PeersAPI) IngressPorts(peerID string) *PeerIngressPortsAPI

IngressPorts APIs for peer ingress ports

func (*PeersAPI) Jobs added in v0.65.0

func (a *PeersAPI) Jobs(peerID string) *PeerJobsAPI

Jobs APIs for peer jobs

func (*PeersAPI) List

func (a *PeersAPI) List(ctx context.Context, opts ...PeersListOption) ([]api.Peer, error)

List list all peers See more: https://docs.netbird.io/api/resources/peers#list-all-peers

func (*PeersAPI) ListAccessiblePeers

func (a *PeersAPI) ListAccessiblePeers(ctx context.Context, peerID string) ([]api.Peer, error)

ListAccessiblePeers list all peers that the specified peer can connect to within the network See more: https://docs.netbird.io/api/resources/peers#list-accessible-peers

func (*PeersAPI) Update

func (a *PeersAPI) Update(ctx context.Context, peerID string, request api.PutApiPeersPeerIdJSONRequestBody) (*api.Peer, error)

Update update information for a peer See more: https://docs.netbird.io/api/resources/peers#update-a-peer

type PeersListOption

type PeersListOption func() (string, string)

PeersListOption options for Peers List API

func PeerIPFilter

func PeerIPFilter(ip string) PeersListOption

func PeerNameFilter

func PeerNameFilter(name string) PeersListOption

type PoliciesAPI

type PoliciesAPI struct {
	// contains filtered or unexported fields
}

PoliciesAPI APIs for Policies, do not use directly

func (*PoliciesAPI) Create

Create create new policy See more: https://docs.netbird.io/api/resources/policies#create-a-policy

func (*PoliciesAPI) Delete

func (a *PoliciesAPI) Delete(ctx context.Context, policyID string) error

Delete delete policy See more: https://docs.netbird.io/api/resources/policies#delete-a-policy

func (*PoliciesAPI) Get

func (a *PoliciesAPI) Get(ctx context.Context, policyID string) (*api.Policy, error)

Get get policy info See more: https://docs.netbird.io/api/resources/policies#retrieve-a-policy

func (*PoliciesAPI) List

func (a *PoliciesAPI) List(ctx context.Context) ([]api.Policy, error)

List list all policies See more: https://docs.netbird.io/api/resources/policies#list-all-policies

func (*PoliciesAPI) Update

Update update policy info See more: https://docs.netbird.io/api/resources/policies#update-a-policy

type PostureChecksAPI

type PostureChecksAPI struct {
	// contains filtered or unexported fields
}

PostureChecksAPI APIs for PostureChecks, do not use directly

func (*PostureChecksAPI) Create

Create create new posture check See more: https://docs.netbird.io/api/resources/posture-checks#create-a-posture-check

func (*PostureChecksAPI) Delete

func (a *PostureChecksAPI) Delete(ctx context.Context, postureCheckID string) error

Delete delete posture check See more: https://docs.netbird.io/api/resources/posture-checks#delete-a-posture-check

func (*PostureChecksAPI) Get

func (a *PostureChecksAPI) Get(ctx context.Context, postureCheckID string) (*api.PostureCheck, error)

Get get posture check info See more: https://docs.netbird.io/api/resources/posture-checks#retrieve-a-posture-check

func (*PostureChecksAPI) List

List list all posture checks See more: https://docs.netbird.io/api/resources/posture-checks#list-all-posture-checks

func (*PostureChecksAPI) Update

Update update posture check info See more: https://docs.netbird.io/api/resources/posture-checks#update-a-posture-check

type RoutesAPI

type RoutesAPI struct {
	// contains filtered or unexported fields
}

RoutesAPI APIs for Routes, do not use directly

func (*RoutesAPI) Create

Create create new route See more: https://docs.netbird.io/api/resources/routes#create-a-route

func (*RoutesAPI) Delete

func (a *RoutesAPI) Delete(ctx context.Context, routeID string) error

Delete delete route See more: https://docs.netbird.io/api/resources/routes#delete-a-route

func (*RoutesAPI) Get

func (a *RoutesAPI) Get(ctx context.Context, routeID string) (*api.Route, error)

Get get route info See more: https://docs.netbird.io/api/resources/routes#retrieve-a-route

func (*RoutesAPI) List

func (a *RoutesAPI) List(ctx context.Context) ([]api.Route, error)

List list all routes See more: https://docs.netbird.io/api/resources/routes#list-all-routes

func (*RoutesAPI) Update

func (a *RoutesAPI) Update(ctx context.Context, routeID string, request api.PutApiRoutesRouteIdJSONRequestBody) (*api.Route, error)

Update update route info See more: https://docs.netbird.io/api/resources/routes#update-a-route

type SCIMAPI added in v0.65.0

type SCIMAPI struct {
	// contains filtered or unexported fields
}

SCIMAPI APIs for SCIM IDP integrations

func (*SCIMAPI) Create added in v0.65.0

Create creates a new SCIM IDP integration See more: https://docs.netbird.io/api/resources/scim#create-a-scim-integration

func (*SCIMAPI) Delete added in v0.65.0

func (a *SCIMAPI) Delete(ctx context.Context, integrationID string) error

Delete deletes a SCIM IDP integration See more: https://docs.netbird.io/api/resources/scim#delete-a-scim-integration

func (*SCIMAPI) Get added in v0.65.0

func (a *SCIMAPI) Get(ctx context.Context, integrationID string) (*api.ScimIntegration, error)

Get retrieves a specific SCIM IDP integration by ID See more: https://docs.netbird.io/api/resources/scim#retrieve-a-scim-integration

func (*SCIMAPI) GetLogs added in v0.65.0

func (a *SCIMAPI) GetLogs(ctx context.Context, integrationID string) ([]api.IdpIntegrationSyncLog, error)

GetLogs retrieves synchronization logs for an SCIM IDP integration See more: https://docs.netbird.io/api/resources/scim#get-scim-sync-logs

func (*SCIMAPI) List added in v0.65.0

func (a *SCIMAPI) List(ctx context.Context) ([]api.ScimIntegration, error)

List retrieves all SCIM IDP integrations See more: https://docs.netbird.io/api/resources/scim#list-all-scim-integrations

func (*SCIMAPI) RegenerateToken added in v0.65.0

func (a *SCIMAPI) RegenerateToken(ctx context.Context, integrationID string) (*api.ScimTokenResponse, error)

RegenerateToken regenerates the SCIM API token for an integration See more: https://docs.netbird.io/api/resources/scim#regenerate-scim-token

func (*SCIMAPI) Update added in v0.65.0

func (a *SCIMAPI) Update(ctx context.Context, integrationID string, request api.UpdateScimIntegrationRequest) (*api.ScimIntegration, error)

Update updates an existing SCIM IDP integration See more: https://docs.netbird.io/api/resources/scim#update-a-scim-integration

type SetupKeysAPI

type SetupKeysAPI struct {
	// contains filtered or unexported fields
}

SetupKeysAPI APIs for Setup keys, do not use directly

func (*SetupKeysAPI) Create

Create generate new Setup Key See more: https://docs.netbird.io/api/resources/setup-keys#create-a-setup-key

func (*SetupKeysAPI) Delete

func (a *SetupKeysAPI) Delete(ctx context.Context, setupKeyID string) error

Delete delete setup key See more: https://docs.netbird.io/api/resources/setup-keys#delete-a-setup-key

func (*SetupKeysAPI) Get

func (a *SetupKeysAPI) Get(ctx context.Context, setupKeyID string) (*api.SetupKey, error)

Get get setup key info See more: https://docs.netbird.io/api/resources/setup-keys#retrieve-a-setup-key

func (*SetupKeysAPI) List

func (a *SetupKeysAPI) List(ctx context.Context) ([]api.SetupKey, error)

List list all setup keys See more: https://docs.netbird.io/api/resources/setup-keys#list-all-setup-keys

func (*SetupKeysAPI) Update

Update generate new Setup Key See more: https://docs.netbird.io/api/resources/setup-keys#update-a-setup-key

type TokensAPI

type TokensAPI struct {
	// contains filtered or unexported fields
}

TokensAPI APIs for PATs, do not use directly

func (*TokensAPI) Create

Create generate new PAT for user See more: https://docs.netbird.io/api/resources/tokens#create-a-token

func (*TokensAPI) Delete

func (a *TokensAPI) Delete(ctx context.Context, userID, tokenID string) error

Delete delete user token See more: https://docs.netbird.io/api/resources/tokens#delete-a-token

func (*TokensAPI) Get

func (a *TokensAPI) Get(ctx context.Context, userID, tokenID string) (*api.PersonalAccessToken, error)

Get get user token info See more: https://docs.netbird.io/api/resources/tokens#retrieve-a-token

func (*TokensAPI) List

func (a *TokensAPI) List(ctx context.Context, userID string) ([]api.PersonalAccessToken, error)

List list user tokens See more: https://docs.netbird.io/api/resources/tokens#list-all-tokens

type UsersAPI

type UsersAPI struct {
	// contains filtered or unexported fields
}

UsersAPI APIs for users, do not use directly

func (*UsersAPI) AcceptInvite added in v0.65.0

AcceptInvite accept a user invite See more: https://docs.netbird.io/api/resources/users#accept-a-user-invite

func (*UsersAPI) Approve added in v0.65.0

func (a *UsersAPI) Approve(ctx context.Context, userID string) (*api.User, error)

Approve approve a pending user See more: https://docs.netbird.io/api/resources/users#approve-a-user

func (*UsersAPI) ChangePassword added in v0.65.0

func (a *UsersAPI) ChangePassword(ctx context.Context, userID string, request api.PutApiUsersUserIdPasswordJSONRequestBody) error

ChangePassword change a user's password See more: https://docs.netbird.io/api/resources/users#change-user-password

func (*UsersAPI) Create

func (a *UsersAPI) Create(ctx context.Context, request api.PostApiUsersJSONRequestBody) (*api.User, error)

Create create user See more: https://docs.netbird.io/api/resources/users#create-a-user

func (*UsersAPI) CreateInvite added in v0.65.0

CreateInvite create a user invite See more: https://docs.netbird.io/api/resources/users#create-a-user-invite

func (*UsersAPI) Current

func (a *UsersAPI) Current(ctx context.Context) (*api.User, error)

Current gets the current user info See more: https://docs.netbird.io/api/resources/users#retrieve-current-user

func (*UsersAPI) Delete

func (a *UsersAPI) Delete(ctx context.Context, userID string) error

Delete delete user See more: https://docs.netbird.io/api/resources/users#delete-a-user

func (*UsersAPI) DeleteInvite added in v0.65.0

func (a *UsersAPI) DeleteInvite(ctx context.Context, inviteID string) error

DeleteInvite delete a user invite See more: https://docs.netbird.io/api/resources/users#delete-a-user-invite

func (*UsersAPI) GetInviteByToken added in v0.65.0

func (a *UsersAPI) GetInviteByToken(ctx context.Context, token string) (*api.UserInviteInfo, error)

GetInviteByToken get a user invite by token See more: https://docs.netbird.io/api/resources/users#get-a-user-invite-by-token

func (*UsersAPI) List

func (a *UsersAPI) List(ctx context.Context) ([]api.User, error)

List list all users, only returns one user always See more: https://docs.netbird.io/api/resources/users#list-all-users

func (*UsersAPI) ListInvites added in v0.65.0

func (a *UsersAPI) ListInvites(ctx context.Context) ([]api.UserInvite, error)

ListInvites list all user invites See more: https://docs.netbird.io/api/resources/users#list-all-user-invites

func (*UsersAPI) RegenerateInvite added in v0.65.0

RegenerateInvite regenerate a user invite token See more: https://docs.netbird.io/api/resources/users#regenerate-a-user-invite

func (*UsersAPI) Reject added in v0.65.0

func (a *UsersAPI) Reject(ctx context.Context, userID string) error

Reject reject a pending user See more: https://docs.netbird.io/api/resources/users#reject-a-user

func (*UsersAPI) ResendInvitation

func (a *UsersAPI) ResendInvitation(ctx context.Context, userID string) error

ResendInvitation resend user invitation See more: https://docs.netbird.io/api/resources/users#resend-user-invitation

func (*UsersAPI) Update

func (a *UsersAPI) Update(ctx context.Context, userID string, request api.PutApiUsersUserIdJSONRequestBody) (*api.User, error)

Update update user settings See more: https://docs.netbird.io/api/resources/users#update-a-user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL