mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-22 10:26:36 +00:00
page titles
This commit is contained in:
@@ -2,6 +2,8 @@ import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/comp
|
||||
|
||||
<HeroPattern />
|
||||
|
||||
export const title = 'Accounts'
|
||||
|
||||
|
||||
|
||||
## List all Accounts {{ tag: 'GET' , label: '/api/accounts' }}
|
||||
@@ -115,7 +117,7 @@ url = URI("https://api.netbird.io/api/accounts")
|
||||
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/accounts")
|
||||
.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',
|
||||
@@ -347,7 +348,7 @@ url = URI("https://api.netbird.io/api/accounts/{accountId}")
|
||||
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>"
|
||||
@@ -392,6 +393,7 @@ curl_setopt_array($curl, array(
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'PUT',
|
||||
|
||||
CURLOPT_POSTFIELDS =>'{
|
||||
"peer_login_expiration_enabled": "boolean",
|
||||
"peer_login_expiration": "integer"
|
||||
|
||||
Reference in New Issue
Block a user