From 2aff48f550aa6038d632fa1a6abb148d2495c11e Mon Sep 17 00:00:00 2001 From: netbirddev Date: Tue, 15 Sep 2026 11:11:43 +0000 Subject: [PATCH] Update API pages with v0.80.0-canary.pr-7535.1 --- src/pages/ipa/resources/agent-network.mdx | 376 +++++++++++++++++++++ src/pages/ipa/resources/posture-checks.mdx | 144 ++++++++ 2 files changed, 520 insertions(+) diff --git a/src/pages/ipa/resources/agent-network.mdx b/src/pages/ipa/resources/agent-network.mdx index 71c94cf5..e4a054c1 100644 --- a/src/pages/ipa/resources/agent-network.mdx +++ b/src/pages/ipa/resources/agent-network.mdx @@ -2,6 +2,382 @@ export const title = 'Agent Network' +## Provision a managed Agent Network gateway {{ tag: 'POST' , label: '/api/integrations/agent-network/managed-proxy' }} + + + + 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. + + + + +```bash {{ title: 'cURL' }} +curl -X POST https://api.netbird.io/api/integrations/agent-network/managed-proxy \ +-H 'Accept: application/json' \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'post', + maxBodyLength: Infinity, + url: '/api/integrations/agent-network/managed-proxy', + 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/integrations/agent-network/managed-proxy" + +headers = { + 'Accept': 'application/json', + 'Authorization': 'Token ' +} + +response = requests.request("POST", 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/agent-network/managed-proxy" + method := "POST" + + 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/integrations/agent-network/managed-proxy") + +https = Net::HTTP.new(url.host, url.port) +https.use_ssl = true + +request = Net::HTTP::Post.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/integrations/agent-network/managed-proxy") + .method("POST") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/integrations/agent-network/managed-proxy', + 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_HTTPHEADER => array( + 'Accept: application/json', + 'Authorization: Token ' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + + + + + +```json {{ title: 'Example' }} +{ + "id": "d1m3kebd9pcs0c1pnu7g", + "state": "ready", + "endpoint": "brave-otter.gateway.netbird.io", + "region": "us-east", + "message": { + "type": "string", + "description": "Failure detail reported by the rollout. Only set when state is `failed`." + } +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "state": "string", + "endpoint": "string", + "region": "string", + "message": "string" +} +``` + + + + + + +--- + + +## Retrieve managed Agent Network gateway status {{ tag: 'GET' , label: '/api/integrations/agent-network/managed-proxy' }} + + + + Reports the account's managed gateway deployment and its derived state. Returns 404 when the account has no managed deployment. + + + + +```bash {{ title: 'cURL' }} +curl -X GET https://api.netbird.io/api/integrations/agent-network/managed-proxy \ +-H 'Accept: application/json' \ +-H 'Authorization: Token ' +``` + +```js +const axios = require('axios'); + +let config = { + method: 'get', + maxBodyLength: Infinity, + url: '/api/integrations/agent-network/managed-proxy', + 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/integrations/agent-network/managed-proxy" + +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/integrations/agent-network/managed-proxy" + 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/integrations/agent-network/managed-proxy") + +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/integrations/agent-network/managed-proxy") + .method("GET") + .addHeader("Accept", "application/json") + .addHeader("Authorization: Token ") + .build(); +Response response = client.newCall(request).execute(); +``` + +```php + 'https://api.netbird.io/api/integrations/agent-network/managed-proxy', + 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": "d1m3kebd9pcs0c1pnu7g", + "state": "ready", + "endpoint": "brave-otter.gateway.netbird.io", + "region": "us-east", + "message": { + "type": "string", + "description": "Failure detail reported by the rollout. Only set when state is `failed`." + } +} +``` +```json {{ title: 'Schema' }} +{ + "id": "string", + "state": "string", + "endpoint": "string", + "region": "string", + "message": "string" +} +``` + + + + + + +--- + + ## List Agent Network access logs {{ tag: 'GET' , label: '/api/agent-network/access-logs' }} diff --git a/src/pages/ipa/resources/posture-checks.mdx b/src/pages/ipa/resources/posture-checks.mdx index c5f61084..2723b3c8 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 + + + + + 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 + + + + + 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" + ] } } }