diff --git a/src/pages/ipa/resources/ingress-ports.mdx b/src/pages/ipa/resources/ingress-ports.mdx new file mode 100644 index 00000000..e424d4a1 --- /dev/null +++ b/src/pages/ipa/resources/ingress-ports.mdx @@ -0,0 +1,2480 @@ +export const title = 'Ingress Ports' + + + +## List all Port Allocations {{ tag: 'GET' , label: '/api/peers/{peerId}/ingress/ports' }} + + + + Returns a list of all ingress port allocations for a peer + + ### Path Parameters + + + + The unique identifier of a peer + + + + ### Query Parameters + + + + Filters ingress port allocations by name + + + + + + +```bash {{ title: 'cURL' }} +curl -X GET https://api.netbird.io/api/peers/{peerId}/ingress/ports \ +-H 'Accept: application/json' \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'get', + maxBodyLength: Infinity, + url: '/api/peers/{peerId}/ingress/ports', + headers: { + 'Accept': 'application/json', + 'Authorization': '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/peers/{peerId}/ingress/ports" + +headers = { + 'Accept': 'application/json', + 'Authorization': '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/peers/{peerId}/ingress/ports" + 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 ") + + 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/peers/{peerId}/ingress/ports") + +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 " + +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/peers/{peerId}/ingress/ports") + .method("GET") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/peers/{peerId}/ingress/ports', + 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 ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +[ + { + "id": "ch8i4ug6lnn4g9hqv7m0", + "name": "Ingress Peer Allocation 1", + "ingress_peer_id": "x7p3kqf2rdd8j5zxw4n9", + "region": "germany", + "enabled": true, + "ingress_ip": "192.34.0.123", + "port_range_mappings": [ + { + "translated_start": 80, + "translated_end": 320, + "ingress_start": 1080, + "ingress_end": 1320, + "protocol": "tcp" + } + ] + } +] +``` +```json {{ title: 'Schema' }} +[ + { + "id": "string", + "name": "string", + "ingress_peer_id": "string", + "region": "string", + "enabled": "boolean", + "ingress_ip": "string", + "port_range_mappings": [ + { + "translated_start": "integer", + "translated_end": "integer", + "ingress_start": "integer", + "ingress_end": "integer", + "protocol": "string" + } + ] + } +] +``` + + + + + + +--- + + +## Create a Port Allocation {{ tag: 'POST' , label: '/api/peers/{peerId}/ingress/ports' }} + + + + Creates a new ingress port allocation for a peer + + ### Path Parameters + + + + The unique identifier of a peer + + + + ### Request-Body Parameters + + + + Name of the ingress port allocation + + + + + Indicates if an ingress port allocation is enabled + + + + +
+ List of port ranges that are forwarded by the ingress peer + + + + + The starting port of the range of forwarded ports + + + + + The ending port of the range of forwarded ports + + + + + The protocol accepted by the port range + + + + + +
+ +
+ + +
+ More Information + + + + + The number of ports to be forwarded + + + + + The protocol accepted by the port + + + + + +
+ +
+
+ + + + + + +```bash {{ title: 'cURL' }} +curl -X POST https://api.netbird.io/api/peers/{peerId}/ingress/ports \ +-H 'Accept: application/json' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Token ' \ +--data-raw '{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}' +``` + +```js +const axios = require('axios'); +let data = JSON.stringify({ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}); +let config = { + method: 'post', + maxBodyLength: Infinity, + url: '/api/peers/{peerId}/ingress/ports', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': 'Token ' + }, + data : data +}; + +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/peers/{peerId}/ingress/ports" +payload = json.dumps({ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}) +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': 'Token ' +} + +response = requests.request("POST", url, headers=headers, data=payload) + +print(response.text) +``` + +```go +package main + +import ( + "fmt" + "strings" + "net/http" + "io/ioutil" +) + +func main() { + + url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports" + method := "POST" + + payload := strings.NewReader(`{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}`) + client := &http.Client { + } + req, err := http.NewRequest(method, url, payload) + + if err != nil { + fmt.Println(err) + return + } + + + req.Header.Add("Content-Type", "application/json") + req.Header.Add("Accept", "application/json") + req.Header.Add("Authorization", "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/peers/{peerId}/ingress/ports") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Post.new(url) +request["Content-Type"] = "application/json" +request["Accept"] = "application/json" +request["Authorization"] = "Token " + +request.body = JSON.dump({ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}) +response = https.request(request) +puts response.read_body +``` + +```java +OkHttpClient client = new OkHttpClient().newBuilder() + .build(); +MediaType mediaType = MediaType.parse("application/json"); +RequestBody body = RequestBody.create(mediaType, '{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}'); +Request request = new Request.Builder() + .url("https://api.netbird.io/api/peers/{peerId}/ingress/ports") + .method("POST", body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/peers/{peerId}/ingress/ports', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS => '{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}', + CURLOPT_HTTPHEADER => array( + 'Content-Type: application/json', + 'Accept: application/json', + 'Authorization: Token ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "ch8i4ug6lnn4g9hqv7m0", + "name": "Ingress Peer Allocation 1", + "ingress_peer_id": "x7p3kqf2rdd8j5zxw4n9", + "region": "germany", + "enabled": true, + "ingress_ip": "192.34.0.123", + "port_range_mappings": [ + { + "translated_start": 80, + "translated_end": 320, + "ingress_start": 1080, + "ingress_end": 1320, + "protocol": "tcp" + } + ] +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "name": "string", + "ingress_peer_id": "string", + "region": "string", + "enabled": "boolean", + "ingress_ip": "string", + "port_range_mappings": [ + { + "translated_start": "integer", + "translated_end": "integer", + "ingress_start": "integer", + "ingress_end": "integer", + "protocol": "string" + } + ] +} +``` + + + + +
+ +--- + + +## Retrieve a Port Allocation {{ tag: 'GET' , label: '/api/peers/{peerId}/ingress/ports/{allocationId}' }} + + + + Get information about an ingress port allocation + + ### Path Parameters + + + + The unique identifier of a peer + + + + The unique identifier of an ingress port allocation + + + + + + +```bash {{ title: 'cURL' }} +curl -X GET https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId} \ +-H 'Accept: application/json' \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'get', + maxBodyLength: Infinity, + url: '/api/peers/{peerId}/ingress/ports/{allocationId}', + headers: { + 'Accept': 'application/json', + 'Authorization': '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/peers/{peerId}/ingress/ports/{allocationId}" + +headers = { + 'Accept': 'application/json', + 'Authorization': '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/peers/{peerId}/ingress/ports/{allocationId}" + 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 ") + + 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/peers/{peerId}/ingress/ports/{allocationId}") + +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 " + +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/peers/{peerId}/ingress/ports/{allocationId}") + .method("GET") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}', + 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 ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "ch8i4ug6lnn4g9hqv7m0", + "name": "Ingress Peer Allocation 1", + "ingress_peer_id": "x7p3kqf2rdd8j5zxw4n9", + "region": "germany", + "enabled": true, + "ingress_ip": "192.34.0.123", + "port_range_mappings": [ + { + "translated_start": 80, + "translated_end": 320, + "ingress_start": 1080, + "ingress_end": 1320, + "protocol": "tcp" + } + ] +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "name": "string", + "ingress_peer_id": "string", + "region": "string", + "enabled": "boolean", + "ingress_ip": "string", + "port_range_mappings": [ + { + "translated_start": "integer", + "translated_end": "integer", + "ingress_start": "integer", + "ingress_end": "integer", + "protocol": "string" + } + ] +} +``` + + + + + + +--- + + +## Update a Port Allocation {{ tag: 'PUT' , label: '/api/peers/{peerId}/ingress/ports/{allocationId}' }} + + + + Update information about an ingress port allocation + + ### Path Parameters + + + + The unique identifier of a peer + + + + The unique identifier of an ingress port allocation + + + + ### Request-Body Parameters + + + + Name of the ingress port allocation + + + + + Indicates if an ingress port allocation is enabled + + + + +
+ List of port ranges that are forwarded by the ingress peer + + + + + The starting port of the range of forwarded ports + + + + + The ending port of the range of forwarded ports + + + + + The protocol accepted by the port range + + + + + +
+ +
+ + +
+ More Information + + + + + The number of ports to be forwarded + + + + + The protocol accepted by the port + + + + + +
+ +
+
+ + + + + + +```bash {{ title: 'cURL' }} +curl -X PUT https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId} \ +-H 'Accept: application/json' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Token ' \ +--data-raw '{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}' +``` + +```js +const axios = require('axios'); +let data = JSON.stringify({ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}); +let config = { + method: 'put', + maxBodyLength: Infinity, + url: '/api/peers/{peerId}/ingress/ports/{allocationId}', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': 'Token ' + }, + data : data +}; + +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/peers/{peerId}/ingress/ports/{allocationId}" +payload = json.dumps({ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}) +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': 'Token ' +} + +response = requests.request("PUT", url, headers=headers, data=payload) + +print(response.text) +``` + +```go +package main + +import ( + "fmt" + "strings" + "net/http" + "io/ioutil" +) + +func main() { + + url := "https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}" + method := "PUT" + + payload := strings.NewReader(`{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}`) + client := &http.Client { + } + req, err := http.NewRequest(method, url, payload) + + if err != nil { + fmt.Println(err) + return + } + + + req.Header.Add("Content-Type", "application/json") + req.Header.Add("Accept", "application/json") + req.Header.Add("Authorization", "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/peers/{peerId}/ingress/ports/{allocationId}") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Put.new(url) +request["Content-Type"] = "application/json" +request["Accept"] = "application/json" +request["Authorization"] = "Token " + +request.body = JSON.dump({ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}) +response = https.request(request) +puts response.read_body +``` + +```java +OkHttpClient client = new OkHttpClient().newBuilder() + .build(); +MediaType mediaType = MediaType.parse("application/json"); +RequestBody body = RequestBody.create(mediaType, '{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}'); +Request request = new Request.Builder() + .url("https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}") + .method("PUT", body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'PUT', + CURLOPT_POSTFIELDS => '{ + "name": "Ingress Port Allocation 1", + "enabled": true, + "port_ranges": [ + { + "start": 80, + "end": 320, + "protocol": "tcp" + } + ], + "direct_port": { + "count": 5, + "protocol": "udp" + } +}', + CURLOPT_HTTPHEADER => array( + 'Content-Type: application/json', + 'Accept: application/json', + 'Authorization: Token ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "ch8i4ug6lnn4g9hqv7m0", + "name": "Ingress Peer Allocation 1", + "ingress_peer_id": "x7p3kqf2rdd8j5zxw4n9", + "region": "germany", + "enabled": true, + "ingress_ip": "192.34.0.123", + "port_range_mappings": [ + { + "translated_start": 80, + "translated_end": 320, + "ingress_start": 1080, + "ingress_end": 1320, + "protocol": "tcp" + } + ] +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "name": "string", + "ingress_peer_id": "string", + "region": "string", + "enabled": "boolean", + "ingress_ip": "string", + "port_range_mappings": [ + { + "translated_start": "integer", + "translated_end": "integer", + "ingress_start": "integer", + "ingress_end": "integer", + "protocol": "string" + } + ] +} +``` + + + + +
+ +--- + + +## Delete a Port Allocation {{ tag: 'DELETE' , label: '/api/peers/{peerId}/ingress/ports/{allocationId}' }} + + + + Delete an ingress port allocation + + ### Path Parameters + + + + The unique identifier of a peer + + + + The unique identifier of an ingress port allocation + + + + + + +```bash {{ title: 'cURL' }} +curl -X DELETE https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId} \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'delete', + maxBodyLength: Infinity, + url: '/api/peers/{peerId}/ingress/ports/{allocationId}', + headers: { + 'Authorization': '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/peers/{peerId}/ingress/ports/{allocationId}" + +headers = { + 'Authorization': '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/peers/{peerId}/ingress/ports/{allocationId}" + method := "DELETE" + + client := &http.Client { + } + req, err := http.NewRequest(method, url, nil) + + if err != nil { + fmt.Println(err) + return + } + + + req.Header.Add("Authorization", "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/peers/{peerId}/ingress/ports/{allocationId}") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Delete.new(url) +request["Authorization"] = "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/peers/{peerId}/ingress/ports/{allocationId}") + .method("DELETE") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/peers/{peerId}/ingress/ports/{allocationId}', + 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 ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + + + + +--- + + +## List all Ingress Peers {{ tag: 'GET' , label: '/api/ingress/peers' }} + + + + Returns a list of all ingress peers + + + + +```bash {{ title: 'cURL' }} +curl -X GET https://api.netbird.io/api/ingress/peers \ +-H 'Accept: application/json' \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'get', + maxBodyLength: Infinity, + url: '/api/ingress/peers', + headers: { + 'Accept': 'application/json', + 'Authorization': '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/ingress/peers" + +headers = { + 'Accept': 'application/json', + 'Authorization': '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/ingress/peers" + 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 ") + + 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/ingress/peers") + +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 " + +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/ingress/peers") + .method("GET") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/ingress/peers', + 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 ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +[ + { + "id": "ch8i4ug6lnn4g9hqv7m0", + "peer_id": "x7p3kqf2rdd8j5zxw4n9", + "ingress_ip": "192.34.0.123", + "available_ports": { + "tcp": 45765, + "udp": 50000 + }, + "enabled": true, + "connected": true, + "fallback": true, + "region": "germany" + } +] +``` +```json {{ title: 'Schema' }} +[ + { + "id": "string", + "peer_id": "string", + "ingress_ip": "string", + "available_ports": { + "tcp": "integer", + "udp": "integer" + }, + "enabled": "boolean", + "connected": "boolean", + "fallback": "boolean", + "region": "string" + } +] +``` + + + + + + +--- + + +## Create a Ingress Peer {{ tag: 'POST' , label: '/api/ingress/peers' }} + + + + Creates a new ingress peer + + ### Request-Body Parameters + + + + ID of the peer that is used as an ingress peer + + + + + Defines if an ingress peer is enabled + + + + + Defines if an ingress peer can be used as a fallback if no ingress peer can be found in the region of the forwarded peer + + + + + + + + + +```bash {{ title: 'cURL' }} +curl -X POST https://api.netbird.io/api/ingress/peers \ +-H 'Accept: application/json' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Token ' \ +--data-raw '{ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}' +``` + +```js +const axios = require('axios'); +let data = JSON.stringify({ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}); +let config = { + method: 'post', + maxBodyLength: Infinity, + url: '/api/ingress/peers', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': 'Token ' + }, + data : data +}; + +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/ingress/peers" +payload = json.dumps({ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}) +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': 'Token ' +} + +response = requests.request("POST", url, headers=headers, data=payload) + +print(response.text) +``` + +```go +package main + +import ( + "fmt" + "strings" + "net/http" + "io/ioutil" +) + +func main() { + + url := "https://api.netbird.io/api/ingress/peers" + method := "POST" + + payload := strings.NewReader(`{ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}`) + client := &http.Client { + } + req, err := http.NewRequest(method, url, payload) + + if err != nil { + fmt.Println(err) + return + } + + + req.Header.Add("Content-Type", "application/json") + req.Header.Add("Accept", "application/json") + req.Header.Add("Authorization", "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/ingress/peers") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Post.new(url) +request["Content-Type"] = "application/json" +request["Accept"] = "application/json" +request["Authorization"] = "Token " + +request.body = JSON.dump({ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}) +response = https.request(request) +puts response.read_body +``` + +```java +OkHttpClient client = new OkHttpClient().newBuilder() + .build(); +MediaType mediaType = MediaType.parse("application/json"); +RequestBody body = RequestBody.create(mediaType, '{ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}'); +Request request = new Request.Builder() + .url("https://api.netbird.io/api/ingress/peers") + .method("POST", body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/ingress/peers', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS => '{ + "peer_id": "ch8i4ug6lnn4g9hqv7m0", + "enabled": true, + "fallback": true +}', + CURLOPT_HTTPHEADER => array( + 'Content-Type: application/json', + 'Accept: application/json', + 'Authorization: Token ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "ch8i4ug6lnn4g9hqv7m0", + "peer_id": "x7p3kqf2rdd8j5zxw4n9", + "ingress_ip": "192.34.0.123", + "available_ports": { + "tcp": 45765, + "udp": 50000 + }, + "enabled": true, + "connected": true, + "fallback": true, + "region": "germany" +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "peer_id": "string", + "ingress_ip": "string", + "available_ports": { + "tcp": "integer", + "udp": "integer" + }, + "enabled": "boolean", + "connected": "boolean", + "fallback": "boolean", + "region": "string" +} +``` + + + + + + +--- + + +## Retrieve a Ingress Peer {{ tag: 'GET' , label: '/api/ingress/peers/{ingressPeerId}' }} + + + + Get information about an ingress peer + + ### Path Parameters + + + + The unique identifier of an ingress peer + + + + + + +```bash {{ title: 'cURL' }} +curl -X GET https://api.netbird.io/api/ingress/peers/{ingressPeerId} \ +-H 'Accept: application/json' \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'get', + maxBodyLength: Infinity, + url: '/api/ingress/peers/{ingressPeerId}', + headers: { + 'Accept': 'application/json', + 'Authorization': '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/ingress/peers/{ingressPeerId}" + +headers = { + 'Accept': 'application/json', + 'Authorization': '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/ingress/peers/{ingressPeerId}" + 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 ") + + 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/ingress/peers/{ingressPeerId}") + +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 " + +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/ingress/peers/{ingressPeerId}") + .method("GET") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/ingress/peers/{ingressPeerId}', + 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 ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "ch8i4ug6lnn4g9hqv7m0", + "peer_id": "x7p3kqf2rdd8j5zxw4n9", + "ingress_ip": "192.34.0.123", + "available_ports": { + "tcp": 45765, + "udp": 50000 + }, + "enabled": true, + "connected": true, + "fallback": true, + "region": "germany" +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "peer_id": "string", + "ingress_ip": "string", + "available_ports": { + "tcp": "integer", + "udp": "integer" + }, + "enabled": "boolean", + "connected": "boolean", + "fallback": "boolean", + "region": "string" +} +``` + + + + + + +--- + + +## Update a Ingress Peer {{ tag: 'PUT' , label: '/api/ingress/peers/{ingressPeerId}' }} + + + + Update information about an ingress peer + + ### Path Parameters + + + + The unique identifier of an ingress peer + + + + ### Request-Body Parameters + + + + Defines if an ingress peer is enabled + + + + + Defines if an ingress peer can be used as a fallback if no ingress peer can be found in the region of the forwarded peer + + + + + + + + + +```bash {{ title: 'cURL' }} +curl -X PUT https://api.netbird.io/api/ingress/peers/{ingressPeerId} \ +-H 'Accept: application/json' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Token ' \ +--data-raw '{ + "enabled": true, + "fallback": true +}' +``` + +```js +const axios = require('axios'); +let data = JSON.stringify({ + "enabled": true, + "fallback": true +}); +let config = { + method: 'put', + maxBodyLength: Infinity, + url: '/api/ingress/peers/{ingressPeerId}', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': 'Token ' + }, + data : data +}; + +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/ingress/peers/{ingressPeerId}" +payload = json.dumps({ + "enabled": true, + "fallback": true +}) +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': 'Token ' +} + +response = requests.request("PUT", url, headers=headers, data=payload) + +print(response.text) +``` + +```go +package main + +import ( + "fmt" + "strings" + "net/http" + "io/ioutil" +) + +func main() { + + url := "https://api.netbird.io/api/ingress/peers/{ingressPeerId}" + method := "PUT" + + payload := strings.NewReader(`{ + "enabled": true, + "fallback": true +}`) + client := &http.Client { + } + req, err := http.NewRequest(method, url, payload) + + if err != nil { + fmt.Println(err) + return + } + + + req.Header.Add("Content-Type", "application/json") + req.Header.Add("Accept", "application/json") + req.Header.Add("Authorization", "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/ingress/peers/{ingressPeerId}") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Put.new(url) +request["Content-Type"] = "application/json" +request["Accept"] = "application/json" +request["Authorization"] = "Token " + +request.body = JSON.dump({ + "enabled": true, + "fallback": true +}) +response = https.request(request) +puts response.read_body +``` + +```java +OkHttpClient client = new OkHttpClient().newBuilder() + .build(); +MediaType mediaType = MediaType.parse("application/json"); +RequestBody body = RequestBody.create(mediaType, '{ + "enabled": true, + "fallback": true +}'); +Request request = new Request.Builder() + .url("https://api.netbird.io/api/ingress/peers/{ingressPeerId}") + .method("PUT", body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/ingress/peers/{ingressPeerId}', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'PUT', + CURLOPT_POSTFIELDS => '{ + "enabled": true, + "fallback": true +}', + CURLOPT_HTTPHEADER => array( + 'Content-Type: application/json', + 'Accept: application/json', + 'Authorization: Token ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "ch8i4ug6lnn4g9hqv7m0", + "peer_id": "x7p3kqf2rdd8j5zxw4n9", + "ingress_ip": "192.34.0.123", + "available_ports": { + "tcp": 45765, + "udp": 50000 + }, + "enabled": true, + "connected": true, + "fallback": true, + "region": "germany" +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "peer_id": "string", + "ingress_ip": "string", + "available_ports": { + "tcp": "integer", + "udp": "integer" + }, + "enabled": "boolean", + "connected": "boolean", + "fallback": "boolean", + "region": "string" +} +``` + + + + + + +--- + + +## Delete a Ingress Peer {{ tag: 'DELETE' , label: '/api/ingress/peers/{ingressPeerId}' }} + + + + Delete an ingress peer + + ### Path Parameters + + + + The unique identifier of an ingress peer + + + + + + +```bash {{ title: 'cURL' }} +curl -X DELETE https://api.netbird.io/api/ingress/peers/{ingressPeerId} \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'delete', + maxBodyLength: Infinity, + url: '/api/ingress/peers/{ingressPeerId}', + headers: { + 'Authorization': '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/ingress/peers/{ingressPeerId}" + +headers = { + 'Authorization': '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/ingress/peers/{ingressPeerId}" + method := "DELETE" + + client := &http.Client { + } + req, err := http.NewRequest(method, url, nil) + + if err != nil { + fmt.Println(err) + return + } + + + req.Header.Add("Authorization", "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/ingress/peers/{ingressPeerId}") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Delete.new(url) +request["Authorization"] = "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/ingress/peers/{ingressPeerId}") + .method("DELETE") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/ingress/peers/{ingressPeerId}', + 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 ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + + + + +--- diff --git a/src/pages/ipa/resources/posture-checks.mdx b/src/pages/ipa/resources/posture-checks.mdx index c5f61084..2d6e3719 100644 --- a/src/pages/ipa/resources/posture-checks.mdx +++ b/src/pages/ipa/resources/posture-checks.mdx @@ -214,6 +214,11 @@ echo $response; "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } } @@ -269,6 +274,11 @@ echo $response; "windows_path": "string" } ] + }, + "certificate_check": { + "ca_certificates": [ + "string" + ] } } } @@ -520,6 +530,23 @@ echo $response; + + + +
+ Posture check for a certificate held by the peer that chains to one of the given CA certificates. Not supported on mobile devices (iOS and Android), which always fail this check and are denied access + + + + + PEM encoded CA certificates the peer's certificate must chain to + + + + + +
+
@@ -590,6 +617,11 @@ curl -X POST https://api.netbird.io/api/posture-checks \ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }' @@ -648,6 +680,11 @@ let data = JSON.stringify({ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }); @@ -728,6 +765,11 @@ payload = json.dumps({ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }) @@ -808,6 +850,11 @@ func main() { "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }`) @@ -907,6 +954,11 @@ request.body = JSON.dump({ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }) @@ -969,6 +1021,11 @@ RequestBody body = RequestBody.create(mediaType, '{ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }'); @@ -1047,6 +1104,11 @@ curl_setopt_array($curl, array( "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }', @@ -1120,6 +1182,11 @@ echo $response; "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } } @@ -1173,6 +1240,11 @@ echo $response; "windows_path": "string" } ] + }, + "certificate_check": { + "ca_certificates": [ + "string" + ] } } } @@ -1405,6 +1477,11 @@ echo $response; "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } } @@ -1458,6 +1535,11 @@ echo $response; "windows_path": "string" } ] + }, + "certificate_check": { + "ca_certificates": [ + "string" + ] } } } @@ -1716,6 +1798,23 @@ echo $response; + + + +
+ Posture check for a certificate held by the peer that chains to one of the given CA certificates. Not supported on mobile devices (iOS and Android), which always fail this check and are denied access + + + + + PEM encoded CA certificates the peer's certificate must chain to + + + + + +
+
@@ -1786,6 +1885,11 @@ curl -X PUT https://api.netbird.io/api/posture-checks/{postureCheckId} \ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }' @@ -1844,6 +1948,11 @@ let data = JSON.stringify({ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }); @@ -1924,6 +2033,11 @@ payload = json.dumps({ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }) @@ -2004,6 +2118,11 @@ func main() { "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }`) @@ -2103,6 +2222,11 @@ request.body = JSON.dump({ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }) @@ -2165,6 +2289,11 @@ RequestBody body = RequestBody.create(mediaType, '{ "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }'); @@ -2243,6 +2372,11 @@ curl_setopt_array($curl, array( "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } }', @@ -2316,6 +2450,11 @@ echo $response; "windows_path": "C:
rogramData…etBird\netbird.exe" } ] + }, + "certificate_check": { + "ca_certificates": [ + "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----" + ] } } } @@ -2369,6 +2508,11 @@ echo $response; "windows_path": "string" } ] + }, + "certificate_check": { + "ca_certificates": [ + "string" + ] } } }