mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-16 15:36:36 +00:00
Update API pages with v0.24.4
This commit is contained in:
@@ -169,7 +169,10 @@ echo $response;
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -183,7 +186,10 @@ echo $response;
|
||||
"peer_login_expiration": "integer",
|
||||
"groups_propagation_enabled": "boolean",
|
||||
"jwt_groups_enabled": "boolean",
|
||||
"jwt_groups_claim_name": "string"
|
||||
"jwt_groups_claim_name": "string",
|
||||
"extra": {
|
||||
"peer_approval_enabled": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -250,6 +256,13 @@ echo $response;
|
||||
|
||||
>
|
||||
Name of the claim from which we extract groups names to add it to account groups.
|
||||
</Property>
|
||||
|
||||
<Property name="peer_approval_enabled" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
(Cloud only) Enables or disables peer approval globally. If enabled, all peers added will be in pending state until approved by an admin.
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
@@ -267,7 +280,10 @@ curl -X PUT https://api.netbird.io/api/accounts/{accountId} \
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
}'
|
||||
```
|
||||
@@ -280,7 +296,10 @@ let data = JSON.stringify({
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
});
|
||||
let config = {
|
||||
@@ -315,7 +334,10 @@ payload = json.dumps({
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
})
|
||||
headers: {
|
||||
@@ -350,7 +372,10 @@ func main() {
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
}`)
|
||||
client := &http.Client {
|
||||
@@ -403,7 +428,10 @@ request.body = JSON.dump({
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
})
|
||||
response = https.request(request)
|
||||
@@ -420,7 +448,10 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
}');
|
||||
Request request = new Request.Builder()
|
||||
@@ -453,7 +484,10 @@ curl_setopt_array($curl, array(
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
}',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
@@ -482,7 +516,10 @@ echo $response;
|
||||
"peer_login_expiration": 43200,
|
||||
"groups_propagation_enabled": true,
|
||||
"jwt_groups_enabled": true,
|
||||
"jwt_groups_claim_name": "roles"
|
||||
"jwt_groups_claim_name": "roles",
|
||||
"extra": {
|
||||
"peer_approval_enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -494,7 +531,10 @@ echo $response;
|
||||
"peer_login_expiration": "integer",
|
||||
"groups_propagation_enabled": "boolean",
|
||||
"jwt_groups_enabled": "boolean",
|
||||
"jwt_groups_claim_name": "string"
|
||||
"jwt_groups_claim_name": "string",
|
||||
"extra": {
|
||||
"peer_approval_enabled": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -504,6 +544,172 @@ echo $response;
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Delete an Account {{ tag: 'DELETE' , label: '/api/accounts/{accountId}' }}
|
||||
|
||||
<Row>
|
||||
<Col>
|
||||
Deletes an account and all its resources. Only administrators and account owners can delete accounts.
|
||||
|
||||
#### Path Parameters
|
||||
<Properties>
|
||||
|
||||
<Property name="accountId" type="string" required={true}>
|
||||
The unique identifier of an account
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
<CodeGroup title="Request" tag="DELETE" label="/api/accounts/{accountId}">
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X DELETE https://api.netbird.io/api/accounts/{accountId} \
|
||||
-H 'Authorization: Token <TOKEN>'
|
||||
```
|
||||
|
||||
```js
|
||||
const axios = require('axios');
|
||||
|
||||
let config = {
|
||||
method: 'delete',
|
||||
maxBodyLength: Infinity,
|
||||
url: '/api/accounts/{accountId}',
|
||||
headers: {
|
||||
'Authorization': 'Token <TOKEN>'
|
||||
}
|
||||
};
|
||||
|
||||
axios(config)
|
||||
.then((response) => {
|
||||
console.log(JSON.stringify(response.data));
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
```
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "https://api.netbird.io/api/accounts/{accountId}"
|
||||
|
||||
headers: {
|
||||
'Authorization': 'Token <TOKEN>'
|
||||
}
|
||||
|
||||
response = requests.request("DELETE", url, headers=headers)
|
||||
|
||||
print(response.text)
|
||||
```
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
url := "https://api.netbird.io/api/accounts/{accountId}"
|
||||
method := "DELETE"
|
||||
|
||||
client := &http.Client {
|
||||
}
|
||||
req, err := http.NewRequest(method, url, nil)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
{
|
||||
|
||||
req.Header.Add("Authorization", "Token <TOKEN>")
|
||||
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(body))
|
||||
}
|
||||
```
|
||||
|
||||
```ruby
|
||||
require "uri"
|
||||
require "json"
|
||||
require "net/http"
|
||||
|
||||
url = URI("https://api.netbird.io/api/accounts/{accountId}")
|
||||
|
||||
https = Net::HTTP.new(url.host, url.port)
|
||||
https.use_ssl = true
|
||||
|
||||
request = Net::HTTP::Delete.new(url)
|
||||
request["Authorization"] = "Token <TOKEN>"
|
||||
|
||||
response = https.request(request)
|
||||
puts response.read_body
|
||||
```
|
||||
|
||||
```java
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
.build();
|
||||
|
||||
Request request = new Request.Builder()
|
||||
.url("https://api.netbird.io/api/accounts/{accountId}")
|
||||
.method("DELETE")
|
||||
.addHeader("Authorization: Token <TOKEN>")
|
||||
.build();
|
||||
Response response = client.newCall(request).execute();
|
||||
```
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => 'https://api.netbird.io/api/accounts/{accountId}',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'DELETE',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Authorization: Token <TOKEN>'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
|
||||
@@ -239,14 +239,14 @@ echo $response;
|
||||
|
||||
maxLen={40}
|
||||
>
|
||||
Nameserver group name
|
||||
Name of nameserver group name
|
||||
</Property>
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group description
|
||||
Description of the nameserver group
|
||||
</Property>
|
||||
|
||||
<Property name="nameservers" type="Nameserver[]" required={true}
|
||||
@@ -257,7 +257,7 @@ echo $response;
|
||||
|
||||
maxLen={2}
|
||||
>
|
||||
Nameserver group
|
||||
Nameserver list
|
||||
</Property>
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
@@ -271,28 +271,28 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
Nameserver group tag groups
|
||||
Distribution group IDs that defines group of peers that will use this nameserver group
|
||||
</Property>
|
||||
|
||||
<Property name="primary" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group primary status
|
||||
Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||
</Property>
|
||||
|
||||
<Property name="domains" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group match domain list
|
||||
Match domain list. It should be empty only if primary is true.
|
||||
</Property>
|
||||
|
||||
<Property name="search_domains_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
|
||||
Search domain status for match domains. It should be true only if domains list is not empty.
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
@@ -901,14 +901,14 @@ echo $response;
|
||||
|
||||
maxLen={40}
|
||||
>
|
||||
Nameserver group name
|
||||
Name of nameserver group name
|
||||
</Property>
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group description
|
||||
Description of the nameserver group
|
||||
</Property>
|
||||
|
||||
<Property name="nameservers" type="Nameserver[]" required={true}
|
||||
@@ -919,7 +919,7 @@ echo $response;
|
||||
|
||||
maxLen={2}
|
||||
>
|
||||
Nameserver group
|
||||
Nameserver list
|
||||
</Property>
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
@@ -933,28 +933,28 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
Nameserver group tag groups
|
||||
Distribution group IDs that defines group of peers that will use this nameserver group
|
||||
</Property>
|
||||
|
||||
<Property name="primary" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group primary status
|
||||
Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||
</Property>
|
||||
|
||||
<Property name="domains" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group match domain list
|
||||
Match domain list. It should be empty only if primary is true.
|
||||
</Property>
|
||||
|
||||
<Property name="search_domains_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
|
||||
Search domain status for match domains. It should be true only if domains list is not empty.
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
|
||||
@@ -186,6 +186,7 @@ echo $response;
|
||||
"login_expiration_enabled": false,
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"accessible_peers_count": 5
|
||||
}
|
||||
]
|
||||
@@ -216,6 +217,7 @@ echo $response;
|
||||
"login_expiration_enabled": "boolean",
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"accessible_peers_count": "integer"
|
||||
}
|
||||
]
|
||||
@@ -423,6 +425,7 @@ echo $response;
|
||||
"login_expiration_enabled": false,
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
@@ -459,6 +462,7 @@ echo $response;
|
||||
"login_expiration_enabled": "boolean",
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -518,6 +522,13 @@ echo $response;
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
|
||||
<Property name="approval_required" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
(Cloud only) Indicates whether peer needs approval
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
@@ -532,7 +543,8 @@ curl -X PUT https://api.netbird.io/api/peers/{peerId} \
|
||||
--data-raw '{
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
}'
|
||||
```
|
||||
|
||||
@@ -541,7 +553,8 @@ const axios = require('axios');
|
||||
let data = JSON.stringify({
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
});
|
||||
let config = {
|
||||
method: 'put',
|
||||
@@ -572,7 +585,8 @@ url = "https://api.netbird.io/api/peers/{peerId}"
|
||||
payload = json.dumps({
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
})
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -603,7 +617,8 @@ func main() {
|
||||
payload := strings.NewReader(`{
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
}`)
|
||||
client := &http.Client {
|
||||
}
|
||||
@@ -652,7 +667,8 @@ request["Authorization"] = "Token <TOKEN>"
|
||||
request.body = JSON.dump({
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
})
|
||||
response = https.request(request)
|
||||
puts response.read_body
|
||||
@@ -665,7 +681,8 @@ MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, '{
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
}');
|
||||
Request request = new Request.Builder()
|
||||
.url("https://api.netbird.io/api/peers/{peerId}")
|
||||
@@ -694,7 +711,8 @@ curl_setopt_array($curl, array(
|
||||
CURLOPT_POSTFIELDS => '{
|
||||
"name": "stage-host-1",
|
||||
"ssh_enabled": true,
|
||||
"login_expiration_enabled": false
|
||||
"login_expiration_enabled": false,
|
||||
"approval_required": true
|
||||
}',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Content-Type: application/json',
|
||||
@@ -739,6 +757,7 @@ echo $response;
|
||||
"login_expiration_enabled": false,
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
@@ -775,6 +794,7 @@ echo $response;
|
||||
"login_expiration_enabled": "boolean",
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "string",
|
||||
|
||||
@@ -291,7 +291,7 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
Route group tag groups
|
||||
Group IDs containing routing peers
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
@@ -909,7 +909,7 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
Route group tag groups
|
||||
Group IDs containing routing peers
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
|
||||
@@ -267,14 +267,14 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
List of source groups
|
||||
List of source group IDs
|
||||
</Property>
|
||||
|
||||
<Property name="destinations" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of destination groups
|
||||
List of destination group IDs
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
@@ -855,14 +855,14 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
List of source groups
|
||||
List of source group IDs
|
||||
</Property>
|
||||
|
||||
<Property name="destinations" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of destination groups
|
||||
List of destination group IDs
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
|
||||
@@ -174,7 +174,7 @@ echo $response;
|
||||
"last_used": "2023-05-05T09:00:35.477782Z",
|
||||
"state": "valid",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"updated_at": "2023-05-05T09:00:35.477782Z",
|
||||
"usage_limit": 0,
|
||||
@@ -293,7 +293,7 @@ curl -X POST https://api.netbird.io/api/setup-keys \
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -308,7 +308,7 @@ let data = JSON.stringify({
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -345,7 +345,7 @@ payload = json.dumps({
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -382,7 +382,7 @@ func main() {
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -437,7 +437,7 @@ request.body = JSON.dump({
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -456,7 +456,7 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -491,7 +491,7 @@ curl_setopt_array($curl, array(
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -527,7 +527,7 @@ echo $response;
|
||||
"last_used": "2023-05-05T09:00:35.477782Z",
|
||||
"state": "valid",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"updated_at": "2023-05-05T09:00:35.477782Z",
|
||||
"usage_limit": 0,
|
||||
@@ -745,7 +745,7 @@ echo $response;
|
||||
"last_used": "2023-05-05T09:00:35.477782Z",
|
||||
"state": "valid",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"updated_at": "2023-05-05T09:00:35.477782Z",
|
||||
"usage_limit": 0,
|
||||
@@ -869,7 +869,7 @@ curl -X PUT https://api.netbird.io/api/setup-keys/{keyId} \
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -884,7 +884,7 @@ let data = JSON.stringify({
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -921,7 +921,7 @@ payload = json.dumps({
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -958,7 +958,7 @@ func main() {
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -1013,7 +1013,7 @@ request.body = JSON.dump({
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -1032,7 +1032,7 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -1067,7 +1067,7 @@ curl_setopt_array($curl, array(
|
||||
"expires_in": 86400,
|
||||
"revoked": false,
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"usage_limit": 0,
|
||||
"ephemeral": true
|
||||
@@ -1103,7 +1103,7 @@ echo $response;
|
||||
"last_used": "2023-05-05T09:00:35.477782Z",
|
||||
"state": "valid",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"updated_at": "2023-05-05T09:00:35.477782Z",
|
||||
"usage_limit": 0,
|
||||
|
||||
@@ -178,7 +178,7 @@ echo $response;
|
||||
"status": "active",
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_current": true,
|
||||
"is_service_user": false,
|
||||
@@ -252,7 +252,7 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
Groups to auto-assign to peers registered by this user
|
||||
Group IDs to auto-assign to peers registered by this user
|
||||
</Property>
|
||||
|
||||
<Property name="is_service_user" type="boolean" required={true}
|
||||
@@ -276,7 +276,7 @@ curl -X POST https://api.netbird.io/api/users \
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
}'
|
||||
@@ -289,7 +289,7 @@ let data = JSON.stringify({
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
});
|
||||
@@ -324,7 +324,7 @@ payload = json.dumps({
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
})
|
||||
@@ -359,7 +359,7 @@ func main() {
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
}`)
|
||||
@@ -412,7 +412,7 @@ request.body = JSON.dump({
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
})
|
||||
@@ -429,7 +429,7 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
}');
|
||||
@@ -462,7 +462,7 @@ curl_setopt_array($curl, array(
|
||||
"name": "Tom Schulz",
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_service_user": false
|
||||
}',
|
||||
@@ -493,7 +493,7 @@ echo $response;
|
||||
"status": "active",
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_current": true,
|
||||
"is_service_user": false,
|
||||
@@ -558,7 +558,7 @@ echo $response;
|
||||
|
||||
|
||||
>
|
||||
Groups to auto-assign to peers registered by this user
|
||||
Group IDs to auto-assign to peers registered by this user
|
||||
</Property>
|
||||
|
||||
<Property name="is_blocked" type="boolean" required={true}
|
||||
@@ -580,7 +580,7 @@ curl -X PUT https://api.netbird.io/api/users/{userId} \
|
||||
--data-raw '{
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
}'
|
||||
@@ -591,7 +591,7 @@ const axios = require('axios');
|
||||
let data = JSON.stringify({
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
});
|
||||
@@ -624,7 +624,7 @@ url = "https://api.netbird.io/api/users/{userId}"
|
||||
payload = json.dumps({
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
})
|
||||
@@ -657,7 +657,7 @@ func main() {
|
||||
payload := strings.NewReader(`{
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
}`)
|
||||
@@ -708,7 +708,7 @@ request["Authorization"] = "Token <TOKEN>"
|
||||
request.body = JSON.dump({
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
})
|
||||
@@ -723,7 +723,7 @@ MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, '{
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
}');
|
||||
@@ -754,7 +754,7 @@ curl_setopt_array($curl, array(
|
||||
CURLOPT_POSTFIELDS => '{
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_blocked": false
|
||||
}',
|
||||
@@ -785,7 +785,7 @@ echo $response;
|
||||
"status": "active",
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
],
|
||||
"is_current": true,
|
||||
"is_service_user": false,
|
||||
|
||||
Reference in New Issue
Block a user