switch requests examples to version with values

This commit is contained in:
Pascal Fischer
2023-05-05 18:04:17 +02:00
parent adf57d5294
commit 05cbda8cd8
11 changed files with 756 additions and 756 deletions

View File

@@ -248,16 +248,16 @@ curl -X PUT https://api.netbird.io/api/accounts/{accountId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
});
let config = {
method: 'put',
@@ -287,8 +287,8 @@ import json
url = "https://api.netbird.io/api/accounts/{accountId}"
payload = json.dumps({
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
})
headers = {
'Content-Type': 'application/json',
@@ -317,8 +317,8 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
}`)
client := &http.Client {
}
@@ -365,8 +365,8 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
})
response = https.request(request)
puts response.read_body
@@ -377,8 +377,8 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/accounts/{accountId}")
@@ -406,8 +406,8 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"peer_login_expiration_enabled": "boolean",
"peer_login_expiration": "integer"
"peer_login_expiration_enabled": true,
"peer_login_expiration": 43200
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',

View File

@@ -309,22 +309,22 @@ curl -X POST https://api.netbird.io/api/dns/nameservers \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}'
```
@@ -332,22 +332,22 @@ curl -X POST https://api.netbird.io/api/dns/nameservers \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
});
let config = {
@@ -378,22 +378,22 @@ import json
url = "https://api.netbird.io/api/dns/nameservers"
payload = json.dumps({
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
})
headers = {
@@ -423,22 +423,22 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}`)
client := &http.Client {
@@ -486,22 +486,22 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
})
response = https.request(request)
@@ -513,22 +513,22 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}');
Request request = new Request.Builder()
@@ -557,22 +557,22 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}',
CURLOPT_HTTPHEADER => array(
@@ -964,22 +964,22 @@ curl -X PUT https://api.netbird.io/api/dns/nameservers/{nsgroupId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}'
```
@@ -987,22 +987,22 @@ curl -X PUT https://api.netbird.io/api/dns/nameservers/{nsgroupId} \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
});
let config = {
@@ -1033,22 +1033,22 @@ import json
url = "https://api.netbird.io/api/dns/nameservers/{nsgroupId}"
payload = json.dumps({
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
})
headers = {
@@ -1078,22 +1078,22 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}`)
client := &http.Client {
@@ -1141,22 +1141,22 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
})
response = https.request(request)
@@ -1168,22 +1168,22 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}');
Request request = new Request.Builder()
@@ -1212,22 +1212,22 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
"name": "Google DNS",
"description": "Google DNS servers",
"nameservers": [
{
"ip": "string",
"ns_type": "string",
"port": "integer"
"ip": "8.8.8.8",
"ns_type": "udp",
"port": 53
}
],
"enabled": "boolean",
"enabled": true,
"groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
],
"primary": "boolean",
"primary": true,
"domains": [
"string"
"example.com"
]
}',
CURLOPT_HTTPHEADER => array(
@@ -1710,7 +1710,7 @@ curl -X PUT https://api.netbird.io/api/dns/settings \
-H 'Content-Type: application/json' \
--data-raw '{
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}'
```
@@ -1719,7 +1719,7 @@ curl -X PUT https://api.netbird.io/api/dns/settings \
const axios = require('axios');
let data = JSON.stringify({
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
});
let config = {
@@ -1751,7 +1751,7 @@ import json
url = "https://api.netbird.io/api/dns/settings"
payload = json.dumps({
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
})
headers = {
@@ -1782,7 +1782,7 @@ func main() {
payload := strings.NewReader(`{
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}`)
client := &http.Client {
@@ -1831,7 +1831,7 @@ request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
})
response = https.request(request)
@@ -1844,7 +1844,7 @@ OkHttpClient client = new OkHttpClient().newBuilder()
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}');
Request request = new Request.Builder()
@@ -1874,7 +1874,7 @@ curl_setopt_array($curl, array(
CURLOPT_POSTFIELDS =>'{
"disabled_management_groups": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}',
CURLOPT_HTTPHEADER => array(

View File

@@ -248,9 +248,9 @@ curl -X POST https://api.netbird.io/api/groups \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}'
```
@@ -258,9 +258,9 @@ curl -X POST https://api.netbird.io/api/groups \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
});
let config = {
@@ -291,9 +291,9 @@ import json
url = "https://api.netbird.io/api/groups"
payload = json.dumps({
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
})
headers = {
@@ -323,9 +323,9 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}`)
client := &http.Client {
@@ -373,9 +373,9 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
})
response = https.request(request)
@@ -387,9 +387,9 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}');
Request request = new Request.Builder()
@@ -418,9 +418,9 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}',
CURLOPT_HTTPHEADER => array(
@@ -733,9 +733,9 @@ curl -X PUT https://api.netbird.io/api/groups/{groupId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}'
```
@@ -743,9 +743,9 @@ curl -X PUT https://api.netbird.io/api/groups/{groupId} \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
});
let config = {
@@ -776,9 +776,9 @@ import json
url = "https://api.netbird.io/api/groups/{groupId}"
payload = json.dumps({
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
})
headers = {
@@ -808,9 +808,9 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}`)
client := &http.Client {
@@ -858,9 +858,9 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
})
response = https.request(request)
@@ -872,9 +872,9 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}');
Request request = new Request.Builder()
@@ -903,9 +903,9 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"name": "devs",
"peers": [
"string"
null
]
}',
CURLOPT_HTTPHEADER => array(

View File

@@ -528,18 +528,18 @@ curl -X PUT https://api.netbird.io/api/peers/{peerId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
});
let config = {
method: 'put',
@@ -569,9 +569,9 @@ import json
url = "https://api.netbird.io/api/peers/{peerId}"
payload = json.dumps({
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
})
headers = {
'Content-Type': 'application/json',
@@ -600,9 +600,9 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
}`)
client := &http.Client {
}
@@ -649,9 +649,9 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
})
response = https.request(request)
puts response.read_body
@@ -662,9 +662,9 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/peers/{peerId}")
@@ -692,9 +692,9 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"ssh_enabled": "boolean",
"login_expiration_enabled": "boolean"
"name": "stage-host-1",
"ssh_enabled": true,
"login_expiration_enabled": false
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',

View File

@@ -307,31 +307,31 @@ curl -X POST https://api.netbird.io/api/policies \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}'
@@ -340,31 +340,31 @@ curl -X POST https://api.netbird.io/api/policies \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
});
@@ -396,31 +396,31 @@ import json
url = "https://api.netbird.io/api/policies"
payload = json.dumps({
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
})
@@ -451,31 +451,31 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}`)
@@ -524,31 +524,31 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
})
@@ -561,31 +561,31 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}');
@@ -615,31 +615,31 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}',
@@ -1046,31 +1046,31 @@ curl -X PUT https://api.netbird.io/api/policies/{policyId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}'
@@ -1079,31 +1079,31 @@ curl -X PUT https://api.netbird.io/api/policies/{policyId} \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
});
@@ -1135,31 +1135,31 @@ import json
url = "https://api.netbird.io/api/policies/{policyId}"
payload = json.dumps({
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
})
@@ -1190,31 +1190,31 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}`)
@@ -1263,31 +1263,31 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
})
@@ -1300,31 +1300,31 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}');
@@ -1354,31 +1354,31 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
"enabled": "boolean",
"query": "string",
"name": "ch8i4ug6lnn4g9hqv7mg",
"description": "This is a default policy that allows connections between all the resources",
"enabled": true,
"query": "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n",
"rules": [
{
"id": "string",
"name": "string",
"description": "string",
"enabled": "boolean",
"id": "ch8i4ug6lnn4g9hqv7mg",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"enabled": true,
"sources": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"destinations": [
{
"id": "string",
"name": "string",
"peers_count": "integer"
"id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs",
"peers_count": 2
}
],
"action": "string"
"action": "accept"
}
]
}',

View File

@@ -304,15 +304,15 @@ curl -X POST https://api.netbird.io/api/routes \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}'
```
@@ -320,15 +320,15 @@ curl -X POST https://api.netbird.io/api/routes \
```js
const axios = require('axios');
let data = JSON.stringify({
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
});
let config = {
@@ -359,15 +359,15 @@ import json
url = "https://api.netbird.io/api/routes"
payload = json.dumps({
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
})
headers = {
@@ -397,15 +397,15 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}`)
client := &http.Client {
@@ -453,15 +453,15 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
})
response = https.request(request)
@@ -473,15 +473,15 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}');
Request request = new Request.Builder()
@@ -510,15 +510,15 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}',
CURLOPT_HTTPHEADER => array(
@@ -893,15 +893,15 @@ curl -X PUT https://api.netbird.io/api/routes/{routeId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}'
```
@@ -909,15 +909,15 @@ curl -X PUT https://api.netbird.io/api/routes/{routeId} \
```js
const axios = require('axios');
let data = JSON.stringify({
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
});
let config = {
@@ -948,15 +948,15 @@ import json
url = "https://api.netbird.io/api/routes/{routeId}"
payload = json.dumps({
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
})
headers = {
@@ -986,15 +986,15 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}`)
client := &http.Client {
@@ -1042,15 +1042,15 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
})
response = https.request(request)
@@ -1062,15 +1062,15 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}');
Request request = new Request.Builder()
@@ -1099,15 +1099,15 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"description": "string",
"network_id": "string",
"enabled": "boolean",
"peer": "string",
"network": "string",
"metric": "integer",
"masquerade": "boolean",
"description": "My first route",
"network_id": "Route 1",
"enabled": true,
"peer": "chacbco6lnnbn6cg5s91",
"network": "10.64.0.0/24",
"metric": 9999,
"masquerade": true,
"groups": [
"string"
"chacdk86lnnboviihd70"
]
}',
CURLOPT_HTTPHEADER => array(

View File

@@ -296,15 +296,15 @@ curl -X POST https://api.netbird.io/api/rules \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}'
```
@@ -312,15 +312,15 @@ curl -X POST https://api.netbird.io/api/rules \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
});
let config = {
@@ -351,15 +351,15 @@ import json
url = "https://api.netbird.io/api/rules"
payload = json.dumps({
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
})
headers = {
@@ -389,15 +389,15 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}`)
client := &http.Client {
@@ -445,15 +445,15 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
})
response = https.request(request)
@@ -465,15 +465,15 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}');
Request request = new Request.Builder()
@@ -502,15 +502,15 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}',
CURLOPT_HTTPHEADER => array(
@@ -887,15 +887,15 @@ curl -X PUT https://api.netbird.io/api/rules/{ruleId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}'
```
@@ -903,15 +903,15 @@ curl -X PUT https://api.netbird.io/api/rules/{ruleId} \
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
});
let config = {
@@ -942,15 +942,15 @@ import json
url = "https://api.netbird.io/api/rules/{ruleId}"
payload = json.dumps({
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
})
headers = {
@@ -980,15 +980,15 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}`)
client := &http.Client {
@@ -1036,15 +1036,15 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
})
response = https.request(request)
@@ -1056,15 +1056,15 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}');
Request request = new Request.Builder()
@@ -1093,15 +1093,15 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"description": "string",
"disabled": "boolean",
"flow": "string",
"name": "Default",
"description": "This is a default rule that allows connections between all the resources",
"disabled": false,
"flow": "bidirect",
"sources": [
"string"
"ch8i4ug6lnn4g9hqv7m1"
],
"destinations": [
"string"
"ch8i4ug6lnn4g9hqv7m0"
]
}',
CURLOPT_HTTPHEADER => array(

View File

@@ -288,28 +288,28 @@ curl -X POST https://api.netbird.io/api/setup-keys \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
});
let config = {
method: 'post',
@@ -339,14 +339,14 @@ import json
url = "https://api.netbird.io/api/setup-keys"
payload = json.dumps({
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
})
headers = {
'Content-Type': 'application/json',
@@ -375,14 +375,14 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}`)
client := &http.Client {
}
@@ -429,14 +429,14 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
})
response = https.request(request)
puts response.read_body
@@ -447,14 +447,14 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys")
@@ -482,14 +482,14 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
@@ -853,28 +853,28 @@ curl -X PUT https://api.netbird.io/api/setup-keys/{keyId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
});
let config = {
method: 'put',
@@ -904,14 +904,14 @@ import json
url = "https://api.netbird.io/api/setup-keys/{keyId}"
payload = json.dumps({
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
})
headers = {
'Content-Type': 'application/json',
@@ -940,14 +940,14 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}`)
client := &http.Client {
}
@@ -994,14 +994,14 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
})
response = https.request(request)
puts response.read_body
@@ -1012,14 +1012,14 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys/{keyId}")
@@ -1047,14 +1047,14 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"name": "Default key",
"type": "reusable",
"expires_in": 43200,
"revoked": false,
"auto_groups": [
"string"
"devs"
],
"usage_limit": "integer"
"usage_limit": 0
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',

View File

@@ -262,16 +262,16 @@ curl -X POST https://api.netbird.io/api/users/{userId}/tokens \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
});
let config = {
method: 'post',
@@ -301,8 +301,8 @@ import json
url = "https://api.netbird.io/api/users/{userId}/tokens"
payload = json.dumps({
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
})
headers = {
'Content-Type': 'application/json',
@@ -331,8 +331,8 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
}`)
client := &http.Client {
}
@@ -379,8 +379,8 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
})
response = https.request(request)
puts response.read_body
@@ -391,8 +391,8 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users/{userId}/tokens")
@@ -420,8 +420,8 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "string",
"expires_in": "integer"
"name": "My first token",
"expires_in": 30
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',

