"
@@ -1772,6 +1772,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"disabled_management_groups": [
"string"
diff --git a/src/pages/docs/examples.mdx b/src/pages/docs/examples.mdx
index cc1bebd6..e1203bec 100644
--- a/src/pages/docs/examples.mdx
+++ b/src/pages/docs/examples.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern";
+export const title = 'Examples'
+
## NetBird Client on AWS ECS (Terraform)
diff --git a/src/pages/docs/faq.mdx b/src/pages/docs/faq.mdx
index c9cd6396..9ddac97e 100644
--- a/src/pages/docs/faq.mdx
+++ b/src/pages/docs/faq.mdx
@@ -2,6 +2,8 @@ import {Note} from "@/components/mdx"; import {HeroPattern} from "@/components/H
+export const title = 'FAQ'
+
## What firewall ports should I open to use NetBird?
### Incoming ports
diff --git a/src/pages/docs/getting-started.mdx b/src/pages/docs/getting-started.mdx
index 03d1a2a8..f9779953 100644
--- a/src/pages/docs/getting-started.mdx
+++ b/src/pages/docs/getting-started.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Getting Started'
+
## Quickstart Guide
Step-by-step video guide on YouTube:
diff --git a/src/pages/docs/how-netbird-works.mdx b/src/pages/docs/how-netbird-works.mdx
index 31840cef..8152942a 100644
--- a/src/pages/docs/how-netbird-works.mdx
+++ b/src/pages/docs/how-netbird-works.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'How NetBird Works'
+
## Architecture
### Overview
diff --git a/src/pages/docs/how-to-guides.mdx b/src/pages/docs/how-to-guides.mdx
index 51837df1..28e6f7ff 100644
--- a/src/pages/docs/how-to-guides.mdx
+++ b/src/pages/docs/how-to-guides.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Button, Note} from
+export const title = 'How-to Guides'
+
## Routing traffic to private networks
diff --git a/src/pages/docs/other.mdx b/src/pages/docs/other.mdx
index b9b89a25..bb6f739a 100644
--- a/src/pages/docs/other.mdx
+++ b/src/pages/docs/other.mdx
@@ -2,6 +2,8 @@ import {Note} from "@/components/mdx"; import {HeroPattern} from "@/components/H
+export const title = 'Other'
+
## Google Summer of Code Ideas - 2022
This page lists the all project ideas for [Google Summer of Code 2022](https://summerofcode.withgoogle.com/).
diff --git a/src/pages/docs/reference.mdx b/src/pages/docs/reference.mdx
index 27627118..ed45fd33 100644
--- a/src/pages/docs/reference.mdx
+++ b/src/pages/docs/reference.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern";
+export const title = 'Reference'
+
## NetBird commands
The NetBird client installation adds a binary called `netbird` to your system. This binary runs as a daemon service to connect
diff --git a/src/pages/events.mdx b/src/pages/events.mdx
index ffcab69d..f8481434 100644
--- a/src/pages/events.mdx
+++ b/src/pages/events.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Events'
+
## List all Events {{ tag: 'GET' , label: '/api/events' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/events")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/events")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
diff --git a/src/pages/groups.mdx b/src/pages/groups.mdx
index 9c11c337..4e78d350 100644
--- a/src/pages/groups.mdx
+++ b/src/pages/groups.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Groups'
+
## List all Groups {{ tag: 'GET' , label: '/api/groups' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -400,6 +401,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"peers": [
@@ -568,7 +570,7 @@ url = URI("https://api.netbird.io/api/groups/{groupId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -580,11 +582,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups/{groupId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -606,7 +607,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -810,7 +811,7 @@ url = URI("https://api.netbird.io/api/groups/{groupId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -859,6 +860,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"peers": [
@@ -1027,7 +1029,7 @@ url = URI("https://api.netbird.io/api/groups/{groupId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -1039,11 +1041,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/groups/{groupId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -1065,7 +1066,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
diff --git a/src/pages/peers.mdx b/src/pages/peers.mdx
index 4edc664a..65d8b9e0 100644
--- a/src/pages/peers.mdx
+++ b/src/pages/peers.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Peers'
+
## List all Peers {{ tag: 'GET' , label: '/api/peers' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/peers")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -331,7 +332,7 @@ url = URI("https://api.netbird.io/api/peers/{peerId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -343,11 +344,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -369,7 +369,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -589,7 +589,7 @@ url = URI("https://api.netbird.io/api/peers/{peerId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -636,6 +636,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"ssh_enabled": "boolean",
@@ -816,7 +817,7 @@ url = URI("https://api.netbird.io/api/peers/{peerId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -828,11 +829,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -854,7 +854,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
diff --git a/src/pages/policies.mdx b/src/pages/policies.mdx
index e2329f0d..27f4db6e 100644
--- a/src/pages/policies.mdx
+++ b/src/pages/policies.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Policies'
+
## List all Policies {{ tag: 'GET' , label: '/api/policies' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/policies")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -578,6 +579,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
@@ -784,7 +786,7 @@ url = URI("https://api.netbird.io/api/policies/{policyId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -796,11 +798,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies/{policyId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -822,7 +823,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -1158,7 +1159,7 @@ url = URI("https://api.netbird.io/api/policies/{policyId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -1253,6 +1254,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
@@ -1463,7 +1465,7 @@ url = URI("https://api.netbird.io/api/policies/{policyId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -1475,11 +1477,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/policies/{policyId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -1501,7 +1502,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
diff --git a/src/pages/routes.mdx b/src/pages/routes.mdx
index 688de62a..78c1a351 100644
--- a/src/pages/routes.mdx
+++ b/src/pages/routes.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Routes'
+
## List all Routes {{ tag: 'GET' , label: '/api/routes' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/routes")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -489,6 +490,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"description": "string",
"network_id": "string",
@@ -666,7 +668,7 @@ url = URI("https://api.netbird.io/api/routes/{routeId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -678,11 +680,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes/{routeId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -704,7 +705,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -985,7 +986,7 @@ url = URI("https://api.netbird.io/api/routes/{routeId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -1046,6 +1047,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"description": "string",
"network_id": "string",
@@ -1223,7 +1225,7 @@ url = URI("https://api.netbird.io/api/routes/{routeId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -1235,11 +1237,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/routes/{routeId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -1261,7 +1262,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
diff --git a/src/pages/rules.mdx b/src/pages/rules.mdx
index 155b1665..b9105935 100644
--- a/src/pages/rules.mdx
+++ b/src/pages/rules.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Rules'
+
## List all Rules {{ tag: 'GET' , label: '/api/rules' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/rules")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/rules")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -474,6 +475,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
@@ -654,7 +656,7 @@ url = URI("https://api.netbird.io/api/rules/{ruleId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -666,11 +668,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/rules/{ruleId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -692,7 +693,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -958,7 +959,7 @@ url = URI("https://api.netbird.io/api/rules/{ruleId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -1019,6 +1020,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
@@ -1203,7 +1205,7 @@ url = URI("https://api.netbird.io/api/rules/{ruleId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -1215,11 +1217,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/rules/{ruleId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -1241,7 +1242,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
diff --git a/src/pages/setup-keys.mdx b/src/pages/setup-keys.mdx
index 16738eef..687b970c 100644
--- a/src/pages/setup-keys.mdx
+++ b/src/pages/setup-keys.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Setup Keys'
+
## List all Setup Keys {{ tag: 'GET' , label: '/api/setup-keys' }}
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/setup-keys")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -127,11 +129,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -153,7 +154,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -458,6 +459,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"type": "string",
@@ -636,7 +638,7 @@ url = URI("https://api.netbird.io/api/setup-keys/{keyId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -648,11 +650,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys/{keyId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -674,7 +675,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -928,7 +929,7 @@ url = URI("https://api.netbird.io/api/setup-keys/{keyId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -985,6 +986,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"type": "string",
diff --git a/src/pages/tokens.mdx b/src/pages/tokens.mdx
index af26e4ea..54081d11 100644
--- a/src/pages/tokens.mdx
+++ b/src/pages/tokens.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Tokens'
+
## List all Tokens {{ tag: 'GET' , label: '/api/users/{userId}/tokens' }}
@@ -123,7 +125,7 @@ url = URI("https://api.netbird.io/api/users/{userId}/tokens")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -135,11 +137,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -161,7 +162,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -405,6 +406,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"name": "string",
"expires_in": "integer"
@@ -575,7 +577,7 @@ url = URI("https://api.netbird.io/api/users/{userId}/tokens/{tokenId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -587,11 +589,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens/{tokenId}")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -613,7 +614,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -777,7 +778,7 @@ url = URI("https://api.netbird.io/api/users/{userId}/tokens/{tokenId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -789,11 +790,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens/{tokenId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -815,7 +815,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
diff --git a/src/pages/users.mdx b/src/pages/users.mdx
index 8d571e7c..432a6b31 100644
--- a/src/pages/users.mdx
+++ b/src/pages/users.mdx
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
+export const title = 'Users'
+
## Retrieve Users {{ tag: 'GET' , label: '/api/users' }}
@@ -123,7 +125,7 @@ url = URI("https://api.netbird.io/api/users")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -135,11 +137,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users")
- .method("GET", body)
+ .method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token ")
@@ -161,7 +162,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
@@ -448,6 +449,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
+
CURLOPT_POSTFIELDS =>'{
"email": "string",
"name": "string",
@@ -661,7 +663,7 @@ url = URI("https://api.netbird.io/api/users/{userId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Token "
@@ -710,6 +712,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
+
CURLOPT_POSTFIELDS =>'{
"role": "string",
"auto_groups": [
@@ -879,7 +882,7 @@ url = URI("https://api.netbird.io/api/users/{userId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
-request = Net::HTTP::Post.new(url)
+request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Token "
@@ -891,11 +894,10 @@ puts response.read_body
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
-MediaType mediaType = MediaType.parse("application/json");
-RequestBody body = RequestBody.create(mediaType, '');
+
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}")
- .method("DELETE", body)
+ .method("DELETE")
.addHeader("Authorization: Token ")
@@ -917,7 +919,7 @@ curl_setopt_array($curl, array(
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_POSTFIELDS =>'',
+
CURLOPT_HTTPHEADER => array(