# Users Interact with and view information about users. --- ## Retrieve Users {{ tag: 'GET' , label: '/api/users' }} Returns a list of all users ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/users \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "email": "string", "name": "string", "role": "string", "status": "string", "auto_groups": [ "string" ], "is_current": "boolean", "is_service_user": "boolean" } ] ``` --- ## Create a User {{ tag: 'POST' , label: '/api/users' }} Creates a new service user or sends an invite to a regular user #### Request-Body Parameters User's Email to send invite to User's full name User's NetBird account role Groups to auto-assign to peers registered by this user Is true if this user is a service user ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/users \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "email": "string", "name": "string", "role": "string", "auto_groups": [ "string" ], "is_service_user": "boolean" }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "email": "string", "name": "string", "role": "string", "status": "string", "auto_groups": [ "string" ], "is_current": "boolean", "is_service_user": "boolean" } ``` --- ## Update a User {{ tag: 'PUT' , label: '/api/users/{userId}' }} Update information about a User #### Path Parameters The unique identifier of a user #### Request-Body Parameters User's NetBird account role Groups to auto-assign to peers registered by this user ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/users/{userId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "role": "string", "auto_groups": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "email": "string", "name": "string", "role": "string", "status": "string", "auto_groups": [ "string" ], "is_current": "boolean", "is_service_user": "boolean" } ``` --- ## Delete a User {{ tag: 'DELETE' , label: '/api/users/{userId}' }} Delete a User #### Path Parameters The unique identifier of a user ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/users/{userId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- ## List all Tokens {{ tag: 'GET' , label: '/api/users/{userId}/tokens' }} Returns a list of all tokens for a user #### Path Parameters The unique identifier of a user ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/users/{userId}/tokens \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "name": "string", "expiration_date": "string", "created_by": "string", "created_at": "string", "last_used": "string" } ] ``` --- ## Create a Token {{ tag: 'POST' , label: '/api/users/{userId}/tokens' }} Create a new token for a user #### Path Parameters The unique identifier of a user #### Request-Body Parameters Name of the token Expiration in days ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/users/{userId}/tokens \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "expires_in": "integer" }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "plain_token": "string", "personal_access_token": { "id": "string", "name": "string", "expiration_date": "string", "created_by": "string", "created_at": "string", "last_used": "string" } } ``` --- ## Retrieve a Token {{ tag: 'GET' , label: '/api/users/{userId}/tokens/{tokenId}' }} Returns a specific token for a user #### Path Parameters The unique identifier of a user The unique identifier of a token ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/users/{userId}/tokens/{tokenId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "expiration_date": "string", "created_by": "string", "created_at": "string", "last_used": "string" } ``` --- ## Delete a Token {{ tag: 'DELETE' , label: '/api/users/{userId}/tokens/{tokenId}' }} Delete a token for a user #### Path Parameters The unique identifier of a user The unique identifier of a token ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/users/{userId}/tokens/{tokenId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- # Peers Interact with and view information about peers. --- ## List all Peers {{ tag: 'GET' , label: '/api/peers' }} Returns a list of all peers ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/peers \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "name": "string", "ip": "string", "connected": "boolean", "last_seen": "string", "os": "string", "version": "string", "groups": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "ssh_enabled": "boolean", "user_id": "string", "hostname": "string", "ui_version": "string", "dns_label": "string", "login_expiration_enabled": "boolean", "login_expired": "boolean", "last_login": "string" } ] ``` --- ## Retrieve a Peer {{ tag: 'GET' , label: '/api/peers/{peerId}' }} Get information about a peer #### Path Parameters The unique identifier of a peer ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/peers/{peerId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "ip": "string", "connected": "boolean", "last_seen": "string", "os": "string", "version": "string", "groups": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "ssh_enabled": "boolean", "user_id": "string", "hostname": "string", "ui_version": "string", "dns_label": "string", "login_expiration_enabled": "boolean", "login_expired": "boolean", "last_login": "string" } ``` --- ## Update a Peer {{ tag: 'PUT' , label: '/api/peers/{peerId}' }} Update information about a peer #### Path Parameters The unique identifier of a peer #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/peers/{peerId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "ssh_enabled": "boolean", "login_expiration_enabled": "boolean" }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "ip": "string", "connected": "boolean", "last_seen": "string", "os": "string", "version": "string", "groups": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "ssh_enabled": "boolean", "user_id": "string", "hostname": "string", "ui_version": "string", "dns_label": "string", "login_expiration_enabled": "boolean", "login_expired": "boolean", "last_login": "string" } ``` --- ## Delete a Peer {{ tag: 'DELETE' , label: '/api/peers/{peerId}' }} Delete a peer #### Path Parameters The unique identifier of a peer ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/peers/{peerId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- # Setup Keys Interact with and view information about setup keys. --- ## List all Setup Keys {{ tag: 'GET' , label: '/api/setup-keys' }} Returns a list of all Setup Keys ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/setup-keys \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "key": "string", "name": "string", "expires": "string", "type": "string", "valid": "boolean", "revoked": "boolean", "used_times": "integer", "last_used": "string", "state": "string", "auto_groups": [ "string" ], "updated_at": "string", "usage_limit": "integer" } ] ``` --- ## Create a Setup Key {{ tag: 'POST' , label: '/api/setup-keys' }} Creates a Setup Key #### Request-Body Parameters Setup Key name Setup key type, one-off for single time usage and reusable Expiration time in seconds Setup key revocation status Setup key groups to auto-assign to peers registered with this key A number of times this key can be used. The value of 0 indicates the unlimited usage. ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/setup-keys \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "type": "string", "expires_in": "integer", "revoked": "boolean", "auto_groups": [ "string" ], "usage_limit": "integer" }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "key": "string", "name": "string", "expires": "string", "type": "string", "valid": "boolean", "revoked": "boolean", "used_times": "integer", "last_used": "string", "state": "string", "auto_groups": [ "string" ], "updated_at": "string", "usage_limit": "integer" } ``` --- ## Retrieve a Setup Key {{ tag: 'GET' , label: '/api/setup-keys/{keyId}' }} Get information about a Setup Key #### Path Parameters The unique identifier of a setup key ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/setup-keys/{keyId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "key": "string", "name": "string", "expires": "string", "type": "string", "valid": "boolean", "revoked": "boolean", "used_times": "integer", "last_used": "string", "state": "string", "auto_groups": [ "string" ], "updated_at": "string", "usage_limit": "integer" } ``` --- ## Update a Setup Key {{ tag: 'PUT' , label: '/api/setup-keys/{keyId}' }} Update information about a Setup Key #### Path Parameters The unique identifier of a setup key #### Request-Body Parameters Setup Key name Setup key type, one-off for single time usage and reusable Expiration time in seconds Setup key revocation status Setup key groups to auto-assign to peers registered with this key A number of times this key can be used. The value of 0 indicates the unlimited usage. ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/setup-keys/{keyId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "type": "string", "expires_in": "integer", "revoked": "boolean", "auto_groups": [ "string" ], "usage_limit": "integer" }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "key": "string", "name": "string", "expires": "string", "type": "string", "valid": "boolean", "revoked": "boolean", "used_times": "integer", "last_used": "string", "state": "string", "auto_groups": [ "string" ], "updated_at": "string", "usage_limit": "integer" } ``` --- # Groups Interact with and view information about groups. --- ## List all Groups {{ tag: 'GET' , label: '/api/groups' }} Returns a list of all Groups ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/groups \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "name": "string", "peers_count": "integer", "peers": [ { "id": "string", "name": "string" } ] } ] ``` --- ## Create a Group {{ tag: 'POST' , label: '/api/groups' }} Creates a Group #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/groups \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "peers": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "peers_count": "integer", "peers": [ { "id": "string", "name": "string" } ] } ``` --- ## Retrieve a Group {{ tag: 'GET' , label: '/api/groups/{groupId}' }} Get information about a Group #### Path Parameters The unique identifier of a group ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/groups/{groupId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "peers_count": "integer", "peers": [ { "id": "string", "name": "string" } ] } ``` --- ## Update a Group {{ tag: 'PUT' , label: '/api/groups/{groupId}' }} Update/Replace a Group #### Path Parameters The unique identifier of a group #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/groups/{groupId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "Name": "string", "Peers": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "peers_count": "integer", "peers": [ { "id": "string", "name": "string" } ] } ``` --- ## Delete a Group {{ tag: 'DELETE' , label: '/api/groups/{groupId}' }} Delete a Group #### Path Parameters The unique identifier of a group ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/groups/{groupId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- # Rules Interact with and view information about rules. --- ## List all Rules {{ tag: 'GET' , label: '/api/rules' }} Returns a list of all Rules ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/rules \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "name": "string", "description": "string", "disabled": "boolean", "flow": "string", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ] } ] ``` --- ## Create a Rule {{ tag: 'POST' , label: '/api/rules' }} Creates a Rule #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/rules \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "description": "string", "disabled": "boolean", "flow": "string", "sources": [ "string" ], "destinations": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "description": "string", "disabled": "boolean", "flow": "string", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ] } ``` --- ## Retrieve a Rule {{ tag: 'GET' , label: '/api/rules/{ruleId}' }} Get information about a Rules #### Path Parameters The unique identifier of a rule ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/rules/{ruleId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "description": "string", "disabled": "boolean", "flow": "string", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ] } ``` --- ## Update a Rule {{ tag: 'PUT' , label: '/api/rules/{ruleId}' }} Update/Replace a Rule #### Path Parameters The unique identifier of a rule #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/rules/{ruleId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "description": "string", "disabled": "boolean", "flow": "string", "sources": [ "string" ], "destinations": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "description": "string", "disabled": "boolean", "flow": "string", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ] } ``` --- ## Delete a Rule {{ tag: 'DELETE' , label: '/api/rules/{ruleId}' }} Delete a Rule #### Path Parameters The unique identifier of a rule ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/rules/{ruleId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- # Policies Interact with and view information about policies. --- ## List all Policies {{ tag: 'GET' , label: '/api/policies' }} Returns a list of all Policies ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/policies \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "name": "string", "description": "string", "enabled": "boolean", "query": "string", "rules": [ { "id": "string", "name": "string", "description": "string", "enabled": "boolean", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "action": "string" } ], "id": "string" } ] ``` --- ## Create a Policy {{ tag: 'POST' , label: '/api/policies' }} Creates a Policy #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/policies \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "description": "string", "enabled": "boolean", "query": "string", "rules": [ { "id": "string", "name": "string", "description": "string", "enabled": "boolean", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "action": "string" } ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "name": "string", "description": "string", "enabled": "boolean", "query": "string", "rules": [ { "id": "string", "name": "string", "description": "string", "enabled": "boolean", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "action": "string" } ], "id": "string" } ``` --- ## Retrieve a Policy {{ tag: 'GET' , label: '/api/policies/{policyId}' }} Get information about a Policies #### Path Parameters The unique identifier of a policy ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/policies/{policyId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "name": "string", "description": "string", "enabled": "boolean", "query": "string", "rules": [ { "id": "string", "name": "string", "description": "string", "enabled": "boolean", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "action": "string" } ], "id": "string" } ``` --- ## Update a Policy {{ tag: 'PUT' , label: '/api/policies/{policyId}' }} Update/Replace a Policy #### Path Parameters The unique identifier of a policy #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/policies/{policyId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "description": "string", "enabled": "boolean", "query": "string", "rules": [ { "id": "string", "name": "string", "description": "string", "enabled": "boolean", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "action": "string" } ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "name": "string", "description": "string", "enabled": "boolean", "query": "string", "rules": [ { "id": "string", "name": "string", "description": "string", "enabled": "boolean", "sources": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "destinations": [ { "id": "string", "name": "string", "peers_count": "integer" } ], "action": "string" } ], "id": "string" } ``` --- ## Delete a Policy {{ tag: 'DELETE' , label: '/api/policies/{policyId}' }} Delete a Policy #### Path Parameters The unique identifier of a policy ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/policies/{policyId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- # Routes Interact with and view information about routes. --- ## List all Routes {{ tag: 'GET' , label: '/api/routes' }} Returns a list of all routes ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/routes \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "network_type": "string", "description": "string", "network_id": "string", "enabled": "boolean", "peer": "string", "network": "string", "metric": "integer", "masquerade": "boolean", "groups": [ "string" ] } ] ``` --- ## Create a Route {{ tag: 'POST' , label: '/api/routes' }} Creates a Route #### Request-Body Parameters Route description Route network identifier, to group HA routes Route status Peer Identifier associated with route Network range in CIDR format Route metric number. Lowest number has higher priority Indicate if peer should masquerade traffic to this route's prefix Route group tag groups ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/routes \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "description": "string", "network_id": "string", "enabled": "boolean", "peer": "string", "network": "string", "metric": "integer", "masquerade": "boolean", "groups": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "network_type": "string", "description": "string", "network_id": "string", "enabled": "boolean", "peer": "string", "network": "string", "metric": "integer", "masquerade": "boolean", "groups": [ "string" ] } ``` --- ## Retrieve a Route {{ tag: 'GET' , label: '/api/routes/{routeId}' }} Get information about a Routes #### Path Parameters The unique identifier of a route ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/routes/{routeId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "network_type": "string", "description": "string", "network_id": "string", "enabled": "boolean", "peer": "string", "network": "string", "metric": "integer", "masquerade": "boolean", "groups": [ "string" ] } ``` --- ## Update a Route {{ tag: 'PUT' , label: '/api/routes/{routeId}' }} Update/Replace a Route #### Path Parameters The unique identifier of a route #### Request-Body Parameters Route description Route network identifier, to group HA routes Route status Peer Identifier associated with route Network range in CIDR format Route metric number. Lowest number has higher priority Indicate if peer should masquerade traffic to this route's prefix Route group tag groups ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/routes/{routeId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "description": "string", "network_id": "string", "enabled": "boolean", "peer": "string", "network": "string", "metric": "integer", "masquerade": "boolean", "groups": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "network_type": "string", "description": "string", "network_id": "string", "enabled": "boolean", "peer": "string", "network": "string", "metric": "integer", "masquerade": "boolean", "groups": [ "string" ] } ``` --- ## Delete a Route {{ tag: 'DELETE' , label: '/api/routes/{routeId}' }} Delete a Route #### Path Parameters The unique identifier of a route ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/routes/{routeId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- # DNS Interact with and view information about DNS configuration. --- ## List all Nameserver Groups {{ tag: 'GET' , label: '/api/dns/nameservers' }} Returns a list of all Nameserver Groups ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/dns/nameservers \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "name": "string", "description": "string", "nameservers": [ { "ip": "string", "ns_type": "string", "port": "integer" } ], "enabled": "boolean", "groups": [ "string" ], "primary": "boolean", "domains": [ "string" ] } ] ``` --- ## Create a Nameserver Group {{ tag: 'POST' , label: '/api/dns/nameservers' }} Creates a Nameserver Group #### Request-Body Parameters Nameserver group name Nameserver group description Nameserver group Nameserver group status Nameserver group tag groups Nameserver group primary status Nameserver group domain list ```bash {{ title: 'cURL' }} curl -X POST https://api.netbird.io/api/dns/nameservers \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "description": "string", "nameservers": [ { "ip": "string", "ns_type": "string", "port": "integer" } ], "enabled": "boolean", "groups": [ "string" ], "primary": "boolean", "domains": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "description": "string", "nameservers": [ { "ip": "string", "ns_type": "string", "port": "integer" } ], "enabled": "boolean", "groups": [ "string" ], "primary": "boolean", "domains": [ "string" ] } ``` --- ## Retrieve a Nameserver Group {{ tag: 'GET' , label: '/api/dns/nameservers/{nsgroupId}' }} Get information about a Nameserver Groups #### Path Parameters The unique identifier of a Nameserver Group ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/dns/nameservers/{nsgroupId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "description": "string", "nameservers": [ { "ip": "string", "ns_type": "string", "port": "integer" } ], "enabled": "boolean", "groups": [ "string" ], "primary": "boolean", "domains": [ "string" ] } ``` --- ## Update a Nameserver Group {{ tag: 'PUT' , label: '/api/dns/nameservers/{nsgroupId}' }} Update/Replace a Nameserver Group #### Path Parameters The unique identifier of a Nameserver Group #### Request-Body Parameters Nameserver group name Nameserver group description Nameserver group Nameserver group status Nameserver group tag groups Nameserver group primary status Nameserver group domain list ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/dns/nameservers/{nsgroupId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "name": "string", "description": "string", "nameservers": [ { "ip": "string", "ns_type": "string", "port": "integer" } ], "enabled": "boolean", "groups": [ "string" ], "primary": "boolean", "domains": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "name": "string", "description": "string", "nameservers": [ { "ip": "string", "ns_type": "string", "port": "integer" } ], "enabled": "boolean", "groups": [ "string" ], "primary": "boolean", "domains": [ "string" ] } ``` --- ## Delete a Nameserver Group {{ tag: 'DELETE' , label: '/api/dns/nameservers/{nsgroupId}' }} Delete a Nameserver Group #### Path Parameters The unique identifier of a Nameserver Group ```bash {{ title: 'cURL' }} curl -X DELETE https://api.netbird.io/api/dns/nameservers/{nsgroupId} \ -H "Authorization: Bearer {token}" \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` --- ## Retrieve DNS Settings {{ tag: 'GET' , label: '/api/dns/settings' }} Returns a DNS settings object ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/dns/settings \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "disabled_management_groups": [ "string" ] } ] ``` --- ## Update DNS Settings {{ tag: 'PUT' , label: '/api/dns/settings' }} Updates a DNS settings object #### Request-Body Parameters Groups whose DNS management is disabled ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/dns/settings \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "disabled_management_groups": [ "string" ] }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "disabled_management_groups": [ "string" ] } ``` --- # Events View information about the account and network events. --- ## List all Events {{ tag: 'GET' , label: '/api/events' }} Returns a list of all events ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/events \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "timestamp": "string", "activity": "string", "activity_code": "string", "initiator_id": "string", "target_id": "string", "meta": "object" } ] ``` --- # Accounts View information about the accounts. --- ## List all Accounts {{ tag: 'GET' , label: '/api/accounts' }} Returns a list of accounts of a user. Always returns a list of one account. ```bash {{ title: 'cURL' }} curl -X GET https://api.netbird.io/api/accounts \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \ ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} [ { "id": "string", "settings": { "peer_login_expiration_enabled": "boolean", "peer_login_expiration": "integer" } } ] ``` --- ## Update an Account {{ tag: 'PUT' , label: '/api/accounts/{accountId}' }} Update information about an account #### Path Parameters The unique identifier of an account #### Request-Body Parameters ```bash {{ title: 'cURL' }} curl -X PUT https://api.netbird.io/api/accounts/{accountId} \ -H "Authorization: Bearer {token}" \ -H 'Accept: application/json' \-H 'Content-Type: application/json' \ --data-raw '{ "settings": { "peer_login_expiration_enabled": "boolean", "peer_login_expiration": "integer" } }' ``` ```js import ApiClient from '@example/protocol-api' const client = new ApiClient(token) await client.contacts.update('WAz8eIbvDR60rouK', { display_name: 'UncleFrank', }) ``` ```python from protocol_api import ApiClient client = ApiClient(token) client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank") ``` ```php $client = new \Protocol\ApiClient($token); $client->contacts->update('WAz8eIbvDR60rouK', [ 'display_name' => 'UncleFrank', ]); ``` ```json {{ title: '200' }} { "id": "string", "settings": { "peer_login_expiration_enabled": "boolean", "peer_login_expiration": "integer" } } ``` ---