View File

@@ -279,26 +279,26 @@ curl -X POST https://api.netbird.io/api/users \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
});
let config = {
method: 'post',
@@ -328,13 +328,13 @@ import json
url = "https://api.netbird.io/api/users"
payload = json.dumps({
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
})
headers = {
'Content-Type': 'application/json',
@@ -363,13 +363,13 @@ func main() {
method := "POST"
payload := strings.NewReader(`{
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
}`)
client := &http.Client {
}
@@ -416,13 +416,13 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
})
response = https.request(request)
puts response.read_body
@@ -433,13 +433,13 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/users")
@@ -467,13 +467,13 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"email": "string",
"name": "string",
"role": "string",
"email": "demo@netbird.io",
"name": "Tom Schulz",
"role": "admin",
"auto_groups": [
"string"
"devs"
],
"is_service_user": "boolean"
"is_service_user": false
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
@@ -574,9 +574,9 @@ curl -X PUT https://api.netbird.io/api/users/{userId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
}'
```
@@ -584,9 +584,9 @@ curl -X PUT https://api.netbird.io/api/users/{userId} \
```js
const axios = require('axios');
let data = JSON.stringify({
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
});
let config = {
@@ -617,9 +617,9 @@ import json
url = "https://api.netbird.io/api/users/{userId}"
payload = json.dumps({
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
})
headers = {
@@ -649,9 +649,9 @@ func main() {
method := "PUT"
payload := strings.NewReader(`{
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
}`)
client := &http.Client {
@@ -699,9 +699,9 @@ request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
request.body = JSON.dump({
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
})
response = https.request(request)
@@ -713,9 +713,9 @@ OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
}');
Request request = new Request.Builder()
@@ -744,9 +744,9 @@ curl_setopt_array($curl, array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"role": "string",
"role": "admin",
"auto_groups": [
"string"
"devs"
]
}',
CURLOPT_HTTPHEADER => array(