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