Update API pages with v0.35.0

This commit is contained in:
netbirddev
2024-12-23 17:49:49 +00:00
parent bf2c616dce
commit 81001b562c
5 changed files with 3934 additions and 26 deletions
+16
View File
@@ -175,6 +175,7 @@ echo $response;
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -198,6 +199,7 @@ echo $response;
"jwt_allow_groups": [ "jwt_allow_groups": [
"string" "string"
], ],
"routing_peer_dns_resolution_enabled": "boolean",
"extra": { "extra": {
"peer_approval_enabled": "boolean" "peer_approval_enabled": "boolean"
} }
@@ -444,6 +446,11 @@ echo $response;
List of groups to which users are allowed access List of groups to which users are allowed access
</Property>
<Property name="routing_peer_dns_resolution_enabled" type="boolean" required={false}>
Enables or disables DNS resolution on the routing peers
</Property> </Property>
<Property name="extra" type="object" required={false}> <Property name="extra" type="object" required={false}>
@@ -493,6 +500,7 @@ curl -X PUT https://api.netbird.io/api/accounts/{accountId} \
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -515,6 +523,7 @@ let data = JSON.stringify({
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -559,6 +568,7 @@ payload = json.dumps({
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -603,6 +613,7 @@ func main() {
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -665,6 +676,7 @@ request.body = JSON.dump({
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -691,6 +703,7 @@ RequestBody body = RequestBody.create(mediaType, '{
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -733,6 +746,7 @@ curl_setopt_array($curl, array(
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -770,6 +784,7 @@ echo $response;
"jwt_allow_groups": [ "jwt_allow_groups": [
"Administrators" "Administrators"
], ],
"routing_peer_dns_resolution_enabled": true,
"extra": { "extra": {
"peer_approval_enabled": true "peer_approval_enabled": true
} }
@@ -791,6 +806,7 @@ echo $response;
"jwt_allow_groups": [ "jwt_allow_groups": [
"string" "string"
], ],
"routing_peer_dns_resolution_enabled": "boolean",
"extra": { "extra": {
"peer_approval_enabled": "boolean" "peer_approval_enabled": "boolean"
} }
+184
View File
@@ -165,12 +165,19 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api", "issued": "api",
"peers": [ "peers": [
{ {
"id": "chacbco6lnnbn6cg5s90", "id": "chacbco6lnnbn6cg5s90",
"name": "stage-host-1" "name": "stage-host-1"
} }
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
} }
] ]
@@ -181,12 +188,19 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string", "issued": "string",
"peers": [ "peers": [
{ {
"id": "string", "id": "string",
"name": "string" "name": "string"
} }
],
"resources": [
{
"id": "string",
"type": "string"
}
] ]
} }
] ]
@@ -217,6 +231,28 @@ echo $response;
List of peers ids List of peers ids
</Property>
<Property name="resources" type="object[]" required={false}>
<details class="custom-details" open>
<summary>More Information</summary>
<Properties>
<Properties><Property name="id" type="string" required={true}>
ID of the resource
</Property>
<Property name="type" type="string" required={true} enumList={["host","subnet","domain"]}>
Network resource type based of the address
</Property>
</Properties>
</Properties>
</details>
</Property> </Property>
</Properties> </Properties>
@@ -234,6 +270,12 @@ curl -X POST https://api.netbird.io/api/groups \
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}' }'
``` ```
@@ -244,6 +286,12 @@ let data = JSON.stringify({
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}); });
let config = { let config = {
@@ -276,6 +324,12 @@ payload = json.dumps({
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}) })
headers = { headers = {
@@ -308,6 +362,12 @@ func main() {
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}`) }`)
client := &http.Client { client := &http.Client {
@@ -358,6 +418,12 @@ request.body = JSON.dump({
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}) })
response = https.request(request) response = https.request(request)
@@ -372,6 +438,12 @@ RequestBody body = RequestBody.create(mediaType, '{
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}'); }');
Request request = new Request.Builder() Request request = new Request.Builder()
@@ -402,6 +474,12 @@ curl_setopt_array($curl, array(
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}', }',
CURLOPT_HTTPHEADER => array( CURLOPT_HTTPHEADER => array(
@@ -426,12 +504,19 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api", "issued": "api",
"peers": [ "peers": [
{ {
"id": "chacbco6lnnbn6cg5s90", "id": "chacbco6lnnbn6cg5s90",
"name": "stage-host-1" "name": "stage-host-1"
} }
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
} }
``` ```
@@ -440,12 +525,19 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string", "issued": "string",
"peers": [ "peers": [
{ {
"id": "string", "id": "string",
"name": "string" "name": "string"
} }
],
"resources": [
{
"id": "string",
"type": "string"
}
] ]
} }
``` ```
@@ -628,12 +720,19 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api", "issued": "api",
"peers": [ "peers": [
{ {
"id": "chacbco6lnnbn6cg5s90", "id": "chacbco6lnnbn6cg5s90",
"name": "stage-host-1" "name": "stage-host-1"
} }
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
} }
``` ```
@@ -642,12 +741,19 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string", "issued": "string",
"peers": [ "peers": [
{ {
"id": "string", "id": "string",
"name": "string" "name": "string"
} }
],
"resources": [
{
"id": "string",
"type": "string"
}
] ]
} }
``` ```
@@ -685,6 +791,28 @@ echo $response;
List of peers ids List of peers ids
</Property>
<Property name="resources" type="object[]" required={false}>
<details class="custom-details" open>
<summary>More Information</summary>
<Properties>
<Properties><Property name="id" type="string" required={true}>
ID of the resource
</Property>
<Property name="type" type="string" required={true} enumList={["host","subnet","domain"]}>
Network resource type based of the address
</Property>
</Properties>
</Properties>
</details>
</Property> </Property>
</Properties> </Properties>
@@ -702,6 +830,12 @@ curl -X PUT https://api.netbird.io/api/groups/{groupId} \
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}' }'
``` ```
@@ -712,6 +846,12 @@ let data = JSON.stringify({
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}); });
let config = { let config = {
@@ -744,6 +884,12 @@ payload = json.dumps({
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}) })
headers = { headers = {
@@ -776,6 +922,12 @@ func main() {
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}`) }`)
client := &http.Client { client := &http.Client {
@@ -826,6 +978,12 @@ request.body = JSON.dump({
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}) })
response = https.request(request) response = https.request(request)
@@ -840,6 +998,12 @@ RequestBody body = RequestBody.create(mediaType, '{
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}'); }');
Request request = new Request.Builder() Request request = new Request.Builder()
@@ -870,6 +1034,12 @@ curl_setopt_array($curl, array(
"name": "devs", "name": "devs",
"peers": [ "peers": [
"ch8i4ug6lnn4g9hqv7m1" "ch8i4ug6lnn4g9hqv7m1"
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
}', }',
CURLOPT_HTTPHEADER => array( CURLOPT_HTTPHEADER => array(
@@ -894,12 +1064,19 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api", "issued": "api",
"peers": [ "peers": [
{ {
"id": "chacbco6lnnbn6cg5s90", "id": "chacbco6lnnbn6cg5s90",
"name": "stage-host-1" "name": "stage-host-1"
} }
],
"resources": [
{
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
] ]
} }
``` ```
@@ -908,12 +1085,19 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string", "issued": "string",
"peers": [ "peers": [
{ {
"id": "string", "id": "string",
"name": "string" "name": "string"
} }
],
"resources": [
{
"id": "string",
"type": "string"
}
] ]
} }
``` ```
File diff suppressed because it is too large Load Diff
+6
View File
@@ -177,6 +177,7 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
@@ -215,6 +216,7 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
@@ -426,6 +428,7 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
@@ -461,6 +464,7 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
@@ -756,6 +760,7 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
@@ -791,6 +796,7 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
+306 -26
View File
@@ -192,17 +192,27 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
{ {
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
} }
@@ -241,17 +251,27 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
"sourceResource": {
"id": "string",
"type": "string"
},
"destinations": [ "destinations": [
{ {
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
] ],
"destinationResource": {
"id": "string",
"type": "string"
}
} }
] ]
} }
@@ -367,15 +387,59 @@ echo $response;
</details> </details>
</Property> </Property>
<Property name="sources" type="string[]" required={true}> <Property name="sources" type="string[]" required={false}>
Policy rule source group IDs Policy rule source group IDs
</Property> </Property>
<Property name="destinations" type="string[]" required={true}> <Property name="sourceResource" type="object" required={false}>
<details class="custom-details" open>
<summary>More Information</summary>
<Properties>
<Properties><Property name="id" type="string" required={true}>
ID of the resource
</Property>
<Property name="type" type="string" required={true} enumList={["host","subnet","domain"]}>
Network resource type based of the address
</Property>
</Properties>
</Properties>
</details>
</Property>
<Property name="destinations" type="string[]" required={false}>
Policy rule destination group IDs Policy rule destination group IDs
</Property>
<Property name="destinationResource" type="object" required={false}>
<details class="custom-details" open>
<summary>More Information</summary>
<Properties>
<Properties><Property name="id" type="string" required={true}>
ID of the resource
</Property>
<Property name="type" type="string" required={true} enumList={["host","subnet","domain"]}>
Network resource type based of the address
</Property>
</Properties>
</Properties>
</details>
</Property> </Property>
</Properties> </Properties>
@@ -424,9 +488,17 @@ curl -X POST https://api.netbird.io/api/policies \
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}' }'
@@ -463,9 +535,17 @@ let data = JSON.stringify({
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}); });
@@ -524,9 +604,17 @@ payload = json.dumps({
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}) })
@@ -585,9 +673,17 @@ func main() {
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}`) }`)
@@ -664,9 +760,17 @@ request.body = JSON.dump({
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}) })
@@ -707,9 +811,17 @@ RequestBody body = RequestBody.create(mediaType, '{
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}'); }');
@@ -766,9 +878,17 @@ curl_setopt_array($curl, array(
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}', }',
@@ -821,17 +941,27 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
{ {
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
} }
@@ -868,17 +998,27 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
"sourceResource": {
"id": "string",
"type": "string"
},
"destinations": [ "destinations": [
{ {
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
] ],
"destinationResource": {
"id": "string",
"type": "string"
}
} }
] ]
} }
@@ -1089,17 +1229,27 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
{ {
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
} }
@@ -1136,17 +1286,27 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
"sourceResource": {
"id": "string",
"type": "string"
},
"destinations": [ "destinations": [
{ {
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
] ],
"destinationResource": {
"id": "string",
"type": "string"
}
} }
] ]
} }
@@ -1269,15 +1429,59 @@ echo $response;
</details> </details>
</Property> </Property>
<Property name="sources" type="string[]" required={true}> <Property name="sources" type="string[]" required={false}>
Policy rule source group IDs Policy rule source group IDs
</Property> </Property>
<Property name="destinations" type="string[]" required={true}> <Property name="sourceResource" type="object" required={false}>
<details class="custom-details" open>
<summary>More Information</summary>
<Properties>
<Properties><Property name="id" type="string" required={true}>
ID of the resource
</Property>
<Property name="type" type="string" required={true} enumList={["host","subnet","domain"]}>
Network resource type based of the address
</Property>
</Properties>
</Properties>
</details>
</Property>
<Property name="destinations" type="string[]" required={false}>
Policy rule destination group IDs Policy rule destination group IDs
</Property>
<Property name="destinationResource" type="object" required={false}>
<details class="custom-details" open>
<summary>More Information</summary>
<Properties>
<Properties><Property name="id" type="string" required={true}>
ID of the resource
</Property>
<Property name="type" type="string" required={true} enumList={["host","subnet","domain"]}>
Network resource type based of the address
</Property>
</Properties>
</Properties>
</details>
</Property> </Property>
</Properties> </Properties>
@@ -1326,9 +1530,17 @@ curl -X PUT https://api.netbird.io/api/policies/{policyId} \
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}' }'
@@ -1365,9 +1577,17 @@ let data = JSON.stringify({
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}); });
@@ -1426,9 +1646,17 @@ payload = json.dumps({
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}) })
@@ -1487,9 +1715,17 @@ func main() {
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}`) }`)
@@ -1566,9 +1802,17 @@ request.body = JSON.dump({
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}) })
@@ -1609,9 +1853,17 @@ RequestBody body = RequestBody.create(mediaType, '{
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}'); }');
@@ -1668,9 +1920,17 @@ curl_setopt_array($curl, array(
"sources": [ "sources": [
"ch8i4ug6lnn4g9hqv797" "ch8i4ug6lnn4g9hqv797"
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
"ch8i4ug6lnn4g9h7v7m0" "ch8i4ug6lnn4g9h7v7m0"
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
}', }',
@@ -1723,17 +1983,27 @@ echo $response;
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
], ],
"sourceResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
},
"destinations": [ "destinations": [
{ {
"id": "ch8i4ug6lnn4g9hqv7m0", "id": "ch8i4ug6lnn4g9hqv7m0",
"name": "devs", "name": "devs",
"peers_count": 2, "peers_count": 2,
"resources_count": 5,
"issued": "api" "issued": "api"
} }
] ],
"destinationResource": {
"id": "chacdk86lnnboviihd7g",
"type": "host"
}
} }
] ]
} }
@@ -1770,17 +2040,27 @@ echo $response;
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
], ],
"sourceResource": {
"id": "string",
"type": "string"
},
"destinations": [ "destinations": [
{ {
"id": "string", "id": "string",
"name": "string", "name": "string",
"peers_count": "integer", "peers_count": "integer",
"resources_count": "integer",
"issued": "string" "issued": "string"
} }
] ],
"destinationResource": {
"id": "string",
"type": "string"
}
} }
] ]
} }