Update API pages with v0.74.0

This commit is contained in:
netbirddev
2026-07-01 20:40:04 +00:00
parent a4192fe371
commit 7c8e149889
2 changed files with 457 additions and 14 deletions

View File

@@ -200,6 +200,7 @@ echo $response;
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -254,6 +255,7 @@ echo $response;
"lazy_connection_enabled": "boolean",
"auto_update_version": "string",
"auto_update_always": "boolean",
"metrics_push_enabled": "boolean",
"embedded_idp_enabled": "boolean",
"local_auth_disabled": "boolean",
"local_mfa_enabled": "boolean",
@@ -594,6 +596,11 @@ echo $response;
When true, updates are installed automatically in the background. When false, updates require user interaction from the UI.
</Property>
<Property name="metrics_push_enabled" type="boolean" required={false}>
Enables or disables client metrics push for all peers in the account
</Property>
<Property name="embedded_idp_enabled" type="boolean" required={false}>
@@ -692,6 +699,7 @@ curl -X PUT https://api.netbird.io/api/accounts/{accountId} \
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -745,6 +753,7 @@ let data = JSON.stringify({
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -820,6 +829,7 @@ payload = json.dumps({
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -895,6 +905,7 @@ func main() {
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -989,6 +1000,7 @@ request.body = JSON.dump({
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -1046,6 +1058,7 @@ RequestBody body = RequestBody.create(mediaType, '{
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -1119,6 +1132,7 @@ curl_setopt_array($curl, array(
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -1187,6 +1201,7 @@ echo $response;
"lazy_connection_enabled": true,
"auto_update_version": "0.51.2",
"auto_update_always": false,
"metrics_push_enabled": false,
"embedded_idp_enabled": false,
"local_auth_disabled": false,
"local_mfa_enabled": false,
@@ -1239,6 +1254,7 @@ echo $response;
"lazy_connection_enabled": "boolean",
"auto_update_version": "string",
"auto_update_always": "boolean",
"metrics_push_enabled": "boolean",
"embedded_idp_enabled": "boolean",
"local_auth_disabled": "boolean",
"local_mfa_enabled": "boolean",

View File

@@ -342,6 +342,401 @@ echo $response;
---
## List Agent Network access logs grouped by session {{ tag: 'GET' , label: '/api/agent-network/access-log-sessions' }}
<Row>
<Col>
Returns a paginated, server-side-filtered list of agent-network (LLM) access logs grouped by session. The page unit is a session (total_records counts sessions); each session carries an aggregate summary and its ordered entries. Requests the client sent no session id for each form their own singleton group. Accepts the same filters as the flat access-logs endpoint. Available only when the account has log collection enabled.
### Query Parameters
<Properties>
<Property name="page" type="integer" required={false}>
Page number for pagination (1-indexed).
</Property>
<Property name="page_size" type="integer" required={false}>
Number of sessions per page (max 100).
</Property>
<Property name="sort_by" type="string" required={false}>
Session-level field to sort by. "timestamp" is the session's last activity, "started_at" its first.
</Property>
<Property name="sort_order" type="string" required={false}>
Sort order (ascending or descending).
</Property>
<Property name="search" type="string" required={false}>
General search across log ID, host, path, model, and user email/name.
</Property>
<Property name="user_id" type="string" required={false}>
Filter by authenticated user ID.
</Property>
<Property name="session_id" type="string" required={false}>
Filter to a single conversation / coding session id.
</Property>
<Property name="group_id" type="array" required={false}>
Filter by authorising group id. Repeat for multiple (matches any).
</Property>
<Property name="provider_id" type="array" required={false}>
Filter by resolved provider id. Repeat for multiple (matches any).
</Property>
<Property name="model" type="array" required={false}>
Filter by model. Repeat for multiple (matches any).
</Property>
<Property name="decision" type="string" required={false}>
Filter by policy decision (e.g. allow, deny).
</Property>
<Property name="path" type="string" required={false}>
Filter by request path prefix (matches entries whose path starts with this value).
</Property>
<Property name="start_date" type="string" required={false}>
Filter by timestamp {'>='} start_date (RFC3339 format).
</Property>
<Property name="end_date" type="string" required={false}>
Filter by timestamp {'<='} end_date (RFC3339 format).
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/agent-network/access-log-sessions">
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/agent-network/access-log-sessions \
-H 'Accept: application/json' \
-H 'Authorization: Token <TOKEN>'
```
```js
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/agent-network/access-log-sessions',
headers: {
'Accept': 'application/json',
'Authorization': 'Token <TOKEN>'
}
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
```
```python
import requests
import json
url = "https://api.netbird.io/api/agent-network/access-log-sessions"
headers = {
'Accept': 'application/json',
'Authorization': 'Token <TOKEN>'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.netbird.io/api/agent-network/access-log-sessions"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Token <TOKEN>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
```
```ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.netbird.io/api/agent-network/access-log-sessions")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Token <TOKEN>"
response = https.request(request)
puts response.read_body
```
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api.netbird.io/api/agent-network/access-log-sessions")
.method("GET")
.addHeader("Accept", "application/json")
.addHeader("Authorization: Token <TOKEN>")
.build();
Response response = client.newCall(request).execute();
```
```php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.netbird.io/api/agent-network/access-log-sessions',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Token <TOKEN>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Example' }}
{
"data": [
{
"session_id": "019eeb72-ab7c-7cd2-aa05-6e8eb834afcb",
"user_id": {
"type": "string",
"description": "NetBird user id of the session's caller."
},
"group_ids": [
{
"type": "string"
}
],
"started_at": "2026-05-05T12:30:00Z",
"ended_at": "2026-05-05T12:34:56Z",
"request_count": 7,
"input_tokens": 8400,
"output_tokens": 4480,
"total_tokens": 12880,
"cost_usd": 0.1617,
"providers": [
{
"type": "string"
}
],
"models": [
{
"type": "string"
}
],
"decision": "allow",
"entries": [
{
"id": "ch8i4ug6lnn4g9hqv7m0",
"service_id": {
"type": "string",
"description": "ID of the synthesised agent-network service that handled the request."
},
"timestamp": "2026-05-05T12:34:56Z",
"status_code": 200,
"duration_ms": 850,
"user_id": {
"type": "string",
"description": "NetBird user id of the authenticated caller, if applicable."
},
"source_ip": {
"type": "string",
"description": "Source IP of the request. Empty when log collection is disabled."
},
"method": "POST",
"host": {
"type": "string",
"description": "Upstream host the request was routed to. Empty when log collection is disabled."
},
"path": {
"type": "string",
"description": "Request path. Empty when log collection is disabled."
},
"provider": "openai",
"model": "gpt-4o",
"session_id": "019eeb72-ab7c-7cd2-aa05-6e8eb834afcb",
"resolved_provider_id": {
"type": "string",
"description": "NetBird agent-network provider id that served the request."
},
"selected_policy_id": {
"type": "string",
"description": "Agent-network policy id that authorised (or denied) the request."
},
"decision": "allow",
"deny_reason": {
"type": "string",
"description": "Raw deny reason code when the request was blocked (e.g. llm_policy.token_cap_exceeded)."
},
"input_tokens": 1200,
"output_tokens": 640,
"total_tokens": 1840,
"cost_usd": 0.0231,
"stream": {
"type": "boolean",
"description": "Whether the request was a streaming completion."
},
"group_ids": [
{
"type": "string"
}
],
"request_prompt": {
"type": "string",
"description": "Captured request prompt. Present only when prompt collection is enabled."
},
"response_completion": {
"type": "string",
"description": "Captured response completion. Present only when prompt collection is enabled."
}
}
]
}
],
"page": 1,
"page_size": 50,
"total_records": 124,
"total_pages": 3
}
```
```json {{ title: 'Schema' }}
{
"data": [
{
"session_id": "string",
"user_id": "string",
"group_ids": [
"string"
],
"started_at": "string",
"ended_at": "string",
"request_count": "integer",
"input_tokens": "integer",
"output_tokens": "integer",
"total_tokens": "integer",
"cost_usd": "number",
"providers": [
"string"
],
"models": [
"string"
],
"decision": "string",
"entries": [
{
"id": "string",
"service_id": "string",
"timestamp": "string",
"status_code": "integer",
"duration_ms": "integer",
"user_id": "string",
"source_ip": "string",
"method": "string",
"host": "string",
"path": "string",
"provider": "string",
"model": "string",
"session_id": "string",
"resolved_provider_id": "string",
"selected_policy_id": "string",
"decision": "string",
"deny_reason": "string",
"input_tokens": "integer",
"output_tokens": "integer",
"total_tokens": "integer",
"cost_usd": "number",
"stream": "boolean",
"group_ids": [
"string"
],
"request_prompt": "string",
"response_completion": "string"
}
]
}
],
"page": "integer",
"page_size": "integer",
"total_records": "integer",
"total_pages": "integer"
}
```
</CodeGroup>
</Col>
</Row>
---
## Agent Network usage overview {{ tag: 'GET' , label: '/api/agent-network/usage/overview' }}
<Row>
@@ -3277,6 +3672,7 @@ echo $response;
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true,
"skip_tls_verification": false,
"created_at": "2026-04-26T10:30:00Z",
"updated_at": "2026-04-26T10:30:00Z"
}
@@ -3307,6 +3703,7 @@ echo $response;
"identity_header_user_id": "string",
"identity_header_groups": "string",
"enabled": "boolean",
"skip_tls_verification": "boolean",
"created_at": "string",
"updated_at": "string"
}
@@ -3403,6 +3800,11 @@ echo $response;
Whether the provider is enabled. Defaults to true on create.
</Property>
<Property name="skip_tls_verification" type="boolean" required={false}>
Skip upstream TLS certificate verification when the proxy dials this provider's URL. For self-hosted / internal gateways behind a private or self-signed certificate. Defaults to false. When omitted on update, the stored value is left unchanged.
</Property>
</Properties>
@@ -3434,7 +3836,8 @@ curl -X POST https://api.netbird.io/api/agent-network/providers \
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}'
```
@@ -3458,7 +3861,8 @@ let data = JSON.stringify({
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
});
let config = {
method: 'post',
@@ -3504,7 +3908,8 @@ payload = json.dumps({
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
})
headers = {
'Content-Type': 'application/json',
@@ -3550,7 +3955,8 @@ func main() {
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}`)
client := &http.Client {
}
@@ -3615,7 +4021,8 @@ request.body = JSON.dump({
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
})
response = https.request(request)
puts response.read_body
@@ -3643,7 +4050,8 @@ RequestBody body = RequestBody.create(mediaType, '{
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/agent-network/providers")
@@ -3687,7 +4095,8 @@ curl_setopt_array($curl, array(
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
@@ -3725,6 +4134,7 @@ echo $response;
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true,
"skip_tls_verification": false,
"created_at": "2026-04-26T10:30:00Z",
"updated_at": "2026-04-26T10:30:00Z"
}
@@ -3753,6 +4163,7 @@ echo $response;
"identity_header_user_id": "string",
"identity_header_groups": "string",
"enabled": "boolean",
"skip_tls_verification": "boolean",
"created_at": "string",
"updated_at": "string"
}
@@ -3951,6 +4362,7 @@ echo $response;
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true,
"skip_tls_verification": false,
"created_at": "2026-04-26T10:30:00Z",
"updated_at": "2026-04-26T10:30:00Z"
}
@@ -3979,6 +4391,7 @@ echo $response;
"identity_header_user_id": "string",
"identity_header_groups": "string",
"enabled": "boolean",
"skip_tls_verification": "boolean",
"created_at": "string",
"updated_at": "string"
}
@@ -4082,6 +4495,11 @@ echo $response;
Whether the provider is enabled. Defaults to true on create.
</Property>
<Property name="skip_tls_verification" type="boolean" required={false}>
Skip upstream TLS certificate verification when the proxy dials this provider's URL. For self-hosted / internal gateways behind a private or self-signed certificate. Defaults to false. When omitted on update, the stored value is left unchanged.
</Property>
</Properties>
@@ -4113,7 +4531,8 @@ curl -X PUT https://api.netbird.io/api/agent-network/providers/{providerId} \
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}'
```
@@ -4137,7 +4556,8 @@ let data = JSON.stringify({
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
});
let config = {
method: 'put',
@@ -4183,7 +4603,8 @@ payload = json.dumps({
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
})
headers = {
'Content-Type': 'application/json',
@@ -4229,7 +4650,8 @@ func main() {
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}`)
client := &http.Client {
}
@@ -4294,7 +4716,8 @@ request.body = JSON.dump({
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
})
response = https.request(request)
puts response.read_body
@@ -4322,7 +4745,8 @@ RequestBody body = RequestBody.create(mediaType, '{
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/agent-network/providers/{providerId}")
@@ -4366,7 +4790,8 @@ curl_setopt_array($curl, array(
},
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true
"enabled": true,
"skip_tls_verification": false
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
@@ -4404,6 +4829,7 @@ echo $response;
"identity_header_user_id": "x-bf-dim-netbird_user_id",
"identity_header_groups": "x-bf-dim-netbird_groups",
"enabled": true,
"skip_tls_verification": false,
"created_at": "2026-04-26T10:30:00Z",
"updated_at": "2026-04-26T10:30:00Z"
}
@@ -4432,6 +4858,7 @@ echo $response;
"identity_header_user_id": "string",
"identity_header_groups": "string",
"enabled": "boolean",
"skip_tls_verification": "boolean",
"created_at": "string",
"updated_at": "string"
}