From 446f80ac77d5b2a1fd6ed13b860b27b5a1586528 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:49:20 +0100
Subject: [PATCH 01/14] Remove trailing whitespaces
---
src/pages/ipa/resources/users.mdx | 204 +++++++++++++++---------------
1 file changed, 102 insertions(+), 102 deletions(-)
diff --git a/src/pages/ipa/resources/users.mdx b/src/pages/ipa/resources/users.mdx
index ffd30a46..ce0674e5 100644
--- a/src/pages/ipa/resources/users.mdx
+++ b/src/pages/ipa/resources/users.mdx
@@ -7,10 +7,10 @@ export const title = 'Users'
Returns a list of all users
-
+
### Query Parameters
-
+
Filters users and returns either regular users or service users
@@ -32,10 +32,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/users',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -53,7 +53,7 @@ import json
url = "https://api.netbird.io/api/users"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -77,7 +77,7 @@ func main() {
url := "https://api.netbird.io/api/users"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -85,8 +85,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -130,7 +130,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -150,8 +150,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -164,8 +164,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -252,8 +252,8 @@ echo $response;
]
```
-
-
+
+
@@ -265,37 +265,37 @@ echo $response;
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
-
+
-
+
Group IDs to auto-assign to peers registered by this user
-
+
-
+
Is true if this user is a service user
-
+
-
+
@@ -331,8 +331,8 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/users',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
},
@@ -362,8 +362,8 @@ payload = json.dumps({
],
"is_service_user": false
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -404,9 +404,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -469,8 +469,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -490,7 +490,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"email": "demo@netbird.io",
"name": "Tom Schulz",
@@ -500,8 +500,8 @@ curl_setopt_array($curl, array(
],
"is_service_user": false
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -514,8 +514,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -598,8 +598,8 @@ echo $response;
}
```
-
-
+
+
@@ -611,35 +611,35 @@ echo $response;
Update information about a User
-
+
### Path Parameters
-
+
The unique identifier of a user
-
+
-
+
### Request-Body Parameters
-
+
-
+
User's NetBird account role
-
+
-
+
Group IDs to auto-assign to peers registered by this user
-
+
-
+
If set to true then user is blocked and can't use the system
-
+
-
+
@@ -671,8 +671,8 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/users/{userId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
},
@@ -700,8 +700,8 @@ payload = json.dumps({
],
"is_blocked": false
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -725,7 +725,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"role": "admin",
"auto_groups": [
@@ -741,8 +741,8 @@ func main() {
fmt.Println(err)
return
{
-
- req.Header.Add("Content-Type", "application/json")
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -801,8 +801,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -822,7 +822,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"role": "admin",
"auto_groups": [
@@ -830,8 +830,8 @@ curl_setopt_array($curl, array(
],
"is_blocked": false
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -844,8 +844,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -928,7 +928,7 @@ echo $response;
}
```
-
+
@@ -947,7 +947,7 @@ echo $response;
The unique identifier of a user
-
+
@@ -965,7 +965,7 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/users/{userId}',
- headers: {
+ headers: {
'Authorization': 'Token '
}
};
@@ -985,7 +985,7 @@ import json
url = "https://api.netbird.io/api/users/{userId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -1059,7 +1059,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1078,8 +1078,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1091,9 +1091,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -1111,7 +1111,7 @@ echo $response;
The unique identifier of a user
-
+
@@ -1129,7 +1129,7 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/users/{userId}/invite',
- headers: {
+ headers: {
'Authorization': 'Token '
}
};
@@ -1149,7 +1149,7 @@ import json
url = "https://api.netbird.io/api/users/{userId}/invite"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -1172,7 +1172,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}/invite"
method := "POST"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1180,8 +1180,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1223,7 +1223,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/invite")
- .method("POST")
+ .method("POST")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1242,8 +1242,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1255,8 +1255,8 @@ echo $response;
```
-
-
+
+
@@ -1286,10 +1286,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/users/current',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1307,7 +1307,7 @@ import json
url = "https://api.netbird.io/api/users/current"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1384,7 +1384,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/current")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1404,8 +1404,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1418,8 +1418,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1502,7 +1502,7 @@ echo $response;
}
```
-
+
From 89a909d1948342cef492a54252553a2bb8126c2b Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:53:27 +0100
Subject: [PATCH 02/14] Remove trailing whitespaces
---
src/pages/ipa/resources/accounts.mdx | 214 +++++++++++++--------------
1 file changed, 107 insertions(+), 107 deletions(-)
diff --git a/src/pages/ipa/resources/accounts.mdx b/src/pages/ipa/resources/accounts.mdx
index 86eb8cb5..94d223b0 100644
--- a/src/pages/ipa/resources/accounts.mdx
+++ b/src/pages/ipa/resources/accounts.mdx
@@ -14,7 +14,7 @@ export const title = 'Accounts'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/accounts \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/accounts',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/accounts"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/accounts"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/accounts")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -240,8 +240,8 @@ echo $response;
]
```
-
-
+
+
@@ -253,13 +253,13 @@ echo $response;
Deletes an account and all its resources. Only account owners can delete accounts.
-
+
### Path Parameters
-
-
+
+
The unique identifier of an account
-
+
@@ -267,7 +267,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/accounts/{accountId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -277,9 +277,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/accounts/{accountId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -297,7 +297,7 @@ import json
url = "https://api.netbird.io/api/accounts/{accountId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -320,7 +320,7 @@ func main() {
url := "https://api.netbird.io/api/accounts/{accountId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -328,8 +328,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -371,7 +371,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/accounts/{accountId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -390,8 +390,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -403,9 +403,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -417,151 +417,151 @@ echo $response;
Update information about an account
-
+
### Path Parameters
-
-
+
+
The unique identifier of an account
-
+
-
+
### Request-Body Parameters
-
+
-
+
More Information
-
+
-
+
Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
-
+
-
+
Period of time after which peer login expires (seconds).
-
+
-
+
Enables or disables peer inactivity expiration globally. After peer's session has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
-
+
-
+
Period of time of inactivity after which peer session expires (seconds).
-
+
-
+
Allows blocking regular users from viewing parts of the system.
-
+
-
+
Allows propagate the new user auto groups to peers that belongs to the user
-
+
-
+
Allows extract groups from JWT claim and add it to account groups.
-
+
-
+
Name of the claim from which we extract groups names to add it to account groups.
-
+
-
+
List of groups to which users are allowed access
-
+
-
+
Enables or disables DNS resolution on the routing peers
-
+
-
+
Allows to define a custom dns domain for the account
-
+
-
+
Allows to define a custom network range for the account in CIDR format
-
+
-
+
More Information
-
+
-
+
(Cloud only) Enables or disables peer approval globally. If enabled, all peers added will be in pending state until approved by an admin.
-
+
-
+
Enables or disables network traffic logging. If enabled, all network traffic events from peers will be stored.
-
+
-
+
Limits traffic logging to these groups. If unset all peers are enabled.
-
+
-
+
Enables or disables network traffic packet counter. If enabled, network packets and their size will be counted and reported. (This can have an slight impact on performance)
-
+
-
+
-
+
-
+
Enables or disables experimental lazy connection
-
+
-
+
-
+
-
+
More Information
-
+
-
+
Indicates whether the account signup form is pending
-
+
-
+
Indicates whether the account onboarding flow is pending
-
+
-
+
-
+
-
+
@@ -641,11 +641,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/accounts/{accountId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -694,8 +694,8 @@ payload = json.dumps({
"onboarding_flow_pending": false
}
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -719,7 +719,7 @@ func main() {
url := "https://api.netbird.io/api/accounts/{accountId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"settings": {
"peer_login_expiration_enabled": true,
@@ -758,9 +758,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -867,8 +867,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/accounts/{accountId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -888,7 +888,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"settings": {
"peer_login_expiration_enabled": true,
@@ -920,8 +920,8 @@ curl_setopt_array($curl, array(
"onboarding_flow_pending": false
}
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -934,8 +934,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1014,8 +1014,8 @@ echo $response;
}
```
-
-
+
+
From c1bc9aab6717d1429bb5c7fc8972ae9a728c14f1 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:54:26 +0100
Subject: [PATCH 03/14] Remove trailing whitespaces
---
src/pages/ipa/resources/events.mdx | 84 +++++++++++++++---------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/src/pages/ipa/resources/events.mdx b/src/pages/ipa/resources/events.mdx
index 18cd79d6..5bb42ec8 100644
--- a/src/pages/ipa/resources/events.mdx
+++ b/src/pages/ipa/resources/events.mdx
@@ -14,7 +14,7 @@ export const title = 'Events'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/events/audit \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/events/audit',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/events/audit"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/events/audit"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/events/audit")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -203,8 +203,8 @@ echo $response;
]
```
-
-
+
+
@@ -216,50 +216,50 @@ echo $response;
Returns a list of all network traffic events
-
+
### Query Parameters
-
+
Page number
-
+
Number of items per page
-
+
Filter by user ID
-
+
Filter by reporter ID
-
+
Filter by protocol
-
+
Filter by event type
-
+
Filter by connection type
-
+
Filter by direction
-
+
Case-insensitive partial match on user email, source/destination names, and source/destination addresses
-
+
Start date for filtering events (ISO 8601 format, e.g., 2024-01-01T00:00:00Z).
-
+
End date for filtering events (ISO 8601 format, e.g., 2024-01-31T23:59:59Z).
@@ -271,7 +271,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/events/network-traffic \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -281,10 +281,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/events/network-traffic',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -302,7 +302,7 @@ import json
url = "https://api.netbird.io/api/events/network-traffic"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -326,7 +326,7 @@ func main() {
url := "https://api.netbird.io/api/events/network-traffic"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -334,8 +334,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -379,7 +379,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/events/network-traffic")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -399,8 +399,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -413,8 +413,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -555,8 +555,8 @@ echo $response;
}
```
-
-
+
+
From 182ae98183ed49339fbb089cc692a240cab73196 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:55:21 +0100
Subject: [PATCH 04/14] Remove trailing whitespaces
---
src/pages/ipa/resources/geo-locations.mdx | 70 +++++++++++------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/src/pages/ipa/resources/geo-locations.mdx b/src/pages/ipa/resources/geo-locations.mdx
index b5b87842..40bfdd6c 100644
--- a/src/pages/ipa/resources/geo-locations.mdx
+++ b/src/pages/ipa/resources/geo-locations.mdx
@@ -14,7 +14,7 @@ export const title = 'Geo Locations'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/locations/countries \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/locations/countries',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/locations/countries"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/locations/countries"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/locations/countries")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -170,8 +170,8 @@ echo $response;
]
```
-
-
+
+
@@ -183,13 +183,13 @@ echo $response;
Get a list of all English city names for a given country code
-
+
### Path Parameters
-
-
-
-
+
+
+
+
@@ -198,7 +198,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/locations/countries/{country}/cities \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -208,10 +208,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/locations/countries/{country}/cities',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -229,7 +229,7 @@ import json
url = "https://api.netbird.io/api/locations/countries/{country}/cities"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -253,7 +253,7 @@ func main() {
url := "https://api.netbird.io/api/locations/countries/{country}/cities"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -261,8 +261,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -306,7 +306,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/locations/countries/{country}/cities")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -326,8 +326,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -340,8 +340,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -356,8 +356,8 @@ echo $response;
}
```
-
-
+
+
From 27756d26f7fa173d14e4ea46abe43166361f316e Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:55:40 +0100
Subject: [PATCH 05/14] Remove trailing whitespaces
---
src/pages/ipa/resources/groups.mdx | 250 ++++++++++++++---------------
1 file changed, 125 insertions(+), 125 deletions(-)
diff --git a/src/pages/ipa/resources/groups.mdx b/src/pages/ipa/resources/groups.mdx
index 3d5ba7c7..a75918e0 100644
--- a/src/pages/ipa/resources/groups.mdx
+++ b/src/pages/ipa/resources/groups.mdx
@@ -7,13 +7,13 @@ export const title = 'Groups'
Returns a list of all groups
-
+
### Query Parameters
-
-
+
+
Filter groups by name
-
+
@@ -22,7 +22,7 @@ export const title = 'Groups'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/groups \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -32,10 +32,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/groups',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -53,7 +53,7 @@ import json
url = "https://api.netbird.io/api/groups"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -77,7 +77,7 @@ func main() {
url := "https://api.netbird.io/api/groups"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -85,8 +85,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -130,7 +130,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -150,8 +150,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -164,8 +164,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -214,8 +214,8 @@ echo $response;
]
```
-
-
+
+
@@ -227,44 +227,44 @@ echo $response;
Creates a group
-
+
### Request-Body Parameters
-
+
-
+
Group name identifier
-
+
-
+
List of peers ids
-
+
-
+
More Information
-
+
-
+
ID of the resource
-
+
-
+
Network resource type based of the address
-
+
-
+
-
+
-
+
@@ -306,11 +306,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/groups',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -340,8 +340,8 @@ payload = json.dumps({
}
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -365,7 +365,7 @@ func main() {
url := "https://api.netbird.io/api/groups"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "devs",
"peers": [
@@ -385,9 +385,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -456,8 +456,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -477,7 +477,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "devs",
"peers": [
@@ -490,8 +490,8 @@ curl_setopt_array($curl, array(
}
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -504,8 +504,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -550,8 +550,8 @@ echo $response;
}
```
-
-
+
+
@@ -563,13 +563,13 @@ echo $response;
Get information about a group
-
+
### Path Parameters
-
-
+
+
The unique identifier of a group
-
+
@@ -578,7 +578,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/groups/{groupId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -588,10 +588,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/groups/{groupId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -609,7 +609,7 @@ import json
url = "https://api.netbird.io/api/groups/{groupId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -633,7 +633,7 @@ func main() {
url := "https://api.netbird.io/api/groups/{groupId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -641,8 +641,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -686,7 +686,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups/{groupId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -706,8 +706,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -720,8 +720,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -766,8 +766,8 @@ echo $response;
}
```
-
-
+
+
@@ -779,52 +779,52 @@ echo $response;
Update/Replace a group
-
+
### Path Parameters
-
-
+
+
The unique identifier of a group
-
+
-
+
### Request-Body Parameters
-
+
-
+
Group name identifier
-
+
-
+
List of peers ids
-
+
-
+
More Information
-
+
-
+
ID of the resource
-
+
-
+
Network resource type based of the address
-
+
-
+
-
+
-
+
@@ -866,11 +866,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/groups/{groupId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -900,8 +900,8 @@ payload = json.dumps({
}
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -925,7 +925,7 @@ func main() {
url := "https://api.netbird.io/api/groups/{groupId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "devs",
"peers": [
@@ -945,9 +945,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1016,8 +1016,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups/{groupId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1037,7 +1037,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "devs",
"peers": [
@@ -1050,8 +1050,8 @@ curl_setopt_array($curl, array(
}
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1064,8 +1064,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1110,8 +1110,8 @@ echo $response;
}
```
-
-
+
+
@@ -1123,13 +1123,13 @@ echo $response;
Delete a group
-
+
### Path Parameters
-
-
+
+
The unique identifier of a group
-
+
@@ -1137,7 +1137,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/groups/{groupId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1147,9 +1147,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/groups/{groupId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1167,7 +1167,7 @@ import json
url = "https://api.netbird.io/api/groups/{groupId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -1190,7 +1190,7 @@ func main() {
url := "https://api.netbird.io/api/groups/{groupId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1198,8 +1198,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1241,7 +1241,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups/{groupId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1260,8 +1260,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1273,9 +1273,9 @@ echo $response;
```
-
-
-
+
+
+
From b763b6134b0321a0e924416ed88a21c14442716b Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:56:09 +0100
Subject: [PATCH 06/14] Remove trailing whitespaces
---
src/pages/ipa/resources/ingress-ports.mdx | 534 +++++++++++-----------
1 file changed, 267 insertions(+), 267 deletions(-)
diff --git a/src/pages/ipa/resources/ingress-ports.mdx b/src/pages/ipa/resources/ingress-ports.mdx
index e9c19ce5..9eae375e 100644
--- a/src/pages/ipa/resources/ingress-ports.mdx
+++ b/src/pages/ipa/resources/ingress-ports.mdx
@@ -7,18 +7,18 @@ export const title = 'Ingress Ports'
Returns a list of all ingress port allocations for a peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
+
-
+
### Query Parameters
-
+
Filters ingress port allocations by name
@@ -30,7 +30,7 @@ export const title = 'Ingress Ports'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/peers/{peerId}/ingress/ports \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -40,10 +40,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}/ingress/ports',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -61,7 +61,7 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}/ingress/ports"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -85,7 +85,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -93,8 +93,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -138,7 +138,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}/ingress/ports")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -158,8 +158,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -172,8 +172,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -218,8 +218,8 @@ echo $response;
]
```
-
-
+
+
@@ -231,79 +231,79 @@ echo $response;
Creates a new ingress port allocation for a peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
+
-
+
### Request-Body Parameters
-
+
-
+
Name of the ingress port allocation
-
+
-
+
Indicates if an ingress port allocation is enabled
-
+
-
+
List of port ranges that are forwarded by the ingress peer
-
+
-
+
The starting port of the range of forwarded ports
-
+
-
+
The ending port of the range of forwarded ports
-
+
-
+
The protocol accepted by the port range
-
+
-
+
-
+
-
+
More Information
-
+
-
+
The number of ports to be forwarded
-
+
-
+
The protocol accepted by the port
-
+
-
+
-
+
-
+
@@ -351,11 +351,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}/ingress/ports',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -388,8 +388,8 @@ payload = json.dumps({
"protocol": "udp"
}
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -413,7 +413,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "Ingress Port Allocation 1",
"enabled": true,
@@ -436,9 +436,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -513,8 +513,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}/ingress/ports")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -534,7 +534,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "Ingress Port Allocation 1",
"enabled": true,
@@ -550,8 +550,8 @@ curl_setopt_array($curl, array(
"protocol": "udp"
}
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -564,8 +564,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -606,8 +606,8 @@ echo $response;
}
```
-
-
+
+
@@ -619,17 +619,17 @@ echo $response;
Get information about an ingress port allocation
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
-
-
+
+
+
The unique identifier of an ingress port allocation
-
+
@@ -638,7 +638,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -648,10 +648,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}/ingress/ports/{allocationId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -669,7 +669,7 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -693,7 +693,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -701,8 +701,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -746,7 +746,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -766,8 +766,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -780,8 +780,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -822,8 +822,8 @@ echo $response;
}
```
-
-
+
+
@@ -835,83 +835,83 @@ echo $response;
Update information about an ingress port allocation
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
-
-
+
+
+
The unique identifier of an ingress port allocation
-
+
-
+
### Request-Body Parameters
-
+
-
+
Name of the ingress port allocation
-
+
-
+
Indicates if an ingress port allocation is enabled
-
+
-
+
List of port ranges that are forwarded by the ingress peer
-
+
-
+
The starting port of the range of forwarded ports
-
+
-
+
The ending port of the range of forwarded ports
-
+
-
+
The protocol accepted by the port range
-
+
-
+
-
+
-
+
More Information
-
+
-
+
The number of ports to be forwarded
-
+
-
+
The protocol accepted by the port
-
+
-
+
-
+
-
+
@@ -959,11 +959,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}/ingress/ports/{allocationId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -996,8 +996,8 @@ payload = json.dumps({
"protocol": "udp"
}
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1021,7 +1021,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "Ingress Port Allocation 1",
"enabled": true,
@@ -1044,9 +1044,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1121,8 +1121,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1142,7 +1142,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "Ingress Port Allocation 1",
"enabled": true,
@@ -1158,8 +1158,8 @@ curl_setopt_array($curl, array(
"protocol": "udp"
}
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1172,8 +1172,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1214,8 +1214,8 @@ echo $response;
}
```
-
-
+
+
@@ -1227,17 +1227,17 @@ echo $response;
Delete an ingress port allocation
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
-
-
+
+
+
The unique identifier of an ingress port allocation
-
+
@@ -1245,7 +1245,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1255,9 +1255,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}/ingress/ports/{allocationId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1275,7 +1275,7 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -1298,7 +1298,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1306,8 +1306,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1349,7 +1349,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1368,8 +1368,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1381,9 +1381,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -1402,7 +1402,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/ingress/peers \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1412,10 +1412,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/ingress/peers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1433,7 +1433,7 @@ import json
url = "https://api.netbird.io/api/ingress/peers"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1457,7 +1457,7 @@ func main() {
url := "https://api.netbird.io/api/ingress/peers"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1465,8 +1465,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1510,7 +1510,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/ingress/peers")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1530,8 +1530,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1544,8 +1544,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -1582,8 +1582,8 @@ echo $response;
]
```
-
-
+
+
@@ -1595,27 +1595,27 @@ echo $response;
Creates a new ingress peer
-
+
### Request-Body Parameters
-
+
-
+
ID of the peer that is used as an ingress peer
-
+
-
+
Defines if an ingress peer is enabled
-
+
-
+
Defines if an ingress peer can be used as a fallback if no ingress peer can be found in the region of the forwarded peer
-
+
-
+
@@ -1643,11 +1643,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/ingress/peers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -1670,8 +1670,8 @@ payload = json.dumps({
"enabled": true,
"fallback": true
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1695,7 +1695,7 @@ func main() {
url := "https://api.netbird.io/api/ingress/peers"
method := "POST"
-
+
payload := strings.NewReader(`{
"peer_id": "ch8i4ug6lnn4g9hqv7m0",
"enabled": true,
@@ -1708,9 +1708,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1765,8 +1765,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/ingress/peers")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1786,14 +1786,14 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"peer_id": "ch8i4ug6lnn4g9hqv7m0",
"enabled": true,
"fallback": true
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1806,8 +1806,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1840,8 +1840,8 @@ echo $response;
}
```
-
-
+
+
@@ -1853,13 +1853,13 @@ echo $response;
Get information about an ingress peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of an ingress peer
-
+
@@ -1868,7 +1868,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/ingress/peers/{ingressPeerId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1878,10 +1878,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/ingress/peers/{ingressPeerId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1899,7 +1899,7 @@ import json
url = "https://api.netbird.io/api/ingress/peers/{ingressPeerId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1923,7 +1923,7 @@ func main() {
url := "https://api.netbird.io/api/ingress/peers/{ingressPeerId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1931,8 +1931,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1976,7 +1976,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/ingress/peers/{ingressPeerId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1996,8 +1996,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -2010,8 +2010,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -2044,8 +2044,8 @@ echo $response;
}
```
-
-
+
+
@@ -2057,30 +2057,30 @@ echo $response;
Update information about an ingress peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of an ingress peer
-
+
-
+
### Request-Body Parameters
-
+
-
+
Defines if an ingress peer is enabled
-
+
-
+
Defines if an ingress peer can be used as a fallback if no ingress peer can be found in the region of the forwarded peer
-
+
-
+
@@ -2106,11 +2106,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/ingress/peers/{ingressPeerId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -2132,8 +2132,8 @@ payload = json.dumps({
"enabled": true,
"fallback": true
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -2157,7 +2157,7 @@ func main() {
url := "https://api.netbird.io/api/ingress/peers/{ingressPeerId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"enabled": true,
"fallback": true
@@ -2169,9 +2169,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -2224,8 +2224,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/ingress/peers/{ingressPeerId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -2245,13 +2245,13 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"enabled": true,
"fallback": true
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -2264,8 +2264,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -2298,8 +2298,8 @@ echo $response;
}
```
-
-
+
+
@@ -2311,13 +2311,13 @@ echo $response;
Delete an ingress peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of an ingress peer
-
+
@@ -2325,7 +2325,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/ingress/peers/{ingressPeerId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -2335,9 +2335,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/ingress/peers/{ingressPeerId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -2355,7 +2355,7 @@ import json
url = "https://api.netbird.io/api/ingress/peers/{ingressPeerId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -2378,7 +2378,7 @@ func main() {
url := "https://api.netbird.io/api/ingress/peers/{ingressPeerId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -2386,8 +2386,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -2429,7 +2429,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/ingress/peers/{ingressPeerId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -2448,8 +2448,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -2461,9 +2461,9 @@ echo $response;
```
-
-
-
+
+
+
From 3e540d4bf00504ea6f0843b20dcfd22e87aae2e2 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:56:33 +0100
Subject: [PATCH 07/14] Remove trailing whitespaces
---
src/pages/ipa/resources/networks.mdx | 784 +++++++++++++--------------
1 file changed, 392 insertions(+), 392 deletions(-)
diff --git a/src/pages/ipa/resources/networks.mdx b/src/pages/ipa/resources/networks.mdx
index d0c19c67..51862c8d 100644
--- a/src/pages/ipa/resources/networks.mdx
+++ b/src/pages/ipa/resources/networks.mdx
@@ -14,7 +14,7 @@ export const title = 'Networks'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/networks"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/networks"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -198,8 +198,8 @@ echo $response;
]
```
-
-
+
+
@@ -211,22 +211,22 @@ echo $response;
Creates a Network
-
+
### Request-Body Parameters
-
+
-
+
Network name
-
+
-
+
Network description
-
+
-
+
@@ -252,11 +252,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/networks',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -278,8 +278,8 @@ payload = json.dumps({
"name": "Remote Network 1",
"description": "A remote network that needs to be accessed"
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -303,7 +303,7 @@ func main() {
url := "https://api.netbird.io/api/networks"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "Remote Network 1",
"description": "A remote network that needs to be accessed"
@@ -315,9 +315,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -370,8 +370,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -391,13 +391,13 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "Remote Network 1",
"description": "A remote network that needs to be accessed"
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -410,8 +410,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -448,8 +448,8 @@ echo $response;
}
```
-
-
+
+
@@ -461,13 +461,13 @@ echo $response;
Get information about a Network
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
@@ -476,7 +476,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks/{networkId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -486,10 +486,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -507,7 +507,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -531,7 +531,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -539,8 +539,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -584,7 +584,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -604,8 +604,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -618,8 +618,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -656,8 +656,8 @@ echo $response;
}
```
-
-
+
+
@@ -669,30 +669,30 @@ echo $response;
Update/Replace a Network
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
-
+
### Request-Body Parameters
-
+
-
+
Network name
-
+
-
+
Network description
-
+
-
+
@@ -718,11 +718,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -744,8 +744,8 @@ payload = json.dumps({
"name": "Remote Network 1",
"description": "A remote network that needs to be accessed"
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -769,7 +769,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "Remote Network 1",
"description": "A remote network that needs to be accessed"
@@ -781,9 +781,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -836,8 +836,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -857,13 +857,13 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "Remote Network 1",
"description": "A remote network that needs to be accessed"
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -876,8 +876,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -914,8 +914,8 @@ echo $response;
}
```
-
-
+
+
@@ -927,13 +927,13 @@ echo $response;
Delete a network
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
@@ -941,7 +941,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/networks/{networkId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -951,9 +951,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -971,7 +971,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -994,7 +994,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1002,8 +1002,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1045,7 +1045,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1064,8 +1064,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1077,9 +1077,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -1091,13 +1091,13 @@ echo $response;
Returns a list of all resources in a network
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
@@ -1106,7 +1106,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks/{networkId}/resources \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1116,10 +1116,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/resources',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1137,7 +1137,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}/resources"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1161,7 +1161,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/resources"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1169,8 +1169,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1214,7 +1214,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/resources")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1234,8 +1234,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1248,8 +1248,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -1294,8 +1294,8 @@ echo $response;
]
```
-
-
+
+
@@ -1307,45 +1307,45 @@ echo $response;
Creates a Network Resource
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
-
+
### Request-Body Parameters
-
+
-
+
Network resource name
-
+
-
+
Network resource description
-
+
-
+
Network resource address (either a direct host like 1.1.1.1 or 1.1.1.1/32, or a subnet like 192.168.178.0/24, or domains like example.com and *.example.com)
-
+
-
+
Network resource status
-
+
-
+
Group IDs containing the resource
-
+
-
+
@@ -1381,11 +1381,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/resources',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -1412,8 +1412,8 @@ payload = json.dumps({
"chacdk86lnnboviihd70"
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1437,7 +1437,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/resources"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "Remote Resource 1",
"description": "A remote resource inside network 1",
@@ -1454,9 +1454,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1519,8 +1519,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/resources")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1540,7 +1540,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "Remote Resource 1",
"description": "A remote resource inside network 1",
@@ -1550,8 +1550,8 @@ curl_setopt_array($curl, array(
"chacdk86lnnboviihd70"
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1564,8 +1564,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1606,8 +1606,8 @@ echo $response;
}
```
-
-
+
+
@@ -1619,17 +1619,17 @@ echo $response;
Get information about a Network Resource
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
-
-
+
+
+
The unique identifier of a network resource
-
+
@@ -1638,7 +1638,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks/{networkId}/resources/{resourceId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1648,10 +1648,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/resources/{resourceId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1669,7 +1669,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1693,7 +1693,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1701,8 +1701,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1746,7 +1746,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1766,8 +1766,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1780,8 +1780,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1822,8 +1822,8 @@ echo $response;
}
```
-
-
+
+
@@ -1835,49 +1835,49 @@ echo $response;
Update a Network Resource
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
-
-
+
+
+
The unique identifier of a resource
-
+
-
+
### Request-Body Parameters
-
+
-
+
Network resource name
-
+
-
+
Network resource description
-
+
-
+
Network resource address (either a direct host like 1.1.1.1 or 1.1.1.1/32, or a subnet like 192.168.178.0/24, or domains like example.com and *.example.com)
-
+
-
+
Network resource status
-
+
-
+
Group IDs containing the resource
-
+
-
+
@@ -1913,11 +1913,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/resources/{resourceId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -1944,8 +1944,8 @@ payload = json.dumps({
"chacdk86lnnboviihd70"
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1969,7 +1969,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "Remote Resource 1",
"description": "A remote resource inside network 1",
@@ -1986,9 +1986,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -2051,8 +2051,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -2072,7 +2072,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "Remote Resource 1",
"description": "A remote resource inside network 1",
@@ -2082,8 +2082,8 @@ curl_setopt_array($curl, array(
"chacdk86lnnboviihd70"
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -2096,8 +2096,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -2138,8 +2138,8 @@ echo $response;
}
```
-
-
+
+
@@ -2151,17 +2151,17 @@ echo $response;
Delete a network resource
-
+
### Path Parameters
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -2169,7 +2169,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/networks/{networkId}/resources/{resourceId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -2179,9 +2179,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/resources/{resourceId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -2199,7 +2199,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -2222,7 +2222,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -2230,8 +2230,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -2273,7 +2273,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/resources/{resourceId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -2292,8 +2292,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -2305,9 +2305,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -2319,13 +2319,13 @@ echo $response;
Returns a list of all routers in a network
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
@@ -2334,7 +2334,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks/{networkId}/routers \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -2344,10 +2344,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/routers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -2365,7 +2365,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}/routers"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -2389,7 +2389,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/routers"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -2397,8 +2397,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -2442,7 +2442,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/routers")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -2462,8 +2462,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -2476,8 +2476,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -2508,8 +2508,8 @@ echo $response;
]
```
-
-
+
+
@@ -2521,45 +2521,45 @@ echo $response;
Creates a Network Router
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
+
-
+
### Request-Body Parameters
-
+
-
+
Peer Identifier associated with route. This property can not be set together with `peer_groups`
-
+
-
+
Peers Group Identifier associated with route. This property can not be set together with `peer`
-
+
-
+
Route metric number. Lowest number has higher priority
-
+
-
+
Indicate if peer should masquerade traffic to this route's prefix
-
+
-
+
Network router status
-
+
-
+
@@ -2595,11 +2595,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/routers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -2626,8 +2626,8 @@ payload = json.dumps({
"masquerade": true,
"enabled": true
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -2651,7 +2651,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/routers"
method := "POST"
-
+
payload := strings.NewReader(`{
"peer": "chacbco6lnnbn6cg5s91",
"peer_groups": [
@@ -2668,9 +2668,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -2733,8 +2733,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/routers")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -2754,7 +2754,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"peer": "chacbco6lnnbn6cg5s91",
"peer_groups": [
@@ -2764,8 +2764,8 @@ curl_setopt_array($curl, array(
"masquerade": true,
"enabled": true
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -2778,8 +2778,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -2806,8 +2806,8 @@ echo $response;
}
```
-
-
+
+
@@ -2819,17 +2819,17 @@ echo $response;
Get information about a Network Router
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
-
-
+
+
+
The unique identifier of a router
-
+
@@ -2838,7 +2838,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks/{networkId}/routers/{routerId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -2848,10 +2848,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/routers/{routerId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -2869,7 +2869,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}/routers/{routerId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -2893,7 +2893,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/routers/{routerId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -2901,8 +2901,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -2946,7 +2946,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/routers/{routerId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -2966,8 +2966,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -2980,8 +2980,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -3008,8 +3008,8 @@ echo $response;
}
```
-
-
+
+
@@ -3021,49 +3021,49 @@ echo $response;
Update a Network Router
-
+
### Path Parameters
-
-
+
+
The unique identifier of a network
-
-
-
+
+
+
The unique identifier of a router
-
+
-
+
### Request-Body Parameters
-
+
-
+
Peer Identifier associated with route. This property can not be set together with `peer_groups`
-
+
-
+
Peers Group Identifier associated with route. This property can not be set together with `peer`
-
+
-
+
Route metric number. Lowest number has higher priority
-
+
-
+
Indicate if peer should masquerade traffic to this route's prefix
-
+
-
+
Network router status
-
+
-
+
@@ -3099,11 +3099,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/routers/{routerId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -3130,8 +3130,8 @@ payload = json.dumps({
"masquerade": true,
"enabled": true
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -3155,7 +3155,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/routers/{routerId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"peer": "chacbco6lnnbn6cg5s91",
"peer_groups": [
@@ -3172,9 +3172,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -3237,8 +3237,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/routers/{routerId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -3258,7 +3258,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"peer": "chacbco6lnnbn6cg5s91",
"peer_groups": [
@@ -3268,8 +3268,8 @@ curl_setopt_array($curl, array(
"masquerade": true,
"enabled": true
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -3282,8 +3282,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -3310,8 +3310,8 @@ echo $response;
}
```
-
-
+
+
@@ -3323,17 +3323,17 @@ echo $response;
Delete a network router
-
+
### Path Parameters
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -3341,7 +3341,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/networks/{networkId}/routers/{routerId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -3351,9 +3351,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/networks/{networkId}/routers/{routerId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -3371,7 +3371,7 @@ import json
url = "https://api.netbird.io/api/networks/{networkId}/routers/{routerId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -3394,7 +3394,7 @@ func main() {
url := "https://api.netbird.io/api/networks/{networkId}/routers/{routerId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -3402,8 +3402,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -3445,7 +3445,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/{networkId}/routers/{routerId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -3464,8 +3464,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -3477,9 +3477,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -3498,7 +3498,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/networks/routers \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -3508,10 +3508,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/networks/routers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -3529,7 +3529,7 @@ import json
url = "https://api.netbird.io/api/networks/routers"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -3553,7 +3553,7 @@ func main() {
url := "https://api.netbird.io/api/networks/routers"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -3561,8 +3561,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -3606,7 +3606,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/networks/routers")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -3626,8 +3626,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -3640,8 +3640,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -3672,8 +3672,8 @@ echo $response;
]
```
-
-
+
+
From 4033f954af5c48624a025658dd63f5660da80c6c Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:56:59 +0100
Subject: [PATCH 08/14] Remove trailing whitespaces
---
src/pages/ipa/resources/peers.mdx | 228 +++++++++++++++---------------
1 file changed, 114 insertions(+), 114 deletions(-)
diff --git a/src/pages/ipa/resources/peers.mdx b/src/pages/ipa/resources/peers.mdx
index 5c0f98f7..94d24377 100644
--- a/src/pages/ipa/resources/peers.mdx
+++ b/src/pages/ipa/resources/peers.mdx
@@ -7,14 +7,14 @@ export const title = 'Peers'
Returns a list of all peers
-
+
### Query Parameters
-
+
Filter peers by name
-
+
Filter peers by IP address
@@ -26,7 +26,7 @@ export const title = 'Peers'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/peers \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -36,10 +36,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/peers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -57,7 +57,7 @@ import json
url = "https://api.netbird.io/api/peers"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -81,7 +81,7 @@ func main() {
url := "https://api.netbird.io/api/peers"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -89,8 +89,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -134,7 +134,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -154,8 +154,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -168,8 +168,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -258,8 +258,8 @@ echo $response;
]
```
-
-
+
+
@@ -271,13 +271,13 @@ echo $response;
Get information about a peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
+
@@ -286,7 +286,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/peers/{peerId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -296,10 +296,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -317,7 +317,7 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -341,7 +341,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -349,8 +349,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -394,7 +394,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -414,8 +414,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -428,8 +428,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -512,8 +512,8 @@ echo $response;
}
```
-
-
+
+
@@ -525,50 +525,50 @@ echo $response;
Update information about a peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
+
-
+
### Request-Body Parameters
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
(Cloud only) Indicates whether peer needs approval
-
+
-
+
Peer's IP address
-
+
-
+
@@ -602,11 +602,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -632,8 +632,8 @@ payload = json.dumps({
"approval_required": true,
"ip": "100.64.0.15"
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -657,7 +657,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "stage-host-1",
"ssh_enabled": true,
@@ -673,9 +673,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -736,8 +736,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -757,7 +757,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "stage-host-1",
"ssh_enabled": true,
@@ -766,8 +766,8 @@ curl_setopt_array($curl, array(
"approval_required": true,
"ip": "100.64.0.15"
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -780,8 +780,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -864,8 +864,8 @@ echo $response;
}
```
-
-
+
+
@@ -877,13 +877,13 @@ echo $response;
Delete a peer
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
+
@@ -891,7 +891,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/peers/{peerId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -901,9 +901,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -921,7 +921,7 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -944,7 +944,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -952,8 +952,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -995,7 +995,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1014,8 +1014,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1027,9 +1027,9 @@ echo $response;
```
-
-
-
+
+
+
@@ -1041,13 +1041,13 @@ echo $response;
Returns a list of peers that the specified peer can connect to within the network.
-
+
### Path Parameters
-
-
+
+
The unique identifier of a peer
-
+
@@ -1056,7 +1056,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/peers/{peerId}/accessible-peers \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1066,10 +1066,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/peers/{peerId}/accessible-peers',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1087,7 +1087,7 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}/accessible-peers"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1111,7 +1111,7 @@ func main() {
url := "https://api.netbird.io/api/peers/{peerId}/accessible-peers"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1119,8 +1119,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1164,7 +1164,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}/accessible-peers")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1184,8 +1184,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1198,8 +1198,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -1236,8 +1236,8 @@ echo $response;
]
```
-
-
+
+
From ba0f593b281e6095da56c7693b66d998fba1d8a9 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:57:16 +0100
Subject: [PATCH 09/14] Remove trailing whitespaces
---
src/pages/ipa/resources/policies.mdx | 418 +++++++++++++--------------
1 file changed, 209 insertions(+), 209 deletions(-)
diff --git a/src/pages/ipa/resources/policies.mdx b/src/pages/ipa/resources/policies.mdx
index 7ee56d83..f8c7f5ee 100644
--- a/src/pages/ipa/resources/policies.mdx
+++ b/src/pages/ipa/resources/policies.mdx
@@ -14,7 +14,7 @@ export const title = 'Policies'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/policies \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/policies',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/policies"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/policies"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -278,8 +278,8 @@ echo $response;
]
```
-
-
+
+
@@ -291,160 +291,160 @@ echo $response;
Creates a policy
-
+
### Request-Body Parameters
-
+
-
+
Policy name identifier
-
+
-
+
Policy friendly description
-
+
-
+
Policy status
-
+
-
+
Posture checks ID's applied to policy source groups
-
+
-
+
Policy rule object for policy UI editor
-
+
-
+
Policy rule name identifier
-
+
-
+
Policy rule friendly description
-
+
-
+
Policy rule status
-
+
-
+
Policy rule accept or drops packets
-
+
-
+
Define if the rule is applicable in both directions, sources, and destinations.
-
+
-
+
Policy rule type of the traffic
-
+
-
+
Policy rule affected ports
-
+
-
+
Policy rule affected ports ranges list
-
+
-
+
The starting port of the range
-
+
-
+
The ending port of the range
-
+
-
+
-
+
-
+
Policy rule ID
-
+
-
+
Policy rule source group IDs
-
+
-
+
More Information
-
+
-
+
ID of the resource
-
+
-
+
Network resource type based of the address
-
+
-
+
-
+
-
+
Policy rule destination group IDs
-
+
-
+
More Information
-
+
-
+
ID of the resource
-
+
-
+
Network resource type based of the address
-
+
-
+
-
+
-
+
-
+
-
+
@@ -546,11 +546,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/policies',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -610,8 +610,8 @@ payload = json.dumps({
}
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -635,7 +635,7 @@ func main() {
url := "https://api.netbird.io/api/policies"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
@@ -685,9 +685,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -816,8 +816,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -837,7 +837,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
@@ -880,8 +880,8 @@ curl_setopt_array($curl, array(
}
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -894,8 +894,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1012,8 +1012,8 @@ echo $response;
}
```
-
-
+
+
@@ -1025,13 +1025,13 @@ echo $response;
Get information about a Policies
-
+
### Path Parameters
-
-
+
+
The unique identifier of a policy
-
+
@@ -1040,7 +1040,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/policies/{policyId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1050,10 +1050,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/policies/{policyId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1071,7 +1071,7 @@ import json
url = "https://api.netbird.io/api/policies/{policyId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1095,7 +1095,7 @@ func main() {
url := "https://api.netbird.io/api/policies/{policyId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1103,8 +1103,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1148,7 +1148,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies/{policyId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1168,8 +1168,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1182,8 +1182,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1300,8 +1300,8 @@ echo $response;
}
```
-
-
+
+
@@ -1313,168 +1313,168 @@ echo $response;
Update/Replace a Policy
-
+
### Path Parameters
-
-
+
+
The unique identifier of a policy
-
+
-
+
### Request-Body Parameters
-
+
-
+
Policy name identifier
-
+
-
+
Policy friendly description
-
+
-
+
Policy status
-
+
-
+
Posture checks ID's applied to policy source groups
-
+
-
+
Policy rule object for policy UI editor
-
+
-
+
Policy rule name identifier
-
+
-
+
Policy rule friendly description
-
+
-
+
Policy rule status
-
+
-
+
Policy rule accept or drops packets
-
+
-
+
Define if the rule is applicable in both directions, sources, and destinations.
-
+
-
+
Policy rule type of the traffic
-
+
-
+
Policy rule affected ports
-
+
-
+
Policy rule affected ports ranges list
-
+
-
+
The starting port of the range
-
+
-
+
The ending port of the range
-
+
-
+
-
+
-
+
Policy rule ID
-
+
-
+
Policy rule source group IDs
-
+
-
+
More Information
-
+
-
+
ID of the resource
-
+
-
+
Network resource type based of the address
-
+
-
+
-
+
-
+
Policy rule destination group IDs
-
+
-
+
More Information
-
+
-
+
ID of the resource
-
+
-
+
Network resource type based of the address
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1576,11 +1576,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/policies/{policyId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -1640,8 +1640,8 @@ payload = json.dumps({
}
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1665,7 +1665,7 @@ func main() {
url := "https://api.netbird.io/api/policies/{policyId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
@@ -1715,9 +1715,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1846,8 +1846,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies/{policyId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1867,7 +1867,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
@@ -1910,8 +1910,8 @@ curl_setopt_array($curl, array(
}
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1924,8 +1924,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -2042,8 +2042,8 @@ echo $response;
}
```
-
-
+
+
@@ -2055,13 +2055,13 @@ echo $response;
Delete a policy
-
+
### Path Parameters
-
-
+
+
The unique identifier of a policy
-
+
@@ -2069,7 +2069,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/policies/{policyId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -2079,9 +2079,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/policies/{policyId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -2099,7 +2099,7 @@ import json
url = "https://api.netbird.io/api/policies/{policyId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -2122,7 +2122,7 @@ func main() {
url := "https://api.netbird.io/api/policies/{policyId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -2130,8 +2130,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -2173,7 +2173,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies/{policyId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -2192,8 +2192,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -2205,9 +2205,9 @@ echo $response;
```
-
-
-
+
+
+
From 79c47c2cf70875969372ec853ea884b110fdd35e Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:57:38 +0100
Subject: [PATCH 10/14] Remove trailing whitespaces
---
src/pages/ipa/resources/posture-checks.mdx | 530 ++++++++++-----------
1 file changed, 265 insertions(+), 265 deletions(-)
diff --git a/src/pages/ipa/resources/posture-checks.mdx b/src/pages/ipa/resources/posture-checks.mdx
index 1b6a314a..0a7c02df 100644
--- a/src/pages/ipa/resources/posture-checks.mdx
+++ b/src/pages/ipa/resources/posture-checks.mdx
@@ -14,7 +14,7 @@ export const title = 'Posture Checks'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/posture-checks \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/posture-checks',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/posture-checks"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/posture-checks"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/posture-checks")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -272,8 +272,8 @@ echo $response;
]
```
-
-
+
+
@@ -285,248 +285,248 @@ echo $response;
Creates a posture check
-
+
### Request-Body Parameters
-
+
-
+
Posture check name identifier
-
+
-
+
Posture check friendly description
-
+
-
+
List of objects that perform the actual checks
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check with the kernel version
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check with the kernel version
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
-
+
-
+
Posture check for geo location
-
+
-
+
List of geo locations to which the policy applies
-
+
-
+
2-letter ISO 3166-1 alpha-2 code that represents the country
-
+
-
+
Commonly used English name of the city
-
+
-
+
-
+
-
+
Action to take upon policy match
-
+
-
+
-
+
-
+
Posture check for allow or deny access based on peer local network addresses
-
+
-
+
List of peer network ranges in CIDR notation
-
+
-
+
Action to take upon policy match
-
+
-
+
-
+
-
+
Posture Check for binaries exist and are running in the peer’s system
-
+
-
+
More Information
-
+
-
+
Path to the process executable file in a Linux operating system
-
+
-
+
Path to the process executable file in a Mac operating system
-
+
-
+
Path to the process executable file in a Windows operating system
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -648,11 +648,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/posture-checks',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -722,8 +722,8 @@ payload = json.dumps({
}
}
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -747,7 +747,7 @@ func main() {
url := "https://api.netbird.io/api/posture-checks"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "Default",
"description": "This checks if the peer is running required NetBird's version",
@@ -807,9 +807,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -958,8 +958,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/posture-checks")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -979,7 +979,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "Default",
"description": "This checks if the peer is running required NetBird's version",
@@ -1032,8 +1032,8 @@ curl_setopt_array($curl, array(
}
}
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1046,8 +1046,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1158,8 +1158,8 @@ echo $response;
}
```
-
-
+
+
@@ -1171,13 +1171,13 @@ echo $response;
Get information about a posture check
-
+
### Path Parameters
-
-
+
+
The unique identifier of a posture check
-
+
@@ -1186,7 +1186,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/posture-checks/{postureCheckId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1196,10 +1196,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/posture-checks/{postureCheckId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1217,7 +1217,7 @@ import json
url = "https://api.netbird.io/api/posture-checks/{postureCheckId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1241,7 +1241,7 @@ func main() {
url := "https://api.netbird.io/api/posture-checks/{postureCheckId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1249,8 +1249,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1294,7 +1294,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/posture-checks/{postureCheckId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1314,8 +1314,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -1328,8 +1328,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1440,8 +1440,8 @@ echo $response;
}
```
-
-
+
+
@@ -1453,256 +1453,256 @@ echo $response;
Update/Replace a posture check
-
+
### Path Parameters
-
-
+
+
The unique identifier of a posture check
-
+
-
+
### Request-Body Parameters
-
+
-
+
Posture check name identifier
-
+
-
+
Posture check friendly description
-
+
-
+
List of objects that perform the actual checks
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check for the version of operating system
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check with the kernel version
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
Posture check with the kernel version
-
+
-
+
Minimum acceptable version
-
+
-
+
-
+
-
+
-
+
-
+
Posture check for geo location
-
+
-
+
List of geo locations to which the policy applies
-
+
-
+
2-letter ISO 3166-1 alpha-2 code that represents the country
-
+
-
+
Commonly used English name of the city
-
+
-
+
-
+
-
+
Action to take upon policy match
-
+
-
+
-
+
-
+
Posture check for allow or deny access based on peer local network addresses
-
+
-
+
List of peer network ranges in CIDR notation
-
+
-
+
Action to take upon policy match
-
+
-
+
-
+
-
+
Posture Check for binaries exist and are running in the peer’s system
-
+
-
+
More Information
-
+
-
+
Path to the process executable file in a Linux operating system
-
+
-
+
Path to the process executable file in a Mac operating system
-
+
-
+
Path to the process executable file in a Windows operating system
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1824,11 +1824,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/posture-checks/{postureCheckId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -1898,8 +1898,8 @@ payload = json.dumps({
}
}
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1923,7 +1923,7 @@ func main() {
url := "https://api.netbird.io/api/posture-checks/{postureCheckId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"name": "Default",
"description": "This checks if the peer is running required NetBird's version",
@@ -1983,9 +1983,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -2134,8 +2134,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/posture-checks/{postureCheckId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -2155,7 +2155,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "Default",
"description": "This checks if the peer is running required NetBird's version",
@@ -2208,8 +2208,8 @@ curl_setopt_array($curl, array(
}
}
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -2222,8 +2222,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -2334,8 +2334,8 @@ echo $response;
}
```
-
-
+
+
@@ -2347,13 +2347,13 @@ echo $response;
Delete a posture check
-
+
### Path Parameters
-
-
+
+
The unique identifier of a posture check
-
+
@@ -2361,7 +2361,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/posture-checks/{postureCheckId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -2371,9 +2371,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/posture-checks/{postureCheckId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -2391,7 +2391,7 @@ import json
url = "https://api.netbird.io/api/posture-checks/{postureCheckId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -2414,7 +2414,7 @@ func main() {
url := "https://api.netbird.io/api/posture-checks/{postureCheckId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -2422,8 +2422,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -2465,7 +2465,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/posture-checks/{postureCheckId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -2484,8 +2484,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -2497,9 +2497,9 @@ echo $response;
```
-
-
-
+
+
+
From 0c260d92500fdf47370f6459a3d9147e81bcea6a Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:57:55 +0100
Subject: [PATCH 11/14] Remove trailing whitespaces
---
src/pages/ipa/resources/routes.mdx | 290 ++++++++++++++---------------
1 file changed, 145 insertions(+), 145 deletions(-)
diff --git a/src/pages/ipa/resources/routes.mdx b/src/pages/ipa/resources/routes.mdx
index 9dfeb45a..c5e62c84 100644
--- a/src/pages/ipa/resources/routes.mdx
+++ b/src/pages/ipa/resources/routes.mdx
@@ -14,7 +14,7 @@ export const title = 'Routes'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/routes \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/routes',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/routes"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/routes"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -216,8 +216,8 @@ echo $response;
]
```
-
-
+
+
@@ -229,72 +229,72 @@ echo $response;
Creates a Route
-
+
### Request-Body Parameters
-
+
-
+
Route description
-
+
-
+
Route network identifier, to group HA routes
-
+
-
+
Route status
-
+
-
+
Peer Identifier associated with route. This property can not be set together with `peer_groups`
-
+
-
+
Peers Group Identifier associated with route. This property can not be set together with `peer`
-
+
-
+
Network range in CIDR format, Conflicts with domains
-
+
-
+
Domain list to be dynamically resolved. Max of 32 domains can be added per route configuration. Conflicts with network
-
+
-
+
Route metric number. Lowest number has higher priority
-
+
-
+
Indicate if peer should masquerade traffic to this route's prefix
-
+
-
+
Group IDs containing routing peers
-
+
-
+
Indicate if the route should be kept after a domain doesn't resolve that IP anymore
-
+
-
+
Access control group identifier associated with route.
-
+
-
+
@@ -356,11 +356,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/routes',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -400,8 +400,8 @@ payload = json.dumps({
"chacbco6lnnbn6cg5s91"
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -425,7 +425,7 @@ func main() {
url := "https://api.netbird.io/api/routes"
method := "POST"
-
+
payload := strings.NewReader(`{
"description": "My first route",
"network_id": "Route 1",
@@ -455,9 +455,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -546,8 +546,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -567,7 +567,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"description": "My first route",
"network_id": "Route 1",
@@ -590,8 +590,8 @@ curl_setopt_array($curl, array(
"chacbco6lnnbn6cg5s91"
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -604,8 +604,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -660,8 +660,8 @@ echo $response;
}
```
-
-
+
+
@@ -673,13 +673,13 @@ echo $response;
Get information about a Routes
-
+
### Path Parameters
-
-
+
+
The unique identifier of a route
-
+
@@ -688,7 +688,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/routes/{routeId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -698,10 +698,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/routes/{routeId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -719,7 +719,7 @@ import json
url = "https://api.netbird.io/api/routes/{routeId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -743,7 +743,7 @@ func main() {
url := "https://api.netbird.io/api/routes/{routeId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -751,8 +751,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -796,7 +796,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes/{routeId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -816,8 +816,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -830,8 +830,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -886,8 +886,8 @@ echo $response;
}
```
-
-
+
+
@@ -899,80 +899,80 @@ echo $response;
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. This property can not be set together with `peer_groups`
-
+
-
+
Peers Group Identifier associated with route. This property can not be set together with `peer`
-
+
-
+
Network range in CIDR format, Conflicts with domains
-
+
-
+
Domain list to be dynamically resolved. Max of 32 domains can be added per route configuration. Conflicts with network
-
+
-
+
Route metric number. Lowest number has higher priority
-
+
-
+
Indicate if peer should masquerade traffic to this route's prefix
-
+
-
+
Group IDs containing routing peers
-
+
-
+
Indicate if the route should be kept after a domain doesn't resolve that IP anymore
-
+
-
+
Access control group identifier associated with route.
-
+
-
+
@@ -1034,11 +1034,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/routes/{routeId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -1078,8 +1078,8 @@ payload = json.dumps({
"chacbco6lnnbn6cg5s91"
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -1103,7 +1103,7 @@ func main() {
url := "https://api.netbird.io/api/routes/{routeId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"description": "My first route",
"network_id": "Route 1",
@@ -1133,9 +1133,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1224,8 +1224,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes/{routeId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -1245,7 +1245,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"description": "My first route",
"network_id": "Route 1",
@@ -1268,8 +1268,8 @@ curl_setopt_array($curl, array(
"chacbco6lnnbn6cg5s91"
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -1282,8 +1282,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1338,8 +1338,8 @@ echo $response;
}
```
-
-
+
+
@@ -1351,13 +1351,13 @@ echo $response;
Delete a route
-
+
### Path Parameters
-
-
+
+
The unique identifier of a route
-
+
@@ -1365,7 +1365,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/routes/{routeId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1375,9 +1375,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/routes/{routeId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1395,7 +1395,7 @@ import json
url = "https://api.netbird.io/api/routes/{routeId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -1418,7 +1418,7 @@ func main() {
url := "https://api.netbird.io/api/routes/{routeId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1426,8 +1426,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1469,7 +1469,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes/{routeId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1488,8 +1488,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1501,9 +1501,9 @@ echo $response;
```
-
-
-
+
+
+
From 535906eb913cf2d3ddaefbe381e7089fe5e9dfb0 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:58:12 +0100
Subject: [PATCH 12/14] Remove trailing whitespaces
---
src/pages/ipa/resources/setup-keys.mdx | 230 ++++++++++++-------------
1 file changed, 115 insertions(+), 115 deletions(-)
diff --git a/src/pages/ipa/resources/setup-keys.mdx b/src/pages/ipa/resources/setup-keys.mdx
index a8698eb8..f5f7d111 100644
--- a/src/pages/ipa/resources/setup-keys.mdx
+++ b/src/pages/ipa/resources/setup-keys.mdx
@@ -14,7 +14,7 @@ export const title = 'Setup Keys'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/setup-keys \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -24,10 +24,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/setup-keys',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -45,7 +45,7 @@ import json
url = "https://api.netbird.io/api/setup-keys"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -69,7 +69,7 @@ func main() {
url := "https://api.netbird.io/api/setup-keys"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -77,8 +77,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -122,7 +122,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -142,8 +142,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -156,8 +156,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -206,8 +206,8 @@ echo $response;
]
```
-
-
+
+
@@ -219,47 +219,47 @@ echo $response;
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
-
+
-
+
List of group IDs 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.
-
+
-
+
Indicate that the peer will be ephemeral or not
-
+
-
+
Allow extra DNS labels to be added to the peer
-
+
-
+
@@ -299,11 +299,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/setup-keys',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -332,8 +332,8 @@ payload = json.dumps({
"ephemeral": true,
"allow_extra_dns_labels": true
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -357,7 +357,7 @@ func main() {
url := "https://api.netbird.io/api/setup-keys"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "Default key",
"type": "reusable",
@@ -376,9 +376,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -445,8 +445,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -466,7 +466,7 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "Default key",
"type": "reusable",
@@ -478,8 +478,8 @@ curl_setopt_array($curl, array(
"ephemeral": true,
"allow_extra_dns_labels": true
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -492,8 +492,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -538,8 +538,8 @@ echo $response;
}
```
-
-
+
+
@@ -551,13 +551,13 @@ echo $response;
Get information about a setup key
-
+
### Path Parameters
-
-
+
+
The unique identifier of a setup key
-
+
@@ -566,7 +566,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/setup-keys/{keyId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -576,10 +576,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/setup-keys/{keyId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -597,7 +597,7 @@ import json
url = "https://api.netbird.io/api/setup-keys/{keyId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -621,7 +621,7 @@ func main() {
url := "https://api.netbird.io/api/setup-keys/{keyId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -629,8 +629,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -674,7 +674,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys/{keyId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -694,8 +694,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -708,8 +708,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -754,8 +754,8 @@ echo $response;
}
```
-
-
+
+
@@ -767,30 +767,30 @@ echo $response;
Update information about a setup key
-
+
### Path Parameters
-
-
+
+
The unique identifier of a setup key
-
+
-
+
### Request-Body Parameters
-
+
-
+
Setup key revocation status
-
+
-
+
List of group IDs to auto-assign to peers registered with this key
-
+
-
+
@@ -820,11 +820,11 @@ let config = {
method: 'put',
maxBodyLength: Infinity,
url: '/api/setup-keys/{keyId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -848,8 +848,8 @@ payload = json.dumps({
"ch8i4ug6lnn4g9hqv7m0"
]
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -873,7 +873,7 @@ func main() {
url := "https://api.netbird.io/api/setup-keys/{keyId}"
method := "PUT"
-
+
payload := strings.NewReader(`{
"revoked": false,
"auto_groups": [
@@ -887,9 +887,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -946,8 +946,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys/{keyId}")
- .method("PUT", body)
- .addHeader("Content-Type", "application/json")
+ .method("PUT", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -967,15 +967,15 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
+ CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"revoked": false,
"auto_groups": [
"ch8i4ug6lnn4g9hqv7m0"
]
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -988,8 +988,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -1034,8 +1034,8 @@ echo $response;
}
```
-
-
+
+
@@ -1047,13 +1047,13 @@ echo $response;
Delete a Setup Key
-
+
### Path Parameters
-
-
+
+
The unique identifier of a setup key
-
+
@@ -1061,7 +1061,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/setup-keys/{keyId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1071,9 +1071,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/setup-keys/{keyId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1091,7 +1091,7 @@ import json
url = "https://api.netbird.io/api/setup-keys/{keyId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -1114,7 +1114,7 @@ func main() {
url := "https://api.netbird.io/api/setup-keys/{keyId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1122,8 +1122,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1165,7 +1165,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys/{keyId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -1184,8 +1184,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -1197,9 +1197,9 @@ echo $response;
```
-
-
-
+
+
+
From 26f32bbff18ce157bf054219345f3bdd5a997cff Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:58:31 +0100
Subject: [PATCH 13/14] Remove trailing whitespaces
---
src/pages/ipa/resources/tokens.mdx | 180 ++++++++++++++---------------
1 file changed, 90 insertions(+), 90 deletions(-)
diff --git a/src/pages/ipa/resources/tokens.mdx b/src/pages/ipa/resources/tokens.mdx
index 5cd0a7bc..af683cac 100644
--- a/src/pages/ipa/resources/tokens.mdx
+++ b/src/pages/ipa/resources/tokens.mdx
@@ -7,13 +7,13 @@ export const title = 'Tokens'
Returns a list of all tokens for a user
-
+
### Path Parameters
-
-
+
+
The unique identifier of a user
-
+
@@ -22,7 +22,7 @@ export const title = 'Tokens'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/users/{userId}/tokens \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -32,10 +32,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/users/{userId}/tokens',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -53,7 +53,7 @@ import json
url = "https://api.netbird.io/api/users/{userId}/tokens"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -77,7 +77,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}/tokens"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -85,8 +85,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -130,7 +130,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -150,8 +150,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -164,8 +164,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
[
@@ -192,8 +192,8 @@ echo $response;
]
```
-
-
+
+
@@ -205,30 +205,30 @@ echo $response;
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
-
+
-
+
@@ -254,11 +254,11 @@ let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/users/{userId}/tokens',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -280,8 +280,8 @@ payload = json.dumps({
"name": "My first token",
"expires_in": 30
})
-headers = {
- 'Content-Type': 'application/json',
+headers = {
+ 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -305,7 +305,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}/tokens"
method := "POST"
-
+
payload := strings.NewReader(`{
"name": "My first token",
"expires_in": 30
@@ -317,9 +317,9 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
- req.Header.Add("Content-Type", "application/json")
+ {
+
+ req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -372,8 +372,8 @@ RequestBody body = RequestBody.create(mediaType, '{
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens")
- .method("POST", body)
- .addHeader("Content-Type", "application/json")
+ .method("POST", body)
+ .addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -393,13 +393,13 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
+ CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "My first token",
"expires_in": 30
}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json',
+ CURLOPT_HTTPHEADER => array(
+ 'Content-Type: application/json',
'Accept: application/json',
'Authorization: Token '
),
@@ -412,8 +412,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -442,8 +442,8 @@ echo $response;
}
```
-
-
+
+
@@ -455,17 +455,17 @@ echo $response;
Returns a specific token for a user
-
+
### Path Parameters
-
-
+
+
The unique identifier of a user
-
-
-
+
+
+
The unique identifier of a token
-
+
@@ -474,7 +474,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/users/{userId}/tokens/{tokenId} \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -484,10 +484,10 @@ let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/users/{userId}/tokens/{tokenId}',
- headers: {
- 'Accept': 'application/json',
+ headers: {
+ 'Accept': 'application/json',
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -505,7 +505,7 @@ import json
url = "https://api.netbird.io/api/users/{userId}/tokens/{tokenId}"
-headers = {
+headers = {
'Accept': 'application/json',
'Authorization': 'Token '
}
@@ -529,7 +529,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}/tokens/{tokenId}"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -537,8 +537,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -582,7 +582,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens/{tokenId}")
- .method("GET")
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
.build();
@@ -602,8 +602,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token '
),
@@ -616,8 +616,8 @@ echo $response;
```
-
-
+
+
```json {{ title: 'Example' }}
{
@@ -640,8 +640,8 @@ echo $response;
}
```
-
-
+
+
@@ -653,17 +653,17 @@ echo $response;
Delete a token for a user
-
+
### Path Parameters
-
-
+
+
The unique identifier of a user
-
-
-
+
+
+
The unique identifier of a token
-
+
@@ -671,7 +671,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/users/{userId}/tokens/{tokenId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -681,9 +681,9 @@ let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '/api/users/{userId}/tokens/{tokenId}',
- headers: {
+ headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -701,7 +701,7 @@ import json
url = "https://api.netbird.io/api/users/{userId}/tokens/{tokenId}"
-headers = {
+headers = {
'Authorization': 'Token '
}
@@ -724,7 +724,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}/tokens/{tokenId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -732,8 +732,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -775,7 +775,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens/{tokenId}")
- .method("DELETE")
+ .method("DELETE")
.addHeader("Authorization: Token ")
.build();
Response response = client.newCall(request).execute();
@@ -794,8 +794,8 @@ curl_setopt_array($curl, array(
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => array(
+ CURLOPT_CUSTOMREQUEST => 'DELETE',
+ CURLOPT_HTTPHEADER => array(
'Authorization: Token '
),
));
@@ -807,9 +807,9 @@ echo $response;
```
-
-
-
+
+
+
From b966c9eae895ad86e20d03894e127a58e10f1086 Mon Sep 17 00:00:00 2001
From: dataprolet <48024821+dataprolet@users.noreply.github.com>
Date: Tue, 9 Dec 2025 13:58:50 +0100
Subject: [PATCH 14/14] Remove trailing whitespaces
---
src/pages/ipa/resources/users.mdx | 52 +++++++++++++++----------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/pages/ipa/resources/users.mdx b/src/pages/ipa/resources/users.mdx
index ce0674e5..8f916ea5 100644
--- a/src/pages/ipa/resources/users.mdx
+++ b/src/pages/ipa/resources/users.mdx
@@ -22,7 +22,7 @@ export const title = 'Users'
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/users \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -335,7 +335,7 @@ let config = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -387,7 +387,7 @@ func main() {
url := "https://api.netbird.io/api/users"
method := "POST"
-
+
payload := strings.NewReader(`{
"email": "demo@netbird.io",
"name": "Tom Schulz",
@@ -615,7 +615,7 @@ echo $response;
### Path Parameters
-
+
The unique identifier of a user
@@ -675,7 +675,7 @@ let config = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token '
- },
+ },
data : data
};
@@ -740,7 +740,7 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
+ {
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
@@ -929,7 +929,7 @@ echo $response;
```
-
+
@@ -941,11 +941,11 @@ echo $response;
This method removes a user from accessing the system. For this leaves the IDP user intact unless the `--user-delete-from-idp` is passed to management startup.
-
+
### Path Parameters
-
-
+
+
The unique identifier of a user
@@ -955,7 +955,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X DELETE https://api.netbird.io/api/users/{userId} \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -967,7 +967,7 @@ let config = {
url: '/api/users/{userId}',
headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1008,7 +1008,7 @@ func main() {
url := "https://api.netbird.io/api/users/{userId}"
method := "DELETE"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1016,8 +1016,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Authorization", "Token ")
res, err := client.Do(req)
@@ -1105,11 +1105,11 @@ echo $response;
Resend user invitation
-
+
### Path Parameters
-
-
+
+
The unique identifier of a user
@@ -1119,7 +1119,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X POST https://api.netbird.io/api/users/{userId}/invite \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1131,7 +1131,7 @@ let config = {
url: '/api/users/{userId}/invite',
headers: {
'Authorization': 'Token '
- }
+ }
};
axios(config)
@@ -1257,7 +1257,7 @@ echo $response;
-
+
@@ -1276,7 +1276,7 @@ echo $response;
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/users/current \
-H 'Accept: application/json' \
--H 'Authorization: Token '
+-H 'Authorization: Token '
```
```js
@@ -1331,7 +1331,7 @@ func main() {
url := "https://api.netbird.io/api/users/current"
method := "GET"
-
+
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
@@ -1339,8 +1339,8 @@ func main() {
if err != nil {
fmt.Println(err)
return
- {
-
+ {
+
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token ")
@@ -1503,7 +1503,7 @@ echo $response;
```
-
+