mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-17 16:06:36 +00:00
Change API parser to handle nested objects (#159)
* rewrite parser to handle new format and nested objects * add properties section also to nested properties * update docs manually
This commit is contained in:
@@ -29,6 +29,8 @@ export const apiNavigation = [
|
||||
{ title: 'Groups', href: '/api/resources/groups' },
|
||||
{ title: 'Rules', href: '/api/resources/rules' },
|
||||
{ title: 'Policies', href: '/api/resources/policies' },
|
||||
{ title: 'Posture-Checks', href: '/api/resources/posture-checks' },
|
||||
{ title: 'Geo-Locations', href: '/api/resources/geo-locations' },
|
||||
{ title: 'Routes', href: '/api/resources/routes' },
|
||||
{ title: 'DNS', href: '/api/resources/dns' },
|
||||
{ title: 'Events', href: '/api/resources/events' },
|
||||
|
||||
@@ -98,12 +98,12 @@ export function Property({ name, type, required, min, max, minLen, maxLen, enumL
|
||||
{type}
|
||||
</dd>
|
||||
<dt className="sr-only">Required</dt>
|
||||
<dd className="font-mono text-xs text-red-600 dark:text-red-600">
|
||||
{required && 'required'}
|
||||
</dd>
|
||||
<dd className="font-mono text-xs text-zinc-400 dark:text-zinc-500">
|
||||
{!required && 'optional'}
|
||||
</dd>
|
||||
{required && <dd className="font-mono text-xs text-red-600 dark:text-red-600">
|
||||
required
|
||||
</dd>}
|
||||
{!required && <dd className="font-mono text-xs text-zinc-400 dark:text-zinc-500">
|
||||
optional
|
||||
</dd>}
|
||||
<dt className="sr-only">Enum</dt>
|
||||
<dd className="w-full flex-none [&>:first-child]:mt-0 [&>:last-child]:mb-0">
|
||||
{/*{enumList && "Possible values: [" + enumList.split(',').forEach((type) => (<tag>{type}</tag>)) + "]"}*/}
|
||||
|
||||
@@ -6,6 +6,7 @@ import * as mdxComponents from '@/components/mdx'
|
||||
import { useMobileNavigationStore } from '@/components/MobileNavigation'
|
||||
|
||||
import '@/styles/tailwind.css'
|
||||
import '@/styles/global.css';
|
||||
import 'focus-visible'
|
||||
import {Layout} from "@/components/Layout";
|
||||
import {slugifyWithCounter} from "@sindresorhus/slugify";
|
||||
|
||||
@@ -157,9 +157,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -200,13 +199,174 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
---
|
||||
@@ -227,57 +387,69 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="settings" type="object" required={true}>
|
||||
|
||||
<Property name="peer_login_expiration_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
|
||||
</Property>
|
||||
<details class="custom-details" open>
|
||||
<summary>More Information</summary>
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="peer_login_expiration_enabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="peer_login_expiration" type="integer" required={true}
|
||||
|
||||
|
||||
>
|
||||
Period of time after which peer login expires (seconds).
|
||||
</Property>
|
||||
Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
|
||||
|
||||
<Property name="groups_propagation_enabled" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
Allows propagate the new user auto groups to peers that belongs to the user
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="peer_login_expiration" type="integer" required={true}>
|
||||
|
||||
<Property name="jwt_groups_enabled" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
Allows extract groups from JWT claim and add it to account groups.
|
||||
</Property>
|
||||
Period of time after which peer login expires (seconds).
|
||||
|
||||
<Property name="jwt_groups_claim_name" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
Name of the claim from which we extract groups names to add it to account groups.
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="groups_propagation_enabled" type="boolean" required={false}>
|
||||
|
||||
<Property name="jwt_allow_groups" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of groups to which users are allowed access
|
||||
</Property>
|
||||
Allows propagate the new user auto groups to peers that belongs to the user
|
||||
|
||||
<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>
|
||||
</Property>
|
||||
<Property name="jwt_groups_enabled" type="boolean" required={false}>
|
||||
|
||||
Allows extract groups from JWT claim and add it to account groups.
|
||||
|
||||
</Property>
|
||||
<Property name="jwt_groups_claim_name" type="string" required={false}>
|
||||
|
||||
Name of the claim from which we extract groups names to add it to account groups.
|
||||
|
||||
</Property>
|
||||
<Property name="jwt_allow_groups" type="string[]" required={false}>
|
||||
|
||||
List of groups to which users are allowed access
|
||||
|
||||
</Property>
|
||||
<Property name="extra" type="object" required={false}>
|
||||
|
||||
<details class="custom-details" open>
|
||||
<summary>More Information</summary>
|
||||
<Properties>
|
||||
|
||||
<Properties><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>
|
||||
|
||||
</Properties>
|
||||
</details>
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
</Properties>
|
||||
</details>
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -539,9 +711,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7l0",
|
||||
@@ -578,6 +749,7 @@ echo $response;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
@@ -746,11 +918,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -157,9 +157,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -210,13 +209,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -229,72 +225,72 @@ echo $response;
|
||||
Creates a Nameserver Group
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true} minLen={1} maxLen={40}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
|
||||
minLen={1}
|
||||
|
||||
maxLen={40}
|
||||
>
|
||||
Name of nameserver group name
|
||||
</Property>
|
||||
Name of nameserver group name
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Description of the nameserver group
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="nameservers" type="Nameserver[]" required={true}
|
||||
|
||||
|
||||
|
||||
minLen={1}
|
||||
|
||||
maxLen={2}
|
||||
>
|
||||
Nameserver list
|
||||
</Property>
|
||||
Description of the nameserver group
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group status
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="nameservers" type="object[]" required={true} minLen={1} maxLen={3}>
|
||||
|
||||
<Property name="groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Distribution group IDs that defines group of peers that will use this nameserver group
|
||||
</Property>
|
||||
<details class="custom-details" open>
|
||||
<summary>Nameserver list</summary>
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="ip" type="string" required={true}>
|
||||
|
||||
<Property name="primary" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||
</Property>
|
||||
Nameserver IP
|
||||
|
||||
<Property name="domains" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Match domain list. It should be empty only if primary is true.
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="ns_type" type="string" required={true} enumList={["udp"]}>
|
||||
|
||||
<Property name="search_domains_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Search domain status for match domains. It should be true only if domains list is not empty.
|
||||
</Property>
|
||||
</Properties>
|
||||
Nameserver Type
|
||||
|
||||
</Property>
|
||||
<Property name="port" type="integer" required={true}>
|
||||
|
||||
Nameserver Port
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
</Properties>
|
||||
</details>
|
||||
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
Nameserver group status
|
||||
|
||||
</Property>
|
||||
<Property name="groups" type="string[]" required={true}>
|
||||
|
||||
Distribution group IDs that defines group of peers that will use this nameserver group
|
||||
|
||||
</Property>
|
||||
<Property name="primary" type="boolean" required={true}>
|
||||
|
||||
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}>
|
||||
|
||||
Match domain list. It should be empty only if primary is true.
|
||||
|
||||
</Property>
|
||||
<Property name="search_domains_enabled" type="boolean" required={true}>
|
||||
|
||||
Search domain status for match domains. It should be true only if domains list is not empty.
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -591,9 +587,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7m0",
|
||||
@@ -640,13 +635,10 @@ echo $response;
|
||||
"search_domains_enabled": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -815,9 +807,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7m0",
|
||||
@@ -864,13 +855,10 @@ echo $response;
|
||||
"search_domains_enabled": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -891,72 +879,72 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true} minLen={1} maxLen={40}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
|
||||
minLen={1}
|
||||
|
||||
maxLen={40}
|
||||
>
|
||||
Name of nameserver group name
|
||||
</Property>
|
||||
Name of nameserver group name
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Description of the nameserver group
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="nameservers" type="Nameserver[]" required={true}
|
||||
|
||||
|
||||
|
||||
minLen={1}
|
||||
|
||||
maxLen={2}
|
||||
>
|
||||
Nameserver list
|
||||
</Property>
|
||||
Description of the nameserver group
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Nameserver group status
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="nameservers" type="object[]" required={true} minLen={1} maxLen={3}>
|
||||
|
||||
<Property name="groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Distribution group IDs that defines group of peers that will use this nameserver group
|
||||
</Property>
|
||||
<details class="custom-details" open>
|
||||
<summary>Nameserver list</summary>
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="ip" type="string" required={true}>
|
||||
|
||||
<Property name="primary" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Defines if a nameserver group is primary that resolves all domains. It should be true only if domains list is empty.
|
||||
</Property>
|
||||
Nameserver IP
|
||||
|
||||
<Property name="domains" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Match domain list. It should be empty only if primary is true.
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="ns_type" type="string" required={true} enumList={["udp"]}>
|
||||
|
||||
<Property name="search_domains_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Search domain status for match domains. It should be true only if domains list is not empty.
|
||||
</Property>
|
||||
</Properties>
|
||||
Nameserver Type
|
||||
|
||||
</Property>
|
||||
<Property name="port" type="integer" required={true}>
|
||||
|
||||
Nameserver Port
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
</Properties>
|
||||
</details>
|
||||
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
Nameserver group status
|
||||
|
||||
</Property>
|
||||
<Property name="groups" type="string[]" required={true}>
|
||||
|
||||
Distribution group IDs that defines group of peers that will use this nameserver group
|
||||
|
||||
</Property>
|
||||
<Property name="primary" type="boolean" required={true}>
|
||||
|
||||
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}>
|
||||
|
||||
Match domain list. It should be empty only if primary is true.
|
||||
|
||||
</Property>
|
||||
<Property name="search_domains_enabled" type="boolean" required={true}>
|
||||
|
||||
Search domain status for match domains. It should be true only if domains list is not empty.
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -1253,9 +1241,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7m0",
|
||||
@@ -1302,13 +1289,10 @@ echo $response;
|
||||
"search_domains_enabled": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1470,11 +1454,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1635,34 +1617,30 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
{
|
||||
"items": {
|
||||
"disabled_management_groups": [
|
||||
"ch8i4ug6lnn4g9hqv7m0"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
```json {{ title: 'Schema' }}
|
||||
[
|
||||
{
|
||||
{
|
||||
"items": {
|
||||
"disabled_management_groups": [
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1675,15 +1653,15 @@ echo $response;
|
||||
Updates a DNS settings object
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="disabled_management_groups" type="string[]" required={true}>
|
||||
|
||||
<Property name="disabled_management_groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Groups whose DNS management is disabled
|
||||
</Property>
|
||||
</Properties>
|
||||
Groups whose DNS management is disabled
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -1875,9 +1853,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"disabled_management_groups": [
|
||||
@@ -1892,13 +1869,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -157,13 +157,12 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
"id": "10",
|
||||
"id": 10,
|
||||
"timestamp": "2023-05-05T10:04:37.473542Z",
|
||||
"activity": "Route created",
|
||||
"activity_code": "route.add",
|
||||
@@ -190,17 +189,23 @@ echo $response;
|
||||
"initiator_name": "string",
|
||||
"initiator_email": "string",
|
||||
"target_id": "string",
|
||||
"meta": "object"
|
||||
"meta": {
|
||||
"description": "The metadata of the event",
|
||||
"type": "object",
|
||||
"additionalProperties": "string",
|
||||
"example": {
|
||||
"name": "my route",
|
||||
"network_range": "10.64.0.0/24",
|
||||
"peer_id": "chacbco6lnnbn6cg5s91"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
364
src/pages/ipa/resources/geo-locations.mdx
Normal file
364
src/pages/ipa/resources/geo-locations.mdx
Normal file
@@ -0,0 +1,364 @@
|
||||
export const title = 'Geo Locations'
|
||||
|
||||
|
||||
|
||||
## List all country codes {{ tag: 'GET' , label: '/api/locations/countries' }}
|
||||
|
||||
<Row>
|
||||
<Col>
|
||||
Get list of all country in 2-letter ISO 3166-1 alpha-2 codes
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
<CodeGroup title="Request" tag="GET" label="/api/locations/countries">
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X GET https://api.netbird.io/api/locations/countries \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: Token <TOKEN>'
|
||||
```
|
||||
|
||||
```js
|
||||
const axios = require('axios');
|
||||
|
||||
let config = {
|
||||
method: 'get',
|
||||
maxBodyLength: Infinity,
|
||||
url: '/api/locations/countries',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'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/locations/countries"
|
||||
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': 'Token <TOKEN>'
|
||||
}
|
||||
|
||||
response = requests.request("GET", url, headers=headers)
|
||||
|
||||
print(response.text)
|
||||
```
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
url := "https://api.netbird.io/api/locations/countries"
|
||||
method := "GET"
|
||||
|
||||
client := &http.Client {
|
||||
}
|
||||
req, err := http.NewRequest(method, url, nil)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
{
|
||||
|
||||
req.Header.Add("Accept", "application/json")
|
||||
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/locations/countries")
|
||||
|
||||
https = Net::HTTP.new(url.host, url.port)
|
||||
https.use_ssl = true
|
||||
|
||||
request = Net::HTTP::Get.new(url)
|
||||
request["Accept"] = "application/json"
|
||||
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/locations/countries")
|
||||
.method("GET")
|
||||
.addHeader("Accept", "application/json")
|
||||
.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/locations/countries',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Accept: application/json',
|
||||
'Authorization: Token <TOKEN>'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
"DE"
|
||||
]
|
||||
```
|
||||
```json {{ title: 'Schema' }}
|
||||
[
|
||||
"string"
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
|
||||
## List all city names by country {{ tag: 'GET' , label: '/api/locations/countries/{country}/cities' }}
|
||||
|
||||
<Row>
|
||||
<Col>
|
||||
Get a list of all English city names for a given country code
|
||||
|
||||
#### Path Parameters
|
||||
<Properties>
|
||||
|
||||
<Property name="country" type="string" required={true}>
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
<CodeGroup title="Request" tag="GET" label="/api/locations/countries/{country}/cities">
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X GET https://api.netbird.io/api/locations/countries/{country}/cities \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: Token <TOKEN>'
|
||||
```
|
||||
|
||||
```js
|
||||
const axios = require('axios');
|
||||
|
||||
let config = {
|
||||
method: 'get',
|
||||
maxBodyLength: Infinity,
|
||||
url: '/api/locations/countries/{country}/cities',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'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/locations/countries/{country}/cities"
|
||||
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': 'Token <TOKEN>'
|
||||
}
|
||||
|
||||
response = requests.request("GET", url, headers=headers)
|
||||
|
||||
print(response.text)
|
||||
```
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
url := "https://api.netbird.io/api/locations/countries/{country}/cities"
|
||||
method := "GET"
|
||||
|
||||
client := &http.Client {
|
||||
}
|
||||
req, err := http.NewRequest(method, url, nil)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
{
|
||||
|
||||
req.Header.Add("Accept", "application/json")
|
||||
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/locations/countries/{country}/cities")
|
||||
|
||||
https = Net::HTTP.new(url.host, url.port)
|
||||
https.use_ssl = true
|
||||
|
||||
request = Net::HTTP::Get.new(url)
|
||||
request["Accept"] = "application/json"
|
||||
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/locations/countries/{country}/cities")
|
||||
.method("GET")
|
||||
.addHeader("Accept", "application/json")
|
||||
.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/locations/countries/{country}/cities',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Accept: application/json',
|
||||
'Authorization: Token <TOKEN>'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"geoname_id": 2950158,
|
||||
"city_name": "Berlin"
|
||||
}
|
||||
```
|
||||
```json {{ title: 'Schema' }}
|
||||
{
|
||||
"geoname_id": "integer",
|
||||
"city_name": "string"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -157,9 +157,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -192,13 +191,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -211,22 +207,20 @@ echo $response;
|
||||
Creates a group
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Group name identifier
|
||||
</Property>
|
||||
Group name identifier
|
||||
|
||||
<Property name="peers" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of peers ids
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="peers" type="string[]" required={false}>
|
||||
|
||||
List of peers ids
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -425,9 +419,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7m0",
|
||||
@@ -456,13 +449,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -631,9 +621,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7m0",
|
||||
@@ -662,13 +651,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -689,22 +675,20 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Group name identifier
|
||||
</Property>
|
||||
Group name identifier
|
||||
|
||||
<Property name="peers" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of peers ids
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="peers" type="string[]" required={false}>
|
||||
|
||||
List of peers ids
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -903,9 +887,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7m0",
|
||||
@@ -934,13 +917,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1102,11 +1082,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -157,18 +157,20 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
"name": "stage-host-1",
|
||||
"ip": "10.64.0.1",
|
||||
"connection_ip": "35.64.0.1",
|
||||
"connected": true,
|
||||
"last_seen": "2023-05-05T10:05:26.420578Z",
|
||||
"os": "Darwin 13.2.1",
|
||||
"kernel_version": "23.2.0",
|
||||
"geoname_id": 2643743,
|
||||
"version": "0.14.0",
|
||||
"groups": [
|
||||
{
|
||||
@@ -187,6 +189,8 @@ echo $response;
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"country_code": "DE",
|
||||
"city_name": "Berlin",
|
||||
"accessible_peers_count": 5
|
||||
}
|
||||
]
|
||||
@@ -197,9 +201,12 @@ echo $response;
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"ip": "string",
|
||||
"connection_ip": "string",
|
||||
"connected": "boolean",
|
||||
"last_seen": "string",
|
||||
"os": "string",
|
||||
"kernel_version": "string",
|
||||
"geoname_id": "integer",
|
||||
"version": "string",
|
||||
"groups": [
|
||||
{
|
||||
@@ -218,17 +225,16 @@ echo $response;
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"country_code": "string",
|
||||
"city_name": "string",
|
||||
"accessible_peers_count": "integer"
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -397,17 +403,19 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
"name": "stage-host-1",
|
||||
"ip": "10.64.0.1",
|
||||
"connection_ip": "35.64.0.1",
|
||||
"connected": true,
|
||||
"last_seen": "2023-05-05T10:05:26.420578Z",
|
||||
"os": "Darwin 13.2.1",
|
||||
"kernel_version": "23.2.0",
|
||||
"geoname_id": 2643743,
|
||||
"version": "0.14.0",
|
||||
"groups": [
|
||||
{
|
||||
@@ -426,6 +434,8 @@ echo $response;
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"country_code": "DE",
|
||||
"city_name": "Berlin",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
@@ -442,9 +452,12 @@ echo $response;
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"ip": "string",
|
||||
"connection_ip": "string",
|
||||
"connected": "boolean",
|
||||
"last_seen": "string",
|
||||
"os": "string",
|
||||
"kernel_version": "string",
|
||||
"geoname_id": "integer",
|
||||
"version": "string",
|
||||
"groups": [
|
||||
{
|
||||
@@ -463,6 +476,8 @@ echo $response;
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"country_code": "string",
|
||||
"city_name": "string",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -474,13 +489,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -501,36 +513,30 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
|
||||
|
||||
<Property name="ssh_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="ssh_enabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="login_expiration_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
|
||||
|
||||
<Property name="approval_required" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
(Cloud only) Indicates whether peer needs approval
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="login_expiration_enabled" type="boolean" required={true}>
|
||||
|
||||
|
||||
|
||||
</Property>
|
||||
<Property name="approval_required" type="boolean" required={false}>
|
||||
|
||||
(Cloud only) Indicates whether peer needs approval
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -729,17 +735,19 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
"name": "stage-host-1",
|
||||
"ip": "10.64.0.1",
|
||||
"connection_ip": "35.64.0.1",
|
||||
"connected": true,
|
||||
"last_seen": "2023-05-05T10:05:26.420578Z",
|
||||
"os": "Darwin 13.2.1",
|
||||
"kernel_version": "23.2.0",
|
||||
"geoname_id": 2643743,
|
||||
"version": "0.14.0",
|
||||
"groups": [
|
||||
{
|
||||
@@ -758,6 +766,8 @@ echo $response;
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"country_code": "DE",
|
||||
"city_name": "Berlin",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
@@ -774,9 +784,12 @@ echo $response;
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"ip": "string",
|
||||
"connection_ip": "string",
|
||||
"connected": "boolean",
|
||||
"last_seen": "string",
|
||||
"os": "string",
|
||||
"kernel_version": "string",
|
||||
"geoname_id": "integer",
|
||||
"version": "string",
|
||||
"groups": [
|
||||
{
|
||||
@@ -795,6 +808,8 @@ echo $response;
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"country_code": "string",
|
||||
"city_name": "string",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -806,13 +821,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -974,11 +986,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -157,9 +157,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -167,6 +166,10 @@ echo $response;
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -207,6 +210,9 @@ echo $response;
|
||||
"name": "string",
|
||||
"description": "string",
|
||||
"enabled": "boolean",
|
||||
"source_posture_checks": [
|
||||
"string"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -240,13 +246,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -259,43 +262,97 @@ echo $response;
|
||||
Creates a policy
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="id" type="string" required={false}>
|
||||
|
||||
<Property name="id" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
Policy ID
|
||||
</Property>
|
||||
Policy ID
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy name identifier
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy friendly description
|
||||
</Property>
|
||||
Policy name identifier
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy status
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="rules" type="PolicyRuleUpdate[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy rule object for policy UI editor
|
||||
</Property>
|
||||
</Properties>
|
||||
Policy friendly description
|
||||
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
Policy status
|
||||
|
||||
</Property>
|
||||
<Property name="source_posture_checks" type="string[]" required={false}>
|
||||
|
||||
Posture checks ID's applied to policy source groups
|
||||
|
||||
</Property>
|
||||
<Property name="rules" type="object[]" required={true}>
|
||||
|
||||
<details class="custom-details" open>
|
||||
<summary>Policy rule object for policy UI editor</summary>
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="id" type="string" required={false}>
|
||||
|
||||
Policy rule ID
|
||||
|
||||
</Property>
|
||||
<Property name="name" type="string" required={true}>
|
||||
|
||||
Policy rule name identifier
|
||||
|
||||
</Property>
|
||||
<Property name="description" type="string" required={false}>
|
||||
|
||||
Policy rule friendly description
|
||||
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
Policy rule status
|
||||
|
||||
</Property>
|
||||
<Property name="action" type="string" required={true} enumList={["accept","drop"]}>
|
||||
|
||||
Policy rule accept or drops packets
|
||||
|
||||
</Property>
|
||||
<Property name="bidirectional" type="boolean" required={true}>
|
||||
|
||||
Define if the rule is applicable in both directions, sources, and destinations.
|
||||
|
||||
</Property>
|
||||
<Property name="protocol" type="string" required={true} enumList={["all","tcp","udp","icmp"]}>
|
||||
|
||||
Policy rule type of the traffic
|
||||
|
||||
</Property>
|
||||
<Property name="ports" type="string[]" required={false}>
|
||||
|
||||
Policy rule affected ports or it ranges list
|
||||
|
||||
</Property>
|
||||
<Property name="sources" type="string[]" required={true}>
|
||||
|
||||
Policy rule source group IDs
|
||||
|
||||
</Property>
|
||||
<Property name="destinations" type="string[]" required={true}>
|
||||
|
||||
Policy rule destination group IDs
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
</Properties>
|
||||
</details>
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -310,6 +367,9 @@ curl -X POST https://api.netbird.io/api/policies \
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -340,6 +400,9 @@ let data = JSON.stringify({
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -392,6 +455,9 @@ payload = json.dumps({
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -444,6 +510,9 @@ func main() {
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -514,6 +583,9 @@ request.body = JSON.dump({
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -548,6 +620,9 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -598,6 +673,9 @@ curl_setopt_array($curl, array(
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -634,15 +712,17 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -681,6 +761,9 @@ echo $response;
|
||||
"name": "string",
|
||||
"description": "string",
|
||||
"enabled": "boolean",
|
||||
"source_posture_checks": [
|
||||
"string"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -713,9 +796,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -884,15 +968,17 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -931,6 +1017,9 @@ echo $response;
|
||||
"name": "string",
|
||||
"description": "string",
|
||||
"enabled": "boolean",
|
||||
"source_posture_checks": [
|
||||
"string"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -963,13 +1052,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -990,43 +1076,97 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="id" type="string" required={false}>
|
||||
|
||||
<Property name="id" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
Policy ID
|
||||
</Property>
|
||||
Policy ID
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy name identifier
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy friendly description
|
||||
</Property>
|
||||
Policy name identifier
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy status
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="rules" type="PolicyRuleUpdate[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Policy rule object for policy UI editor
|
||||
</Property>
|
||||
</Properties>
|
||||
Policy friendly description
|
||||
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
Policy status
|
||||
|
||||
</Property>
|
||||
<Property name="source_posture_checks" type="string[]" required={false}>
|
||||
|
||||
Posture checks ID's applied to policy source groups
|
||||
|
||||
</Property>
|
||||
<Property name="rules" type="object[]" required={true}>
|
||||
|
||||
<details class="custom-details" open>
|
||||
<summary>Policy rule object for policy UI editor</summary>
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="id" type="string" required={false}>
|
||||
|
||||
Policy rule ID
|
||||
|
||||
</Property>
|
||||
<Property name="name" type="string" required={true}>
|
||||
|
||||
Policy rule name identifier
|
||||
|
||||
</Property>
|
||||
<Property name="description" type="string" required={false}>
|
||||
|
||||
Policy rule friendly description
|
||||
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
Policy rule status
|
||||
|
||||
</Property>
|
||||
<Property name="action" type="string" required={true} enumList={["accept","drop"]}>
|
||||
|
||||
Policy rule accept or drops packets
|
||||
|
||||
</Property>
|
||||
<Property name="bidirectional" type="boolean" required={true}>
|
||||
|
||||
Define if the rule is applicable in both directions, sources, and destinations.
|
||||
|
||||
</Property>
|
||||
<Property name="protocol" type="string" required={true} enumList={["all","tcp","udp","icmp"]}>
|
||||
|
||||
Policy rule type of the traffic
|
||||
|
||||
</Property>
|
||||
<Property name="ports" type="string[]" required={false}>
|
||||
|
||||
Policy rule affected ports or it ranges list
|
||||
|
||||
</Property>
|
||||
<Property name="sources" type="string[]" required={true}>
|
||||
|
||||
Policy rule source group IDs
|
||||
|
||||
</Property>
|
||||
<Property name="destinations" type="string[]" required={true}>
|
||||
|
||||
Policy rule destination group IDs
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
</Properties>
|
||||
</details>
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -1041,6 +1181,9 @@ curl -X PUT https://api.netbird.io/api/policies/{policyId} \
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1071,6 +1214,9 @@ let data = JSON.stringify({
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1123,6 +1269,9 @@ payload = json.dumps({
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1175,6 +1324,9 @@ func main() {
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1245,6 +1397,9 @@ request.body = JSON.dump({
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1279,6 +1434,9 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1329,6 +1487,9 @@ curl_setopt_array($curl, array(
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1365,15 +1526,17 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"name": "ch8i4ug6lnn4g9hqv7mg",
|
||||
"description": "This is a default policy that allows connections between all the resources",
|
||||
"enabled": true,
|
||||
"source_posture_checks": [
|
||||
"chacdk86lnnboviihd70"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1412,6 +1575,9 @@ echo $response;
|
||||
"name": "string",
|
||||
"description": "string",
|
||||
"enabled": "boolean",
|
||||
"source_posture_checks": [
|
||||
"string"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -1444,13 +1610,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1612,11 +1775,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
2266
src/pages/ipa/resources/posture-checks.mdx
Normal file
2266
src/pages/ipa/resources/posture-checks.mdx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -157,9 +157,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -202,13 +201,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -221,79 +217,55 @@ echo $response;
|
||||
Creates a Route
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Route description
|
||||
</Property>
|
||||
Route description
|
||||
|
||||
<Property name="network_id" type="string" required={true}
|
||||
|
||||
|
||||
|
||||
minLen={1}
|
||||
|
||||
maxLen={40}
|
||||
>
|
||||
Route network identifier, to group HA routes
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="network_id" type="string" required={true} minLen={1} maxLen={40}>
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Route status
|
||||
</Property>
|
||||
Route network identifier, to group HA routes
|
||||
|
||||
<Property name="peer" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
Peer Identifier associated with route. This property can not be set together with `peer_groups`
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="peer_groups" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
Peers Group Identifier associated with route. This property can not be set together with `peer`
|
||||
</Property>
|
||||
Route status
|
||||
|
||||
<Property name="network" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Network range in CIDR format
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="peer" type="string" required={false}>
|
||||
|
||||
<Property name="metric" type="integer" required={true}
|
||||
|
||||
|
||||
min={1}
|
||||
|
||||
|
||||
max={9999}
|
||||
>
|
||||
Route metric number. Lowest number has higher priority
|
||||
</Property>
|
||||
Peer Identifier associated with route. This property can not be set together with `peer_groups`
|
||||
|
||||
<Property name="masquerade" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Indicate if peer should masquerade traffic to this route's prefix
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="peer_groups" type="string[]" required={false}>
|
||||
|
||||
<Property name="groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Group IDs containing routing peers
|
||||
</Property>
|
||||
</Properties>
|
||||
Peers Group Identifier associated with route. This property can not be set together with `peer`
|
||||
|
||||
</Property>
|
||||
<Property name="network" type="string" required={true}>
|
||||
|
||||
Network range in CIDR format
|
||||
|
||||
</Property>
|
||||
<Property name="metric" type="integer" required={true} min={1} max={9999}>
|
||||
|
||||
Route metric number. Lowest number has higher priority
|
||||
|
||||
</Property>
|
||||
<Property name="masquerade" type="boolean" required={true}>
|
||||
|
||||
Indicate if peer should masquerade traffic to this route's prefix
|
||||
|
||||
</Property>
|
||||
<Property name="groups" type="string[]" required={true}>
|
||||
|
||||
Group IDs containing routing peers
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -555,9 +527,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacdk86lnnboviihd7g",
|
||||
@@ -596,13 +567,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -771,9 +739,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacdk86lnnboviihd7g",
|
||||
@@ -812,13 +779,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -839,79 +803,55 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Route description
|
||||
</Property>
|
||||
Route description
|
||||
|
||||
<Property name="network_id" type="string" required={true}
|
||||
|
||||
|
||||
|
||||
minLen={1}
|
||||
|
||||
maxLen={40}
|
||||
>
|
||||
Route network identifier, to group HA routes
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="network_id" type="string" required={true} minLen={1} maxLen={40}>
|
||||
|
||||
<Property name="enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Route status
|
||||
</Property>
|
||||
Route network identifier, to group HA routes
|
||||
|
||||
<Property name="peer" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
Peer Identifier associated with route. This property can not be set together with `peer_groups`
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="peer_groups" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
Peers Group Identifier associated with route. This property can not be set together with `peer`
|
||||
</Property>
|
||||
Route status
|
||||
|
||||
<Property name="network" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Network range in CIDR format
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="peer" type="string" required={false}>
|
||||
|
||||
<Property name="metric" type="integer" required={true}
|
||||
|
||||
|
||||
min={1}
|
||||
|
||||
|
||||
max={9999}
|
||||
>
|
||||
Route metric number. Lowest number has higher priority
|
||||
</Property>
|
||||
Peer Identifier associated with route. This property can not be set together with `peer_groups`
|
||||
|
||||
<Property name="masquerade" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Indicate if peer should masquerade traffic to this route's prefix
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="peer_groups" type="string[]" required={false}>
|
||||
|
||||
<Property name="groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Group IDs containing routing peers
|
||||
</Property>
|
||||
</Properties>
|
||||
Peers Group Identifier associated with route. This property can not be set together with `peer`
|
||||
|
||||
</Property>
|
||||
<Property name="network" type="string" required={true}>
|
||||
|
||||
Network range in CIDR format
|
||||
|
||||
</Property>
|
||||
<Property name="metric" type="integer" required={true} min={1} max={9999}>
|
||||
|
||||
Route metric number. Lowest number has higher priority
|
||||
|
||||
</Property>
|
||||
<Property name="masquerade" type="boolean" required={true}>
|
||||
|
||||
Indicate if peer should masquerade traffic to this route's prefix
|
||||
|
||||
</Property>
|
||||
<Property name="groups" type="string[]" required={true}>
|
||||
|
||||
Group IDs containing routing peers
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -1173,9 +1113,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacdk86lnnboviihd7g",
|
||||
@@ -1214,13 +1153,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1382,11 +1318,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -157,9 +157,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -214,13 +213,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -233,50 +229,40 @@ echo $response;
|
||||
Creates a rule. This will be deprecated in favour of `/api/policies`.
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rule name identifier
|
||||
</Property>
|
||||
Rule name identifier
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rule friendly description
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="disabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rules status
|
||||
</Property>
|
||||
Rule friendly description
|
||||
|
||||
<Property name="flow" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rule flow, currently, only "bidirect" for bi-directional traffic is accepted
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="disabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="sources" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of source group IDs
|
||||
</Property>
|
||||
Rules status
|
||||
|
||||
<Property name="destinations" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of destination group IDs
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="flow" type="string" required={true}>
|
||||
|
||||
Rule flow, currently, only "bidirect" for bi-directional traffic is accepted
|
||||
|
||||
</Property>
|
||||
<Property name="sources" type="string[]" required={false}>
|
||||
|
||||
List of source group IDs
|
||||
|
||||
</Property>
|
||||
<Property name="destinations" type="string[]" required={false}>
|
||||
|
||||
List of destination group IDs
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -517,9 +503,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -570,9 +555,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -741,9 +727,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -794,13 +779,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -821,50 +803,40 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rule name identifier
|
||||
</Property>
|
||||
Rule name identifier
|
||||
|
||||
<Property name="description" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rule friendly description
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="description" type="string" required={true}>
|
||||
|
||||
<Property name="disabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rules status
|
||||
</Property>
|
||||
Rule friendly description
|
||||
|
||||
<Property name="flow" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Rule flow, currently, only "bidirect" for bi-directional traffic is accepted
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="disabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="sources" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of source group IDs
|
||||
</Property>
|
||||
Rules status
|
||||
|
||||
<Property name="destinations" type="string[]" required={false}
|
||||
|
||||
|
||||
>
|
||||
List of destination group IDs
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="flow" type="string" required={true}>
|
||||
|
||||
Rule flow, currently, only "bidirect" for bi-directional traffic is accepted
|
||||
|
||||
</Property>
|
||||
<Property name="sources" type="string[]" required={false}>
|
||||
|
||||
List of source group IDs
|
||||
|
||||
</Property>
|
||||
<Property name="destinations" type="string[]" required={false}>
|
||||
|
||||
List of destination group IDs
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -1105,9 +1077,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i4ug6lnn4g9hqv7mg",
|
||||
@@ -1158,13 +1129,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1326,11 +1294,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -157,13 +157,12 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
"id": "2531583362",
|
||||
"id": 2531583362,
|
||||
"key": "A616097E-FCF0-48FA-9354-CA4A61142761",
|
||||
"name": "Default key",
|
||||
"expires": "2023-06-01T14:47:22.291057Z",
|
||||
@@ -204,13 +203,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -223,61 +219,45 @@ echo $response;
|
||||
Creates a setup key
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Setup Key name
|
||||
</Property>
|
||||
Setup Key name
|
||||
|
||||
<Property name="type" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Setup key type, one-off for single time usage and reusable
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="type" type="string" required={true}>
|
||||
|
||||
<Property name="expires_in" type="integer" required={true}
|
||||
|
||||
|
||||
min={86400}
|
||||
|
||||
|
||||
max={31536000}
|
||||
>
|
||||
Expiration time in seconds
|
||||
</Property>
|
||||
Setup key type, one-off for single time usage and reusable
|
||||
|
||||
<Property name="revoked" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Setup key revocation status
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="expires_in" type="integer" required={true} min={86400} max={31536000}>
|
||||
|
||||
<Property name="auto_groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
List of group IDs to auto-assign to peers registered with this key
|
||||
</Property>
|
||||
Expiration time in seconds
|
||||
|
||||
<Property name="usage_limit" type="integer" required={true}
|
||||
|
||||
|
||||
>
|
||||
A number of times this key can be used. The value of 0 indicates the unlimited usage.
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="revoked" type="boolean" required={true}>
|
||||
|
||||
<Property name="ephemeral" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
Indicate that the peer will be ephemeral or not
|
||||
</Property>
|
||||
</Properties>
|
||||
Setup key revocation status
|
||||
|
||||
</Property>
|
||||
<Property name="auto_groups" type="string[]" required={true}>
|
||||
|
||||
List of group IDs to auto-assign to peers registered with this key
|
||||
|
||||
</Property>
|
||||
<Property name="usage_limit" type="integer" required={true}>
|
||||
|
||||
A number of times this key can be used. The value of 0 indicates the unlimited usage.
|
||||
|
||||
</Property>
|
||||
<Property name="ephemeral" type="boolean" required={false}>
|
||||
|
||||
Indicate that the peer will be ephemeral or not
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -511,12 +491,11 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "2531583362",
|
||||
"id": 2531583362,
|
||||
"key": "A616097E-FCF0-48FA-9354-CA4A61142761",
|
||||
"name": "Default key",
|
||||
"expires": "2023-06-01T14:47:22.291057Z",
|
||||
@@ -554,13 +533,10 @@ echo $response;
|
||||
"ephemeral": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -729,12 +705,11 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "2531583362",
|
||||
"id": 2531583362,
|
||||
"key": "A616097E-FCF0-48FA-9354-CA4A61142761",
|
||||
"name": "Default key",
|
||||
"expires": "2023-06-01T14:47:22.291057Z",
|
||||
@@ -772,13 +747,10 @@ echo $response;
|
||||
"ephemeral": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -799,61 +771,45 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Setup Key name
|
||||
</Property>
|
||||
Setup Key name
|
||||
|
||||
<Property name="type" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Setup key type, one-off for single time usage and reusable
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="type" type="string" required={true}>
|
||||
|
||||
<Property name="expires_in" type="integer" required={true}
|
||||
|
||||
|
||||
min={86400}
|
||||
|
||||
|
||||
max={31536000}
|
||||
>
|
||||
Expiration time in seconds
|
||||
</Property>
|
||||
Setup key type, one-off for single time usage and reusable
|
||||
|
||||
<Property name="revoked" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Setup key revocation status
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="expires_in" type="integer" required={true} min={86400} max={31536000}>
|
||||
|
||||
<Property name="auto_groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
List of group IDs to auto-assign to peers registered with this key
|
||||
</Property>
|
||||
Expiration time in seconds
|
||||
|
||||
<Property name="usage_limit" type="integer" required={true}
|
||||
|
||||
|
||||
>
|
||||
A number of times this key can be used. The value of 0 indicates the unlimited usage.
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="revoked" type="boolean" required={true}>
|
||||
|
||||
<Property name="ephemeral" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
Indicate that the peer will be ephemeral or not
|
||||
</Property>
|
||||
</Properties>
|
||||
Setup key revocation status
|
||||
|
||||
</Property>
|
||||
<Property name="auto_groups" type="string[]" required={true}>
|
||||
|
||||
List of group IDs to auto-assign to peers registered with this key
|
||||
|
||||
</Property>
|
||||
<Property name="usage_limit" type="integer" required={true}>
|
||||
|
||||
A number of times this key can be used. The value of 0 indicates the unlimited usage.
|
||||
|
||||
</Property>
|
||||
<Property name="ephemeral" type="boolean" required={false}>
|
||||
|
||||
Indicate that the peer will be ephemeral or not
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -1087,12 +1043,11 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "2531583362",
|
||||
"id": 2531583362,
|
||||
"key": "A616097E-FCF0-48FA-9354-CA4A61142761",
|
||||
"name": "Default key",
|
||||
"expires": "2023-06-01T14:47:22.291057Z",
|
||||
@@ -1130,13 +1085,10 @@ echo $response;
|
||||
"ephemeral": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -165,9 +165,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -192,13 +191,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -219,26 +215,20 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
Name of the token
|
||||
</Property>
|
||||
Name of the token
|
||||
|
||||
<Property name="expires_in" type="integer" required={true}
|
||||
|
||||
|
||||
min={1}
|
||||
|
||||
|
||||
max={365}
|
||||
>
|
||||
Expiration in days
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="expires_in" type="integer" required={true} min={1} max={365}>
|
||||
|
||||
Expiration in days
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -423,12 +413,11 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"plain_token": "2023-05-02T14:48:20.465209Z",
|
||||
"plain_token": {},
|
||||
"personal_access_token": {
|
||||
"id": "ch8i54g6lnn4g9hqv7n0",
|
||||
"name": "My first token",
|
||||
@@ -452,13 +441,10 @@ echo $response;
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -631,9 +617,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "ch8i54g6lnn4g9hqv7n0",
|
||||
@@ -654,13 +639,10 @@ echo $response;
|
||||
"last_used": "string"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -826,11 +808,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
@@ -165,9 +165,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
@@ -206,13 +205,10 @@ echo $response;
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -225,43 +221,35 @@ echo $response;
|
||||
Creates a new service user or sends an invite to a regular user
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="email" type="string" required={false}>
|
||||
|
||||
<Property name="email" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
User's Email to send invite to
|
||||
</Property>
|
||||
User's Email to send invite to
|
||||
|
||||
<Property name="name" type="string" required={false}
|
||||
|
||||
|
||||
>
|
||||
User's full name
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="name" type="string" required={false}>
|
||||
|
||||
<Property name="role" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
User's NetBird account role
|
||||
</Property>
|
||||
User's full name
|
||||
|
||||
<Property name="auto_groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Group IDs to auto-assign to peers registered by this user
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="role" type="string" required={true}>
|
||||
|
||||
<Property name="is_service_user" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
Is true if this user is a service user
|
||||
</Property>
|
||||
</Properties>
|
||||
User's NetBird account role
|
||||
|
||||
</Property>
|
||||
<Property name="auto_groups" type="string[]" required={true}>
|
||||
|
||||
Group IDs to auto-assign to peers registered by this user
|
||||
|
||||
</Property>
|
||||
<Property name="is_service_user" type="boolean" required={true}>
|
||||
|
||||
Is true if this user is a service user
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -481,9 +469,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "google-oauth2|277474792786460067937",
|
||||
@@ -518,13 +505,10 @@ echo $response;
|
||||
"issued": "string"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -545,29 +529,25 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="role" type="string" required={true}>
|
||||
|
||||
<Property name="role" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
User's NetBird account role
|
||||
</Property>
|
||||
User's NetBird account role
|
||||
|
||||
<Property name="auto_groups" type="string[]" required={true}
|
||||
|
||||
|
||||
>
|
||||
Group IDs to auto-assign to peers registered by this user
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="auto_groups" type="string[]" required={true}>
|
||||
|
||||
<Property name="is_blocked" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
If set to true then user is blocked and can't use the system
|
||||
</Property>
|
||||
</Properties>
|
||||
Group IDs to auto-assign to peers registered by this user
|
||||
|
||||
</Property>
|
||||
<Property name="is_blocked" type="boolean" required={true}>
|
||||
|
||||
If set to true then user is blocked and can't use the system
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -773,9 +753,8 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "google-oauth2|277474792786460067937",
|
||||
@@ -810,13 +789,10 @@ echo $response;
|
||||
"issued": "string"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -978,11 +954,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -1144,11 +1118,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
3
src/styles/global.css
Normal file
3
src/styles/global.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.custom-details li {
|
||||
margin-left: 50px !important;
|
||||
}
|
||||
Reference in New Issue
Block a user