From c8cc844374fe5f8a440ef38d25a695204a8b1abe Mon Sep 17 00:00:00 2001 From: netbirddev Date: Thu, 8 Oct 2026 09:14:11 +0000 Subject: [PATCH] Update API pages with v0.81.0-canary.pr-7407.1 --- src/pages/ipa/resources/agent-network.mdx | 4 +- src/pages/ipa/resources/ingress-ports.mdx | 2480 +++++++++++++++++++++ src/pages/ipa/resources/msp.mdx | 165 -- src/pages/ipa/resources/peers.mdx | 40 - 4 files changed, 2482 insertions(+), 207 deletions(-) create mode 100644 src/pages/ipa/resources/ingress-ports.mdx diff --git a/src/pages/ipa/resources/agent-network.mdx b/src/pages/ipa/resources/agent-network.mdx index 39630361..e4a054c1 100644 --- a/src/pages/ipa/resources/agent-network.mdx +++ b/src/pages/ipa/resources/agent-network.mdx @@ -6,7 +6,7 @@ export const title = 'Agent Network' - Starts provisioning of a NetBird-managed Agent Network gateway for the account, allocating its endpoint under the managed zone on the first call. Idempotent — answers 202 when this call started (or, after a failure, restarted) provisioning and 200 when a deployment already exists, reporting current state either way. A disabled deployment answers 200 with state `disabled` and stays disabled. Returns 409 when the account already has an Agent Network endpoint that managed provisioning does not own, and 503 when endpoint allocation is temporarily exhausted. + Starts provisioning of a NetBird-managed Agent Network gateway for the account, allocating its endpoint under the managed zone on the first call. Idempotent — answers 202 when this call started (or, after a failure, restarted) provisioning and 200 when a deployment already exists, reporting current state either way. Returns 409 when the account already has an Agent Network endpoint that managed provisioning does not own, and 503 when endpoint allocation is temporarily exhausted. @@ -194,7 +194,7 @@ echo $response; - Reports the account's managed gateway deployment and its derived state, including `disabled` for a deployment that is turned off. Returns 404 when the account has no managed deployment. + Reports the account's managed gateway deployment and its derived state. Returns 404 when the account has no managed deployment. 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/msp.mdx b/src/pages/ipa/resources/msp.mdx index 2feb6b1a..66a783e3 100644 --- a/src/pages/ipa/resources/msp.mdx +++ b/src/pages/ipa/resources/msp.mdx @@ -845,171 +845,6 @@ echo $response; --- -## Delete MSP tenant {{ tag: 'DELETE' , label: '/api/integrations/msp/tenants/{id}' }} - - - - - - ### Path Parameters - - - - The unique identifier of a tenant account - - - - - - -```bash {{ title: 'cURL' }} -curl -X DELETE https://api.netbird.io/api/integrations/msp/tenants/{id} \ --H 'Authorization: Token ' -``` - -```js -const axios = require('axios'); - -let config = { - method: 'delete', - maxBodyLength: Infinity, - url: '/api/integrations/msp/tenants/{id}', - 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/integrations/msp/tenants/{id}" - -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/integrations/msp/tenants/{id}" - 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/integrations/msp/tenants/{id}") - -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/integrations/msp/tenants/{id}") - .method("DELETE") - .addHeader("Authorization: Token ") - .build(); -Response response = client.newCall(request).execute(); -``` - -```php - 'https://api.netbird.io/api/integrations/msp/tenants/{id}', - 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; -``` - - - - - - - - ---- - - ## Unlink a tenant {{ tag: 'POST' , label: '/api/integrations/msp/tenants/{id}/unlink' }} diff --git a/src/pages/ipa/resources/peers.mdx b/src/pages/ipa/resources/peers.mdx index d2f3895f..747b70d1 100644 --- a/src/pages/ipa/resources/peers.mdx +++ b/src/pages/ipa/resources/peers.mdx @@ -18,10 +18,6 @@ export const title = 'Peers' Filter peers by IP address - - - Filter peers by MAC address of a network interface - @@ -184,12 +180,6 @@ echo $response; "created_at": "2023-05-05T09:00:35.477782Z", "ip": "10.64.0.1", "ipv6": "fd00:4e42:ab12::1", - "network_addresses": [ - { - "net_ip": "192.168.0.11/24", - "mac": "00:93:37:bd:83:0f" - } - ], "connection_ip": "35.64.0.1", "connected": true, "last_seen": "2023-05-05T10:05:26.420578Z", @@ -252,12 +242,6 @@ echo $response; "created_at": "string", "ip": "string", "ipv6": "string", - "network_addresses": [ - { - "net_ip": "string", - "mac": "string" - } - ], "connection_ip": "string", "connected": "boolean", "last_seen": "string", @@ -491,12 +475,6 @@ echo $response; "created_at": "2023-05-05T09:00:35.477782Z", "ip": "10.64.0.1", "ipv6": "fd00:4e42:ab12::1", - "network_addresses": [ - { - "net_ip": "192.168.0.11/24", - "mac": "00:93:37:bd:83:0f" - } - ], "connection_ip": "35.64.0.1", "connected": true, "last_seen": "2023-05-05T10:05:26.420578Z", @@ -556,12 +534,6 @@ echo $response; "created_at": "string", "ip": "string", "ipv6": "string", - "network_addresses": [ - { - "net_ip": "string", - "mac": "string" - } - ], "connection_ip": "string", "connected": "boolean", "last_seen": "string", @@ -903,12 +875,6 @@ echo $response; "created_at": "2023-05-05T09:00:35.477782Z", "ip": "10.64.0.1", "ipv6": "fd00:4e42:ab12::1", - "network_addresses": [ - { - "net_ip": "192.168.0.11/24", - "mac": "00:93:37:bd:83:0f" - } - ], "connection_ip": "35.64.0.1", "connected": true, "last_seen": "2023-05-05T10:05:26.420578Z", @@ -968,12 +934,6 @@ echo $response; "created_at": "string", "ip": "string", "ipv6": "string", - "network_addresses": [ - { - "net_ip": "string", - "mac": "string" - } - ], "connection_ip": "string", "connected": "boolean", "last_seen": "string",