page titles

This commit is contained in:
Pascal Fischer
2023-05-03 21:02:16 +02:00
parent f2b0294ea7
commit 6777c62530
20 changed files with 186 additions and 156 deletions

View File

@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
<HeroPattern />
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 <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 <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 <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 <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 <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 <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 <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(