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 = '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 <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 <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 <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 <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 <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 <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 <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(